hadoop - Apache PIG - How to change the standard output name "part-r-00000" of files? -
i have .pig script creates file calculated data. want have output file named "result.txt" instead of meaningless standard output name "part-r-00000".
the last entry in .pig script
store c 'result' using pigstorage();
therefore "result" name of folder in hdfs result.txt should stored.
how can this?
the part-r-xxxxx not meaningless depending on how plan use them. if need load results of pig script pig script can do:
a = load 'result' using pigstorage() (...) ; as load can take directory input , load each file in directory.
if need handle output (locally) single text file, there nothing builtin pig accomplish that. need write script pull results hdfs , concatenate of part-r-xxxxx files together.
Comments
Post a Comment