You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by an...@apache.org on 2015/02/06 20:12:36 UTC
spark git commit: [SPARK-5618][Spark Core][Minor] Optimise utility
code.
Repository: spark
Updated Branches:
refs/heads/master 6072fcc14 -> 4cdb26c17
[SPARK-5618][Spark Core][Minor] Optimise utility code.
Author: Makoto Fukuhara <fu...@gmail.com>
Closes #4396 from fukuo33/fix-unnecessary-regex and squashes the following commits:
cd07fd6 [Makoto Fukuhara] fix unnecessary regex.
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/4cdb26c1
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/4cdb26c1
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/4cdb26c1
Branch: refs/heads/master
Commit: 4cdb26c174e479a144950d12e1ad180f361af1fd
Parents: 6072fcc
Author: Makoto Fukuhara <fu...@gmail.com>
Authored: Fri Feb 6 11:11:38 2015 -0800
Committer: Andrew Or <an...@databricks.com>
Committed: Fri Feb 6 11:12:34 2015 -0800
----------------------------------------------------------------------
core/src/main/scala/org/apache/spark/util/Utils.scala | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/4cdb26c1/core/src/main/scala/org/apache/spark/util/Utils.scala
----------------------------------------------------------------------
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 72d15e6..61d287c 100644
--- a/core/src/main/scala/org/apache/spark/util/Utils.scala
+++ b/core/src/main/scala/org/apache/spark/util/Utils.scala
@@ -1162,9 +1162,9 @@ private[spark] object Utils extends Logging {
// finding the call site of a method.
val SPARK_CORE_CLASS_REGEX =
"""^org\.apache\.spark(\.api\.java)?(\.util)?(\.rdd)?(\.broadcast)?\.[A-Z]""".r
- val SCALA_CLASS_REGEX = """^scala""".r
+ val SCALA_CORE_CLASS_PREFIX = "scala"
val isSparkCoreClass = SPARK_CORE_CLASS_REGEX.findFirstIn(className).isDefined
- val isScalaClass = SCALA_CLASS_REGEX.findFirstIn(className).isDefined
+ val isScalaClass = className.startsWith(SCALA_CORE_CLASS_PREFIX)
// If the class is a Spark internal class or a Scala class, then exclude.
isSparkCoreClass || isScalaClass
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org