Using FlinkML from Java?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Using FlinkML from Java?

Steve Jerman
Hi Folks,

I’m trying to use FlinkML 1.2 from Java … getting this:

SVM svm = new SVM()
  .setBlocks(env.getParallelism())
  .setIterations(100)
  .setRegularization(0.001)
  .setStepsize(0.1)
  .setSeed(42);


svm.fit(labelledTraining);

The type org.apache.flink.api.scala.DataSet cannot be resolved. It is indirectly referenced from required .class files.

Are there any tricks required to get it running? Or is Java not supported?

Steve
Reply | Threaded
Open this post in threaded view
|

Re: Using FlinkML from Java?

Till Rohrmann
Hi Steve,

unfortunately, FlinkML's pipeline mechanism depends on Scala's implicit value feature. Therefore, FlinkML can only be used with Scala if you don't want to construct the pipelines manually (which I wouldn't recommend).

Cheers,
Till

On Thu, Apr 20, 2017 at 6:56 PM, Steve Jerman <[hidden email]> wrote:
Hi Folks,

I’m trying to use FlinkML 1.2 from Java … getting this:

SVM svm = new SVM()
  .setBlocks(env.getParallelism())
  .setIterations(100)
  .setRegularization(0.001)
  .setStepsize(0.1)
  .setSeed(42);


svm.fit(labelledTraining);

The type org.apache.flink.api.scala.DataSet cannot be resolved. It is indirectly referenced from required .class files.

Are there any tricks required to get it running? Or is Java not supported?

Steve