krisdas commented on code in PR #5039:
URL: https://github.com/apache/iceberg/pull/5039#discussion_r897967378
##########
hive-metastore/src/main/java/org/apache/iceberg/hive/HiveTableOperations.java:
##########
@@ -512,6 +513,7 @@ long acquireLock() throws UnknownHostException, TException,
InterruptedException
LockResponse lockResponse = metaClients.run(client ->
client.lock(lockRequest));
AtomicReference<LockState> state = new
AtomicReference<>(lockResponse.getState());
long lockId = lockResponse.getLockid();
+ final Pair<Long, String> lockDetails = Pair.of(lockId,
String.format("%s.%s", database, tableName));
Review Comment:
In current implementation, only a single lock is acquired, so we can use
database/tableName directly inside the task/lambda. Since we are using
Tasks.foreach, where multiple tasks can run in future, grouped lock id and
table info in a pair (to avoid confusion). thoughts?
--
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]