前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >hive启动后相关操作

hive启动后相关操作

作者头像
闵开慧
发布2018-03-30 11:43:16
7470
发布2018-03-30 11:43:16
举报
文章被收录于专栏:闵开慧
代码语言:javascript
复制
   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)  
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
云数据库 MySQL
腾讯云数据库 MySQL(TencentDB for MySQL)为用户提供安全可靠,性能卓越、易于维护的企业级云数据库服务。其具备6大企业级特性,包括企业级定制内核、企业级高可用、企业级高可靠、企业级安全、企业级扩展以及企业级智能运维。通过使用腾讯云数据库 MySQL,可实现分钟级别的数据库部署、弹性扩展以及全自动化的运维管理,不仅经济实惠,而且稳定可靠,易于运维。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档