Skip to content
Snippets Groups Projects
Commit f4a3c4e3 authored by Holden Karau's avatar Holden Karau Committed by Joseph K. Bradley
Browse files

[SPARK-9962] [ML] Decision Tree training: prevNodeIdsForInstances.unpersist() at end of training

NodeIdCache: prevNodeIdsForInstances.unpersist() needs to be called at end of training.

Author: Holden Karau <holden@pigscanfly.ca>

Closes #8541 from holdenk/SPARK-9962-decission-tree-training-prevNodeIdsForiNstances-unpersist-at-end-of-training.
parent 870b8a2e
No related branches found
No related tags found
No related merge requests found
......@@ -164,10 +164,10 @@ private[spark] class NodeIdCache(
}
}
}
}
if (prevNodeIdsForInstances != null) {
// Unpersist the previous one if one exists.
prevNodeIdsForInstances.unpersist()
if (prevNodeIdsForInstances != null) {
// Unpersist the previous one if one exists.
prevNodeIdsForInstances.unpersist()
}
}
}
......
......@@ -166,6 +166,10 @@ private[spark] class NodeIdCache(
fs.delete(new Path(old.getCheckpointFile.get), true)
}
}
if (prevNodeIdsForInstances != null) {
// Unpersist the previous one if one exists.
prevNodeIdsForInstances.unpersist()
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment