[ 
https://issues.apache.org/jira/browse/HIVE-22869?focusedWorklogId=460300&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-460300
 ]

ASF GitHub Bot logged work on HIVE-22869:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 17/Jul/20 13:16
            Start Date: 17/Jul/20 13:16
    Worklog Time Spent: 10m 
      Work Description: zchovan commented on a change in pull request #1073:
URL: https://github.com/apache/hive/pull/1073#discussion_r456434704



##########
File path: 
standalone-metastore/metastore-tools/tools-common/src/main/java/org/apache/hadoop/hive/metastore/tools/HMSClient.java
##########
@@ -345,21 +348,44 @@ boolean openTxn(int numTxns) throws TException {
     return openTxns;
   }
 
+  List<TxnInfo> getOpenTxnsInfo() throws TException {
+    return client.get_open_txns_info().getOpen_txns();
+  }
+
   boolean commitTxn(long txnId) throws TException {
     client.commit_txn(new CommitTxnRequest(txnId));
     return true;
   }
 
-  boolean abortTxn(long txnId) throws TException {
-    client.abort_txn(new AbortTxnRequest(txnId));
+  boolean abortTxns(List<Long> txnIds) throws TException {
+    client.abort_txns(new AbortTxnsRequest(txnIds));
     return true;
   }
 
-  boolean abortTxns(List<Long> txnIds) throws TException {
-    client.abort_txns(new AbortTxnsRequest(txnIds));
+  boolean allocateTableWriteIds(String dbName, String tableName, List<Long> 
openTxns) throws TException {
+    AllocateTableWriteIdsRequest awiRqst = new 
AllocateTableWriteIdsRequest(dbName, tableName);
+    openTxns.forEach(t -> {
+      awiRqst.addToTxnIds(t);
+    });
+
+    client.allocate_table_write_ids(awiRqst);
     return true;
   }
 
+  boolean getValidWriteIds(List<String> fullTableNames) throws TException {

Review comment:
       ah sorry, I was mistaken, the reason why it never returned the writeIds 
is because they are never used, the benchmark is just executing the api call. 
The return value from the hms is actually a GetValidWriteIdsResponse object, 
not a list. As it is never used I'm not sure if we need to change this.




----------------------------------------------------------------
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:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 460300)
    Time Spent: 2h  (was: 1h 50m)

> Add locking benchmark to metastore-tools/metastore-benchmarks
> -------------------------------------------------------------
>
>                 Key: HIVE-22869
>                 URL: https://issues.apache.org/jira/browse/HIVE-22869
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Zoltan Chovan
>            Assignee: Zoltan Chovan
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: HIVE-22869.2.patch, HIVE-22869.3.patch, 
> HIVE-22869.4.patch, HIVE-22869.5.patch, HIVE-22869.6.patch, 
> HIVE-22869.7.patch, HIVE-22869.8.patch, HIVE-22869.9.patch, HIVE-22869.patch
>
>          Time Spent: 2h
>  Remaining Estimate: 0h
>
> Add the possibility to run benchmarks on opening lock in the HMS



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to