本文整理了Java中org.apache.hadoop.hive.ql.metadata.Hive.loadPartition()
方法的一些代码示例,展示了Hive.loadPartition()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Hive.loadPartition()
方法的具体详情如下:
包路径:org.apache.hadoop.hive.ql.metadata.Hive
类名称:Hive
方法名:loadPartition
[英]Load a directory into a Hive Table Partition - Alters existing content of the partition with the contents of loadPath. - If he partition does not exist - one is created - files in loadPath are moved into Hive. But the directory itself is not removed.
[中]将目录加载到配置单元表分区-使用loadPath的内容更改分区的现有内容。-如果分区不存在,则创建一个分区,加载路径中的文件将移动到配置单元中。但目录本身并没有被删除。
代码示例来源:origin: apache/drill
public void loadPartition(Path loadPath, String tableName,
Map<String, String> partSpec, boolean replace,
boolean inheritTableSpecs, boolean isSkewedStoreAsSubdir,
boolean isSrcLocal, boolean isAcid, boolean hasFollowingStatsTask) throws HiveException {
Table tbl = getTable(tableName);
loadPartition(loadPath, tbl, partSpec, replace, inheritTableSpecs,
isSkewedStoreAsSubdir, isSrcLocal, isAcid, hasFollowingStatsTask);
}
代码示例来源:origin: apache/drill
tbd.getPartitionSpec());
db.validatePartitionNameCharacters(partVals);
db.loadPartition(tbd.getSourcePath(), tbd.getTable().getTableName(),
tbd.getPartitionSpec(), tbd.getReplace(),
tbd.getInheritTableSpecs(), isSkewedStoredAsDirs(tbd), work.isSrcLocal(),
代码示例来源:origin: apache/hive
private DataContainer handleStaticParts(Hive db, Table table, LoadTableDesc tbd,
TaskInformation ti) throws HiveException, IOException, InvalidOperationException {
List<String> partVals = MetaStoreUtils.getPvals(table.getPartCols(), tbd.getPartitionSpec());
db.validatePartitionNameCharacters(partVals);
if (Utilities.FILE_OP_LOGGER.isTraceEnabled()) {
Utilities.FILE_OP_LOGGER.trace("loadPartition called from " + tbd.getSourcePath()
+ " into " + tbd.getTable().getTableName());
}
db.loadPartition(tbd.getSourcePath(), db.getTable(tbd.getTable().getTableName()),
tbd.getPartitionSpec(), tbd.getLoadFileType(), tbd.getInheritTableSpecs(),
tbd.getInheritLocation(), isSkewedStoredAsDirs(tbd), work.isSrcLocal(),
work.getLoadTableWork().getWriteType() != AcidUtils.Operation.NOT_ACID &&
!tbd.isMmTable(),
resetStatisticsProps(table), tbd.getWriteId(), tbd.getStmtId(),
tbd.isInsertOverwrite());
Partition partn = db.getPartition(table, tbd.getPartitionSpec(), false);
// See the comment inside updatePartitionBucketSortColumns.
if (!tbd.isMmTable() && (ti.bucketCols != null || ti.sortCols != null)) {
updatePartitionBucketSortColumns(db, table, partn, ti.bucketCols,
ti.numBuckets, ti.sortCols);
}
DataContainer dc = new DataContainer(table.getTTable(), partn.getTPartition());
// add this partition to post-execution hook
if (work.getOutputs() != null) {
DDLTask.addIfAbsentByName(new WriteEntity(partn,
getWriteType(tbd, work.getLoadTableWork().getWriteType())), work.getOutputs());
}
return dc;
}
代码示例来源:origin: com.facebook.presto.hive/hive-apache
public void loadPartition(Path loadPath, String tableName,
Map<String, String> partSpec, boolean replace, boolean holdDDLTime,
boolean inheritTableSpecs, boolean isSkewedStoreAsSubdir,
boolean isSrcLocal, boolean isAcid) throws HiveException {
Table tbl = getTable(tableName);
loadPartition(loadPath, tbl, partSpec, replace, holdDDLTime, inheritTableSpecs,
isSkewedStoreAsSubdir, isSrcLocal, isAcid);
}
代码示例来源:origin: org.apache.hadoop.hive/hive-exec
loadPartition(partPath, tableName, fullPartSpec, replace, holdDDLTime);
LOG.info("New loading path = " + partPath + " with partSpec " + fullPartSpec);
代码示例来源:origin: com.facebook.presto.hive/hive-apache
Partition newPartition = loadPartition(partPath, tbl, fullPartSpec, replace,
holdDDLTime, true, listBucketingEnabled, false, isAcid);
partitionsMap.put(fullPartSpec, newPartition);
代码示例来源:origin: org.apache.hadoop.hive/hive-exec
db.loadPartition(new Path(tbd.getSourceDir()), tbd.getTable().getTableName(),
tbd.getPartitionSpec(), tbd.getReplace(), tbd.getHoldDDLTime());
Partition partn = db.getPartition(table, tbd.getPartitionSpec(), false);
代码示例来源:origin: com.facebook.presto.hive/hive-apache
tbd.getPartitionSpec());
db.validatePartitionNameCharacters(partVals);
db.loadPartition(tbd.getSourcePath(), tbd.getTable().getTableName(),
tbd.getPartitionSpec(), tbd.getReplace(), tbd.getHoldDDLTime(),
tbd.getInheritTableSpecs(), isSkewedStoredAsDirs(tbd), work.isSrcLocal(),
内容来源于网络,如有侵权,请联系作者删除!