pig.registerQuery("store A into '" + out.getAbsolutePath() + "';");
FileSystem fs = FileSystem.get(ConfigurationUtil.toConfiguration(
pig.getPigContext().getProperties()));
FSDataInputStream is = fs.open(new Path(out.getAbsolutePath() +
"/part-r-00000.bz2"));
CBZip2InputStream cis = new CBZip2InputStream(is);
// Just a sanity check, to make sure it was a bzip file; we
// will do the value verification later
assertEquals(-1, cis.read(new byte[100]));
cis.close();
pig.registerQuery("B = load '" + out.getAbsolutePath() + "';");
pig.openIterator("B");
in.delete();