Github user mengxr commented on a diff in the pull request:

    https://github.com/apache/spark/pull/1628#discussion_r15506022
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/mllib/api/python/PythonMLLibAPI.scala ---
    @@ -453,4 +454,74 @@ class PythonMLLibAPI extends Serializable {
         val ratings = ratingsBytesJRDD.rdd.map(unpackRating)
         ALS.trainImplicit(ratings, rank, iterations, lambda, blocks, alpha)
       }
    +
    +  /**
    +   * Java stub for Python mllib RandomRDDGenerators.uniformRDD()
    +   */
    +  def uniformRDD(jsc: JavaSparkContext,
    +      size: Long,
    +      numPartitions: Int,
    +      seed: Long): JavaRDD[Array[Byte]] = {
    +    RandomRDDGenerators.uniformRDD(jsc.sc, size, numPartitions, seed)
    +      .map(serializeDouble).toJavaRDD()
    +  }
    +
    +  /**
    +   * Java stub for Python mllib RandomRDDGenerators.normalRDD()
    +   */
    +  def normalRDD(jsc: JavaSparkContext,
    +      size: Long,
    +      numPartitions: Int,
    +      seed: Long): JavaRDD[Array[Byte]] = {
    +    RandomRDDGenerators.normalRDD(jsc.sc, size, numPartitions, seed)
    +      .map(serializeDouble).toJavaRDD()
    +  }
    +
    +  /**
    +   * Java stub for Python mllib RandomRDDGenerators.poissonRDD()
    +   */
    +  def poissonRDD(jsc: JavaSparkContext,
    +      mean: Double,
    +      size: Long,
    +      numPartitions: Int,
    +      seed: Long): JavaRDD[Array[Byte]] = {
    +    RandomRDDGenerators.poissonRDD(jsc.sc, mean, size, numPartitions, seed)
    +      .map(serializeDouble).toJavaRDD()
    +  }
    +
    +  /**
    +   * Java stub for Python mllib RandomRDDGenerators.uniformVectorRDD()
    +   */
    +  def uniformVectorRDD(jsc: JavaSparkContext,
    +      numRows: Long,
    +      numCols: Int,
    +      numPartitions: Int,
    +      seed: Long): JavaRDD[Array[Byte]] = {
    +    RandomRDDGenerators.uniformVectorRDD(jsc.sc, numRows, numCols, 
numPartitions, seed)
    +      .map(serializeDoubleVector).toJavaRDD()
    +  }
    +
    +  /**
    +   * Java stub for Python mllib RandomRDDGenerators.normalVectorRDD()
    +   */
    +  def normalVectorRDD(jsc: JavaSparkContext,
    +      numRows: Long,
    +      numCols: Int,
    +      numPartitions: Int,
    +      seed: Long): JavaRDD[Array[Byte]] = {
    +    RandomRDDGenerators.normalVectorRDD(jsc.sc, numRows, numCols, 
numPartitions, seed)
    +      .map(serializeDoubleVector).toJavaRDD()
    +  }
    +
    +  /**
    +   * Java stub for Python mllib RandomRDDGenerators.poissonVectorRDD()
    +   */
    +  def poissonVectorRDD(jsc: JavaSparkContext,mean: Double,
    --- End diff --
    
    move `mean: Double` to next line


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to