#step1: create hive table 't_test'
hive -e "
create table test.t_user(id int,name string,age int)
row format delimited
fields terminated by '\t';
"

#step2: prepare dataset and load into hive table 't_test'
cat /tmp/t_user.txt
----------------------
101 Jack 12
102 Michael 18
103 John 21
104 July 20

hive -e "
load data local inpath '/tmp/t_user.txt' overwrite into table test.t_user;
"

#step3: create hbase mapping table 't_user'
echo "create 't_user','i'" | hbase shell

#step4: create external hive table 't_user_hbase' related with hbase table 't_uesr'
hive -e "
create external table test.t_user_hbase(id int, name string, age int)
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES ('hbase.columns.mapping' = ':key,i:name,i:age')
TBLPROPERTIES('hbase.table.name' = 't_user');
"

#step5: copy data from hive raw table 't_user' to hbase table 't_user'
hive -e "
insert overwrite table test.t_user_hbase select id,name,age from test.t_user;
"

Hive集成HBase实践的更多相关文章

  1. Hive集成HBase;安装pig

    Hive集成HBase 配置 将hive的lib/中的HBase.jar包用实际安装的Hbase的jar包替换掉 cd /opt/hive/lib/ ls hbase-0.94.2*  rm -rf ...

  2. Hive集成HBase详解

    摘要 Hive提供了与HBase的集成,使得能够在HBase表上使用HQL语句进行查询 插入操作以及进行Join和Union等复杂查询   应用场景 1. 将ETL操作的数据存入HBase 2. HB ...

  3. 大数据技术之_11_HBase学习_02_HBase API 操作 + HBase 与 Hive 集成 + HBase 优化

    第6章 HBase API 操作6.1 环境准备6.2 HBase API6.2.1 判断表是否存在6.2.2 抽取获取 Configuration.Connection.Admin 对象的方法以及关 ...

  4. Hive 集成 Hudi 实践(含代码)| 可能是全网最详细的数据湖系列

    公众号后台越来越多人问关于数据湖相关的内容,看来大家对新技术还是很感兴趣的.关于数据湖的资料网络上还是比较少的,特别是实践系列,对于新技术来说,基础的入门文档还是很有必要的,所以这一篇希望能够帮助到想 ...

  5. hive 集成 hbase NoClassDefFoundError: org/apache/htrace/Trace

    更新了hive版本后,在创建hive外部表 级联hbase 的时候报如下异常: hive (default)> create external table weblogs(id string,d ...

  6. Hortonwork Ambari配置Hive集成Hbase的java开发maven配置

    集群环境 ambari 2.7.3 hdp/hortonwork 2.6.0.3 maven <dependency> <groupId>org.apache.hive< ...

  7. hbase与hive集成:hive读取hbase中数据

    1.创建hbase jar包到hive lib目录软连接 hive需要jar包: hive-hbase-handler-0.13.1-cdh5.3.6.jar zookeeper-3.4.5-cdh5 ...

  8. 集成Hive和HBase

    1. MapReduce 用MapReduce将数据从本地文件系统导入到HBase的表中, 比如从HBase中读取一些原始数据后使用MapReduce做数据分析. 结合计算型框架进行计算统计查看HBa ...

  9. hive和hbase整合的原因和原理

    为什么要进行hive和hbase的整合? hive是高延迟.结构化和面向分析的: hbase是低延迟.非结构化和面向编程的. Hive集成Hbase就是为了使用hbase的一些特性.或者说是中和它们的 ...

随机推荐

  1. A SQL to insert continuous values

    I need a table to store all the working days. I dont like loop, so I tried sql. The following is the ...

  2. linux系统编程之进程(七):system()函数使用

    一,system()理解 功能:system()函数调用"/bin/sh -c command"执行特定的命令,阻塞当前进程直到command命令执行完毕 原型: int syst ...

  3. 记录FormsAuthentication的使用方法

    配置,配置mode="Forms",其他属性详见 MSDN(点我直接查看各authentication属性) . <configuration> <system. ...

  4. [招聘] 上海耐斯特数字招聘3D图形软件工程师

    公司介绍 上海耐斯特数字科技有限公司成立于2018年9月,致力于为中国原创动画.影视行业提供新一代核心技术解决方案和全流程技术服务.公司创始团队拥有国内外领先的行业背景与资源,在DCC软件开发方面具有 ...

  5. On extracting ops from LLVM backend

    Symbols and ops generation: llvm::Function* BackendLLVM::build_llvm_instance (bool groupentry) Work ...

  6. asp.net core读取appsetting.json文件

    1.在Startup.cs文件中注入,ConfigureServices方法 services.Configure<MyConfig>(Configuration.GetSection(& ...

  7. 世界线(bzoj2894)(广义后缀自动机)

    由于春希对于第二世代操作的不熟练,所以刚使用完\(invasion process\)便掉落到了世界线之外,错综复杂的平行世界信息涌入到春希的意识中.春希明白了事件的真相. 在一个冬马与雪菜同时存在的 ...

  8. Python大法之从火车余票查询到打造抢Supreme神器

    本文作者:i春秋作家——阿甫哥哥 系列文章专辑:https://bbs.ichunqiu.com/forum.php?mod=collection&action=view&ctid=9 ...

  9. [JavaScript] js获取当前页面url网址信息

    在WEB开发中,时常会用到javascript来获取当前页面的url网址信息,在这里是我的一些获取url信息的小总结. 下面我们举例一个URL,然后获得它的各个组成部分:http://i.cnblog ...

  10. fail2ban

    在 [DEFAULT] 全局配置中的ignoreip选项中添加被放行的ip地址:ignoreip = 127.0.0.1 172.17.1.218 网段可以加 127.0.0.1/8,用空格隔开就行. ...