hive启动后相关操作

hadoop@ubuntu118:~$ $HIVE_HOME/bin/hive
WARNING: org.apache.hadoop.metrics.jvm.EventCounter is deprecated. Please use org.apache.hadoop.log.metrics.EventCounter in all the log4j.properties files.
Logging initialized using configuration in jar:file:/home/hadoop/hive-0.8.1-bin/lib/hive-common-0.8.1.jar!/hive-log4j.properties
Hive history file=/tmp/hadoop/hive_job_log_hadoop_201208291807_723168203.txt
hive> show tables;
OK
Time taken: 4.076 seconds
hive> create table tt(id int, name string) row format delimited fields terminated by '\t';
OK
Time taken: 0.193 seconds
hive> show tables;
OK
tt
Time taken: 0.082 seconds
hive> select name from tt;
Total MapReduce jobs = 1
Launching Job 1 out of 1
Number of reduce tasks is set to 0 since there's no reduce operator
Starting Job = job_201208291803_0001, Tracking URL = http://ubuntu118:50030/jobdetails.jsp?jobid=job_201208291803_0001
Kill Command = /home/hadoop/hadoop-1.0.2/libexec/../bin/hadoop job  -Dmapred.job.tracker=192.168.0.118:9001 -kill job_201208291803_0001
Hadoop job information for Stage-1: number of mappers: 0; number of reducers: 0
2012-08-29 18:31:00,383 Stage-1 map = 0%,  reduce = 0%
2012-08-29 18:31:06,404 Stage-1 map = 100%,  reduce = 100%
Ended Job = job_201208291803_0001
MapReduce Jobs Launched: 
Job 0:  HDFS Read: 0 HDFS Write: 0 SUCESS
Total MapReduce CPU Time Spent: 0 msec
OK
Time taken: 18.233 seconds
hive> dfs -ls /user/hive/warehouse/;
Found 1 items
drwxr-xr-x   - hadoop supergroup          0 2012-08-29 18:30 /user/hive/warehouse/tt
hive> dfs -ls /user/hive/warehouse/;
Found 1 items
drwxr-xr-x   - hadoop supergroup          0 2012-08-29 18:30 /user/hive/warehouse/tt
hive> exit;
hadoop@ubuntu118:~$ mysql -uroot -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 38
Server version: 5.5.24-0ubuntu0.12.04.1 (Ubuntu)

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use hive;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
+-----------------+
| Tables_in_hive  |
+-----------------+
| BUCKETING_COLS  |
| CDS             |
| COLUMNS_V2      |
| DATABASE_PARAMS |
| DBS             |
| PARTITION_KEYS  |
| SDS             |
| SD_PARAMS       |
| SEQUENCE_TABLE  |
| SERDES          |
| SERDE_PARAMS    |
| SORT_COLS       |
| TABLE_PARAMS    |
| TBLS            |
| t               |
+-----------------+
15 rows in set (0.00 sec)

mysql> select * from TBLS;
+--------+-------------+-------+------------------+--------+-----------+-------+----------+---------------+--------------------+--------------------+
| TBL_ID | CREATE_TIME | DB_ID | LAST_ACCESS_TIME | OWNER  | RETENTION | SD_ID | TBL_NAME | TBL_TYPE      | VIEW_EXPANDED_TEXT | VIEW_ORIGINAL_TEXT |
+--------+-------------+-------+------------------+--------+-----------+-------+----------+---------------+--------------------+--------------------+
|      1 |  1346290224 |     1 |                0 | hadoop |         0 |     1 | tt       | MANAGED_TABLE | NULL               | NULL               |
+--------+-------------+-------+------------------+--------+-----------+-------+----------+---------------+--------------------+--------------------+
1 row in set (0.00 sec)

转载于:https://my.oschina.net/mkh/blog/75546

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值