Skip to content

Commit 1c2f605

Browse files
committed
Merge branch 'master' of git://git.apache.org/spark into history-page-indexing
2 parents 76b05e3 + aea7a99 commit 1c2f605

File tree

265 files changed

+7002
-2568
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

265 files changed

+7002
-2568
lines changed

assembly/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<parent>
2222
<groupId>org.apache.spark</groupId>
2323
<artifactId>spark-parent</artifactId>
24-
<version>1.2.0-SNAPSHOT</version>
24+
<version>1.3.0-SNAPSHOT</version>
2525
<relativePath>../pom.xml</relativePath>
2626
</parent>
2727

bagel/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<parent>
2222
<groupId>org.apache.spark</groupId>
2323
<artifactId>spark-parent</artifactId>
24-
<version>1.2.0-SNAPSHOT</version>
24+
<version>1.3.0-SNAPSHOT</version>
2525
<relativePath>../pom.xml</relativePath>
2626
</parent>
2727

bin/spark-sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
# Enter posix mode for bash
2424
set -o posix
2525

26+
# NOTE: This exact class name is matched downstream by SparkSubmit.
27+
# Any changes need to be reflected there.
2628
CLASS="org.apache.spark.sql.hive.thriftserver.SparkSQLCLIDriver"
2729

2830
# Figure out where Spark is installed

bin/spark-submit

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
export SPARK_HOME="$(cd "`dirname "$0"`"/..; pwd)"
2323
ORIG_ARGS=("$@")
2424

