예제 #1
0
 public static Properties getHiveSchema(Partition partition, Table table) {
   // Mimics function in Hive: MetaStoreUtils.getSchema(Partition, Table)
   return getHiveSchema(
       partition.getStorage(),
       partition.getColumns(),
       table.getDataColumns(),
       table.getParameters(),
       table.getDatabaseName(),
       table.getTableName(),
       table.getPartitionColumns());
 }
예제 #2
0
 public static org.apache.hadoop.hive.metastore.api.Partition toMetastoreApiPartition(
     Partition partition) {
   org.apache.hadoop.hive.metastore.api.Partition result =
       new org.apache.hadoop.hive.metastore.api.Partition();
   result.setDbName(partition.getDatabaseName());
   result.setTableName(partition.getTableName());
   result.setValues(partition.getValues());
   result.setSd(
       makeStorageDescriptor(
           partition.getTableName(), partition.getColumns(), partition.getStorage()));
   result.setParameters(partition.getParameters());
   return result;
 }