随笔分类 -  hive

摘要:hive>show functions;查看Hive的内置函数 hive>create temporary function say_hello as 'cn.zhangyu.HelloUdf';创建临时函数 hive>add jar /home/hadoop/udaf_avg.jar hive>c 阅读全文
posted @ 2019-01-08 14:40 uuhh 阅读(181) 评论(0) 推荐(0)
摘要:UDTF:User-Defined Table-Generating Functions,用户定义表生成函数,用来解决输入一行输出多行 UDF只能实现一进一出的操作,单条记录的列进行的计算操作 UDAF实现多进一出的操作,基于表的所有记录进行的计算操作, 函数类需要继承UDAF类,计算类Evalua 阅读全文
posted @ 2019-01-08 14:26 uuhh 阅读(3128) 评论(0) 推荐(0)
摘要:create temporary function say_hello as 'cn.zhangyu.HelloUdf'; 阅读全文
posted @ 2019-01-08 14:07 uuhh 阅读(1335) 评论(0) 推荐(0)
摘要:HCatalog Hadoop的表存储管理工具,它将Hive Metastore的表格数据公开给其他Hadoop应用程序。使得具有不同数据处理工具(Pig,MapReduce)的用户能够轻松将数据写入网格。它确保用户不必担心数据存储在何处或以何种格式存储. HCatalog像Hive的一个关键组件一 阅读全文
posted @ 2019-01-08 13:40 uuhh 阅读(788) 评论(0) 推荐(0)
摘要:1. order by Hive中的order by跟传统的sql语言中的order by作用是一样的,会对查询的结果做一次全局排序,所以说,只有hive的sql中制定了order by所有的数据都会到同一个reducer进行处理(不管有多少map,也不管文件有多少的block只会启动一个reduc 阅读全文
posted @ 2019-01-08 10:58 uuhh 阅读(726) 评论(0) 推荐(0)
摘要:CREATE TABLE pokes (foo INT, bar STRING);Error: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.q 阅读全文
posted @ 2019-01-08 10:27 uuhh 阅读(1193) 评论(0) 推荐(0)
摘要:Hive 单用户模式安装(成功实施) mysql在Node02,hive也在node02。安装之前确保,mysql和hadoop处于启动状态 安装mysql: [root@BrianZhu /]# wget -i -c http://dev.mysql.com/get/mysql57-communi 阅读全文
posted @ 2018-11-18 12:56 uuhh 阅读(573) 评论(0) 推荐(0)
摘要:1、hive的DML操作 在执行update、delete操作的时候需要开启事务的支持 2、hive事务的开启需要以下的依赖的条件 只支持ORCFile文件格式 默认关闭,需要手动开启 表必须支持分桶 0.14开始支持insert,delete,update操作 必须加入配置 3、需要添加的配置 hive.support.concurrency true h... 阅读全文
posted @ 2018-08-08 10:59 uuhh 阅读(1886) 评论(0) 推荐(0)
摘要:hive—high Avaliablehive的搭建方式有三种,分别是1、Local/Embedded Metastore Database (Derby)2、Remote Metastore Database3、Remote Metastore Server一般情况下,我们在学习的时候直接使用hi 阅读全文
posted @ 2018-08-08 10:53 uuhh 阅读(254) 评论(0) 推荐(0)
摘要:Hivehive三种方式区别和搭建Hive中metastore(元数据存储)的三种方式:a)内嵌Derby方式b)Local方式c)Remote方式1.本地模式(derby)这种方式是最简单的存储方式,只需要在hive-site.xml做如下配置便可<?xml version="1.0"?> <?x 阅读全文
posted @ 2018-08-08 10:40 uuhh 阅读(142) 评论(0) 推荐(0)
摘要:练习建表语句 (struct使用的分割符是和collection相同的) CREATE TABLE emp(name string,salary float,likes array<string>,cloco map<string,string>,address struct<country:str 阅读全文
posted @ 2018-08-06 17:14 uuhh 阅读(187) 评论(0) 推荐(0)