Examples of filelength()


Examples of com.alimama.mdrill.hdfsDirectory.FileSystemDirectory.fileLength()

        Configuration conf = getConf();
        Path p=this.hdfsLinks.get(name);
       
        try {
        FileSystemDirectory dir=new FileSystemDirectory(FileSystem.get(conf), p.getParent(), false, conf);
        return dir.fileLength(p.getName());
      } catch (IOException e) {
        SolrCore.log.error("hdfs",e);
      }
      }
   
View Full Code Here

Examples of com.alimama.mdrill.solr.hbaserealtime.DirectoryInfo.filelength()

  public void maybeMerger()
  {
    DirectoryInfo buffer=bufferDirector.get(RAM_KEY);
    if(buffer!=null)
    {
      if(buffer.filelength()>=UniqConfig.RealTimeBufferSize()||(buffer.createtime+bufferdely)<System.currentTimeMillis())
      {
        try {
          this.mergerBuffer(null);
        } catch (Throwable e) {
          LOG.error("mayBeMerger_buffer",e);
View Full Code Here

Examples of com.alimama.mdrill.solr.hbaserealtime.DirectoryInfo.filelength()

    DirectoryInfo ram=this.RamDirector.get(RAM_KEY);
    if(ram!=null)
    {
      if((debugIndex++)%10==1)
      {
        LOG.info("####ramsize####"+ram.filelength()+","+UniqConfig.RealTimeRamSize()+","+debugIndex);
        if(debugIndex>100000000)
        {
          debugIndex=0;
        }
      }
View Full Code Here

Examples of com.alimama.mdrill.solr.hbaserealtime.DirectoryInfo.filelength()

        {
          debugIndex=0;
        }
      }

      if(ram.filelength()>=UniqConfig.RealTimeRamSize()||(ram.createtime+ramdelay)<System.currentTimeMillis())
      {
        try {
          this.mergerRam(null);
        } catch (Throwable e) {
          LOG.error("mayBeMerger_ram",e);
View Full Code Here

Examples of com.alimama.mdrill.solr.realtime.DirectoryInfo.filelength()

  public void maybeMerger()
  {
    DirectoryInfo buffer=bufferDirector.get(RAM_KEY);
    if(buffer!=null)
    {
      if(buffer.filelength()>=UniqConfig.RealTimeBufferSize()||(buffer.createtime+bufferdely)<System.currentTimeMillis())
      {
        try {
          this.mergerBuffer(null);
        } catch (Throwable e) {
          LOG.error("mayBeMerger_buffer",e);
View Full Code Here

Examples of com.alimama.mdrill.solr.realtime.DirectoryInfo.filelength()

    DirectoryInfo ram=this.RamDirector.get(RAM_KEY);
    if(ram!=null)
    {
      if((debugIndex++)%10==1)
      {
        LOG.info("####ramsize####"+ram.filelength()+","+UniqConfig.RealTimeRamSize()+","+debugIndex);
        if(debugIndex>100000000)
        {
          debugIndex=0;
        }
      }
View Full Code Here

Examples of com.alimama.mdrill.solr.realtime.DirectoryInfo.filelength()

        {
          debugIndex=0;
        }
      }

      if(ram.filelength()>=UniqConfig.RealTimeRamSize()||(ram.createtime+ramdelay)<System.currentTimeMillis())
      {
        try {
          this.mergerRam(null);
        } catch (Throwable e) {
          LOG.error("mayBeMerger_ram",e);
View Full Code Here

Examples of org.apache.lucene.store.CompoundFileDirectory.fileLength()

      String [] files = cfr.listAll();
      ArrayUtil.mergeSort(files);   // sort the array of filename so that the output is more readable

      for (int i = 0; i < files.length; ++i) {
        long len = cfr.fileLength(files[i]);

        if (extract) {
          System.out.println("extract " + files[i] + " with " + len + " bytes to local directory...");
          IndexInput ii = cfr.openInput(files[i], context);
View Full Code Here

Examples of org.apache.lucene.store.Directory.fileLength()

      try {
        Directory dir = (Directory) index;
        int size = 0;
        String[] fileNames = dir.list();
        for (int i=0; i < fileNames.length; i++) {
          size += dir.fileLength(fileNames[i]);
        }
        return size;
      }
      catch (IOException e) { // can never happen (RAMDirectory)
        throw new RuntimeException(e);
View Full Code Here

Examples of org.apache.lucene.store.Directory.fileLength()

      bw.write(" <files count='" + dir.listAll().length + "'>\n");
      String[] files = dir.listAll();
      Arrays.sort(files);
      for (String file : files) {
        bw.write("  <file name='" + file +
            "' size='" + dir.fileLength(file) +
            "' func='" + IndexGate.getFileFunction(file) + "'/>\n");
      }
      bw.write(" </files>\n");
      List<IndexCommit> commits = DirectoryReader.listCommits(dir);
      bw.write(" <commits count='" + commits.size() + "'>\n");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.