Assuming your EnvironmentContext is named `env` Simply call:

DataSet<Tuple3<Integer, Point, Boolean>> fElements = env.*fromCollection*
(finalElements);

Does this help?

On Tue, Feb 9, 2016 at 6:06 PM, subash basnet <yasub...@gmail.com> wrote:

> Hello all,
>
> I have performed a modification in KMeans code to detect outliers. I have
> printed the output in the console but I am not able to write it to the file
> using the given 'writeAsCsv' method.
> The problem is I generate a list of tuples.
> My List is:
> List<Tuple3> finalElements = new ArrayList<Tuple3>();
> Following is the datatype of the elements added to the list:
> Tuple3<Integer, Point, Boolean> newElement = new Tuple3<Integer, Point,
> Boolean>();
> finalElements.add(newElement);
> Now I am stuck on how to convert this 'finalElements' to
> DataSet<Tuple3<Integer, Point, Boolean>> fElements,
> so that I could use
> fElements.writeAsCsv(outputPath, "\n"," ");
>
> Best Regards,
> Subash Basnet
>



-- 
BR,
Stefano Baghino

Software Engineer @ Radicalbit

Reply via email to