hive启动后相关操作
时间:2022-05-06
本文章向大家介绍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)
- 巧用echo命令解决Samba批量添加用户难题
- 分分钟搭建MySQL Group Replication测试环境(r11笔记第82天)
- MySQL 5.7 Group Replication错误总结(r11笔记第84天)
- 空结构体struct{}解析
- 动态创建MySQL Group Replication的节点(r11笔记第84天)
- sysbench压测小记(r11笔记第99天)
- WordPress启用memcached动态缓存以及报错解决
- 升级CentOS6.5内核,开启Nginx的fastopen和reuseport特性
- Nginx网站使用CDN之后禁止用户真实IP访问的方法
- 相差数十倍的SQL性能分析(r11笔记第98天)
- shell脚本实现整站缓存和预缓存,进一步提升网站整体加载速度
- Oracle中的PGA监控报警分析(r11笔记第96天)
- MySQL错误修复记录:Table xx is marked as crashed and should be repaired
- WordPress百度自动推送JS优化,规避错误、重复推送问题
- JavaScript 教程
- JavaScript 编辑工具
- JavaScript 与HTML
- JavaScript 与Java
- JavaScript 数据结构
- JavaScript 基本数据类型
- JavaScript 特殊数据类型
- JavaScript 运算符
- JavaScript typeof 运算符
- JavaScript 表达式
- JavaScript 类型转换
- JavaScript 基本语法
- JavaScript 注释
- Javascript 基本处理流程
- Javascript 选择结构
- Javascript if 语句
- Javascript if 语句的嵌套
- Javascript switch 语句
- Javascript 循环结构
- Javascript 循环结构实例
- Javascript 跳转语句
- Javascript 控制语句总结
- Javascript 函数介绍
- Javascript 函数的定义
- Javascript 函数调用
- Javascript 几种特殊的函数
- JavaScript 内置函数简介
- Javascript eval() 函数
- Javascript isFinite() 函数
- Javascript isNaN() 函数
- parseInt() 与 parseFloat()
- escape() 与 unescape()
- Javascript 字符串介绍
- Javascript length属性
- javascript 字符串函数
- Javascript 日期对象简介
- Javascript 日期对象用途
- Date 对象属性和方法
- Javascript 数组是什么
- Javascript 创建数组
- Javascript 数组赋值与取值
- Javascript 数组属性和方法