org.apache.hadoop.hive.metastore.api.Partition.getValuesSize()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(4.6k)|赞(0)|评价(0)|浏览(83)

本文整理了Java中org.apache.hadoop.hive.metastore.api.Partition.getValuesSize()方法的一些代码示例,展示了Partition.getValuesSize()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Partition.getValuesSize()方法的具体详情如下:
包路径:org.apache.hadoop.hive.metastore.api.Partition
类名称:Partition
方法名:getValuesSize

Partition.getValuesSize介绍

暂无

代码示例

代码示例来源:origin: apache/hive

private static Map<String, String> getPtnDesc(Table t, Partition p) {
 assertEquals(t.getPartitionKeysSize(),p.getValuesSize());
 Map<String,String> retval = new HashMap<String,String>();
 Iterator<String> pval = p.getValuesIterator();
 for (FieldSchema fs : t.getPartitionKeys()){
  retval.put(fs.getName(),pval.next());
 }
 return retval;
}

代码示例来源:origin: apache/hive

HCatPartition(HCatTable hcatTable, Partition partition) throws HCatException {
 this.hcatTable = hcatTable;
 this.tableName = partition.getTableName();
 this.dbName = partition.getDbName();
 this.createTime = partition.getCreateTime();
 this.lastAccessTime = partition.getLastAccessTime();
 this.parameters = partition.getParameters();
 this.values = partition.getValues();
 if (hcatTable != null && partition.getValuesSize() != hcatTable.getPartCols().size()) {
  throw new HCatException("Mismatched number of partition columns between table:" + hcatTable.getDbName() + "." + hcatTable.getTableName()
              + " and partition " + partition.getValues());
 }
 this.sd = partition.getSd();
 this.columns = getColumns(this.sd);
}

代码示例来源:origin: apache/hive

for (int i=0; i<composingSpec.getPartitions().size(); i++) {
 Partition partition = composingSpec.getPartitions().get(i);
 Assert.assertEquals(2, partition.getValuesSize());
 validateList(expectedVals.get(i), partition.getValues());
 Assert.assertNull("parameters were not requested so should have been null",

代码示例来源:origin: apache/hive

fetched =
  client.getPartition(DEFAULT_DATABASE_NAME, tableName, Collections.singletonList("b3"));
Assert.assertEquals(1, fetched.getValuesSize());
Assert.assertEquals("b3", fetched.getValues().get(0));

代码示例来源:origin: apache/hive

Assert.assertEquals(1, created.getValuesSize());
Assert.assertEquals("a1", created.getValues().get(0));
Partition fetched =
Assert.assertEquals(1, created.getValuesSize());
Assert.assertEquals("a2", created.getValues().get(0));
fetched = client.getPartition(catName, dbName, tableName, Collections.singletonList("a2"));

代码示例来源:origin: org.apache.hive.hcatalog/hive-webhcat-java-client

HCatPartition(HCatTable hcatTable, Partition partition) throws HCatException {
 this.hcatTable = hcatTable;
 this.tableName = partition.getTableName();
 this.dbName = partition.getDbName();
 this.createTime = partition.getCreateTime();
 this.lastAccessTime = partition.getLastAccessTime();
 this.parameters = partition.getParameters();
 this.values = partition.getValues();
 if (hcatTable != null && partition.getValuesSize() != hcatTable.getPartCols().size()) {
  throw new HCatException("Mismatched number of partition columns between table:" + hcatTable.getDbName() + "." + hcatTable.getTableName()
              + " and partition " + partition.getValues());
 }
 this.sd = partition.getSd();
 this.columns = getColumns(this.sd);
}

代码示例来源:origin: com.github.hyukjinkwon.hcatalog/hive-webhcat-java-client

HCatPartition(HCatTable hcatTable, Partition partition) throws HCatException {
 this.hcatTable = hcatTable;
 this.tableName = partition.getTableName();
 this.dbName = partition.getDbName();
 this.createTime = partition.getCreateTime();
 this.lastAccessTime = partition.getLastAccessTime();
 this.parameters = partition.getParameters();
 this.values = partition.getValues();
 if (hcatTable != null && partition.getValuesSize() != hcatTable.getPartCols().size()) {
  throw new HCatException("Mismatched number of partition columns between table:" + hcatTable.getDbName() + "." + hcatTable.getTableName()
              + " and partition " + partition.getValues());
 }
 this.sd = partition.getSd();
 this.columns = getColumns(this.sd);
}

代码示例来源:origin: org.spark-project.hive.hcatalog/hive-webhcat-java-client

HCatPartition(HCatTable hcatTable, Partition partition) throws HCatException {
 this.hcatTable = hcatTable;
 this.tableName = partition.getTableName();
 this.dbName = partition.getDbName();
 this.createTime = partition.getCreateTime();
 this.lastAccessTime = partition.getLastAccessTime();
 this.parameters = partition.getParameters();
 this.values = partition.getValues();
 if (hcatTable != null && partition.getValuesSize() != hcatTable.getPartCols().size()) {
  throw new HCatException("Mismatched number of partition columns between table:" + hcatTable.getDbName() + "." + hcatTable.getTableName()
              + " and partition " + partition.getValues());
 }
 this.sd = partition.getSd();
 this.columns = getColumns(this.sd);
}

相关文章

微信公众号

最新文章

更多

Partition类方法