Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

john

By: a guest on Sep 13th, 2013  |  syntax: Bash  |  size: 0.99 KB  |  views: 7  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. -- The new load udf, works fine. The data are stored directly in the bags
  2. INTERMEDIATE_BAG_0 = load 'hbase://myTable1' using myUDFPackage.HBaseLoadBagUDF('mycf', '-caching 10','rowkey1') as (output0:chararray);
  3. INTERMEDIATE_BAG_1 = load 'hbase://myTable2' using myUDFPackage.HBaseLoadBagUDF('mycf', '-caching 10','rowkey2') as (output1:chararray);
  4. INTERMEDIATE_BAG_2 = load 'hbase://myTable3' using myUDFPackage.HBaseLoadBagUDF('mycf', '-caching 10','rowkey3') as (output1_2:chararray, output2_2:chararray);
  5.  
  6. -- this merge join works fine
  7. INTERMEDIATE_BAG_3 = JOIN INTERMEDIATE_BAG_0 BY $0, INTERMEDIATE_BAG_1 BY $0 USING 'merge';
  8. INTERMEDIATE_BAG_3 = Foreach INTERMEDIATE_BAG_3 GENERATE $0;
  9.  
  10. -- at this point I got the error: ERROR 1103: Merge join/Cogroup only supports Filter, Foreach, Ascending Sort, or Load as its predecessors. Found
  11. INTERMEDIATE_BAG_4 = JOIN INTERMEDIATE_BAG_3 BY $0, INTERMEDIATE_BAG_2 BY $0 USING 'merge';
  12. INTERMEDIATE_BAG_4 = Foreach INTERMEDIATE_BAG_4 GENERATE $1, $2;