This is an automated email from the ASF dual-hosted git repository.
roryqi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-uniffle.git
The following commit(s) were added to refs/heads/master by this push:
new de0206fb [Log-Improvement] Log the newly registered app id (#193)
de0206fb is described below
commit de0206fb63a17b50c9975eeb703971efc389a572
Author: Junfan Zhang <[email protected]>
AuthorDate: Thu Sep 1 14:51:25 2022 +0800
[Log-Improvement] Log the newly registered app id (#193)
### What changes were proposed in this pull request?
[Log-Improvement] Log the newly registered app id
### Why are the changes needed?
I hope from the coordinator log, I could directly find the newly registered
app and manually monitor its state.
Besides, the appId in uniffle is different from the Yarn appId, it's with
the timestamp. So it's better to add the spilt KEY for debugging.
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
Not necessary.
---
.../src/main/java/org/apache/spark/shuffle/RssShuffleManager.java | 2 +-
.../main/java/org/apache/uniffle/coordinator/ApplicationManager.java | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git
a/client-spark/spark3/src/main/java/org/apache/spark/shuffle/RssShuffleManager.java
b/client-spark/spark3/src/main/java/org/apache/spark/shuffle/RssShuffleManager.java
index af5b36ac..0d0ca539 100644
---
a/client-spark/spark3/src/main/java/org/apache/spark/shuffle/RssShuffleManager.java
+++
b/client-spark/spark3/src/main/java/org/apache/spark/shuffle/RssShuffleManager.java
@@ -247,7 +247,7 @@ public class RssShuffleManager implements ShuffleManager {
public <K, V, C> ShuffleHandle registerShuffle(int shuffleId,
ShuffleDependency<K, V, C> dependency) {
if (id.get() == null) {
- id.compareAndSet(null, SparkEnv.get().conf().getAppId() +
System.currentTimeMillis());
+ id.compareAndSet(null, SparkEnv.get().conf().getAppId() + "_" +
System.currentTimeMillis());
}
LOG.info("Generate application id used in rss: " + id.get());
diff --git
a/coordinator/src/main/java/org/apache/uniffle/coordinator/ApplicationManager.java
b/coordinator/src/main/java/org/apache/uniffle/coordinator/ApplicationManager.java
index 40589567..40a1e1ee 100644
---
a/coordinator/src/main/java/org/apache/uniffle/coordinator/ApplicationManager.java
+++
b/coordinator/src/main/java/org/apache/uniffle/coordinator/ApplicationManager.java
@@ -70,6 +70,7 @@ public class ApplicationManager {
public void refreshAppId(String appId) {
if (!appIds.containsKey(appId)) {
CoordinatorMetrics.counterTotalAppNum.inc();
+ LOG.info("New application is registered: {}", appId);
}
appIds.put(appId, System.currentTimeMillis());
}