Hadoop: key and value are tab separated in the output file. how to do it semicolon-separated? Hadoop: key and value are tab separated in the output file. how to do it semicolon-separated? hadoop hadoop

Hadoop: key and value are tab separated in the output file. how to do it semicolon-separated?


Set the configuration property mapred.textoutputformat.separator to ";"


In lack of better documentation, here's what I've collected:

    setTextOutputFormatSeparator(final Job job, final String separator){            final Configuration conf = job.getConfiguration(); //ensure accurate config ref            conf.set("mapred.textoutputformat.separator", separator); //Prior to Hadoop 2 (YARN)            conf.set("mapreduce.textoutputformat.separator", separator);  //Hadoop v2+ (YARN)            conf.set("mapreduce.output.textoutputformat.separator", separator);            conf.set("mapreduce.output.key.field.separator", separator);            conf.set("mapred.textoutputformat.separatorText", separator); // ?    }


you can use "KEY_VALUE_SEPERATOR " property of "KeyValueLineRecordReader" to specify a separator of your choice.