You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by me...@apache.org on 2015/04/28 23:07:29 UTC

spark git commit: [SPARK-7201] [MLLIB] move Identifiable to ml.util

Repository: spark
Updated Branches:
  refs/heads/master 28b1af742 -> f0a1f90f5


[SPARK-7201] [MLLIB] move Identifiable to ml.util

It shouldn't live directly under `spark.ml`.

Author: Xiangrui Meng <me...@databricks.com>

Closes #5749 from mengxr/SPARK-7201 and squashes the following commits:

53847f9 [Xiangrui Meng] move Identifiable to ml.util


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/f0a1f90f
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/f0a1f90f
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/f0a1f90f

Branch: refs/heads/master
Commit: f0a1f90f53b447c61f405cdb2c553f3dc067bf8d
Parents: 28b1af7
Author: Xiangrui Meng <me...@databricks.com>
Authored: Tue Apr 28 14:07:26 2015 -0700
Committer: Xiangrui Meng <me...@databricks.com>
Committed: Tue Apr 28 14:07:26 2015 -0700

----------------------------------------------------------------------
 .../scala/org/apache/spark/ml/Evaluator.scala   |  1 +
 .../org/apache/spark/ml/Identifiable.scala      | 33 --------------------
 .../org/apache/spark/ml/param/params.scala      |  2 +-
 .../org/apache/spark/ml/util/Identifiable.scala | 33 ++++++++++++++++++++
 4 files changed, 35 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/f0a1f90f/mllib/src/main/scala/org/apache/spark/ml/Evaluator.scala
----------------------------------------------------------------------
diff --git a/mllib/src/main/scala/org/apache/spark/ml/Evaluator.scala b/mllib/src/main/scala/org/apache/spark/ml/Evaluator.scala
index d2ca2e6..8b4b5fd 100644
--- a/mllib/src/main/scala/org/apache/spark/ml/Evaluator.scala
+++ b/mllib/src/main/scala/org/apache/spark/ml/Evaluator.scala
@@ -19,6 +19,7 @@ package org.apache.spark.ml
 
 import org.apache.spark.annotation.AlphaComponent
 import org.apache.spark.ml.param.ParamMap
+import org.apache.spark.ml.util.Identifiable
 import org.apache.spark.sql.DataFrame
 
 /**

http://git-wip-us.apache.org/repos/asf/spark/blob/f0a1f90f/mllib/src/main/scala/org/apache/spark/ml/Identifiable.scala
----------------------------------------------------------------------
diff --git a/mllib/src/main/scala/org/apache/spark/ml/Identifiable.scala b/mllib/src/main/scala/org/apache/spark/ml/Identifiable.scala
deleted file mode 100644
index a1d4909..0000000
--- a/mllib/src/main/scala/org/apache/spark/ml/Identifiable.scala
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.spark.ml
-
-import java.util.UUID
-
-/**
- * Object with a unique id.
- */
-private[ml] trait Identifiable extends Serializable {
-
-  /**
-   * A unique id for the object. The default implementation concatenates the class name, "_", and 8
-   * random hex chars.
-   */
-  private[ml] val uid: String =
-    this.getClass.getSimpleName + "_" + UUID.randomUUID().toString.take(8)
-}

http://git-wip-us.apache.org/repos/asf/spark/blob/f0a1f90f/mllib/src/main/scala/org/apache/spark/ml/param/params.scala
----------------------------------------------------------------------
diff --git a/mllib/src/main/scala/org/apache/spark/ml/param/params.scala b/mllib/src/main/scala/org/apache/spark/ml/param/params.scala
index ddc5907..014e124 100644
--- a/mllib/src/main/scala/org/apache/spark/ml/param/params.scala
+++ b/mllib/src/main/scala/org/apache/spark/ml/param/params.scala
@@ -24,7 +24,7 @@ import scala.annotation.varargs
 import scala.collection.mutable
 
 import org.apache.spark.annotation.{AlphaComponent, DeveloperApi}
-import org.apache.spark.ml.Identifiable
+import org.apache.spark.ml.util.Identifiable
 
 /**
  * :: AlphaComponent ::

http://git-wip-us.apache.org/repos/asf/spark/blob/f0a1f90f/mllib/src/main/scala/org/apache/spark/ml/util/Identifiable.scala
----------------------------------------------------------------------
diff --git a/mllib/src/main/scala/org/apache/spark/ml/util/Identifiable.scala b/mllib/src/main/scala/org/apache/spark/ml/util/Identifiable.scala
new file mode 100644
index 0000000..8a56748
--- /dev/null
+++ b/mllib/src/main/scala/org/apache/spark/ml/util/Identifiable.scala
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.ml.util
+
+import java.util.UUID
+
+/**
+ * Object with a unique id.
+ */
+private[ml] trait Identifiable extends Serializable {
+
+  /**
+   * A unique id for the object. The default implementation concatenates the class name, "_", and 8
+   * random hex chars.
+   */
+  private[ml] val uid: String =
+    this.getClass.getSimpleName + "_" + UUID.randomUUID().toString.take(8)
+}


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org