aboutsummaryrefslogtreecommitdiff
path: root/spark-common/src/main/java/me/lucko/spark/common
diff options
context:
space:
mode:
authorLuck <git@lucko.me>2019-05-15 17:02:27 +0100
committerLuck <git@lucko.me>2019-05-15 17:02:27 +0100
commitaaa03b1cde9595afacfecd1a24e4540eda40a02a (patch)
tree102b563a08b8d2238fe3d235067d17c1ec45819c /spark-common/src/main/java/me/lucko/spark/common
parent5d52a42508bb6d3e8ada40ff65746301fd42a4a4 (diff)
downloadspark-aaa03b1cde9595afacfecd1a24e4540eda40a02a.tar.gz
spark-aaa03b1cde9595afacfecd1a24e4540eda40a02a.tar.bz2
spark-aaa03b1cde9595afacfecd1a24e4540eda40a02a.zip
Add try..catch around the parsing of each heap dump summary entry
Diffstat (limited to 'spark-common/src/main/java/me/lucko/spark/common')
-rw-r--r--spark-common/src/main/java/me/lucko/spark/common/heapdump/HeapDumpSummary.java17
1 files changed, 11 insertions, 6 deletions
diff --git a/spark-common/src/main/java/me/lucko/spark/common/heapdump/HeapDumpSummary.java b/spark-common/src/main/java/me/lucko/spark/common/heapdump/HeapDumpSummary.java
index 6021d92..867dcc6 100644
--- a/spark-common/src/main/java/me/lucko/spark/common/heapdump/HeapDumpSummary.java
+++ b/spark-common/src/main/java/me/lucko/spark/common/heapdump/HeapDumpSummary.java
@@ -90,12 +90,17 @@ public final class HeapDumpSummary {
return null;
}
- return new Entry(
- Integer.parseInt(matcher.group(1)),
- Integer.parseInt(matcher.group(2)),
- Long.parseLong(matcher.group(3)),
- TypeDescriptors.getJavaType(matcher.group(4))
- );
+ try {
+ return new Entry(
+ Integer.parseInt(matcher.group(1)),
+ Integer.parseInt(matcher.group(2)),
+ Long.parseLong(matcher.group(3)),
+ TypeDescriptors.getJavaType(matcher.group(4))
+ );
+ } catch (Exception e) {
+ e.printStackTrace();
+ return null;
+ }
})
.filter(Objects::nonNull)
.collect(Collectors.toList()));