`
lookqlp
  • 浏览: 342101 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论
文章列表
官方issue未解决,不支持多网卡 https://issues.apache.org/jira/browse/HBASE-2502?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel 但参看hbase可以regionserver、zookeeper可以指定网卡: http://search-hadoop.com/m/la35qci6P21/hbase+dns&subj=hbase+host+dns+ip+and+route+for+multi+network+interface+card hba ...
接上一篇,对hbase参数进行优化,主要是调整与查询效率相关的参数 count select count(1) from hbase_table; 部分字段切表 insert overwrite table hive_table select a,b,c,d from hbase_table; 全字段切表 insert into table test_table partition(part='aa') select * from hbase_table; hive至hive切表 create table test_table2 like test_table; insert into tab ...
需求 将文本数据导入至hbase中。 安装thrift 下载http://thrift.apache.org/download/,并解压 我使用ubuntu系统,参考http://thrift.apache.org/docs/install/,执行sudo apt-get install libboost-dev libboost-test-dev libboost-program-options-dev libevent-dev automake libtool flex bison pkg-config g++ libssl-dev root账户下,先后执行./configure、mak ...
前言 我们考虑为什么要将hive与hbase结合,出于hbase有唯一主键的缘故可以将其作为存储,顺手能帮我们完成海量数据“去重”的etl处理,而hive能作为我们统计计算。两者结合简直就是双剑合臂~~,但效果怎么样呢? 目的 基于多种hiveSQL去重方式失败后,考虑过使用mysql做近期数据去重的方式,然而不能满足全量去重的业务需求,所以考虑使用hbase的唯一主键来达到全量“去重”的效果。 测试环境 hadoop-1.0.3 hive-0.9.0 hbase-0.94.2 zookeeper-3.3.5 1namenode,5datanode sqoop 测试指标 1.mysql-> ...
hive关联hbase表,使用select count(*) from tablename报如下异常: java.io.IOException: Cannot create an instance of InputSplit class = org.apache.hadoop.hive.hbase.HBaseSplit:org.apache.hadoop.hive.hbase.HBaseSplit at org.apache.hadoop.hive.ql.io.HiveInputFormat$HiveInputSplit.readField ...

hive rank 测试

    博客分类:
  • hive
前言 最近在做数据的去重,想到一种类似于关系型数据库rank函数的方式,即获取topN(N=1)的方式,sql步骤如下: 1.数据分组,组内排序 2.对分组数据进行标记rank 3.获取rank<N的数据 hive udf hive中没有这种函数,需要自己编写udf函数,代码如下: public final class TradeUDF extends UDF { private int counter; private String last_dp_id; private String last_tid; //多参数 public int evaluate(Str ...
sqoop语句 以tid为主键,info为列族 sqoop import --connect jdbc:mysql://ip/taobao_db --username hive --password 123456 --table mysql_table_name --hbase-table hbase_table_name --column-family info --split-by tid hbae创建表语句 create 'trade','info' hive创建表语句 CREATE EXTERNAL TABLE hbase_trade( tid string, dp_id s ...
前置条件 hadoop hive hbase环境搭建完成。 搭建版本 hadoop-1.0.3 hive-0.9.0 hbase-0.94.2 zookeeper-3.3.5 步骤 配置hive xml,配置hbase与hive结合包 <property> <name>hive.aux.jars.path</name> <value>file:///usr/local/hive-0.9.0/lib/hive-hbase-handler-0.9.0.jar,file:///usr/local/hive-0.9.0/lib/hbase-0.94 ...
hive做大数据处理时,遇到如下异常: [Fatal Error] Operator FS_2 (id=2): Number of dynamic partitions exceeded hive.exec.max.dynamic.partitions.pernode. ...... org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.ipc.RemoteException: org.apache.hadoop.hdfs.server.namenode.LeaseExpiredException: No ...

hbase搭建

前置条件 hadoop环境运行正常。 步骤 下载hbase压缩包hbase-0.94.2.tar.gz,并解压tar -zxvf  *.gz 配置hbase-site.xml <property> <name>hbase.rootdir</name> <value>hdfs://master:8020/hbase</value> <description>The directory shared by region servers and into which HBase persists. The URL ...
from datetime import datetime as dtime import datetime def firstDayOfMonth(dt): return (dt + datetime.timedelta(days= -dt.day + 1)).replace(hour=0, minute=0, second=0, microsecond=0) print firstDayOfMonth(dtime.today()).day == dtime.today().day
sql调用python获取数据字段个数太多 源码:     for line in sys.stdin:        (tid, dp_id, customerno,...此处省略多个字段,共n个字段) = line.strip().split() 异常:     图1 原因:     根据测试,split分割数据以后获取n+m个数值,与预期的n个数值不对应,split默认以空格分割数据,而hive录入数据默认以制表符“\t”分割。 解决:      for line in sys.stdin:        (tid, dp_id, customerno,...此处省略多个字段 ...
做个mark! 监控指标大致如下: default.shuffleInput dfs.datanode jvm mapred.shuffleOutput rpc metricssystem dfs.datanode.blockChecksumOp_avg_time 块校验平均时间 dfs.datanode.blockChecksumOp_num_ops 块检验次数 dfs.datanode.blockReports_avg_time 块报告平均时间 dfs.datanode.blockReports_num_ops 块报告次数 dfs.datanode.block_veri ...
svn check out hive 工程 图1 将相关java build path,保证能编译通过,没有红色xx build.xml--》run as--》Ant build,successful后,将build/目录下所有jar包拷贝至lib/文件夹下。 若ant没有安装或者不想通过ant编译,可以在apache上下载已经编译好的hive工程,将所有jar包拷贝至lib下,注意,hadoop jar与集群hadoop版本一致。 将lib/*.jar build path。 选择org.apache.hadoop.hive.cli.CliDriver,右键Debug As--》Debug C ...
a、导入到sqoop到eclipse中:下载sqoop 1.3的tar包解压,我们打开build.xml,发现<target name="eclipse" description="Generate Eclipse project">的target,我们只需要执行,ant eclipse,就可以ant脚本就可以给我们生成eclipse的工程文件,我们只需要在eclipse中导入即可。 b、调试sqoop:由于sqoop bin文件夹中的脚本,sqoop来启动java进程,java进程是sqoop脚本的子进程,sqoop脚本中配置了的许多环境变 ...
Global site tag (gtag.js) - Google Analytics