随笔 - 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... 阅读全文

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

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

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

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

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

摘要:#!/bin/bash#需要指定hive中的库名#set -xset -eDB=$1if [ -z $1 ];then echo “Usage:$0 DbName” exit 1fi#注释掉cron对应的计划任务row=$(sed -n '/s... 阅读全文

posted @ 2016-02-27 10:20 ggzone 阅读(342) 评论(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 $re... 阅读全文

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

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

posted @ 2016-02-20 11:16 ggzone 阅读(120) 评论(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_14541... 阅读全文

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

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

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

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

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

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

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

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

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

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

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

摘要:最简单方式是按主键增量导入:http://blog.csdn.net/ggz631047367/article/details/50185319以下方法只做存档需求:redis缓存的数据隔段时间往MySQL中写入一次。如果按照job的增量导入,比如上次red... 阅读全文

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

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

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

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

posted @ 2015-12-05 13:26 ggzone 阅读(125) 评论(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 . 复制:... 阅读全文

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

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

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

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