1

I am trying to read .xz file compressed using hadoop-xz codec using pig script.

The sample code i tried is,

REGISTER hadoop-xz-1.4.jar
SET output.compression.enabled true;
SET output.compression.codec io.sensesecure.hadoop.xz.XZCodec;

msg = LOAD 'pigtest/newXZ.xz' USING PigStorage();
STORE msg INTO 'pigtest/output' USING PigStorage();
DUMP msg;

The result is still in a compressed format. Am i doing wrong or i have to use XZInputStream inside pig?

The running environment is HortonWorks Sandbox 2.2 (Hue)

Nikhil
  • 2,857
  • 9
  • 34
  • 58

1 Answers1

0

Depends on what you want to do.

It seems like you want to read an XZ file so I would assume you need to setup the input codec not the output one.

I'm not a PIG user but from what I gather it cannot easily handle custom compression (unlike Hive and Streaming for example).

Andre de Miranda
  • 726
  • 7
  • 17