Skip to content

Commit d4ff81b

Browse files
committed
fix doc
1 parent d071032 commit d4ff81b

4 files changed

Lines changed: 24 additions & 24 deletions

File tree

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1225,7 +1225,6 @@ public void preDropPartitions(org.apache.hadoop.hive.metastore.api.Table hmsTabl
12251225
} catch (IOException e) {
12261226
throw new MetaException(String.format("Error while fetching the partitions due to: %s", e));
12271227
}
1228-
context.putToProperties(BaseMetaStoreClient.SKIP_DROP_PARTITION, "true");
12291228
}
12301229

12311230
@Override
@@ -1242,8 +1241,8 @@ public void preDropPartitions(org.apache.hadoop.hive.metastore.api.Table hmsTabl
12421241
preDropPartitions(hmsTable, context, partExprs);
12431242
} else if (partsSpec.isSetNames()) {
12441243
preTruncateTable(hmsTable, context, partsSpec.getNames());
1245-
context.putToProperties(BaseMetaStoreClient.SKIP_DROP_PARTITION, "true");
12461244
}
1245+
context.putToProperties(BaseMetaStoreClient.SKIP_DROP_PARTITION, "true");
12471246
}
12481247

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

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

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1980,7 +1980,8 @@ boolean dropPartition(String catName, String db_name, String tbl_name, List<Stri
19801980

19811981
/**
19821982
* Drop partitions based on an expression.
1983-
* @deprecated Use {@link #dropPartitions(TableName, RequestPartsSpec, PartitionDropOptions, EnvironmentContext)} instead
1983+
* @deprecated since 4.1.0, will be removed in 5.0.0
1984+
* use {@link #dropPartitions(TableName, RequestPartsSpec, PartitionDropOptions, EnvironmentContext)} instead.
19841985
* @param dbName database name.
19851986
* @param tblName table name.
19861987
* @param partExprs I don't understand this fully, so can't completely explain it. The second
@@ -2002,7 +2003,8 @@ List<Partition> dropPartitions(String dbName, String tblName,
20022003

20032004
/**
20042005
* Drop partitions based on an expression.
2005-
* @deprecated Use {@link #dropPartitions(TableName, RequestPartsSpec, PartitionDropOptions, EnvironmentContext)} instead
2006+
* @deprecated since 4.1.0, will be removed in 5.0.0
2007+
* use {@link #dropPartitions(TableName, RequestPartsSpec, PartitionDropOptions, EnvironmentContext)} instead.
20062008
* @param catName catalog name.
20072009
* @param dbName database name.
20082010
* @param tblName table name.
@@ -2031,7 +2033,8 @@ default List<Partition> dropPartitions(String catName, String dbName, String tbl
20312033

20322034
/**
20332035
* Drop partitions based on an expression.
2034-
* @deprecated Use {@link #dropPartitions(TableName, RequestPartsSpec, PartitionDropOptions, EnvironmentContext)} instead
2036+
* @deprecated since 4.1.0, will be removed in 5.0.0
2037+
* use {@link #dropPartitions(TableName, RequestPartsSpec, PartitionDropOptions, EnvironmentContext)} instead.
20352038
* @param catName catalog name.
20362039
* @param dbName database name.
20372040
* @param tblName table name.
@@ -2063,7 +2066,8 @@ default List<Partition> dropPartitions(String catName, String dbName, String tbl
20632066

20642067
/**
20652068
* Generalization of dropPartitions(),
2066-
* @deprecated Use {@link #dropPartitions(TableName, RequestPartsSpec, PartitionDropOptions, EnvironmentContext)} instead
2069+
* @deprecated since 4.1.0, will be removed in 5.0.0
2070+
* use {@link #dropPartitions(TableName, RequestPartsSpec, PartitionDropOptions, EnvironmentContext)} instead.
20672071
* @param dbName Name of the database
20682072
* @param tblName Name of the table
20692073
* @param partExprs Partition-specification
@@ -2081,7 +2085,8 @@ List<Partition> dropPartitions(String dbName, String tblName,
20812085

20822086
/**
20832087
* Generalization of dropPartitions(),
2084-
* @deprecated Use {@link #dropPartitions(TableName, RequestPartsSpec, PartitionDropOptions, EnvironmentContext)} instead
2088+
* @deprecated since 4.1.0, will be removed in 5.0.0
2089+
* use {@link #dropPartitions(TableName, RequestPartsSpec, PartitionDropOptions, EnvironmentContext)} instead.
20852090
* @param catName catalog name
20862091
* @param dbName Name of the database
20872092
* @param tblName Name of the table
@@ -2099,13 +2104,23 @@ List<Partition> dropPartitions(String catName, String dbName, String tblName,
20992104
throws NoSuchObjectException, MetaException, TException;
21002105

21012106
/**
2102-
* @deprecated Use {@link #dropPartitions(TableName, RequestPartsSpec, PartitionDropOptions, EnvironmentContext)} instead
2107+
* @deprecated since 4.1.0, will be removed in 5.0.0
2108+
* use {@link #dropPartitions(TableName, RequestPartsSpec, PartitionDropOptions, EnvironmentContext)} instead.
21032109
*/
21042110
@Deprecated
21052111
List<Partition> dropPartitions(String catName, String dbName, String tblName,
21062112
List<Pair<Integer, byte[]>> partExprs, PartitionDropOptions options, EnvironmentContext context)
21072113
throws NoSuchObjectException, MetaException, TException;
21082114

2115+
/**
2116+
* Drop partitions based on the request partitions specification.
2117+
* @param tableName Name of the table.
2118+
* @param partsSpec Specification of the partitions to drop.
2119+
* @param options Options for dropping partitions.
2120+
* @param context Environment context for the operation.
2121+
* @return List of Partitions dropped.
2122+
* @throws TException thrift transport error.
2123+
*/
21092124
List<Partition> dropPartitions(TableName tableName,
21102125
RequestPartsSpec partsSpec, PartitionDropOptions options, EnvironmentContext context)
21112126
throws TException;

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

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -312,21 +312,6 @@ private void dropDatabaseCascadePerDb(DropDatabaseRequest req, List<String> tabl
312312
}
313313
}
314314

315-
@Override
316-
public List<Partition> dropPartitions(String catName, String dbName, String tblName,
317-
List<Pair<Integer, byte[]>> partExprs, PartitionDropOptions options, EnvironmentContext context)
318-
throws TException {
319-
Table table = delegate.getTable(catName, dbName, tblName);
320-
HiveMetaHook hook = getHook(table);
321-
if (hook != null) {
322-
if (context == null) {
323-
context = new EnvironmentContext();
324-
}
325-
hook.preDropPartitions(table, context, partExprs);
326-
}
327-
return delegate.dropPartitions(catName, dbName, tblName, partExprs, options, context);
328-
}
329-
330315
@Override
331316
public List<Partition> dropPartitions(TableName tableName,
332317
RequestPartsSpec partsSpec, PartitionDropOptions options, EnvironmentContext context)

standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaHook.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,8 @@ default void postGetTable(Table table) {
218218

219219
/**
220220
* Called before dropping the partitions from the table in the metastore during ALTER TABLE DROP PARTITION.
221-
* @deprecated Use {@link #preDropPartitions(Table, EnvironmentContext, RequestPartsSpec)} instead.
221+
* @deprecated since 4.1.0, will be removed in 5.0.0
222+
* use {@link #preDropPartitions(Table, EnvironmentContext, RequestPartsSpec)} instead.
222223
* @param table table whose partition needs to be dropped
223224
* @param context context of the operation
224225
* @param partExprs List of partition expressions

0 commit comments

Comments
 (0)