Changes between Version 5 and Version 6 of waue/2009/0506
- Timestamp:
- May 6, 2009, 5:03:55 PM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
waue/2009/0506
v5 v6 25 25 26 26 27 27 28 {{{ 28 29 hive> CREATE TABLE pokes (foo INT, bar STRING); 29 30 }}} 30 * 31 {{{ 31 * 32 {{{ 33 #!sh 32 34 OK 33 35 Time taken: 0.251 seconds … … 37 39 hive> CREATE TABLE invites (foo INT, bar STRING) PARTITIONED BY (ds STRING); 38 40 }}} 39 * 40 {{{ 41 * 42 {{{ 43 #!sh 41 44 OK 42 45 Time taken: 0.106 seconds … … 46 49 hive> SHOW TABLES; 47 50 }}} 48 * 49 {{{ 51 * 52 {{{ 53 #!sh 50 54 OK 51 55 invites pokes … … 56 60 hive> DESCRIBE invites; 57 61 }}} 58 * 59 {{{ 62 * 63 {{{ 64 #!sh 60 65 OK 61 66 foo int … … 68 73 hive> ALTER TABLE pokes ADD COLUMNS (new_col INT); 69 74 }}} 70 * 71 {{{ 75 * 76 {{{ 77 #!sh 72 78 OK 73 79 Time taken: 0.117 seconds … … 77 83 hive> ALTER TABLE invites ADD COLUMNS (new_col2 INT COMMENT 'a comment'); 78 84 }}} 79 * 80 {{{ 85 * 86 {{{ 87 #!sh 81 88 OK 82 89 Time taken: 0.152 seconds … … 87 94 OVERWRITE INTO TABLE pokes; 88 95 }}} 89 * 90 {{{ 96 * 97 {{{ 98 #!sh 91 99 Copying data from file:/home/hadoop/hadoop-0.19.1/contrib/hive/examples/files/kv1.txt 92 100 Loading data to table pokes … … 99 107 OVERWRITE INTO TABLE invites PARTITION (ds='2008-08-15'); 100 108 }}} 101 * 102 {{{ 109 * 110 {{{ 111 #!sh 103 112 Copying data from file:/home/hadoop/hadoop-0.19.1/contrib/hive/examples/files/kv2.txt 104 113 Loading data to table invites partition {ds=2008-08-15} … … 111 120 OVERWRITE INTO TABLE invites PARTITION (ds='2008-08-08'); 112 121 }}} 113 * 114 {{{ 122 * 123 {{{ 124 #!sh 115 125 Copying data from file:/home/hadoop/hadoop-0.19.1/contrib/hive/examples/files/kv3.txt 116 126 Loading data to table invites partition {ds=2008-08-08} … … 123 133 SELECT a.* FROM invites a; 124 134 }}} 125 * 126 {{{ 135 * 136 {{{ 137 #!sh 127 138 Total MapReduce jobs = 1 128 139 Starting Job = job_200902261245_0002, Tracking URL = http://gp1:50030/jobdetails.jsp?jobid=job_200902261245_0002 … … 140 151 hive> select count(1) from pokes; 141 152 }}} 142 * 143 {{{ 153 * 154 {{{ 155 #!sh 144 156 Total MapReduce jobs = 2 145 157 Number of reducers = 1 … … 169 181 hive> INSERT OVERWRITE DIRECTORY '/tmp/hdfs_out' SELECT a.* FROM invites a; 170 182 }}} 171 * 172 {{{ 183 * 184 {{{ 185 #!sh 173 186 Total MapReduce jobs = 1 174 187 Starting Job = job_200902261245_0005, Tracking URL = http://gp1:50030/jobdetails.jsp?jobid=job_200902261245_0005 … … 186 199 hive> INSERT OVERWRITE DIRECTORY '/tmp/reg_5' SELECT COUNT(1) FROM invites a; 187 200 }}} 188 * 189 {{{ 201 * 202 {{{ 203 #!sh 190 204 Total MapReduce jobs = 2 191 205 Number of reducers = 1