Github user vanzin commented on a diff in the pull request:
https://github.com/apache/spark/pull/14999#discussion_r77918461
--- Diff:
common/network-yarn/src/main/java/org/apache/spark/network/yarn/YarnShuffleService.java
---
@@ -328,37 +327,51 @@ public void setRecoveryPath(Path recoveryPath) {
}
/**
- * Get the recovery path, this will override the default one to get our
own maintained
- * recovery path.
+ * Get the path specific to this auxiliary service to use for recovery.
+ */
+ protected Path getRecoveryPath(String fileName) {
+ return _recoveryPath;
+ }
+
+ /**
+ * Figure out the recovery path and handle moving the DB if YARN NM
recovery gets enabled
+ * when it previously was not. If YARN NM recovery is enabled it uses
that path, otherwise
+ * it will uses a YARN local dir.
*/
- protected Path getRecoveryPath() {
+ protected File initRecoveryDb(String dbFileName) {
String[] localDirs =
_conf.getTrimmedStrings("yarn.nodemanager.local-dirs");
--- End diff --
Minor, but I'd swap the logic around and first check whether a DB exists in
the recovery path, and if it does, just ignore local dirs altogether. Just to
avoid doing unneeded work when we know the recovery path is already being used.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]