
hive
showmyheart
这个作者很懒,什么都没留下…
展开
-
hive的安装与配置
1. hive安装在hadoop.client上2. 解压缩安装在/home/hadoopuser下3. 配置(1) 复制一份hive-env.sh.template,取消.template后缀(2) 更改hive-env.sh的内容:HADOOP_HOME=/home/hadoopuser/hadoop(3) 复制一份hiv转载 2013-11-04 23:24:37 · 890 阅读 · 0 评论 -
hiveQL分区表
1、分区表的创建hive> create table part (str string) > partitioned by (data string);OKTime taken: 0.158 seconds2、加载数据时显示指定分区值hive> load data local inpath 'file1' > into table part >原创 2013-11-07 13:25:38 · 1830 阅读 · 0 评论 -
hiveQL 外部表
1、创建外部表hive> create external table ext_t (name string) > location '/user/grid/ext_t';OKTime taken: 5.494 seconds使用external 关键字后,hive知道数据并不是由自己管理的,因此不会吧数据移动到自己的目录,即:在表定义时,甚至不会去检查这个外部位置是否存在原创 2013-11-07 12:41:00 · 1034 阅读 · 0 评论 -
hive的使用和优化笔记
hive.optimize.cp=true:列裁剪,取数只取 在读数据的时候,只读取查询中需要用到的列,而忽略其他列。例如,对于查询:SELECT a,b FROM T WHEREe hive.optimize.prunner:分区裁剪 LIMIT hive.limit.optimize.enable=true:优化LIMIT n语句 使用原创 2015-04-25 00:01:02 · 2445 阅读 · 0 评论