Skip to content

Instantly share code, notes, and snippets.

@buryat
Created October 4, 2016 21:09
Show Gist options
  • Save buryat/4489f5cfe5b55239dd194770a1dbdcd4 to your computer and use it in GitHub Desktop.
Save buryat/4489f5cfe5b55239dd194770a1dbdcd4 to your computer and use it in GitHub Desktop.
Index: app/org/apache/spark/deploy/history/SparkFSFetcher.scala
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- app/org/apache/spark/deploy/history/SparkFSFetcher.scala (revision c3cb9efddc15cb9b9af3b510d6dad3e65652ce38)
+++ app/org/apache/spark/deploy/history/SparkFSFetcher.scala (revision )
@@ -138,7 +138,7 @@
null
}
} else {
- val logFilePath = new Path(logPath + "_1.snappy")
+ val logFilePath = new Path(logPath.toString)
if (!shouldThrottle(logFilePath)) {
EventLoggingListener.openEventLog(logFilePath, fs)
} else {
Index: app/com/linkedin/drelephant/util/Utils.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- app/com/linkedin/drelephant/util/Utils.java (revision c3cb9efddc15cb9b9af3b510d6dad3e65652ce38)
+++ app/com/linkedin/drelephant/util/Utils.java (revision )
@@ -102,14 +102,28 @@
if (token.isEmpty()) {
continue;
}
- if (!token.startsWith("-D")) {
+ if (!token.startsWith("-D") || !token.startsWith("-X") || !token.startsWith("-verbose")) {
throw new IllegalArgumentException(
- "Cannot parse java option string [" + str + "]. Some options does not begin with -D prefix.");
+ "Cannot parse java option string [" + str + "]. Some options do not begin with -D/-X/-verbose prefix.");
}
- String[] parts = token.substring(2).split("=", 2);
- if (parts.length != 2) {
+ String[] parts = null;
+ if (token.startsWith("-D")) {
+ parts = token.substring(2).split("=", 2);
+ } else if (token.startsWith("-verbose")) {
+ parts = token.split(":", 2);
+ } else if (token.startsWith("-XX:")) {
+ parts = token.split("=", 2);
+ } else if (token.startsWith("-X")) {
+ parts = token.split(":", 2);
+ }
+
+ if (parts == null || parts.length == 0 || parts.length > 2) {
throw new IllegalArgumentException(
"Cannot parse java option string [" + str + "]. The part [" + token + "] does not contain a =.");
+ }
+
+ if (parts.length == 1) {
+ parts[1] = null;
}
options.put(parts[0], parts[1]);
Index: app/org/apache/spark/deploy/history/SparkDataCollection.scala
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- app/org/apache/spark/deploy/history/SparkDataCollection.scala (revision c3cb9efddc15cb9b9af3b510d6dad3e65652ce38)
+++ app/org/apache/spark/deploy/history/SparkDataCollection.scala (revision )
@@ -249,7 +249,11 @@
stageInfo.outputBytes = data.outputBytes
stageInfo.shuffleReadBytes = data.shuffleReadTotalBytes
stageInfo.shuffleWriteBytes = data.shuffleWriteBytes
- addIntSetToJSet(data.completedIndices.asInstanceOf[mutable.HashSet[Int]], stageInfo.completedIndices)
+
+ val completedIndicies = new mutable.HashSet[Int]
+ data.completedIndices.iterator.foreach(x => completedIndicies.add(x))
+
+ addIntSetToJSet(completedIndicies, stageInfo.completedIndices)
_jobProgressData.addStageInfo(id._1, id._2, stageInfo)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment