pvargacl commented on a change in pull request #1087:
URL: https://github.com/apache/hive/pull/1087#discussion_r450786917
##########
File path:
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java
##########
@@ -2015,8 +2019,49 @@ public AllocateTableWriteIdsResponse
allocateTableWriteIds(AllocateTableWriteIds
return allocateTableWriteIds(rqst);
}
}
+
+ @Override
+ public MaxAllocatedTableWriteIdResponse
getMaxAllocatedTableWrited(MaxAllocatedTableWriteIdRequest rqst) throws
MetaException {
+ String dbName = rqst.getDbName();
+ String tableName = rqst.getTableName();
+ try {
+ Connection dbConn = null;
+ PreparedStatement pStmt = null;
+ ResultSet rs = null;
+ try {
+ lockInternal();
+ dbConn = getDbConn(Connection.TRANSACTION_READ_COMMITTED);
Review comment:
most of Txnhandler uses this pattern, instead of using three nested
try-with for dbconn, statement and resultset
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]