mridulm commented on a change in pull request #34018:
URL: https://github.com/apache/spark/pull/34018#discussion_r711433027
##########
File path:
common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/ExternalBlockStoreClient.java
##########
@@ -83,6 +87,34 @@ public void init(String appId) {
clientFactory = context.createClientFactory(bootstraps);
}
+ @Override
+ public void setAppAttemptId(String appAttemptId) {
+ super.setAppAttemptId(appAttemptId);
+ setComparableAppAttemptId(appAttemptId);
+ }
+
+ @Override
+ public String getAppAttemptId() {
+ return Integer.toString(getComparableAppAttemptId());
+ }
+
+ private void setComparableAppAttemptId(String appAttemptId) {
+ // For now, push based shuffle only supports running in YARN.
+ // Application attemptId in YARN is integer and it can be safely parsed
+ // to integer here. For the application attemptId from other cluster set up
+ // which is not numeric, it needs to generate this comparableAppAttemptId
+ // from the String typed appAttemptId through some other customized logic.
+ try {
+ this.comparableAppAttemptId = Integer.parseInt(appAttemptId);
+ } catch (NumberFormatException e) {
+ logger.warn("Push based shuffle requires comparable application
attemptId", e);
Review comment:
Add the parameter to the exception msg as well.
--
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]