25+
# Set COLUMNS for progress bar
26+
export COLUMNS=`tput cols`
27+
2528
while (($#)); do
2629
if [ "$1" = "--deploy-mode" ]; then
2730
SPARK_SUBMIT_DEPLOY_MODE=$2

core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<parent>
2222
<groupId>org.apache.spark</groupId>
2323
<artifactId>spark-parent</artifactId>
24-
<version>1.2.0-SNAPSHOT</version>
24+
<version>1.3.0-SNAPSHOT</version>
2525
<relativePath>../pom.xml</relativePath>
2626
</parent>
2727

core/src/main/java/org/apache/spark/SparkStageInfo.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
public interface SparkStageInfo {
2727
int stageId();
2828
int currentAttemptId();
29+
long submissionTime();
2930
String name();
3031
int numTasks();
3132
int numActiveTasks();

core/src/main/resources/org/apache/spark/ui/static/additional-metrics.js

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,26 +26,24 @@ $(function() {
2626
// Switch the class of the arrow from open to closed.
2727
$(this).find('.expand-additional-metrics-arrow').toggleClass('arrow-open');
2828
$(this).find('.expand-additional-metrics-arrow').toggleClass('arrow-closed');
29-
30-
// If clicking caused the metrics to expand, automatically check all options for additional
31-
// metrics (don't trigger a click when collapsing metrics, because it leads to weird
32-
// toggling behavior).
33-
if (!$(additionalMetricsDiv).hasClass('collapsed')) {
34-
$(this).parent().find('input:checkbox:not(:checked)').trigger('click');
35-
}
3629
});
3730

38-
$("input:checkbox:not(:checked)").each(function() {
39-
var column = "table ." + $(this).attr("name");
40-
$(column).hide();
41-
});
42-
// Stripe table rows after rows have been hidden to ensure correct striping.
43-
stripeTables();
31+
stripeSummaryTable();
4432

4533
$("input:checkbox").click(function() {
4634
var column = "table ." + $(this).attr("name");
4735
$(column).toggle();
48-
stripeTables();
36+
stripeSummaryTable();
37+
});
38+
39+
$("#select-all-metrics").click(function() {
40+
if (this.checked) {
41+
// Toggle all un-checked options.
42+
$('input:checkbox:not(:checked)').trigger('click');
43+
} else {
44+
// Toggle all checked options.
45+
$('input:checkbox:checked').trigger('click');
46+
}
4947
});
5048

5149
// Trigger a click on the checkbox if a user clicks the label next to it.

core/src/main/resources/org/apache/spark/ui/static/table.js

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,18 @@
1515
* limitations under the License.
1616
*/
1717

18-
/* Adds background colors to stripe table rows. This is necessary (instead of using css or the
19-
* table striping provided by bootstrap) to appropriately stripe tables with hidden rows. */
20-
function stripeTables() {
21-
$("table.table-striped-custom").each(function() {
22-
$(this).find("tr:not(:hidden)").each(function (index) {
23-
if (index % 2 == 1) {
24-
$(this).css("background-color", "#f9f9f9");
25-
} else {
26-
$(this).css("background-color", "#ffffff");
27-
}
28-
});
18+
/* Adds background colors to stripe table rows in the summary table (on the stage page). This is
19+
* necessary (instead of using css or the table striping provided by bootstrap) because the summary
20+
* table has hidden rows.
21+
*
22+
* An ID selector (rather than a class selector) is used to ensure this runs quickly even on pages
23+
* with thousands of task rows (ID selectors are much faster than class selectors). */
24+
function stripeSummaryTable() {
25+
$("#task-summary-table").find("tr:not(:hidden)").each(function (index) {
26+
if (index % 2 == 1) {
27+
$(this).css("background-color", "#f9f9f9");
28+
} else {
29+
$(this).css("background-color", "#ffffff");
30+
}
2931
});
3032
}

core/src/main/resources/org/apache/spark/ui/static/webui.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,3 +168,9 @@ span.additional-metric-title {
168168
border-left: 5px solid black;
169169
display: inline-block;
170170
}
171+
172+
/* Hide all additional metrics by default. This is done here rather than using JavaScript to
173+
* avoid slow page loads for stage pages with large numbers (e.g., thousands) of tasks. */
174+
.scheduler_delay, .gc_time, .deserialization_time, .serialization_time, .getting_result_time {
175+
display: none;
176+
}

core/src/main/scala/org/apache/spark/Accumulators.scala

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
package org.apache.spark
1919

2020
import java.io.{ObjectInputStream, Serializable}
21+
import java.util.concurrent.atomic.AtomicLong
2122

2223
import scala.collection.generic.Growable
2324
import scala.collection.mutable.Map
@@ -228,6 +229,7 @@ GrowableAccumulableParam[R <% Growable[T] with TraversableOnce[T] with Serializa
228229
*/
229230
class Accumulator[T](@transient initialValue: T, param: AccumulatorParam[T], name: Option[String])
230231
extends Accumulable[T,T](initialValue, param, name) {
232+
231233
def this(initialValue: T, param: AccumulatorParam[T]) = this(initialValue, param, None)
232234
}
233235

@@ -244,6 +246,36 @@ trait AccumulatorParam[T] extends AccumulableParam[T, T] {
244246
}
245247
}
246248

249+
object AccumulatorParam {
250+
251+
// The following implicit objects were in SparkContext before 1.2 and users had to
252+
// `import SparkContext._` to enable them. Now we move them here to make the compiler find
253+
// them automatically. However, as there are duplicate codes in SparkContext for backward
254+
// compatibility, please update them accordingly if you modify the following implicit objects.
255+
256+
implicit object DoubleAccumulatorParam extends AccumulatorParam[Double] {
257+
def addInPlace(t1: Double, t2: Double): Double = t1 + t2
258+
def zero(initialValue: Double) = 0.0
259+
}
260+
261+
implicit object IntAccumulatorParam extends AccumulatorParam[Int] {
262+
def addInPlace(t1: Int, t2: Int): Int = t1 + t2
263+
def zero(initialValue: Int) = 0
264+
}
265+
266+
implicit object LongAccumulatorParam extends AccumulatorParam[Long] {
267+
def addInPlace(t1: Long, t2: Long) = t1 + t2
268+
def zero(initialValue: Long) = 0L
269+
}
270+
271+
implicit object FloatAccumulatorParam extends AccumulatorParam[Float] {
272+
def addInPlace(t1: Float, t2: Float) = t1 + t2
273+
def zero(initialValue: Float) = 0f
274+
}
275+
276+
// TODO: Add AccumulatorParams for other types, e.g. lists and strings
277+
}
278+
247279
// TODO: The multi-thread support in accumulators is kind of lame; check
248280
// if there's a more intuitive way of doing it right
249281
private object Accumulators {
@@ -252,7 +284,7 @@ private object Accumulators {
252284
val localAccums = Map[Thread, Map[Long, Accumulable[_, _]]]()
253285
var lastId: Long = 0
254286

255-
def newId: Long = synchronized {
287+
def newId(): Long = synchronized {
256288
lastId += 1
257289
lastId
258290
}

0 commit comments

Comments
 (0)