本文整理匯總了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)));
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}