From dcff6c46b7426892418fa59513ecbd0c0b9299c4 Mon Sep 17 00:00:00 2001 From: Ben Smith Date: Fri, 23 Nov 2018 11:48:14 +0100 Subject: [PATCH 1/2] throw Error when profiler has wrong APP parameter. --- src/main/java/profiler/utils/SparkUtils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/profiler/utils/SparkUtils.java b/src/main/java/profiler/utils/SparkUtils.java index 0fce554..7406e09 100755 --- a/src/main/java/profiler/utils/SparkUtils.java +++ b/src/main/java/profiler/utils/SparkUtils.java @@ -50,7 +50,8 @@ public static String appName(final String s) { } else if (s.equals("vmsm-sorted-g1")) { return "SparkVMSMSortedG1"; } - return "default"; + String exception = String.format("APP parameter '%s' not listed for profiling", s); + throw new IllegalArgumentException(exception); } public static Class[] zksparkClasses() { From df32efedfa039e83b8ba4e60bf119dd0678bdc6b Mon Sep 17 00:00:00 2001 From: Ben Smith Date: Mon, 19 Nov 2018 15:33:26 +0100 Subject: [PATCH 2/2] Missing else if condition in profiler Spark utils --- src/main/java/profiler/utils/SparkUtils.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/profiler/utils/SparkUtils.java b/src/main/java/profiler/utils/SparkUtils.java index 7406e09..1ead15a 100755 --- a/src/main/java/profiler/utils/SparkUtils.java +++ b/src/main/java/profiler/utils/SparkUtils.java @@ -31,6 +31,8 @@ public class SparkUtils { public static String appName(final String s) { if (s.equals("fft")) { return "SparkFFT"; + } else if (s.equals("lagrange")) { + return "Lagrange"; } else if (s.equals("fmsm-g1")) { return "SparkFixedMSMG1"; } else if (s.equals("fmsm-g2")) {