diff options
author | scwf <wangfei1@huawei.com> | 2014-08-27 19:44:26 -0700 |
---|---|---|
committer | Matei Zaharia <matei@databricks.com> | 2014-08-27 19:44:30 -0700 |
commit | b86277c13232c3e65ce6c6cf7f6ede6a00546485 (patch) | |
tree | 4d062d606b57ce5a61008da3c6ac5bc565eddb20 /core | |
parent | 64d8ecbbe94c47236ff2d8c94d7401636ba6fca4 (diff) | |
download | spark-b86277c13232c3e65ce6c6cf7f6ede6a00546485.tar.gz spark-b86277c13232c3e65ce6c6cf7f6ede6a00546485.tar.bz2 spark-b86277c13232c3e65ce6c6cf7f6ede6a00546485.zip |
[SPARK-3271] delete unused methods in Utils
delete no used method in Utils
Author: scwf <wangfei1@huawei.com>
Closes #2160 from scwf/delete-no-use-method and squashes the following commits:
d8f6b0d [scwf] delete no use method in Utils
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/scala/org/apache/spark/util/Utils.scala | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/core/src/main/scala/org/apache/spark/util/Utils.scala b/core/src/main/scala/org/apache/spark/util/Utils.scala index 69a84a3604..86f646d2af 100644 --- a/core/src/main/scala/org/apache/spark/util/Utils.scala +++ b/core/src/main/scala/org/apache/spark/util/Utils.scala @@ -52,11 +52,6 @@ private[spark] case class CallSite(shortForm: String, longForm: String) private[spark] object Utils extends Logging { val random = new Random() - def sparkBin(sparkHome: String, which: String): File = { - val suffix = if (isWindows) ".cmd" else "" - new File(sparkHome + File.separator + "bin", which + suffix) - } - /** Serialize an object using Java serialization */ def serialize[T](o: T): Array[Byte] = { val bos = new ByteArrayOutputStream() @@ -162,30 +157,6 @@ private[spark] object Utils extends Logging { } } - def isAlpha(c: Char): Boolean = { - (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') - } - - /** Split a string into words at non-alphabetic characters */ - def splitWords(s: String): Seq[String] = { - val buf = new ArrayBuffer[String] - var i = 0 - while (i < s.length) { - var j = i - while (j < s.length && isAlpha(s.charAt(j))) { - j += 1 - } - if (j > i) { - buf += s.substring(i, j) - } - i = j - while (i < s.length && !isAlpha(s.charAt(i))) { - i += 1 - } - } - buf - } - private val shutdownDeletePaths = new scala.collection.mutable.HashSet[String]() private val shutdownDeleteTachyonPaths = new scala.collection.mutable.HashSet[String]() @@ -831,14 +802,6 @@ private[spark] object Utils extends Logging { } /** - * Execute a command in the current working directory, throwing an exception if it completes - * with an exit code other than 0. - */ - def execute(command: Seq[String]) { - execute(command, new File(".")) - } - - /** * Execute a command and get its output, throwing an exception if it yields a code other than 0. */ def executeAndGetOutput(command: Seq[String], workingDir: File = new File("."), |