本文整理了Java中org.apache.hadoop.hive.ql.exec.Utilities.getBucketIdFromFile()
方法的一些代码示例,展示了Utilities.getBucketIdFromFile()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utilities.getBucketIdFromFile()
方法的具体详情如下:
包路径:org.apache.hadoop.hive.ql.exec.Utilities
类名称:Utilities
方法名:getBucketIdFromFile
暂无
代码示例来源:origin: apache/hive
public static int parseSplitBucket(InputSplit split) {
if (split instanceof FileSplit) {
return getBucketIdFromFile(((FileSplit) split).getPath().getName());
}
// cannot get this for combined splits
return -1;
}
代码示例来源:origin: apache/drill
public static int parseSplitBucket(InputSplit split) {
if (split instanceof FileSplit) {
return getBucketIdFromFile(((FileSplit) split).getPath().getName());
}
// cannot get this for combined splits
return -1;
}
代码示例来源:origin: apache/hive
/**
* mapping from bucket number to bucket path
*/
// TODO: add test case and clean it up
@SuppressWarnings("nls")
public Path getBucketPath(int bucketNum) {
// Note: this makes assumptions that won't work with MM tables, unions, etc.
FileStatus srcs[] = getSortedPaths();
if (srcs == null) {
return null;
}
// Compute bucketid from srcs and return the 1st match.
for (FileStatus src : srcs) {
String bucketName = src.getPath().getName();
String bucketIdStr = Utilities.getBucketFileNameFromPathSubString(bucketName);
int bucketId = Utilities.getBucketIdFromFile(bucketIdStr);
if (bucketId == bucketNum) {
// match, return
return src.getPath();
}
}
return null;
}
代码示例来源:origin: apache/hive
int bucketId = Utilities.getBucketIdFromFile(bucketIdStr);
if (bucketId == -1) {
fallback = true;
代码示例来源:origin: apache/hive
int bucketId = Utilities.getBucketIdFromFile(bucketIdStr);
LOG.debug("bucket ID for file " + oneSrc.getPath() + " = " + bucketId
+ " for table " + table.getFullyQualifiedName());
内容来源于网络,如有侵权,请联系作者删除!