Saving all output to "!!{outputDirectory}!!/smb_mapjoin_8.q.raw". Enter "record" with no arguments to stop it. >>> !run !!{qFileDirectory}!!/smb_mapjoin_8.q >>> set hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat; No rows affected >>> set hive.enforce.bucketing = true; No rows affected >>> set hive.enforce.sorting = true; No rows affected >>> set hive.exec.reducers.max = 1; No rows affected >>> >>> >>> create table smb_bucket_input (key int, value string) stored as rcfile; No rows affected >>> load data local inpath '../data/files/smb_bucket_input.rc' into table smb_bucket_input; No rows affected >>> >>> >>> CREATE TABLE smb_bucket4_1(key int, value string) CLUSTERED BY (key) SORTED BY (key) INTO 1 BUCKETS; No rows affected >>> >>> CREATE TABLE smb_bucket4_2(key int, value string) CLUSTERED BY (key) SORTED BY (key) INTO 1 BUCKETS; No rows affected >>> >>> CREATE TABLE smb_bucket4_3(key int, value string) CLUSTERED BY (key) SORTED BY (key) INTO 1 BUCKETS; No rows affected >>> >>> insert overwrite table smb_bucket4_1 select * from smb_bucket_input where key=4 or key=2000 or key=4000; 'key','value' No rows selected >>> insert overwrite table smb_bucket4_2 select * from smb_bucket_input where key=484 or key=3000 or key=5000; 'key','value' No rows selected >>> >>> set hive.optimize.bucketmapjoin = true; No rows affected >>> set hive.optimize.bucketmapjoin.sortedmerge = true; No rows affected >>> set hive.input.format = org.apache.hadoop.hive.ql.io.BucketizedHiveInputFormat; No rows affected >>> >>> select /*+mapjoin(a)*/ * from smb_bucket4_1 a full outer join smb_bucket4_2 b on a.key = b.key; 'key','value','key','value' '4','val_356','','' '','','484','val_169' '2000','val_169','','' '','','3000','val_169' '4000','val_125','','' '','','5000','val_125' 6 rows selected >>> select /*+mapjoin(b)*/ * from smb_bucket4_1 a full outer join smb_bucket4_2 b on a.key = b.key; 'key','value','key','value' '4','val_356','','' '','','484','val_169' '2000','val_169','','' '','','3000','val_169' '4000','val_125','','' '','','5000','val_125' 6 rows selected >>> >>> >>> insert overwrite table smb_bucket4_1 select * from smb_bucket_input where key=2000 or key=4000; 'key','value' No rows selected >>> insert overwrite table smb_bucket4_2 select * from smb_bucket_input where key=3000 or key=5000; 'key','value' No rows selected >>> >>> select /*+mapjoin(a)*/ * from smb_bucket4_1 a full outer join smb_bucket4_2 b on a.key = b.key; 'key','value','key','value' '2000','val_169','','' '','','3000','val_169' '4000','val_125','','' '','','5000','val_125' 4 rows selected >>> select /*+mapjoin(b)*/ * from smb_bucket4_1 a full outer join smb_bucket4_2 b on a.key = b.key; 'key','value','key','value' '2000','val_169','','' '','','3000','val_169' '4000','val_125','','' '','','5000','val_125' 4 rows selected >>> >>> >>> insert overwrite table smb_bucket4_1 select * from smb_bucket_input where key=4000; 'key','value' No rows selected >>> insert overwrite table smb_bucket4_2 select * from smb_bucket_input where key=5000; 'key','value' No rows selected >>> >>> select /*+mapjoin(a)*/ * from smb_bucket4_1 a full outer join smb_bucket4_2 b on a.key = b.key; 'key','value','key','value' '4000','val_125','','' '','','5000','val_125' 2 rows selected >>> select /*+mapjoin(b)*/ * from smb_bucket4_1 a full outer join smb_bucket4_2 b on a.key = b.key; 'key','value','key','value' '4000','val_125','','' '','','5000','val_125' 2 rows selected >>> >>> >>> insert overwrite table smb_bucket4_1 select * from smb_bucket_input where key=1000 or key=4000; 'key','value' No rows selected >>> insert overwrite table smb_bucket4_2 select * from smb_bucket_input where key=1000 or key=5000; 'key','value' No rows selected >>> >>> select /*+mapjoin(a)*/ * from smb_bucket4_1 a full outer join smb_bucket4_2 b on a.key = b.key; 'key','value','key','value' '1000','val_1000','1000','val_1000' '4000','val_125','','' '','','5000','val_125' 3 rows selected >>> select /*+mapjoin(b)*/ * from smb_bucket4_1 a full outer join smb_bucket4_2 b on a.key = b.key; 'key','value','key','value' '1000','val_1000','1000','val_1000' '4000','val_125','','' '','','5000','val_125' 3 rows selected >>> >>> >>> insert overwrite table smb_bucket4_1 select * from smb_bucket_input where key=1000 or key=4000; 'key','value' No rows selected >>> insert overwrite table smb_bucket4_2 select * from smb_bucket_input where key=1000 or key=5000; 'key','value' No rows selected >>> insert overwrite table smb_bucket4_3 select * from smb_bucket_input where key=1000 or key=5000; 'key','value' No rows selected >>> >>> select /*+mapjoin(b,c)*/ * from smb_bucket4_1 a full outer join smb_bucket4_2 b on a.key = b.key full outer join smb_bucket4_3 c on a.key=c.key; 'key','value','key','value','key','value' '1000','val_1000','1000','val_1000','1000','val_1000' '4000','val_125','','','','' '','','5000','val_125','','' '','','','','5000','val_125' 4 rows selected >>> >>> >>> insert overwrite table smb_bucket4_1 select * from smb_bucket_input where key=1000 or key=4000; 'key','value' No rows selected >>> insert overwrite table smb_bucket4_2 select * from smb_bucket_input where key=1000 or key=5000; 'key','value' No rows selected >>> insert overwrite table smb_bucket4_3 select * from smb_bucket_input where key=1000 or key=4000; 'key','value' No rows selected >>> >>> select /*+mapjoin(b,c)*/ * from smb_bucket4_1 a full outer join smb_bucket4_2 b on a.key = b.key full outer join smb_bucket4_3 c on a.key=c.key; 'key','value','key','value','key','value' '1000','val_1000','1000','val_1000','1000','val_1000' '4000','val_125','','','4000','val_125' '','','5000','val_125','','' 3 rows selected >>> >>> >>> insert overwrite table smb_bucket4_1 select * from smb_bucket_input where key=4000; 'key','value' No rows selected >>> insert overwrite table smb_bucket4_2 select * from smb_bucket_input where key=5000; 'key','value' No rows selected >>> insert overwrite table smb_bucket4_3 select * from smb_bucket_input where key=4000; 'key','value' No rows selected >>> >>> select /*+mapjoin(b,c)*/ * from smb_bucket4_1 a full outer join smb_bucket4_2 b on a.key = b.key full outer join smb_bucket4_3 c on a.key=c.key; 'key','value','key','value','key','value' '4000','val_125','','','4000','val_125' '','','5000','val_125','','' 2 rows selected >>> >>> >>> insert overwrite table smb_bucket4_1 select * from smb_bucket_input where key=00000; 'key','value' No rows selected >>> insert overwrite table smb_bucket4_2 select * from smb_bucket_input where key=4000; 'key','value' No rows selected >>> insert overwrite table smb_bucket4_3 select * from smb_bucket_input where key=5000; 'key','value' No rows selected >>> >>> select /*+mapjoin(b,c)*/ * from smb_bucket4_1 a full outer join smb_bucket4_2 b on a.key = b.key full outer join smb_bucket4_3 c on a.key=c.key; 'key','value','key','value','key','value' '','','4000','val_125','','' '','','','','5000','val_125' 2 rows selected >>> >>> >>> insert overwrite table smb_bucket4_1 select * from smb_bucket_input where key=1000; 'key','value' No rows selected >>> insert overwrite table smb_bucket4_2 select * from smb_bucket_input where key=4000; 'key','value' No rows selected >>> insert overwrite table smb_bucket4_3 select * from smb_bucket_input where key=5000; 'key','value' No rows selected >>> >>> select /*+mapjoin(b,c)*/ * from smb_bucket4_1 a full outer join smb_bucket4_2 b on a.key = b.key full outer join smb_bucket4_3 c on a.key=c.key; 'key','value','key','value','key','value' '1000','val_1000','','','','' '','','4000','val_125','','' '','','','','5000','val_125' 3 rows selected >>> >>> >>> >>> >>> !record