et compute() throws Exception {
return this.env.generateSequence(1, NumIter)
.map(new Sampler())
.reduce(new SumReducer())
.map(/*return 4 * x*/);}
...
public ? computeWhatever(DataSet pi) throws Exception {
...
}
On 07.06.2016 13:35, Ser Kho wrote
a function in Apache Flink Java setting."
Implement CustomUnaryOperation. This can then be applied to a DataSet by
calling `DataSet result = DataSet.runOperation(new MyOperation<>(...));`.
On Mon, Jun 6, 2016 at 3:14 PM, Ser Kho <khov2...@yahoo.com> wrote:
The question is
trying to execute a job within a
job. This just doesn't work.
your main method should look like this:
public static void main(String[] args) throws Exception
{
double pi = new classPI().compute();
System.out.println("We estimate Pi to be: " + pi);
}
On 06.06.2016 21:1
The question is how to encapsulate numerous transformations into one object or
may be a function in Apache Flink Java setting. I have tried to investigate
this question using an example of Pi calculation (see below). I am wondering
whether or not the suggested approach is valid from the Flink's