當前位置: 首頁>>代碼示例>>Java>>正文


Java Path.compareTo方法代碼示例

本文整理匯總了Java中org.apache.hadoop.fs.Path.compareTo方法的典型用法代碼示例。如果您正苦於以下問題:Java Path.compareTo方法的具體用法?Java Path.compareTo怎麽用?Java Path.compareTo使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.apache.hadoop.fs.Path的用法示例。


在下文中一共展示了Path.compareTo方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: realPath

import org.apache.hadoop.fs.Path; //導入方法依賴的package包/類
/**
 * get rid of / in the beginning of path
 * @param p the path
 * @return return path without /
 */
private Path realPath(Path p, Path parent) {
  Path rootPath = new Path(Path.SEPARATOR);
  if (rootPath.compareTo(p) == 0) {
    return parent;
  }
  return new Path(parent, new Path(p.toString().substring(1)));
}
 
開發者ID:naver,項目名稱:hadoop,代碼行數:13,代碼來源:HadoopArchives.java

示例2: findJobByDestPath

import org.apache.hadoop.fs.Path; //導入方法依賴的package包/類
public CompactJob findJobByDestPath(Path destPath) {
  synchronized (syncJobsObj) {
    for (BasicJob job : jobs) {
      CompactJob fJob = (CompactJob) job;
      if (destPath.compareTo(fJob.tmpHDFSPath) == 0) {
        return fJob;
      }
    }
  }
  return null;
}
 
開發者ID:fengchen8086,項目名稱:ditb,代碼行數:12,代碼來源:CompactJobQueue.java

示例3: findJobByRawPath

import org.apache.hadoop.fs.Path; //導入方法依賴的package包/類
public FlushJob findJobByRawPath(Path rawPath) {
  FlushJob ret = null;
  synchronized (syncJobsObj) {
    for (BasicJob job : jobs) {
      FlushJob fJob = (FlushJob) job;
      if (rawPath.compareTo(fJob.rawHFilePath) == 0) {
        ret = fJob;
        break;
      }
    }
  }
  return ret;
}
 
開發者ID:fengchen8086,項目名稱:ditb,代碼行數:14,代碼來源:FlushJobQueue.java

示例4: findJobByDestPath

import org.apache.hadoop.fs.Path; //導入方法依賴的package包/類
public CompleteCompactionJob findJobByDestPath(Path destPath) {
  synchronized (syncJobsObj) {
    for (BasicJob job : jobs) {
      CompleteCompactionJob fJob = (CompleteCompactionJob) job;
      LOG.info("cur: " + fJob.hdfsPath.toString() + ", target: " + destPath.toString());
      if (destPath.compareTo(fJob.hdfsPath) == 0) {
        return fJob;
      }
    }
  }
  return null;
}
 
開發者ID:fengchen8086,項目名稱:ditb,代碼行數:13,代碼來源:CompleteCompactionJobQueue.java

示例5: findJobByDestPath

import org.apache.hadoop.fs.Path; //導入方法依賴的package包/類
public CommitJob findJobByDestPath(Path destPath) {
  synchronized (syncJobsObj) {
    for (BasicJob job : jobs) {
      CommitJob fJob = (CommitJob) job;
      if (destPath.compareTo(fJob.hdfsDestPath) == 0) {
        return fJob;
      }
    }
  }
  return null;
}
 
開發者ID:fengchen8086,項目名稱:ditb,代碼行數:12,代碼來源:CommitJobQueue.java


注:本文中的org.apache.hadoop.fs.Path.compareTo方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。