You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ha...@apache.org on 2015/02/21 07:39:46 UTC
svn commit: r1661289 - in
/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore:
HiveMetaStoreClient.java IMetaStoreClient.java
Author: hashutosh
Date: Sat Feb 21 06:39:45 2015
New Revision: 1661289
URL: http://svn.apache.org/r1661289
Log:
HIVE-9628 : HiveMetaStoreClient.dropPartitions(...List<ObjectPair<Integer,byte[]>>...) doesn't take (boolean needResult) (Mithun Radhakrishnan via Sergey Shelukhin)
Modified:
hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java
Modified: hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java?rev=1661289&r1=1661288&r2=1661289&view=diff
==============================================================================
--- hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java (original)
+++ hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java Sat Feb 21 06:39:45 2015
@@ -794,7 +794,7 @@ public class HiveMetaStoreClient impleme
@Override
public List<Partition> dropPartitions(String dbName, String tblName,
List<ObjectPair<Integer, byte[]>> partExprs, boolean deleteData, boolean ignoreProtection,
- boolean ifExists) throws NoSuchObjectException, MetaException, TException {
+ boolean ifExists, boolean needResult) throws NoSuchObjectException, MetaException, TException {
RequestPartsSpec rps = new RequestPartsSpec();
List<DropPartitionsExpr> exprs = new ArrayList<DropPartitionsExpr>(partExprs.size());
for (ObjectPair<Integer, byte[]> partExpr : partExprs) {
@@ -807,11 +807,19 @@ public class HiveMetaStoreClient impleme
DropPartitionsRequest req = new DropPartitionsRequest(dbName, tblName, rps);
req.setDeleteData(deleteData);
req.setIgnoreProtection(ignoreProtection);
- req.setNeedResult(true);
+ req.setNeedResult(needResult);
req.setIfExists(ifExists);
return client.drop_partitions_req(req).getPartitions();
}
+ @Override
+ public List<Partition> dropPartitions(String dbName, String tblName,
+ List<ObjectPair<Integer, byte[]>> partExprs, boolean deleteData, boolean ignoreProtection,
+ boolean ifExists) throws NoSuchObjectException, MetaException, TException {
+ // By default, we need the results from dropPartitions();
+ return dropPartitions(dbName, tblName, partExprs, deleteData, ignoreProtection, ifExists, true);
+ }
+
/**
* {@inheritDoc}
* @see #dropTable(String, String, boolean, boolean, EnvironmentContext)
Modified: hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java?rev=1661289&r1=1661288&r2=1661289&view=diff
==============================================================================
--- hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java (original)
+++ hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java Sat Feb 21 06:39:45 2015
@@ -664,6 +664,10 @@ public interface IMetaStoreClient {
List<ObjectPair<Integer, byte[]>> partExprs, boolean deleteData, boolean ignoreProtection,
boolean ifExists) throws NoSuchObjectException, MetaException, TException;
+ List<Partition> dropPartitions(String dbName, String tblName,
+ List<ObjectPair<Integer, byte[]>> partExprs, boolean deleteData, boolean ignoreProtection,
+ boolean ifExists, boolean needResults) throws NoSuchObjectException, MetaException, TException;
+
boolean dropPartition(String db_name, String tbl_name,
String name, boolean deleteData) throws NoSuchObjectException,
MetaException, TException;