K0K0V0K commented on code in PR #6569:
URL: https://github.com/apache/hadoop/pull/6569#discussion_r1499304409
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/event/Event.java:
##########
@@ -32,4 +32,14 @@ public interface Event<TYPE extends Enum<TYPE>> {
TYPE getType();
long getTimestamp();
String toString();
+
+ /**
+ * In case of parallel execution of events in the same dispatcher,
+ * the result of this method will be used as semaphore.
+ * If method returns null, then a default semaphore will be used.
+ * @return the semaphore
+ */
+ default String getLockKey() {
+ return null;
Review Comment:
Hi @slfan1989 !
Thanks for the review.
Yes, that is expected.
If we dont specify lockKey for an event we should return with null, so these
events will be executed in sequential not parallel. The method is used in the
MultiDispatcherLocks.
--
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]