本文整理了Java中org.apache.hadoop.hive.ql.metadata.Hive.compact2()
方法的一些代码示例,展示了Hive.compact2()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Hive.compact2()
方法的具体详情如下:
包路径:org.apache.hadoop.hive.ql.metadata.Hive
类名称:Hive
方法名:compact2
[英]Enqueue a compaction request. Only 1 compaction for a given resource (db/table/partSpec) can be scheduled/running at any given time.
[中]
代码示例来源:origin: apache/drill
/**
* @deprecated use {@link #compact2(String, String, String, String, Map)}
*/
public void compact(String dbname, String tableName, String partName, String compactType,
Map<String, String> tblproperties) throws HiveException {
compact2(dbname, tableName, partName, compactType, tblproperties);
}
/**
代码示例来源:origin: apache/hive
/**
* @deprecated use {@link #compact2(String, String, String, String, Map)}
*/
@Deprecated
public void compact(String dbname, String tableName, String partName, String compactType,
Map<String, String> tblproperties) throws HiveException {
compact2(dbname, tableName, partName, compactType, tblproperties);
}
/**
代码示例来源:origin: apache/hive
private static void scheduleCompaction(Table t, Partition p, Hive db,
CompactionMetaInfo compactionMetaInfo) throws HiveException, MetaException {
String partName = p == null ? null :
Warehouse.makePartName(t.getPartitionKeys(), p.getValues());
CompactionResponse resp =
//this gives an easy way to get at compaction ID so we can only wait for those this
//utility started
db.compact2(t.getDbName(), t.getTableName(), partName, "major", null);
if(!resp.isAccepted()) {
LOG.info(Warehouse.getQualifiedName(t) + (p == null ? "" : "/" + partName) +
" is already being compacted with id=" + resp.getId());
}
else {
LOG.info("Scheduled compaction for " + Warehouse.getQualifiedName(t) +
(p == null ? "" : "/" + partName) + " with id=" + resp.getId());
}
compactionMetaInfo.compactionIds.add(resp.getId());
}
代码示例来源:origin: apache/hive
CompactionResponse resp = db.compact2(tbl.getDbName(), tbl.getTableName(), partName,
desc.getCompactionType(), desc.getProps());
if(resp.isAccepted()) {
代码示例来源:origin: apache/drill
CompactionResponse resp = db.compact2(tbl.getDbName(), tbl.getTableName(), partName,
desc.getCompactionType(), desc.getProps());
if(resp.isAccepted()) {
代码示例来源:origin: org.apache.hive/hive-upgrade-acid
private static void scheduleCompaction(Table t, Partition p, Hive db,
CompactionMetaInfo compactionMetaInfo) throws HiveException, MetaException {
String partName = p == null ? null :
Warehouse.makePartName(t.getPartitionKeys(), p.getValues());
CompactionResponse resp =
//this gives an easy way to get at compaction ID so we can only wait for those this
//utility started
db.compact2(t.getDbName(), t.getTableName(), partName, "major", null);
if(!resp.isAccepted()) {
LOG.info(Warehouse.getQualifiedName(t) + (p == null ? "" : "/" + partName) +
" is already being compacted with id=" + resp.getId());
}
else {
LOG.info("Scheduled compaction for " + Warehouse.getQualifiedName(t) +
(p == null ? "" : "/" + partName) + " with id=" + resp.getId());
}
compactionMetaInfo.compactionIds.add(resp.getId());
}
/**
内容来源于网络,如有侵权,请联系作者删除!