You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/08/26 18:58:35 UTC

[GitHub] [spark] mridulm commented on a diff in pull request #37648: [WIP][SPARK-38909][BUILD][CORE][YARN][FOLLOWUP]

mridulm commented on code in PR #37648:
URL: https://github.com/apache/spark/pull/37648#discussion_r956351701


##########
common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/ExternalShuffleBlockResolver.java:
##########
@@ -125,18 +125,13 @@ public ShuffleIndexInformation load(String filePath) throws IOException {
       .weigher((Weigher<String, ShuffleIndexInformation>)
         (filePath, indexInfo) -> indexInfo.getRetainedMemorySize())
       .build(indexCacheLoader);
-    DBBackend dbBackend;
-    if (registeredExecutorFile != null) {
-      String dbBackendName =
-        conf.get(Constants.SHUFFLE_SERVICE_DB_BACKEND, DBBackend.LEVELDB.name());
-      dbBackend = DBBackend.byName(dbBackendName);
+    String dbBackendName =
+      conf.get(Constants.SHUFFLE_SERVICE_DB_BACKEND, DBBackend.LEVELDB.name());
+    DBBackend dbBackend = DBBackend.byName(dbBackendName);
+    db = DBProvider.initDB(dbBackend, this.registeredExecutorFile, CURRENT_VERSION, mapper);

Review Comment:
   Review note: Recovery need not be enabled for node managers - in which case `registeredExecutorFile` will be `null` (in addition to tests).
   
   `DBProvider.initDB` does handle null input though.



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org