Re: [PR] [HUDI-7601] Add heartbeat mechanism to refresh lock [hudi]

2024-04-12 Thread via GitHub


leesf merged PR #10994:
URL: https://github.com/apache/hudi/pull/10994


-- 
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: commits-unsubscr...@hudi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [HUDI-7601] Add heartbeat mechanism to refresh lock [hudi]

2024-04-11 Thread via GitHub


hudi-bot commented on PR #10994:
URL: https://github.com/apache/hudi/pull/10994#issuecomment-2049298296

   
   ## CI report:
   
   * e1320524fc5843767451fce7110387c936b6549d Azure: 
[SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=23190)
 
   
   
   Bot commands
 @hudi-bot supports the following commands:
   
- `@hudi-bot run azure` re-run the last Azure build
   


-- 
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: commits-unsubscr...@hudi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [HUDI-7601] Add heartbeat mechanism to refresh lock [hudi]

2024-04-11 Thread via GitHub


hudi-bot commented on PR #10994:
URL: https://github.com/apache/hudi/pull/10994#issuecomment-2049129241

   
   ## CI report:
   
   * 772a3711b602d7d9f8c49255ba4c03291fbf5372 Azure: 
[SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=23188)
 
   * e1320524fc5843767451fce7110387c936b6549d Azure: 
[PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=23190)
 
   
   
   Bot commands
 @hudi-bot supports the following commands:
   
- `@hudi-bot run azure` re-run the last Azure build
   


-- 
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: commits-unsubscr...@hudi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [HUDI-7601] Add heartbeat mechanism to refresh lock [hudi]

2024-04-11 Thread via GitHub


hudi-bot commented on PR #10994:
URL: https://github.com/apache/hudi/pull/10994#issuecomment-2049117112

   
   ## CI report:
   
   * 772a3711b602d7d9f8c49255ba4c03291fbf5372 Azure: 
[SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=23188)
 
   * e1320524fc5843767451fce7110387c936b6549d UNKNOWN
   
   
   Bot commands
 @hudi-bot supports the following commands:
   
- `@hudi-bot run azure` re-run the last Azure build
   


-- 
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: commits-unsubscr...@hudi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [HUDI-7601] Add heartbeat mechanism to refresh lock [hudi]

2024-04-11 Thread via GitHub


hudi-bot commented on PR #10994:
URL: https://github.com/apache/hudi/pull/10994#issuecomment-2049105847

   
   ## CI report:
   
   * 772a3711b602d7d9f8c49255ba4c03291fbf5372 Azure: 
[SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=23188)
 
   
   
   Bot commands
 @hudi-bot supports the following commands:
   
- `@hudi-bot run azure` re-run the last Azure build
   


-- 
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: commits-unsubscr...@hudi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [HUDI-7601] Add heartbeat mechanism to refresh lock [hudi]

2024-04-11 Thread via GitHub


Zouxxyy commented on code in PR #10994:
URL: https://github.com/apache/hudi/pull/10994#discussion_r1560482072


##
hudi-sync/hudi-hive-sync/src/main/java/org/apache/hudi/hive/transaction/lock/HiveMetastoreBasedLockProvider.java:
##
@@ -187,6 +194,12 @@ private void acquireLockInternal(long time, TimeUnit unit, 
LockComponent lockCom
   final LockRequest lockRequestFinal = lockRequest;
   this.lock = executor.submit(() -> hiveClient.lock(lockRequestFinal))
   .get(time, unit);
+
+  // refresh lock in case that certain commit takes a long time.
+  Heartbeat heartbeat = new Heartbeat(hiveClient, lock.getLockid());
+  long heartbeatIntervalMs = lockConfiguration.getConfig()
+  .getLong(LOCK_HEARTBEAT_INTERVAL_MS_KEY, 
DEFAULT_LOCK_HEARTBEAT_INTERVAL_MS);
+  future = executor.scheduleAtFixedRate(heartbeat, heartbeatIntervalMs / 
2, heartbeatIntervalMs, TimeUnit.MICROSECONDS);

Review Comment:
   TimeUnit.MILLISECONDS



-- 
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: commits-unsubscr...@hudi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [HUDI-7601] Add heartbeat mechanism to refresh lock [hudi]

2024-04-10 Thread via GitHub


hudi-bot commented on PR #10994:
URL: https://github.com/apache/hudi/pull/10994#issuecomment-2048918038

   
   ## CI report:
   
   * 772a3711b602d7d9f8c49255ba4c03291fbf5372 Azure: 
[PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=23188)
 
   
   
   Bot commands
 @hudi-bot supports the following commands:
   
- `@hudi-bot run azure` re-run the last Azure build
   


-- 
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: commits-unsubscr...@hudi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [HUDI-7601] Add heartbeat mechanism to refresh lock [hudi]

2024-04-10 Thread via GitHub


hudi-bot commented on PR #10994:
URL: https://github.com/apache/hudi/pull/10994#issuecomment-2048913366

   
   ## CI report:
   
   * 772a3711b602d7d9f8c49255ba4c03291fbf5372 UNKNOWN
   
   
   Bot commands
 @hudi-bot supports the following commands:
   
- `@hudi-bot run azure` re-run the last Azure build
   


-- 
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: commits-unsubscr...@hudi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org