Skip to content

Commit e132828

Browse files
committed
remove SKIP_DROP_PARTITION check in BaseMetaStoreClient
1 parent d4ff81b commit e132828

3 files changed

Lines changed: 3 additions & 12 deletions

File tree

iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergMetaHook.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
import org.apache.hadoop.hive.metastore.api.SerDeInfo;
5555
import org.apache.hadoop.hive.metastore.api.StorageDescriptor;
5656
import org.apache.hadoop.hive.metastore.api.hive_metastoreConstants;
57-
import org.apache.hadoop.hive.metastore.client.BaseMetaStoreClient;
57+
import org.apache.hadoop.hive.metastore.client.ThriftHiveMetaStoreClient;
5858
import org.apache.hadoop.hive.metastore.partition.spec.PartitionSpecProxy;
5959
import org.apache.hadoop.hive.metastore.utils.MetaStoreUtils;
6060
import org.apache.hadoop.hive.ql.QueryState;
@@ -1242,7 +1242,7 @@ public void preDropPartitions(org.apache.hadoop.hive.metastore.api.Table hmsTabl
12421242
} else if (partsSpec.isSetNames()) {
12431243
preTruncateTable(hmsTable, context, partsSpec.getNames());
12441244
}
1245-
context.putToProperties(BaseMetaStoreClient.SKIP_DROP_PARTITION, "true");
1245+
context.putToProperties(ThriftHiveMetaStoreClient.SKIP_DROP_PARTITION, "true");
12461246
}
12471247

12481248
private static void validatePartitionSpec(SearchArgument sarg, PartitionSpec partitionSpec) {

standalone-metastore/metastore-client/src/main/java/org/apache/hadoop/hive/metastore/client/BaseMetaStoreClient.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
import static org.apache.hadoop.hive.metastore.utils.MetaStoreUtils.getDefaultCatalog;
4646

4747
public abstract class BaseMetaStoreClient implements IMetaStoreClient {
48-
public static final String SKIP_DROP_PARTITION = "dropPartitionSkip";
4948

5049
// Keep a copy of HiveConf so if Session conf changes, we may need to get a new HMS client.
5150
protected final Configuration conf;
@@ -565,15 +564,6 @@ public final List<Partition> dropPartitions(String catName, String dbName, Strin
565564
public List<Partition> dropPartitions(String catName, String dbName, String tblName,
566565
List<Pair<Integer, byte[]>> partExprs, PartitionDropOptions options, EnvironmentContext context)
567566
throws NoSuchObjectException, MetaException, TException {
568-
if (context == null) {
569-
context = new EnvironmentContext();
570-
}
571-
572-
if (context.getProperties() != null &&
573-
Boolean.parseBoolean(context.getProperties().get(SKIP_DROP_PARTITION))) {
574-
return Lists.newArrayList();
575-
}
576-
577567
RequestPartsSpec rps = new RequestPartsSpec();
578568
List<DropPartitionsExpr> exprs = new ArrayList<>(partExprs.size());
579569

standalone-metastore/metastore-client/src/main/java/org/apache/hadoop/hive/metastore/client/ThriftHiveMetaStoreClient.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ public class ThriftHiveMetaStoreClient extends BaseMetaStoreClient {
112112
public final static ClientCapabilities TEST_VERSION = new ClientCapabilities(
113113
Lists.newArrayList(ClientCapability.INSERT_ONLY_TABLES, ClientCapability.TEST_CAPABILITY));
114114
public static final String TRUNCATE_SKIP_DATA_DELETION = "truncateSkipDataDeletion";
115+
public static final String SKIP_DROP_PARTITION = "dropPartitionSkip";
115116
public static final String SNAPSHOT_REF = "snapshot_ref";
116117

117118
// Name of the HiveMetaStore class. It is used to initialize embedded metastore

0 commit comments

Comments
 (0)