本文整理了Java中org.apache.hadoop.hive.ql.metadata.Partition.getSortedPaths()
方法的一些代码示例,展示了Partition.getSortedPaths()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Partition.getSortedPaths()
方法的具体详情如下:
包路径:org.apache.hadoop.hive.ql.metadata.Partition
类名称:Partition
方法名:getSortedPaths
[英]get all paths for this partition in a sorted manner
[中]以排序方式获取此分区的所有路径
代码示例来源:origin: apache/drill
/**
* mapping from bucket number to bucket path
*/
// TODO: add test case and clean it up
@SuppressWarnings("nls")
public Path getBucketPath(int bucketNum) {
FileStatus srcs[] = getSortedPaths();
if (srcs == null) {
return null;
}
return srcs[bucketNum].getPath();
}
代码示例来源: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
partitions.get(0).getSortedPaths());
return null;
代码示例来源:origin: apache/drill
partitions.get(0).getSortedPaths());
return null;
代码示例来源:origin: com.facebook.presto.hive/hive-apache
/**
* mapping from bucket number to bucket path
*/
// TODO: add test case and clean it up
@SuppressWarnings("nls")
public Path getBucketPath(int bucketNum) {
FileStatus srcs[] = getSortedPaths();
if (srcs == null) {
return null;
}
return srcs[bucketNum].getPath();
}
代码示例来源:origin: com.facebook.presto.hive/hive-apache
partitions.get(0).getSortedPaths());
return null;
内容来源于网络,如有侵权,请联系作者删除!