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/11 10:09:53 UTC

[26/50] [abbrv] mahout git commit: NoJira: Remove deprecated DataSetOps.scala

NoJira: Remove deprecated DataSetOps.scala


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

Branch: refs/heads/master
Commit: 2861732da34a87c48f7da77576ca2a75837a54e4
Parents: 209b946
Author: smarthi <sm...@apache.org>
Authored: Wed Apr 6 21:18:59 2016 -0400
Committer: smarthi <sm...@apache.org>
Committed: Wed Apr 6 21:18:59 2016 -0400

----------------------------------------------------------------------
 .../mahout/flinkbindings/DataSetOps.scala       | 67 --------------------
 1 file changed, 67 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mahout/blob/2861732d/flink/src/main/scala/org/apache/mahout/flinkbindings/DataSetOps.scala
----------------------------------------------------------------------
diff --git a/flink/src/main/scala/org/apache/mahout/flinkbindings/DataSetOps.scala b/flink/src/main/scala/org/apache/mahout/flinkbindings/DataSetOps.scala
deleted file mode 100644
index 2387d4b..0000000
--- a/flink/src/main/scala/org/apache/mahout/flinkbindings/DataSetOps.scala
+++ /dev/null
@@ -1,67 +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.mahout.flinkbindings
-
-//@Deprecated
-//class DataSetOps[K: ClassTag](val ds: DataSet[K]) {
-
-  /**
-   * Implementation taken from http://stackoverflow.com/questions/30596556/zipwithindex-on-apache-flink
-   * 
-   * TODO: remove when FLINK-2152 is committed and released 
-   */
-//  def zipWithIndex(): DataSet[(Int, K)] = {
-//
-//     first for each partition count the number of elements - to calculate the offsets
-//    val counts = ds.mapPartition(new RichMapPartitionFunction[K, (Int, Int)] {
-//      override def mapPartition(values: Iterable[K], out: Collector[(Int, Int)]): Unit = {
-//        val cnt: Int = values.asScala.count(_ => true)
-//        val subtaskIdx = getRuntimeContext.getIndexOfThisSubtask
-//        out.collect((subtaskIdx, cnt))
-//      }
-//    })
-
-    // then use the offsets to index items of each partition
-//    val zipped = ds.mapPartition(new RichMapPartitionFunction[K, (Int, K)] {
-//        var offset: Int = 0
-//
-//        override def open(parameters: Configuration): Unit = {
-//          val offsetsJava: java.util.List[(Int, Int)] =
-//                  getRuntimeContext.getBroadcastVariable("counts")
-//          val offsets = offsetsJava.asScala
-//
-//          val sortedOffsets =
-//            offsets sortBy { case (id, _) => id } map { case (_, cnt) => cnt }
-//
-//          val subtaskId = getRuntimeContext.getIndexOfThisSubtask
-//          offset = sortedOffsets.take(subtaskId).sum
-//        }
-//
-//        override def mapPartition(values: Iterable[K], out: Collector[(Int, K)]): Unit = {
-//          val it = values.asScala
-//          it.zipWithIndex.foreach { case (value, idx) =>
-//            out.collect((idx + offset, value))
-//          }
-//        }
-//    }).withBroadcastSet(counts, "counts")
-//
-//    zipped
-//  }
-//
-//}
\ No newline at end of file