aboutsummaryrefslogtreecommitdiff
path: root/repl
diff options
context:
space:
mode:
authorReynold Xin <rxin@databricks.com>2016-04-22 09:36:59 -0700
committerReynold Xin <rxin@databricks.com>2016-04-22 09:36:59 -0700
commitc089c6f4e83d85e622b8d13f466a656c2852702b (patch)
tree0759f0137ad230e158699393d183e7fe244e0d6d /repl
parent056883e070bd258d193fd4d783ab608a19b86c36 (diff)
downloadspark-c089c6f4e83d85e622b8d13f466a656c2852702b.tar.gz
spark-c089c6f4e83d85e622b8d13f466a656c2852702b.tar.bz2
spark-c089c6f4e83d85e622b8d13f466a656c2852702b.zip
[SPARK-10001] Consolidate Signaling and SignalLogger.
## What changes were proposed in this pull request? This is a follow-up to #12557, with the following changes: 1. Fixes some of the style issues. 2. Merges Signaling and SignalLogger into a new class called SignalUtils. It was pretty confusing to have Signaling and Signal in one file, and it was also confusing to have two classes named Signaling and one called the other. 3. Made logging registration idempotent. ## How was this patch tested? N/A. Author: Reynold Xin <rxin@databricks.com> Closes #12605 from rxin/SPARK-10001.
Diffstat (limited to 'repl')
-rw-r--r--repl/src/main/scala/org/apache/spark/repl/Signaling.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/repl/src/main/scala/org/apache/spark/repl/Signaling.scala b/repl/src/main/scala/org/apache/spark/repl/Signaling.scala
index c305ed545c..202febf144 100644
--- a/repl/src/main/scala/org/apache/spark/repl/Signaling.scala
+++ b/repl/src/main/scala/org/apache/spark/repl/Signaling.scala
@@ -19,7 +19,7 @@ package org.apache.spark.repl
import org.apache.spark.SparkContext
import org.apache.spark.internal.Logging
-import org.apache.spark.util.{Signaling => USignaling}
+import org.apache.spark.util.SignalUtils
private[repl] object Signaling extends Logging {
@@ -28,7 +28,7 @@ private[repl] object Signaling extends Logging {
* when no jobs are currently running.
* This makes it possible to interrupt a running shell job by pressing Ctrl+C.
*/
- def cancelOnInterrupt(ctx: SparkContext): Unit = USignaling.register("INT") {
+ def cancelOnInterrupt(ctx: SparkContext): Unit = SignalUtils.register("INT") {
if (!ctx.statusTracker.getActiveJobIds().isEmpty) {
logWarning("Cancelling all active jobs, this can take a while. " +
"Press Ctrl+C again to exit now.")