Saving all output to "!!{outputDirectory}!!/sample4.q.raw". Enter "record" with no arguments to stop it. >>> !run !!{qFileDirectory}!!/sample4.q >>> CREATE TABLE dest1(key INT, value STRING) STORED AS TEXTFILE; No rows affected >>> >>> -- bucket column is the same as table sample >>> -- No need for sample filter >>> EXPLAIN EXTENDED INSERT OVERWRITE TABLE dest1 SELECT s.* FROM srcbucket TABLESAMPLE (BUCKET 1 OUT OF 2 on key) s; 'Explain' 'ABSTRACT SYNTAX TREE:' ' (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME srcbucket) (TOK_TABLEBUCKETSAMPLE 1 2 (TOK_TABLE_OR_COL key)) s)) (TOK_INSERT (TOK_DESTINATION (TOK_TAB (TOK_TABNAME dest1))) (TOK_SELECT (TOK_SELEXPR (TOK_ALLCOLREF (TOK_TABNAME s))))))' '' 'STAGE DEPENDENCIES:' ' Stage-1 is a root stage' ' Stage-7 depends on stages: Stage-1 , consists of Stage-4, Stage-3, Stage-5' ' Stage-4' ' Stage-0 depends on stages: Stage-4, Stage-3, Stage-6' ' Stage-2 depends on stages: Stage-0' ' Stage-3' ' Stage-5' ' Stage-6 depends on stages: Stage-5' '' 'STAGE PLANS:' ' Stage: Stage-1' ' Map Reduce' ' Alias -> Map Operator Tree:' ' s ' ' TableScan' ' alias: s' ' GatherStats: false' ' Filter Operator' ' isSamplingPred: true' ' predicate:' ' expr: (((hash(key) & 2147483647) % 2) = 0)' ' type: boolean' ' Select Operator' ' expressions:' ' expr: key' ' type: int' ' expr: value' ' type: string' ' outputColumnNames: _col0, _col1' ' File Output Operator' ' compressed: false' ' GlobalTableId: 1' ' directory: pfile:!!{hive.exec.scratchdir}!!' ' NumFilesPerFileSink: 1' ' Stats Publishing Key Prefix: pfile:!!{hive.exec.scratchdir}!!' ' table:' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' properties:' ' bucket_count -1' ' columns key,value' ' columns.types int:string' ' file.inputformat org.apache.hadoop.mapred.TextInputFormat' ' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' location !!{hive.metastore.warehouse.dir}!!/sample4.db/dest1' ' name sample4.dest1' ' serialization.ddl struct dest1 { i32 key, string value}' ' serialization.format 1' ' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' transient_lastDdlTime !!UNIXTIME!!' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' name: sample4.dest1' ' TotalFiles: 1' ' GatherStats: true' ' MultiFileSpray: false' ' Needs Tagging: false' ' Path -> Alias:' ' !!{hive.metastore.warehouse.dir}!!/sample4.db/srcbucket/srcbucket0.txt [s]' ' Path -> Partition:' ' !!{hive.metastore.warehouse.dir}!!/sample4.db/srcbucket/srcbucket0.txt ' ' Partition' ' base file name: srcbucket0.txt' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' properties:' ' bucket_count 2' ' bucket_field_name key' ' columns key,value' ' columns.types int:string' ' file.inputformat org.apache.hadoop.mapred.TextInputFormat' ' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' location !!{hive.metastore.warehouse.dir}!!/sample4.db/srcbucket' ' name sample4.srcbucket' ' numFiles 2' ' numPartitions 0' ' numRows 0' ' rawDataSize 0' ' serialization.ddl struct srcbucket { i32 key, string value}' ' serialization.format 1' ' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' totalSize 11603' ' transient_lastDdlTime !!UNIXTIME!!' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' ' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' properties:' ' bucket_count 2' ' bucket_field_name key' ' columns key,value' ' columns.types int:string' ' file.inputformat org.apache.hadoop.mapred.TextInputFormat' ' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' location !!{hive.metastore.warehouse.dir}!!/sample4.db/srcbucket' ' name sample4.srcbucket' ' numFiles 2' ' numPartitions 0' ' numRows 0' ' rawDataSize 0' ' serialization.ddl struct srcbucket { i32 key, string value}' ' serialization.format 1' ' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' totalSize 11603' ' transient_lastDdlTime !!UNIXTIME!!' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' name: sample4.srcbucket' ' name: sample4.srcbucket' '' ' Stage: Stage-7' ' Conditional Operator' '' ' Stage: Stage-4' ' Move Operator' ' files:' ' hdfs directory: true' ' source: pfile:!!{hive.exec.scratchdir}!!' ' destination: pfile:!!{hive.exec.scratchdir}!!' '' ' Stage: Stage-0' ' Move Operator' ' tables:' ' replace: true' ' source: pfile:!!{hive.exec.scratchdir}!!' ' table:' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' properties:' ' bucket_count -1' ' columns key,value' ' columns.types int:string' ' file.inputformat org.apache.hadoop.mapred.TextInputFormat' ' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' location !!{hive.metastore.warehouse.dir}!!/sample4.db/dest1' ' name sample4.dest1' ' serialization.ddl struct dest1 { i32 key, string value}' ' serialization.format 1' ' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' transient_lastDdlTime !!UNIXTIME!!' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' name: sample4.dest1' ' tmp directory: pfile:!!{hive.exec.scratchdir}!!' '' ' Stage: Stage-2' ' Stats-Aggr Operator' ' Stats Aggregation Key Prefix: pfile:!!{hive.exec.scratchdir}!!' '' ' Stage: Stage-3' ' Map Reduce' ' Alias -> Map Operator Tree:' ' pfile:!!{hive.exec.scratchdir}!! ' ' File Output Operator' ' compressed: false' ' GlobalTableId: 0' ' directory: pfile:!!{hive.exec.scratchdir}!!' ' NumFilesPerFileSink: 1' ' table:' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' properties:' ' bucket_count -1' ' columns key,value' ' columns.types int:string' ' file.inputformat org.apache.hadoop.mapred.TextInputFormat' ' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' location !!{hive.metastore.warehouse.dir}!!/sample4.db/dest1' ' name sample4.dest1' ' serialization.ddl struct dest1 { i32 key, string value}' ' serialization.format 1' ' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' transient_lastDdlTime !!UNIXTIME!!' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' name: sample4.dest1' ' TotalFiles: 1' ' GatherStats: false' ' MultiFileSpray: false' ' Needs Tagging: false' ' Path -> Alias:' ' pfile:!!{hive.exec.scratchdir}!! [pfile:!!{hive.exec.scratchdir}!!]' ' Path -> Partition:' ' pfile:!!{hive.exec.scratchdir}!! ' ' Partition' ' base file name: -ext-10002' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' properties:' ' bucket_count -1' ' columns key,value' ' columns.types int:string' ' file.inputformat org.apache.hadoop.mapred.TextInputFormat' ' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' location !!{hive.metastore.warehouse.dir}!!/sample4.db/dest1' ' name sample4.dest1' ' serialization.ddl struct dest1 { i32 key, string value}' ' serialization.format 1' ' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' transient_lastDdlTime !!UNIXTIME!!' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' ' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' properties:' ' bucket_count -1' ' columns key,value' ' columns.types int:string' ' file.inputformat org.apache.hadoop.mapred.TextInputFormat' ' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' location !!{hive.metastore.warehouse.dir}!!/sample4.db/dest1' ' name sample4.dest1' ' serialization.ddl struct dest1 { i32 key, string value}' ' serialization.format 1' ' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' transient_lastDdlTime !!UNIXTIME!!' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' name: sample4.dest1' ' name: sample4.dest1' '' ' Stage: Stage-5' ' Map Reduce' ' Alias -> Map Operator Tree:' ' pfile:!!{hive.exec.scratchdir}!! ' ' File Output Operator' ' compressed: false' ' GlobalTableId: 0' ' directory: pfile:!!{hive.exec.scratchdir}!!' ' NumFilesPerFileSink: 1' ' table:' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' properties:' ' bucket_count -1' ' columns key,value' ' columns.types int:string' ' file.inputformat org.apache.hadoop.mapred.TextInputFormat' ' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' location !!{hive.metastore.warehouse.dir}!!/sample4.db/dest1' ' name sample4.dest1' ' serialization.ddl struct dest1 { i32 key, string value}' ' serialization.format 1' ' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' transient_lastDdlTime !!UNIXTIME!!' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' name: sample4.dest1' ' TotalFiles: 1' ' GatherStats: false' ' MultiFileSpray: false' ' Needs Tagging: false' ' Path -> Alias:' ' pfile:!!{hive.exec.scratchdir}!! [pfile:!!{hive.exec.scratchdir}!!]' ' Path -> Partition:' ' pfile:!!{hive.exec.scratchdir}!! ' ' Partition' ' base file name: -ext-10002' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' properties:' ' bucket_count -1' ' columns key,value' ' columns.types int:string' ' file.inputformat org.apache.hadoop.mapred.TextInputFormat' ' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' location !!{hive.metastore.warehouse.dir}!!/sample4.db/dest1' ' name sample4.dest1' ' serialization.ddl struct dest1 { i32 key, string value}' ' serialization.format 1' ' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' transient_lastDdlTime !!UNIXTIME!!' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' ' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' properties:' ' bucket_count -1' ' columns key,value' ' columns.types int:string' ' file.inputformat org.apache.hadoop.mapred.TextInputFormat' ' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' location !!{hive.metastore.warehouse.dir}!!/sample4.db/dest1' ' name sample4.dest1' ' serialization.ddl struct dest1 { i32 key, string value}' ' serialization.format 1' ' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' transient_lastDdlTime !!UNIXTIME!!' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' name: sample4.dest1' ' name: sample4.dest1' '' ' Stage: Stage-6' ' Move Operator' ' files:' ' hdfs directory: true' ' source: pfile:!!{hive.exec.scratchdir}!!' ' destination: pfile:!!{hive.exec.scratchdir}!!' '' '' 298 rows selected >>> >>> INSERT OVERWRITE TABLE dest1 SELECT s.* FROM srcbucket TABLESAMPLE (BUCKET 1 OUT OF 2 on key) s; 'key','value' No rows selected >>> >>> SELECT dest1.* FROM dest1; 'key','value' '474','val_475' '62','val_63' '468','val_469' '272','val_273' '448','val_449' '246','val_247' '440','val_441' '278','val_279' '296','val_297' '428','val_429' '126','val_127' '106','val_107' '356','val_357' '490','val_491' '402','val_403' '128','val_129' '10','val_11' '226','val_227' '110','val_111' '0','val_1' '240','val_241' '286','val_287' '408','val_409' '476','val_477' '482','val_483' '48','val_49' '424','val_425' '226','val_227' '494','val_495' '488','val_489' '94','val_95' '50','val_51' '402','val_403' '128','val_129' '468','val_469' '314','val_315' '224','val_225' '344','val_345' '4','val_5' '206','val_207' '114','val_115' '56','val_57' '114','val_115' '254','val_255' '390','val_391' '304','val_305' '264','val_265' '196','val_197' '238','val_239' '20','val_21' '492','val_493' '82','val_83' '58','val_59' '86','val_87' '438','val_439' '360','val_361' '222','val_223' '42','val_43' '338','val_339' '68','val_69' '16','val_17' '492','val_493' '376','val_377' '120','val_121' '306','val_307' '426','val_427' '132','val_133' '446','val_447' '386','val_387' '388','val_389' '184','val_185' '284','val_285' '246','val_247' '262','val_263' '122','val_123' '438','val_439' '390','val_391' '352','val_353' '226','val_227' '328','val_329' '382','val_383' '342','val_343' '480','val_481' '102','val_103' '480','val_481' '318','val_319' '392','val_393' '476','val_477' '258','val_259' '174','val_175' '252','val_253' '114','val_115' '264','val_265' '48','val_49' '336','val_337' '340','val_341' '390','val_391' '484','val_485' '6','val_7' '260','val_261' '2','val_3' '170','val_171' '164','val_165' '118','val_119' '310','val_311' '104','val_105' '80','val_81' '326','val_327' '450','val_451' '140','val_141' '212','val_213' '308','val_309' '30','val_31' '358','val_359' '416','val_417' '42','val_43' '386','val_387' '454','val_455' '364','val_365' '20','val_21' '52','val_53' '40','val_41' '8','val_9' '168','val_169' '384','val_385' '324','val_325' '310','val_311' '206','val_207' '404','val_405' '206','val_207' '226','val_227' '262','val_263' '260','val_261' '328','val_329' '322','val_323' '122','val_123' '404','val_405' '384','val_385' '76','val_77' '116','val_117' '42','val_43' '104','val_105' '406','val_407' '32','val_33' '132','val_133' '192','val_193' '58','val_59' '70','val_71' '356','val_357' '352','val_353' '52','val_53' '330','val_331' '138','val_139' '160','val_161' '454','val_455' '76','val_77' '174','val_175' '412','val_413' '16','val_17' '204','val_205' '126','val_127' '274','val_275' '374','val_375' '494','val_495' '216','val_217' '470','val_471' '196','val_197' '302','val_303' '450','val_451' '12','val_13' '398','val_399' '334','val_335' '384','val_385' '60','val_61' '442','val_443' '52','val_53' '404','val_405' '446','val_447' '300','val_301' '0','val_1' '268','val_269' '392','val_393' '104','val_105' '436','val_437' '156','val_157' '118','val_119' '172','val_173' '244','val_245' '6','val_7' '284','val_285' '164','val_165' '136','val_137' '462','val_463' '432','val_433' '496','val_497' '144','val_145' '408','val_409' '152','val_153' '382','val_383' '348','val_349' '122','val_123' '292','val_293' '182','val_183' '474','val_475' '310','val_311' '52','val_53' '486','val_487' '152','val_153' '378','val_379' '414','val_415' '256','val_257' '292','val_293' '412','val_413' '40','val_41' '478','val_479' '178','val_179' '100','val_101' '156','val_157' '228','val_229' '22','val_23' '248','val_249' '402','val_403' '62','val_63' '162','val_163' '244','val_245' '276','val_277' '46','val_47' '78','val_79' '134','val_135' '196','val_197' '410','val_411' '82','val_83' '440','val_441' '100','val_101' '308','val_309' '430','val_431' '468','val_469' '152','val_153' '138','val_139' '76','val_77' '300','val_301' '478','val_479' '118','val_119' '178','val_179' '242','val_243' '244','val_245' '238','val_238' '86','val_86' '278','val_278' '98','val_98' '484','val_484' '150','val_150' '224','val_224' '66','val_66' '128','val_128' '146','val_146' '406','val_406' '374','val_374' '152','val_152' '82','val_82' '166','val_166' '430','val_430' '252','val_252' '292','val_292' '338','val_338' '446','val_446' '394','val_394' '482','val_482' '174','val_174' '494','val_494' '466','val_466' '208','val_208' '174','val_174' '396','val_396' '162','val_162' '266','val_266' '342','val_342' '0','val_0' '128','val_128' '316','val_316' '302','val_302' '438','val_438' '170','val_170' '20','val_20' '378','val_378' '92','val_92' '72','val_72' '4','val_4' '280','val_280' '208','val_208' '356','val_356' '382','val_382' '498','val_498' '386','val_386' '192','val_192' '286','val_286' '176','val_176' '54','val_54' '138','val_138' '216','val_216' '430','val_430' '278','val_278' '176','val_176' '318','val_318' '332','val_332' '180','val_180' '284','val_284' '12','val_12' '230','val_230' '260','val_260' '404','val_404' '384','val_384' '272','val_272' '138','val_138' '84','val_84' '348','val_348' '466','val_466' '58','val_58' '8','val_8' '230','val_230' '208','val_208' '348','val_348' '24','val_24' '172','val_172' '42','val_42' '158','val_158' '496','val_496' '0','val_0' '322','val_322' '468','val_468' '454','val_454' '100','val_100' '298','val_298' '418','val_418' '96','val_96' '26','val_26' '230','val_230' '120','val_120' '404','val_404' '436','val_436' '156','val_156' '468','val_468' '308','val_308' '196','val_196' '288','val_288' '98','val_98' '282','val_282' '318','val_318' '318','val_318' '470','val_470' '316','val_316' '0','val_0' '490','val_490' '364','val_364' '118','val_118' '134','val_134' '282','val_282' '138','val_138' '238','val_238' '118','val_118' '72','val_72' '90','val_90' '10','val_10' '306','val_306' '224','val_224' '242','val_242' '392','val_392' '272','val_272' '242','val_242' '452','val_452' '226','val_226' '402','val_402' '396','val_396' '58','val_58' '336','val_336' '168','val_168' '34','val_34' '472','val_472' '322','val_322' '498','val_498' '160','val_160' '42','val_42' '430','val_430' '458','val_458' '78','val_78' '76','val_76' '492','val_492' '218','val_218' '228','val_228' '138','val_138' '30','val_30' '64','val_64' '468','val_468' '76','val_76' '74','val_74' '342','val_342' '230','val_230' '368','val_368' '296','val_296' '216','val_216' '344','val_344' '274','val_274' '116','val_116' '256','val_256' '70','val_70' '480','val_480' '288','val_288' '244','val_244' '438','val_438' '128','val_128' '432','val_432' '202','val_202' '316','val_316' '280','val_280' '2','val_2' '80','val_80' '44','val_44' '104','val_104' '466','val_466' '366','val_366' '406','val_406' '190','val_190' '406','val_406' '114','val_114' '258','val_258' '90','val_90' '262','val_262' '348','val_348' '424','val_424' '12','val_12' '396','val_396' '164','val_164' '454','val_454' '478','val_478' '298','val_298' '164','val_164' '424','val_424' '382','val_382' '70','val_70' '480','val_480' '24','val_24' '104','val_104' '70','val_70' '438','val_438' '414','val_414' '200','val_200' '360','val_360' '248','val_248' '444','val_444' '120','val_120' '230','val_230' '478','val_478' '178','val_178' '468','val_468' '310','val_310' '460','val_460' '480','val_480' '136','val_136' '172','val_172' '214','val_214' '462','val_462' '406','val_406' '454','val_454' '384','val_384' '256','val_256' '26','val_26' '134','val_134' '384','val_384' '18','val_18' '462','val_462' '492','val_492' '100','val_100' '298','val_298' '498','val_498' '146','val_146' '458','val_458' '362','val_362' '186','val_186' '348','val_348' '18','val_18' '344','val_344' '84','val_84' '28','val_28' '448','val_448' '152','val_152' '348','val_348' '194','val_194' '414','val_414' '222','val_222' '126','val_126' '90','val_90' '400','val_400' '200','val_200' 493 rows selected >>> !record