Github user srowen commented on the issue:
https://github.com/apache/spark/pull/18584
@vanzin I took this example:
https://github.com/apache/spark/blob/master/examples/src/main/scala/org/apache/spark/examples/mllib/PMMLModelExportExample.scala
which should exercise this code most directly, broke it out into a project and
compiled it vs Spark 2.1.1.
I then build Spark from this PR's branch, and ran the example locally with
`spark-submit`. It worked, but only if I set `SPARK_PREPEND_CLASSES=1`. Am I
right that this is to be expected, or the fact that it failed without this is a
problem? the failure otherwise was:
```
Exception in thread "main" java.lang.NoClassDefFoundError:
org/spark_project/dmg/pmml/Measure
at
org.apache.spark.mllib.pmml.export.PMMLModelExportFactory$.createPMMLModelExport(PMMLModelExportFactory.scala:38)
at
org.apache.spark.mllib.pmml.PMMLExportable$class.toPMML(PMMLExportable.scala:43)
at
org.apache.spark.mllib.pmml.PMMLExportable$class.toPMML(PMMLExportable.scala:78)
at
org.apache.spark.mllib.clustering.KMeansModel.toPMML(KMeansModel.scala:39)
at com.cloudera.datascience.jpmml.Test$.main(Test.scala:31)
...
```
That's not an error between the app and Spark API but saying that the Spark
code isn't finding the shaded JPMML that it is expecting to link against.
---
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]