vihangk1 commented on a change in pull request #1217:
URL: https://github.com/apache/hive/pull/1217#discussion_r453805922



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
##########
@@ -3580,7 +3596,17 @@ public boolean dropPartition(String dbName, String 
tableName, List<String> parti
     List<String> pvals = MetaStoreUtils.getPvals(t.getPartCols(), partSpec);
 
     try {
-      names = getMSC().listPartitionNames(dbName, tblName, pvals, max);
+      GetPartitionNamesPsRequest req = new GetPartitionNamesPsRequest();

Review comment:
       Sounds good to me. Would be good to create a sub-task in case there 
isn't any.

##########
File path: ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
##########
@@ -1459,6 +1464,22 @@ public Table getTable(final String dbName, final String 
tableName, boolean throw
     return new Table(tTable);
   }
 
+  /**
+   * Get ValidWriteIdList for the current transaction.
+   * @param dbName
+   * @param tableName
+   * @return
+   * @throws LockException
+   */
+  private ValidWriteIdList getValidWriteIdList(String dbName, String 
tableName) throws LockException {
+    ValidWriteIdList validWriteIdList = null;
+    long txnId = SessionState.get().getTxnMgr() != null ? 
SessionState.get().getTxnMgr().getCurrentTxnId() : 0;
+    if (txnId > 0) {

Review comment:
       Do you mean these two statements below which assert that it is set in 
getValidWriteIds() called from getTableValidWriteIdListWithTxnList()?
   
   assert isTxnOpen();
   assert validTxnList != null && !validTxnList.isEmpty();
   
   I guess its okay for the tests but in production those checks may not be 
enabled since assertions are disabled by default. Since its unrelated to this 
patch, I think its okay to defer this to later.

##########
File path: 
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
##########
@@ -4160,6 +4185,18 @@ public SerDeInfo getSerDe(String serDeName) throws 
TException {
     return client.get_serde(new GetSerdeRequest(serDeName));
   }
 
+  /**
+   * This method is called to get the ValidWriteIdList in order to send the 
same in HMS get_* APIs,
+   * if the validWriteIdList is not already set by HS2.

Review comment:
       nit, "is not already set by HS2" is confusing and not clear. The 
HMSClient runs within HS2 in case of Hive and in case of other projects (Spark, 
Impala) in other components. So its not very clear what you mean by that. 
Perhaps replace it with "if the validWriteIdList is not explicitly passed (as a 
method argument) to the HMS APIs."




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to