When loading mutiple files which not all the files sharing the same compressor (load gz + bz2 + rawata files for example), depending on the last file used, PigStorage will use either Bzip2TextInputFormat if the last file ends with .bz2 end fail, or PigStorage will use TextInputFormat in any other case and succeed in ready all types of files (including the bz2 one).
A = LOAD 'file1.gz,file2.bz2' USING PigStorage(); <-- this will fail
B = LOAD 'file2.bz2,file1.gz' USING PigStorage(); <-- this will succeed
I think another person suggested in the dev mailing list to drop the use of the internal pig Bzip2TextInputFormat because hadoop now better handle those cases (bz2 compression & co). I don't push the patch yet because i don't have a fully comliant pig test environnement so i'm not able to be sure this won't introduce a regression with the minimal supported level version of hadoop by pig 0.14/0.15 + i need to know if you agree in drop the internal Bzip2 stuff and rely on the hadoop implementation.