kishendas commented on a change in pull request #1095:
URL: https://github.com/apache/hive/pull/1095#discussion_r441748603
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java
##########
@@ -2425,6 +2425,42 @@ public static TableSnapshot
getTableSnapshot(Configuration conf,
validWriteIdList != null ? validWriteIdList.toString() : null);
}
+ /**
+ * This is called by Hive.java for all write operations (DDL). Advance write
id
+ * for the table via transaction manager, and store it in config. The write
id
+ * will be marked as committed instantly in config, as all DDL are auto
+ * committed, there's no chance to rollback.
+ */
+ public static ValidWriteIdList advanceWriteId(HiveConf conf, Table tbl)
throws LockException {
+ if (!isTransactionalTable(tbl)) {
+ return null;
+ }
+ HiveTxnManager txnMgr = SessionState.get().getTxnMgr();
+ long writeId =
SessionState.get().getTxnMgr().getTableWriteId(tbl.getDbName(),
tbl.getTableName());
Review comment:
This logic is no longer required. This would be done in Driver.java.
----------------------------------------------------------------
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]