You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mahout.apache.org by sm...@apache.org on 2016/04/08 10:28:06 UTC
mahout git commit: NoJira: Fix missing license header
Repository: mahout
Updated Branches:
refs/heads/flink-binding 4fc65d4e2 -> a2101110e
NoJira: Fix missing license header
Project: http://git-wip-us.apache.org/repos/asf/mahout/repo
Commit: http://git-wip-us.apache.org/repos/asf/mahout/commit/a2101110
Tree: http://git-wip-us.apache.org/repos/asf/mahout/tree/a2101110
Diff: http://git-wip-us.apache.org/repos/asf/mahout/diff/a2101110
Branch: refs/heads/flink-binding
Commit: a2101110e9a932ac547c025c7267ffa88ecbe271
Parents: 4fc65d4
Author: smarthi <sm...@apache.org>
Authored: Fri Apr 8 04:27:31 2016 -0400
Committer: smarthi <sm...@apache.org>
Committed: Fri Apr 8 04:27:31 2016 -0400
----------------------------------------------------------------------
.../flinkbindings/FlinkDistributedContext.scala | 1 -
.../mahout/flinkbindings/blas/FlinkOpAtA.scala | 18 ++++++++++++++++++
.../standard/DistributedDecompositionsSuite.scala | 3 +++
.../apache/mahout/sparkbindings/blas/AtA.scala | 10 ++++------
4 files changed, 25 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mahout/blob/a2101110/flink/src/main/scala/org/apache/mahout/flinkbindings/FlinkDistributedContext.scala
----------------------------------------------------------------------
diff --git a/flink/src/main/scala/org/apache/mahout/flinkbindings/FlinkDistributedContext.scala b/flink/src/main/scala/org/apache/mahout/flinkbindings/FlinkDistributedContext.scala
index 49dc593..8338080 100644
--- a/flink/src/main/scala/org/apache/mahout/flinkbindings/FlinkDistributedContext.scala
+++ b/flink/src/main/scala/org/apache/mahout/flinkbindings/FlinkDistributedContext.scala
@@ -43,7 +43,6 @@ class FlinkDistributedContext(val env: ExecutionEnvironment) extends Distributed
val engine: DistributedEngine = FlinkEngine
-
override def close() {
// TODO
}
http://git-wip-us.apache.org/repos/asf/mahout/blob/a2101110/flink/src/main/scala/org/apache/mahout/flinkbindings/blas/FlinkOpAtA.scala
----------------------------------------------------------------------
diff --git a/flink/src/main/scala/org/apache/mahout/flinkbindings/blas/FlinkOpAtA.scala b/flink/src/main/scala/org/apache/mahout/flinkbindings/blas/FlinkOpAtA.scala
index b9fbc63..ab99e4d 100644
--- a/flink/src/main/scala/org/apache/mahout/flinkbindings/blas/FlinkOpAtA.scala
+++ b/flink/src/main/scala/org/apache/mahout/flinkbindings/blas/FlinkOpAtA.scala
@@ -1,3 +1,21 @@
+/**
+ * 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.mahout.flinkbindings.blas
import java.lang.Iterable
http://git-wip-us.apache.org/repos/asf/mahout/blob/a2101110/flink/src/test/scala/org/apache/mahout/flinkbindings/standard/DistributedDecompositionsSuite.scala
----------------------------------------------------------------------
diff --git a/flink/src/test/scala/org/apache/mahout/flinkbindings/standard/DistributedDecompositionsSuite.scala b/flink/src/test/scala/org/apache/mahout/flinkbindings/standard/DistributedDecompositionsSuite.scala
index 4256b52..031553e 100644
--- a/flink/src/test/scala/org/apache/mahout/flinkbindings/standard/DistributedDecompositionsSuite.scala
+++ b/flink/src/test/scala/org/apache/mahout/flinkbindings/standard/DistributedDecompositionsSuite.scala
@@ -20,8 +20,11 @@ package org.apache.mahout.flinkbindings.standard
import org.apache.mahout.flinkbindings._
import org.apache.mahout.math.decompositions.DistributedDecompositionsSuiteBase
+import org.junit.runner.RunWith
import org.scalatest.FunSuite
+import org.scalatest.junit.JUnitRunner
+@RunWith(classOf[JUnitRunner])
class DistributedDecompositionsSuite extends FunSuite with DistributedFlinkSuite
with DistributedDecompositionsSuiteBase {
http://git-wip-us.apache.org/repos/asf/mahout/blob/a2101110/spark/src/main/scala/org/apache/mahout/sparkbindings/blas/AtA.scala
----------------------------------------------------------------------
diff --git a/spark/src/main/scala/org/apache/mahout/sparkbindings/blas/AtA.scala b/spark/src/main/scala/org/apache/mahout/sparkbindings/blas/AtA.scala
index 50a4b19..26af329 100644
--- a/spark/src/main/scala/org/apache/mahout/sparkbindings/blas/AtA.scala
+++ b/spark/src/main/scala/org/apache/mahout/sparkbindings/blas/AtA.scala
@@ -25,8 +25,6 @@ import org.apache.mahout.math.scalabindings._
import RLikeOps._
import collection._
import JavaConversions._
-import org.apache.spark.SparkContext._
-import org.apache.log4j.Logger
import org.apache.mahout.math.drm.logical.OpAtA
import SparkEngine._
@@ -135,7 +133,7 @@ object AtA {
// dense in reality than the source.
val m = op.A.nrow
val n = op.A.ncol
- val srcNumParts = srcRdd.partitions.size
+ val srcNumParts = srcRdd.partitions.length
val finalNumParts = (srcNumParts * n / m).ceil.toInt max 1
val numParts = finalNumParts max srcNumParts
val ranges = computeEvenSplits(n, numParts)
@@ -185,7 +183,7 @@ object AtA {
// dense in reality than the source.
val m = op.A.nrow
val n = op.A.ncol
- val numParts = (srcRdd.partitions.size.toDouble * n / m).ceil.toInt max 1
+ val numParts = (srcRdd.partitions.length.toDouble * n / m).ceil.toInt max 1
val blockHeight = (n - 1) / numParts + 1
val offsets = (0 until numParts).map(_ * blockHeight)
val ranges = offsets.map(offset => offset until (offset + blockHeight min n))
@@ -229,7 +227,7 @@ object AtA {
}
if (log.isDebugEnabled)
- log.debug(s"AtA #parts: ${rddAtA.partitions.size}.")
+ log.debug(s"AtA #parts: ${rddAtA.partitions.length}.")
rddAtA
}
@@ -245,7 +243,7 @@ object AtA {
// dense in reality than the source.
val m = op.A.nrow
val n = op.A.ncol
- val aparts = srcRdd.partitions.size
+ val aparts = srcRdd.partitions.length
val numParts = estimateProductPartitions(anrow = n, ancol = m, bncol = n, aparts = aparts, bparts = aparts)
val ranges = computeEvenSplits(n, numParts)