3

I have a requirement of changing the part file naming convention after running my PIG job. I want part-r-0000 to be userdefinedName-r-0000.

Any possible solution to that? I am avoiding hadoop -cp and hadoop -mv commands.

Thanks

Aviral Kumar
  • 814
  • 1
  • 15
  • 40

2 Answers2

3

This files are created by map-reduce jobs generated by Pig. So you should configure Apache Map-reduce. The corresponding property is mapreduce.output.basename

You can define any Hadoop property directly in your pig script:

SET mapreduce.output.basename 'custom-name';
Mikhail Golubtsov
  • 6,285
  • 3
  • 29
  • 36
1

Starting the pig like this would do the same

 pig -Dmapreduce.job.queuename=my-queue -Dmapreduce.output.basename=my-outputfilename;
rbyndoor
  • 699
  • 4
  • 14