Changes between Version 5 and Version 6 of waue/2009/0506


Ignore:
Timestamp:
May 6, 2009, 5:03:55 PM (15 years ago)
Author:
waue
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • waue/2009/0506

    v5 v6  
    2525
    2626
     27
    2728{{{
    2829hive> CREATE TABLE pokes (foo INT, bar STRING);
    2930}}}
    30  *
    31 {{{
     31*
     32{{{
     33#!sh
    3234OK
    3335Time taken: 0.251 seconds
     
    3739hive> CREATE TABLE invites (foo INT, bar STRING) PARTITIONED BY (ds STRING);
    3840}}}
    39  *
    40 {{{
     41*
     42{{{
     43#!sh
    4144OK
    4245Time taken: 0.106 seconds
     
    4649hive> SHOW TABLES;
    4750}}}
    48  *
    49 {{{
     51*
     52{{{
     53#!sh
    5054OK
    5155invites pokes
     
    5660hive> DESCRIBE invites;
    5761}}}
    58  *
    59 {{{
     62*
     63{{{
     64#!sh
    6065OK
    6166foo     int
     
    6873hive> ALTER TABLE pokes ADD COLUMNS (new_col INT);
    6974}}}
    70  *
    71 {{{
     75*
     76{{{
     77#!sh
    7278OK
    7379Time taken: 0.117 seconds
     
    7783hive> ALTER TABLE invites ADD COLUMNS (new_col2 INT COMMENT 'a comment');
    7884}}}
    79  *
    80 {{{
     85*
     86{{{
     87#!sh
    8188OK
    8289Time taken: 0.152 seconds
     
    8794OVERWRITE INTO TABLE pokes;
    8895}}}
    89  *
    90 {{{
     96*
     97{{{
     98#!sh
    9199Copying data from file:/home/hadoop/hadoop-0.19.1/contrib/hive/examples/files/kv1.txt
    92100Loading data to table pokes
     
    99107OVERWRITE INTO TABLE invites PARTITION (ds='2008-08-15');
    100108}}}
    101  *
    102 {{{
     109*
     110{{{
     111#!sh
    103112Copying data from file:/home/hadoop/hadoop-0.19.1/contrib/hive/examples/files/kv2.txt
    104113Loading data to table invites partition {ds=2008-08-15}
     
    111120OVERWRITE INTO TABLE invites PARTITION (ds='2008-08-08');
    112121}}}
    113  *
    114 {{{
     122*
     123{{{
     124#!sh
    115125Copying data from file:/home/hadoop/hadoop-0.19.1/contrib/hive/examples/files/kv3.txt
    116126Loading data to table invites partition {ds=2008-08-08}
     
    123133SELECT a.* FROM invites a;
    124134}}}
    125  *
    126 {{{
     135*
     136{{{
     137#!sh
    127138Total MapReduce jobs = 1
    128139Starting Job = job_200902261245_0002, Tracking URL = http://gp1:50030/jobdetails.jsp?jobid=job_200902261245_0002
     
    140151hive> select count(1) from pokes;
    141152}}}
    142  *
    143 {{{
     153*
     154{{{
     155#!sh
    144156Total MapReduce jobs = 2
    145157Number of reducers = 1
     
    169181hive> INSERT OVERWRITE DIRECTORY '/tmp/hdfs_out' SELECT a.* FROM invites a;
    170182}}}
    171  *
    172 {{{
     183*
     184{{{
     185#!sh
    173186Total MapReduce jobs = 1
    174187Starting Job = job_200902261245_0005, Tracking URL = http://gp1:50030/jobdetails.jsp?jobid=job_200902261245_0005
     
    186199hive>  INSERT OVERWRITE DIRECTORY '/tmp/reg_5' SELECT COUNT(1) FROM invites a;
    187200}}}
    188  *
    189 {{{
     201*
     202{{{
     203#!sh
    190204Total MapReduce jobs = 2
    191205Number of reducers = 1