Package com.alimama.mdrill.utils

Examples of com.alimama.mdrill.utils.TryLockFile


  }
 
  public static RefCounted<SolrIndexSearcher> getSearch(SolrQueryRequest req,String tablename) throws IOException
  {
    String path=null;
    TryLockFile lock=null;
    try{
      lock=new TryLockFile(HigoJoinUtils.pathForLock(req, tablename));
      lock.trylock();
      path=pathToLocal(req, tablename);
    }finally{
      if(lock!=null)
      {
        lock.unlock();
      }
    }
    LOG.info("###joinpath###"+path);
    return req.getCore().getSearcherByPath(null,"join@"+SolrResourceLoader.getCacheFlushKey(null)+"@"+String.valueOf(path), path, false, false, false);
  }
View Full Code Here


    }
   
    String lockPathBase=stormhome+"/lock";
    File file = new File(lockPathBase);
    file.mkdirs();
    flock=new TryLockFile(lockPathBase+"/"+tablename);

  }
View Full Code Here

    }
   
    String lockPathBase=stormhome+"/lock";
    File file = new File(lockPathBase);
    file.mkdirs();
    TryLockFile flock=new TryLockFile(lockPathBase+"/"+lockname);
    flock.trylock();
    long ts=System.currentTimeMillis();
    execute(ts,path,issend);
   
    flock.unlock();
  }
View Full Code Here

    }
   
    String lockPathBase=stormhome+"/lock";
    File file = new File(lockPathBase);
    file.mkdirs();
    TryLockFile flock=new TryLockFile(lockPathBase+"/"+lockname);
    flock.trylock();
    long ts=System.currentTimeMillis();
    execute(ts,path,issend);
   
    flock.unlock();
  }
View Full Code Here

    }
   
    String lockPathBase=stormhome+"/lock";
    File file = new File(lockPathBase);
    file.mkdirs();
    TryLockFile flock=new TryLockFile(lockPathBase+"/"+lockname);
    flock.trylock();
    long ts=System.currentTimeMillis();
    execute(ts,path,issend);
   
    flock.unlock();
  }
View Full Code Here

    }
   
    String lockPathBase=stormhome+"/lock";
    File file = new File(lockPathBase);
    file.mkdirs();
    TryLockFile flock=new TryLockFile(lockPathBase+"/"+lockname);
   
    flock.trylock();
   
    execute(path);
   
    flock.unlock();
  }
View Full Code Here

TOP

Related Classes of com.alimama.mdrill.utils.TryLockFile

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.