mridulm commented on a change in pull request #34018:
URL: https://github.com/apache/spark/pull/34018#discussion_r711432454
##########
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());
Review comment:
We dont need to override this
##########
File path:
core/src/main/scala/org/apache/spark/executor/CoarseGrainedExecutorBackend.scala
##########
@@ -470,7 +470,13 @@ private[spark] object CoarseGrainedExecutorBackend extends
Logging {
driverConf.set(EXECUTOR_ID, arguments.executorId)
val env = SparkEnv.createExecutorEnv(driverConf, arguments.executorId,
arguments.bindAddress,
arguments.hostname, arguments.cores, cfg.ioEncryptionKey, isLocal =
false)
-
+ // Set the application attemptId in the BlockStoreClient if available.
+ if (Utils.isPushBasedShuffleEnabled(env.conf)) {
Review comment:
Same here: always set, if check not required
##########
File path: core/src/main/scala/org/apache/spark/SparkContext.scala
##########
@@ -583,7 +583,12 @@ class SparkContext(config: SparkConf) extends Logging {
_applicationId = _taskScheduler.applicationId()
_applicationAttemptId = _taskScheduler.applicationAttemptId()
_conf.set("spark.app.id", _applicationId)
- _applicationAttemptId.foreach(attemptId => _conf.set(APP_ATTEMPT_ID,
attemptId))
+ if (Utils.isPushBasedShuffleEnabled(_conf)) {
Review comment:
The `if` check is not required.
--
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]