org.apache.hadoop.hive.ql.metadata.Hive.dropPartition()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(6.3k)|赞(0)|评价(0)|浏览(203)

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

Hive.dropPartition介绍

[英]drop the partitions specified as directory names associated with the table.
[中]删除指定为与表关联的目录名的分区。

代码示例

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

public boolean dropPartition(String tblName, List<String> part_vals, boolean deleteData)
  throws HiveException {
 String[] names = Utilities.getDbTableName(tblName);
 return dropPartition(names[0], names[1], part_vals, deleteData);
}

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

for (Partition p : Iterables.filter(partitions,
  replicationSpec.allowEventReplacementInto())){
 db.dropPartition(tbl.getDbName(),tbl.getTableName(),p.getValues(),true);

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

public boolean dropPartition(String tblName, List<String> part_vals, boolean deleteData)
  throws HiveException {
 String[] names = Utilities.getDbTableName(tblName);
 return dropPartition(names[0], names[1], part_vals, deleteData);
}

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

db.getPartitionsByFilter(tbl, partSpec.getPartSpec().getExprString()),
 replicationSpec.allowEventReplacementInto())){
db.dropPartition(tbl.getDbName(),tbl.getTableName(),p.getValues(),true);

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

public boolean dropPartition(String db_name, String tbl_name,
  List<String> part_vals, boolean deleteData) throws HiveException {
 return dropPartition(db_name, tbl_name, part_vals,
            PartitionDropOptions.instance().deleteData(deleteData));
}

代码示例来源:origin: com.facebook.presto.hive/hive-apache

db.getPartitionsByFilter(tbl, partSpec.getPartSpec().getExprString()),
 replicationSpec.allowEventReplacementInto())){
db.dropPartition(tbl.getDbName(),tbl.getTableName(),p.getValues(),true);

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

public boolean dropPartition(String db_name, String tbl_name,
  List<String> part_vals, boolean deleteData) throws HiveException {
 return dropPartition(db_name, tbl_name, part_vals,
            PartitionDropOptions.instance().deleteData(deleteData));
}

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

assertNotNull("Newly created partition shouldn't be null!", partition);
hm.dropPartition(dbName, tableName,
  partition.getValues(),
  PartitionDropOptions.instance()

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

assertNotNull("Newly created partition shouldn't be null!", partition);
hm.dropPartition(dbName, tableName,
         partition.getValues(),
         PartitionDropOptions.instance()
assertNotNull("Newly created partition shouldn't be null!", partition);
hm.dropPartition(dbName, tableName,
         partition.getValues(),
         PartitionDropOptions.instance()

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

db.dropPartition(tbl.getDbName(),tbl.getTableName(),p.getValues(),true);

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

db.dropPartition(tbl.getDbName(),tbl.getTableName(),p.getValues(),true);

代码示例来源:origin: com.facebook.presto.hive/hive-apache

public boolean dropPartition(String tblName, List<String> part_vals, boolean deleteData)
  throws HiveException {
 String[] names = Utilities.getDbTableName(tblName);
 return dropPartition(names[0], names[1], part_vals, deleteData);
}

代码示例来源:origin: com.facebook.presto.hive/hive-apache

public boolean dropPartition(String db_name, String tbl_name,
  List<String> part_vals, boolean deleteData) throws HiveException {
 return dropPartition(db_name, tbl_name, part_vals,
            PartitionDropOptions.instance().deleteData(deleteData));
}

代码示例来源:origin: org.apache.hadoop.hive/hive-exec

public boolean dropPartition(String tblName, List<String> part_vals, boolean deleteData)
throws HiveException {
 Table t = newTable(tblName);
 return dropPartition(t.getDbName(), t.getTableName(), part_vals, deleteData);
}

代码示例来源:origin: org.apache.lens/lens-cube

private void loadTimelinesFromAllPartitions(String storageTableName, String timeLineKey)
 throws HiveException, LensException {
 // Then add all existing partitions for batch addition in respective timelines.
 Table storageTable = getTable(storageTableName);
 List<String> timeParts = getTimePartColNamesOfTable(storageTable);
 List<FieldSchema> partCols = storageTable.getPartCols();
 for (Partition partition : getPartitionsByFilter(storageTableName, null)) {
  UpdatePeriod period = deduceUpdatePeriod(partition);
  List<String> values = partition.getValues();
  if (values.contains(StorageConstants.LATEST_PARTITION_VALUE)) {
   log.info("dropping latest partition from fact storage table: {}. Spec: {}", storageTableName,
    partition.getSpec());
   getClient().dropPartition(storageTableName, values, false);
   continue;
  }
  for (int i = 0; i < partCols.size(); i++) {
   if (timeParts.contains(partCols.get(i).getName())) {
    addForBatchAddition(timeLineKey, storageTableName, period, partCols.get(i).getName(), values.get(i));
   }
  }
 }
}

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

private void loadTimelinesFromAllPartitions(String storageTableName, String timeLineKey)
 throws HiveException, LensException {
 // Then add all existing partitions for batch addition in respective timelines.
 Table storageTable = getTable(storageTableName);
 List<String> timeParts = getTimePartColNamesOfTable(storageTable);
 List<FieldSchema> partCols = storageTable.getPartCols();
 for (Partition partition : getPartitionsByFilter(storageTableName, null)) {
  UpdatePeriod period = deduceUpdatePeriod(partition);
  List<String> values = partition.getValues();
  if (values.contains(StorageConstants.LATEST_PARTITION_VALUE)) {
   log.info("dropping latest partition from fact storage table: {}. Spec: {}", storageTableName,
    partition.getSpec());
   getClient().dropPartition(storageTableName, values, false);
   continue;
  }
  for (int i = 0; i < partCols.size(); i++) {
   if (timeParts.contains(partCols.get(i).getName())) {
    addForBatchAddition(timeLineKey, storageTableName, period, partCols.get(i).getName(), values.get(i));
   }
  }
 }
}

代码示例来源:origin: org.apache.lens/lens-cube

client.dropPartition(storageTbl.getTableName(), latest.get(0).getValues(), false);

代码示例来源:origin: org.apache.lens/lens-cube

boolean success = false;
try {
 client.dropPartition(storageTableName, partVals, false);
 String dbName = SessionState.get().getCurrentDatabase();
 Table storageTbl = client.getTable(storageTableName);
    client.dropPartition(storageTbl.getTableName(), latestParts.get(0).getValues(), false);

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

boolean success = false;
try {
 client.dropPartition(storageTableName, partVals, false);
 String dbName = SessionState.get().getCurrentDatabase();
 Table storageTbl = client.getTable(storageTableName);
    client.dropPartition(storageTbl.getTableName(), latestParts.get(0).getValues(), false);

代码示例来源:origin: com.facebook.presto.hive/hive-apache

db.dropPartition(tbl.getDbName(),tbl.getTableName(),p.getValues(),true);

相关文章

Hive类方法