Open youzp opened 6 years ago
Can the path of PMML file or udf-Jar be set HDFS path?
The UDF JAR is generated in-memory, and then saved to a file in local filesystem: https://github.com/jpmml/jpmml-evaluator-hive/blob/master/src/main/java/org/jpmml/evaluator/hive/ArchiveBuilderUDF.java#L42
The following two options should be both technically feasible:
The first option seems more elegant. Perhaps, the third argument of the CodeModelUtil#build(String, File, File)
method should simply be a java.io.OutputStream
(and the second argument a java.io.InputStream
):
https://github.com/jpmml/jpmml-evaluator-hive/blob/master/src/main/java/org/jpmml/evaluator/hive/CodeModelUtil.java#L47
I don't have access to a proper HDFS backend at the moment. It would be appreciated, if you could investigate and report back your findings.
Thanks for your help.The second option works fine, I think it's enough to use.
The second option works fine, I think it's enough to use.
Reopening this issue - the current assumption that both the incoming PMML file and the outgoing UDF JAR file must reside in the local filesystem is unnecessarily restrictive.
SELECT BuildArchive('com.mycompany.DecisionTreeIris', '/path/to/DecisionTreeIris.pmml', '/path/to/DecisionTreeIris.jar');