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

    https://github.com/apache/spark/pull/15874#discussion_r88142430
  
    --- Diff: mllib/src/main/scala/org/apache/spark/ml/feature/LSH.scala ---
    @@ -179,16 +211,13 @@ private[ml] abstract class LSHModel[T <: LSHModel[T]]
           inputName: String,
           explodeCols: Seq[String]): Dataset[_] = {
         require(explodeCols.size == 2, "explodeCols must be two strings.")
    -    val vectorToMap = udf((x: Vector) => x.asBreeze.iterator.toMap,
    -      MapType(DataTypes.IntegerType, DataTypes.DoubleType))
         val modelDataset: DataFrame = if 
(!dataset.columns.contains($(outputCol))) {
           transform(dataset)
         } else {
           dataset.toDF()
         }
         modelDataset.select(
    -      struct(col("*")).as(inputName),
    -      explode(vectorToMap(col($(outputCol)))).as(explodeCols))
    +      struct(col("*")).as(inputName), 
posexplode(col($(outputCol))).as(explodeCols))
    --- End diff --
    
    Yeah I still get it. Did you use the code above? It's not directly copy 
pasted from the existing tests.
    
    ````
    - memory leak test *** FAILED *** (8 seconds, 938 milliseconds)
    [info]   org.apache.spark.SparkException: Job aborted due to stage failure: 
Task 0 in stage 3.0 failed 1 times, most recent failure: Lost task 0.0 in stage 
3.0 (TID 204, localhost, executor driver): org.apache.spark.SparkException: 
Managed memory leak detected; size = 33816576 bytes, TID = 204
    [info]  at 
org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:295)
    [info]  at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    [info]  at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    [info]  at java.lang.Thread.run(Thread.java:745)
    [info] 
    [info] Driver stacktrace:
    [info]   at 
org.apache.spark.scheduler.DAGScheduler.org$apache$spark$scheduler$DAGScheduler$$failJobAndIndependentStages(DAGScheduler.scala:1435)
    [info]   at 
org.apache.spark.scheduler.DAGScheduler$$anonfun$abortStage$1.apply(DAGScheduler.scala:1423)
    [info]   at 
org.apache.spark.scheduler.DAGScheduler$$anonfun$abortStage$1.apply(DAGScheduler.scala:1422)
    [info]   at 
scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
    [info]   at 
scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)
    [info]   at 
org.apache.spark.scheduler.DAGScheduler.abortStage(DAGScheduler.scala:1422)
    [info]   at 
org.apache.spark.scheduler.DAGScheduler$$anonfun$handleTaskSetFailed$1.apply(DAGScheduler.scala:802)
    [info]   at 
org.apache.spark.scheduler.DAGScheduler$$anonfun$handleTaskSetFailed$1.apply(DAGScheduler.scala:802)
    [info]   at scala.Option.foreach(Option.scala:257)
    [info]   at 
org.apache.spark.scheduler.DAGScheduler.handleTaskSetFailed(DAGScheduler.scala:802)
    [info]   at 
org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.doOnReceive(DAGScheduler.scala:1650)
    [info]   at 
org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.onReceive(DAGScheduler.scala:1605)
    [info]   at 
org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.onReceive(DAGScheduler.scala:1594)
    [info]   at org.apache.spark.util.EventLoop$$anon$1.run(EventLoop.scala:48)
    [info]   at 
org.apache.spark.scheduler.DAGScheduler.runJob(DAGScheduler.scala:628)
    [info]   at org.apache.spark.SparkContext.runJob(SparkContext.scala:1896)
    [info]   at org.apache.spark.SparkContext.runJob(SparkContext.scala:1909)
    [info]   at org.apache.spark.SparkContext.runJob(SparkContext.scala:1922)
    [info]   at 
org.apache.spark.sql.execution.SparkPlan.executeTake(SparkPlan.scala:333)
    [info]   at 
org.apache.spark.sql.execution.CollectLimitExec.executeCollect(limit.scala:38)
    [info]   at 
org.apache.spark.sql.Dataset$$anonfun$org$apache$spark$sql$Dataset$$execute$1$1.apply(Dataset.scala:2323)
    [info]   at 
org.apache.spark.sql.execution.SQLExecution$.withNewExecutionId(SQLExecution.scala:57)
    [info]   at 
org.apache.spark.sql.Dataset.withNewExecutionId(Dataset.scala:2717)
    [info]   at 
org.apache.spark.sql.Dataset.org$apache$spark$sql$Dataset$$execute$1(Dataset.scala:2322)
    [info]   at 
org.apache.spark.sql.Dataset.org$apache$spark$sql$Dataset$$collect(Dataset.scala:2329)
    [info]   at 
org.apache.spark.sql.Dataset$$anonfun$head$1.apply(Dataset.scala:2065)
    [info]   at 
org.apache.spark.sql.Dataset$$anonfun$head$1.apply(Dataset.scala:2064)
    [info]   at 
org.apache.spark.sql.Dataset.withTypedCallback(Dataset.scala:2747)
    [info]   at org.apache.spark.sql.Dataset.head(Dataset.scala:2064)
    [info]   at org.apache.spark.sql.Dataset.take(Dataset.scala:2279)
    [info]   at org.apache.spark.sql.Dataset.showString(Dataset.scala:247)
    [info]   at org.apache.spark.sql.Dataset.show(Dataset.scala:596)
    [info]   at org.apache.spark.sql.Dataset.show(Dataset.scala:555)
    [info]   at org.apache.spark.sql.Dataset.show(Dataset.scala:564)
    [info]   at 
org.apache.spark.ml.feature.BucketedRandomProjectionLSHSuite$$anonfun$3.apply$mcV$sp(BucketedRandomProjectionLSHSuite.scala:74)
    ````


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to