随笔 - 483, 文章 - 0, 评论 - 2, 阅读 - 18万

导航

< 2025年2月 >
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 1
2 3 4 5 6 7 8

随笔分类 -  Hive

摘要:sbt依赖name := "Pi"version := "1.0"scalaVersion := "2.10.6"libraryDependencies++= Seq( "org.apache.spark" %% "spark-core" % "1.5.2", "org.apac... 阅读全文

posted @ 2016-03-31 15:59 ggzone 阅读(229) 评论(0) 推荐(0) 编辑

摘要:看mr的运行显示:sqoop job可以获得的select max(xxx)结果,但是当mr开始时却显示大片错误,就是连接超时,和连接重置等问题, 最后去每个节点ping mysql的ip地址,发现root@hslave1:/opt/cm-5.5.1/etc# ping 10.121... 阅读全文

posted @ 2016-03-15 21:00 ggzone 阅读(210) 评论(0) 推荐(0) 编辑

摘要:使用的是cloudera manager管理的集群:hive添加自定义jar包服务端:高级:Hive 辅助 JAR 目录设置的的路径是影响所有服务端的设置,比如hue中使用到了hive查询编辑器,在里面写HQL要用到自定义的JAR,那就必须设置这个地方。CM需要重启集群客户端:高级... 阅读全文

posted @ 2016-02-27 10:31 ggzone 阅读(931) 评论(0) 推荐(0) 编辑

摘要:#!/bin/bash#set -xDB=$1#获取hive表定义ret=$(hive -e "use ${DB};show tables;"|grep -v _es|grep -v _hb|grep -v importinfo)for tem in $ret;do echo... 阅读全文

posted @ 2016-02-27 10:19 ggzone 阅读(2692) 评论(0) 推荐(0) 编辑

摘要:#!/bin/bash#set -xDB=$1#获取hive表定义ret=$(hive -e 'use ${DB};show tables;'|grep -v _es|grep -v _hb|grep -v importinfo)for tem in $ret;do hive... 阅读全文

posted @ 2016-02-27 10:03 ggzone 阅读(836) 评论(0) 推荐(0) 编辑

摘要:hive级联删除数据库和表 drop database t1 cascade;hive创建临时表和插入 create table t1 as select * from achi; insert into table t1 select * from achi; insert ove... 阅读全文

posted @ 2016-02-20 11:15 ggzone 阅读(101) 评论(0) 推荐(0) 编辑

摘要:错误:GB physical memory used; 4.7 GB of 2.1 GB virtual memory used. Killing container. Dump of the process-tree for container_1454126356092_002... 阅读全文

posted @ 2016-02-14 11:52 ggzone 阅读(2517) 评论(0) 推荐(0) 编辑

摘要:hive中field如果是string,比如id,那么使用10000000000+id结果是科学计数法显示,转换为正常显示方法:select (10000000000+cast(id as int)) as id from tb1 limit 10;hive 调用java的函数,必... 阅读全文

posted @ 2016-01-30 13:17 ggzone 阅读(812) 评论(0) 推荐(0) 编辑

摘要:CREATE EXTERNAL TABLE table1(key string,zoneid int,result int,) STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' WITH SERDEPROP... 阅读全文

posted @ 2016-01-30 13:09 ggzone 阅读(190) 评论(0) 推荐(0) 编辑

摘要:https://cwiki.apache.org/confluence/display/Hive/HCatalog+CLIhive的配置中添加:export PATH=$PATH:$HIVE_HOME/hcatalog/bin:$HIVE_HOME/hcatalog/sbinHCatalog C... 阅读全文

posted @ 2016-01-10 11:22 ggzone 阅读(721) 评论(0) 推荐(0) 编辑

摘要:使用hive访问elasticsearch的数据1.配置 将elasticsearch-hadoop-2.1.1.jar拷贝到hive/libhive -hiveconf hive.aux.jars.path=/usr/local/hive-1.2.1/lib/elasticsear... 阅读全文

posted @ 2016-01-01 20:53 ggzone 阅读(887) 评论(0) 推荐(0) 编辑

摘要:使用spark访问elasticsearch的数据,前提是spark能访问hive,hive能访问es http://blog.csdn.net/ggz631047367/article/details/504458321.配置cp elasticsearch-hadoop-2.1.... 阅读全文

posted @ 2016-01-01 20:39 ggzone 阅读(3570) 评论(0) 推荐(0) 编辑

摘要:需求:redis缓存的数据隔段时间往MySQL中写入一次。如果按照job的增量导入,比如上次redis向mysql导入数据时间为8:00,下一次导入时间为9:00,8:20sqoop进行增量导入,导入的时*~8:20的数据,sqoop把job中的最后导入时间设置为8:20。当9:00... 阅读全文

posted @ 2015-12-05 14:06 ggzone 阅读(753) 评论(0) 推荐(0) 编辑

摘要:MR代码:package merge;import java.io.IOException;import java.util.Iterator;import org.apache.hadoop.fs.Path;import org.apache.hadoop.io.IntWritab... 阅读全文

posted @ 2015-12-05 13:38 ggzone 阅读(680) 评论(0) 推荐(0) 编辑

摘要:sqoop job --create incretest -- import --connect jdbc:mysql://10.8.2.19:3306/db --table table1 --username op_root --password root -m 1 --hi... 阅读全文

posted @ 2015-12-05 13:26 ggzone 阅读(350) 评论(0) 推荐(0) 编辑

摘要:下载:apache-hive-1.2.1-src.tar apache-hive-1.2.1-src.tar 解压,cd apache-hive-1.2.1-src/hwi 命令:jar cfM hive-hwi-1.2.0.war -C web . 复制:hive-1.2.1/li... 阅读全文

posted @ 2015-11-22 17:04 ggzone 阅读(339) 评论(0) 推荐(0) 编辑

摘要:1、添加环境变量:vi ~/.bashrc#HIVE VARIABLES STARTexport HIVE_HOME=/usr/local/hive-1.2.1export PATH=$PATH:$HIVE_HOME/binexport CLASSPATH=$CLASSPATH:$H... 阅读全文

posted @ 2015-11-22 17:01 ggzone 阅读(333) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示