[ 
https://issues.apache.org/jira/browse/SPARK-8853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Feynman Liang updated SPARK-8853:
---------------------------------
    Description: 
`FPGrowth[Item : ClassTag]` has a public constructor but uses a parameterized 
type with a context bound `ClassTag`, making it difficult to instantiate in 
Java.

For example, to instantiate one needs to do

```
ClassTag<String> tag = scala.reflect.ClassTag$.MODULE$.apply(String.class)

FPGrowthModel<String> model = new FPGrowthModel<String>(rdd, 35L, tag);
JavaRDD<AssociationRules.Rule<String>> results = (new 
AssociationRules()).runJava(model);
```

  was:
`FPGrowth[Item : ClassTag]` has a public constructor but uses a parameterized 
type with a context bound `ClassTag`, making it difficult to instantiate in 
Java.

For example, to instantiate one needs to do
```java
ClassTag<String> tag = scala.reflect.ClassTag$.MODULE$.apply(String.class)

FPGrowthModel<String> model = new FPGrowthModel<String>(rdd, 35L, tag);
JavaRDD<AssociationRules.Rule<String>> results = (new 
AssociationRules()).runJava(model);
```


> FPGrowth is not Java-Friendly
> -----------------------------
>
>                 Key: SPARK-8853
>                 URL: https://issues.apache.org/jira/browse/SPARK-8853
>             Project: Spark
>          Issue Type: Improvement
>          Components: MLlib
>            Reporter: Feynman Liang
>
> `FPGrowth[Item : ClassTag]` has a public constructor but uses a parameterized 
> type with a context bound `ClassTag`, making it difficult to instantiate in 
> Java.
> For example, to instantiate one needs to do
> ```
> ClassTag<String> tag = scala.reflect.ClassTag$.MODULE$.apply(String.class)
> FPGrowthModel<String> model = new FPGrowthModel<String>(rdd, 35L, tag);
> JavaRDD<AssociationRules.Rule<String>> results = (new 
> AssociationRules()).runJava(model);
> ```



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to