本文整理汇总了Java中org.apache.hadoop.hive.metastore.api.Partition.getValues方法的典型用法代码示例。如果您正苦于以下问题:Java Partition.getValues方法的具体用法?Java Partition.getValues怎么用?Java Partition.getValues使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.hadoop.hive.metastore.api.Partition
的用法示例。
在下文中一共展示了Partition.getValues方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: HivePartition
import org.apache.hadoop.hive.metastore.api.Partition; //导入方法依赖的package包/类
public HivePartition(Partition partition) {
if (partition == null) {
return;
}
this.partition = partition;
this.values = partition.getValues();
this.tableName = partition.getTableName();
this.dbName = partition.getDbName();
this.createTime = partition.getCreateTime();
this.lastAccessTime = partition.getLastAccessTime();
this.sd = new StorageDescriptorWrapper(partition.getSd());
this.parameters = partition.getParameters();
}
示例2: getPartitions
import org.apache.hadoop.hive.metastore.api.Partition; //导入方法依赖的package包/类
private static List<PartitionValue> getPartitions(Table table, Partition partition) {
if(partition == null){
return Collections.emptyList();
}
final List<String> partitionValues = partition.getValues();
final List<PartitionValue> output = Lists.newArrayList();
final List<FieldSchema> partitionKeys = table.getPartitionKeys();
for(int i =0; i < partitionKeys.size(); i++){
PartitionValue value = getPartitionValue(partitionKeys.get(i), partitionValues.get(i));
if(value != null){
output.add(value);
}
}
return output;
}
示例3: partitionName
import org.apache.hadoop.hive.metastore.api.Partition; //导入方法依赖的package包/类
private static String partitionName(Table table, Partition partition) {
try {
return Warehouse.makePartName(table.getPartitionKeys(), partition.getValues());
} catch (MetaException e) {
throw new CircusTrainException("Unable to build partition name for partition values "
+ partition.getValues()
+ " of table "
+ Warehouse.getQualifiedName(table), e);
}
}
示例4: partitionToString
import org.apache.hadoop.hive.metastore.api.Partition; //导入方法依赖的package包/类
private String partitionToString(Partition partition) {
return "Partition values: " + partition.getValues();
}