kishendas commented on a change in pull request #1095:
URL: https://github.com/apache/hive/pull/1095#discussion_r446439787
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java
##########
@@ -2368,6 +2368,36 @@ public static TableSnapshot
getTableSnapshot(Configuration conf,
validWriteIdList != null ? validWriteIdList.toString() : null);
}
+ /**
+ * This is called by Driver.java for all write operations (DDL). This
updates the latest validWriteIdList in config,
+ * so that the same can be sent from HMS Client during invocation of get_*
HMS APIs.
+ */
+ public static ValidWriteIdList updateValidWriteIdList(HiveConf conf, String
fullTableName) throws LockException {
Review comment:
We should actually update it. Changing the logic to reflect the same.
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java
##########
@@ -2368,6 +2368,36 @@ public static TableSnapshot
getTableSnapshot(Configuration conf,
validWriteIdList != null ? validWriteIdList.toString() : null);
}
+ /**
+ * This is called by Driver.java for all write operations (DDL). This
updates the latest validWriteIdList in config,
+ * so that the same can be sent from HMS Client during invocation of get_*
HMS APIs.
+ */
+ public static ValidWriteIdList updateValidWriteIdList(HiveConf conf, String
fullTableName) throws LockException {
+
+ HiveTxnManager txnMgr = SessionState.get().getTxnMgr();
+ List<String> txnTables = new ArrayList<>();
+ txnTables.add(fullTableName);
+ ValidTxnWriteIdList txnWriteIds;
+ if (conf.get(ValidTxnWriteIdList.VALID_TABLES_WRITEIDS_KEY) != null) {
Review comment:
Changed the logic
----------------------------------------------------------------
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]