maheshk114 commented on a change in pull request #2357:
URL: https://github.com/apache/hive/pull/2357#discussion_r681441315
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
##########
@@ -3101,10 +3102,25 @@ private void constructOneLBLocationMap(FileStatus fSta,
// For acid table, add the acid_write event with file list at the time
of load itself. But
// it should be done after partition is created.
+ List<WriteNotificationLogRequest> requestList = new ArrayList<>();
for (Entry<Path, PartitionDetails> entry :
partitionDetailsMap.entrySet()) {
PartitionDetails partitionDetails = entry.getValue();
if (isTxnTable && partitionDetails.newFiles != null) {
- addWriteNotificationLog(tbl, partitionDetails.fullSpec,
partitionDetails.newFiles, writeId);
+ addWriteNotificationLog(tbl, partitionDetails.fullSpec,
partitionDetails.newFiles,
+ writeId, requestList);
+ }
+ }
+ if (requestList.size() != 0) {
+ WriteNotificationLogBatchRequest rqst = new
WriteNotificationLogBatchRequest(tbl.getCatName(), tbl.getDbName(),
+ tbl.getTableName(), requestList);
+ try {
+ get(conf).getSynchronizedMSC().addWriteNotificationLogInBatch(rqst);
+ } catch (TException e) {
+ // For older HMS, if the batch API is not supported, fall back to
older API.
+ LOG.info("addWriteNotificationLogInBatch failed with ", e);
Review comment:
I have changed the code to retry only if the error is not supported
method. And checked the idempotent behaviour also.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]