本文整理了Java中org.apache.hadoop.hive.ql.metadata.Partition.createMetaPartitionObject()
方法的一些代码示例,展示了Partition.createMetaPartitionObject()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Partition.createMetaPartitionObject()
方法的具体详情如下:
包路径:org.apache.hadoop.hive.ql.metadata.Partition
类名称:Partition
方法名:createMetaPartitionObject
暂无
代码示例来源:origin: apache/hive
/**
* Create partition object with the given info.
*
* @param tbl
* Table the partition will be in.
* @param partSpec
* Partition specifications.
* @param location
* Location of the partition, relative to the table.
* @throws HiveException
* Thrown if we could not create the partition.
*/
public Partition(Table tbl, Map<String, String> partSpec, Path location) throws HiveException {
initialize(tbl, createMetaPartitionObject(tbl, partSpec, location));
}
代码示例来源:origin: apache/drill
/**
* Create partition object with the given info.
*
* @param tbl
* Table the partition will be in.
* @param partSpec
* Partition specifications.
* @param location
* Location of the partition, relative to the table.
* @throws HiveException
* Thrown if we could not create the partition.
*/
public Partition(Table tbl, Map<String, String> partSpec, Path location) throws HiveException {
initialize(tbl, createMetaPartitionObject(tbl, partSpec, location));
}
代码示例来源:origin: apache/drill
/**
* Creates a partition.
*
* @param tbl
* table for which partition needs to be created
* @param partSpec
* partition keys and their values
* @return created partition object
* @throws HiveException
* if table doesn't exist or partition already exists
*/
public Partition createPartition(Table tbl, Map<String, String> partSpec) throws HiveException {
try {
return new Partition(tbl, getMSC().add_partition(
Partition.createMetaPartitionObject(tbl, partSpec, null)));
} catch (Exception e) {
LOG.error(StringUtils.stringifyException(e));
throw new HiveException(e);
}
}
代码示例来源:origin: apache/hive
/**
* Creates a partition.
*
* @param tbl
* table for which partition needs to be created
* @param partSpec
* partition keys and their values
* @return created partition object
* @throws HiveException
* if table doesn't exist or partition already exists
*/
@VisibleForTesting
public Partition createPartition(Table tbl, Map<String, String> partSpec) throws HiveException {
try {
org.apache.hadoop.hive.metastore.api.Partition part =
Partition.createMetaPartitionObject(tbl, partSpec, null);
AcidUtils.TableSnapshot tableSnapshot = AcidUtils.getTableSnapshot(conf, tbl);
part.setWriteId(tableSnapshot != null ? tableSnapshot.getWriteId() : 0);
return new Partition(tbl, getMSC().add_partition(part));
} catch (Exception e) {
LOG.error(StringUtils.stringifyException(e));
throw new HiveException(e);
}
}
代码示例来源:origin: apache/hive
Partition.createMetaPartitionObject(tbl, addSpec.getPartSpec(), location);
if (addSpec.getPartParams() != null) {
part.setParameters(addSpec.getPartParams());
代码示例来源:origin: apache/drill
Partition.createMetaPartitionObject(tbl, addSpec.getPartSpec(), location);
if (addSpec.getPartParams() != null) {
part.setParameters(addSpec.getPartParams());
代码示例来源:origin: com.facebook.presto.hive/hive-apache
/**
* Create partition object with the given info.
*
* @param tbl
* Table the partition will be in.
* @param partSpec
* Partition specifications.
* @param location
* Location of the partition, relative to the table.
* @throws HiveException
* Thrown if we could not create the partition.
*/
public Partition(Table tbl, Map<String, String> partSpec, Path location) throws HiveException {
initialize(tbl, createMetaPartitionObject(tbl, partSpec, location));
}
代码示例来源:origin: com.facebook.presto.hive/hive-apache
/**
* Creates a partition.
*
* @param tbl
* table for which partition needs to be created
* @param partSpec
* partition keys and their values
* @return created partition object
* @throws HiveException
* if table doesn't exist or partition already exists
*/
public Partition createPartition(Table tbl, Map<String, String> partSpec) throws HiveException {
try {
return new Partition(tbl, getMSC().add_partition(
Partition.createMetaPartitionObject(tbl, partSpec, null)));
} catch (Exception e) {
LOG.error(StringUtils.stringifyException(e));
throw new HiveException(e);
}
}
代码示例来源:origin: com.facebook.presto.hive/hive-apache
Partition.createMetaPartitionObject(tbl, addSpec.getPartSpec(), location);
if (addSpec.getPartParams() != null) {
part.setParameters(addSpec.getPartParams());
内容来源于网络,如有侵权,请联系作者删除!