You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Steve Jerman <st...@kloudspot.com> on 2017/04/20 16:56:58 UTC

Using FlinkML from Java?

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

Re: Using FlinkML from Java?

Posted by Till Rohrmann <tr...@apache.org>.
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 <st...@kloudspot.com> 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
>