jerqi commented on code in PR #1258:
URL:
https://github.com/apache/incubator-uniffle/pull/1258#discussion_r1377186551
##########
client-spark/common/src/main/java/org/apache/uniffle/shuffle/manager/ShuffleManagerGrpcService.java:
##########
@@ -163,6 +239,90 @@ public void unregisterShuffle(int shuffleId) {
shuffleStatus.remove(shuffleId);
}
+ private static class ShuffleServerFailureRecord {
+ private final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
+ private final ReentrantReadWriteLock.ReadLock readLock = lock.readLock();
+ private final ReentrantReadWriteLock.WriteLock writeLock =
lock.writeLock();
+ private final Map<String, AtomicInteger> shuffleServerFailureRecordCount;
+ private int stageAttemptNumber;
+
+ private ShuffleServerFailureRecord(
+ Map<String, AtomicInteger> shuffleServerFailureRecordCount, int
stageAttemptNumber) {
+ this.shuffleServerFailureRecordCount = shuffleServerFailureRecordCount;
+ this.stageAttemptNumber = stageAttemptNumber;
+ }
+
+ private <T> T withReadLock(Supplier<T> fn) {
Review Comment:
These methods seems useful. Could we extract some methods for other classes
to use?
--
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]