Hello!

I'm using Spark Streaming rigth now, and I'd wanted to write output to hdfs
folder.
I have JavaPairDStream<String, String> plans
After some code, I want to configure output:
plans.saveAsHadoopFiles("hdfs://localhost:8020/user/hue/output/completed",
"csv", String.class, String.class, TextOutputFormat.class);

But I get this error:

The method saveAsHadoopFiles(String, String, Class<?>, Class<?>, Class<?
extends OutputFormat<?,?>>) in the type JavaPairDStream<String,String> is
not applicable for the arguments (String, String, Class<String>,
Class<String>, Class<TextOutputFormat>)

As I understand, this is because of wrong last argument, but I don't
understand what should I pass here.
I use TextOutputFormat from org.apache.hadoop.mapred.TextOutputFormat;

Please, help!)



Best regards,
Alex

Reply via email to