Saving all output to "!!{outputDirectory}!!/query_result_fileformat.q.raw". Enter "record" with no arguments to stop it. >>> !run !!{qFileDirectory}!!/query_result_fileformat.q >>> create table nzhang_test1 stored as sequencefile as select 'key1' as key, 'value 1 http://asdf' value from src limit 1; 'key','value' No rows selected >>> >>> select * from nzhang_test1; 'key','value' 'key1','value 1 http://asdf' 1 row selected >>> select count(*) from nzhang_test1; '_c0' '1' 1 row selected >>> >>> explain select * from nzhang_test1 where key='key1'; 'Explain' 'ABSTRACT SYNTAX TREE:' ' (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME nzhang_test1))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF)) (TOK_WHERE (= (TOK_TABLE_OR_COL key) 'key1'))))' '' 'STAGE DEPENDENCIES:' ' Stage-1 is a root stage' ' Stage-0 is a root stage' '' 'STAGE PLANS:' ' Stage: Stage-1' ' Map Reduce' ' Alias -> Map Operator Tree:' ' nzhang_test1 ' ' TableScan' ' alias: nzhang_test1' ' Filter Operator' ' predicate:' ' expr: (key = 'key1')' ' type: boolean' ' Select Operator' ' expressions:' ' expr: key' ' type: string' ' expr: value' ' type: string' ' outputColumnNames: _col0, _col1' ' File Output Operator' ' compressed: false' ' GlobalTableId: 0' ' table:' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' '' ' Stage: Stage-0' ' Fetch Operator' ' limit: -1' '' '' 37 rows selected >>> >>> select * from nzhang_test1 where key='key1'; 'key','value' 'key1','value ' '1 ','' ' ','' 'http://asdf','' 4 rows selected >>> >>> set hive.query.result.fileformat=SequenceFile; No rows affected >>> >>> select * from nzhang_test1; 'key','value' 'key1','value 1 http://asdf' 1 row selected >>> >>> select count(*) from nzhang_test1; '_c0' '1' 1 row selected >>> >>> explain select * from nzhang_test1 where key='key1'; 'Explain' 'ABSTRACT SYNTAX TREE:' ' (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME nzhang_test1))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF)) (TOK_WHERE (= (TOK_TABLE_OR_COL key) 'key1'))))' '' 'STAGE DEPENDENCIES:' ' Stage-1 is a root stage' ' Stage-0 is a root stage' '' 'STAGE PLANS:' ' Stage: Stage-1' ' Map Reduce' ' Alias -> Map Operator Tree:' ' nzhang_test1 ' ' TableScan' ' alias: nzhang_test1' ' Filter Operator' ' predicate:' ' expr: (key = 'key1')' ' type: boolean' ' Select Operator' ' expressions:' ' expr: key' ' type: string' ' expr: value' ' type: string' ' outputColumnNames: _col0, _col1' ' File Output Operator' ' compressed: false' ' GlobalTableId: 0' ' table:' ' input format: org.apache.hadoop.mapred.SequenceFileInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat' '' ' Stage: Stage-0' ' Fetch Operator' ' limit: -1' '' '' 37 rows selected >>> >>> select * from nzhang_test1 where key='key1'; 'key','value' 'key1','value 1 http://asdf' 1 row selected >>> !record