Github user mengxr commented on a diff in the pull request:
https://github.com/apache/spark/pull/4347#discussion_r24109644
--- Diff:
mllib/src/main/scala/org/apache/spark/mllib/tree/RandomForest.scala ---
@@ -244,7 +245,10 @@ private class RandomForest (
// Delete any remaining checkpoints used for node Id cache.
if (nodeIdCache.nonEmpty) {
- nodeIdCache.get.deleteAllCheckpoints()
+ Try(nodeIdCache.get.deleteAllCheckpoints()) match {
+ case Failure(e) => logWarning(s"delete all chackpoints failed.
Error reason: ${e.getMessage}")
--- End diff --
line too wide. Move logWarning to the next line.
Btw, I don't see how `Try` is useful here. Maybe we should just use
~~~
try {
...
} catch {
case ...
case ...
}
~~~
Java users would feel familiar with the code.
---
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]