hbase

HBase Error : zookeeper.znode.parent mismatch

∥☆過路亽.° 提交于 2019-12-30 06:40:31
问题 i am trying to learn Hadoop and i'v reached HBase section in Hadoop Definitive Guide. i tried to start HBase and got error. Could someone give me step-by-step guide? opel@ubuntu:~$ zkServer.sh start JMX enabled by default Using config: /home/opel/zookeeper-3.4.6/bin/../conf/zoo.cfg Starting zookeeper ... STARTED opel@ubuntu:~$ start-hbase.sh starting master, logging to /home/opel/hbase-0.94.20/logs/hbase-opel-master-ubuntu.out opel@ubuntu:~$ hbase shell HBase Shell; enter 'help<RETURN>' for

What are the non-hex characters in HBase Shell RowKey?

与世无争的帅哥 提交于 2019-12-30 04:41:26
问题 I am saving my key as a byte-array. In HBase Shell when I look at my key I see non-hex values...I do not have any encoding enabled, I do not have any compression enabled. Here is a sample...what is VNQ? what is BBW? I'm guessing there is some sort of encoding going on? \xFB\xC6\xE8\x03\xF0VNQ\x8By\xF6\x89D\xC1\xBBW\x00\x00\x00\x00\x00\x00\x01\xF3\x00\x00\x00\x00\x00\x07\xA1\x1F 回答1: HBase shell uses something called a "binary string" (Escaped hexadecimal) representation of byte arrays to

Hadoop体系架构简介

让人想犯罪 __ 提交于 2019-12-30 01:41:37
  今天跟一个朋友在讨论hadoop体系架构,从当下流行的Hadoop+HDFS+MapReduce+Hbase+Pig+Hive+Spark+Storm开始一直讲到HDFS的底层实现,MapReduce的模型计算,到一个云盘如何实现,再到Google分布式史上那最伟大的三篇文章。   这几个名词刚问到初学者的时候肯定会一脸懵逼包括我自己,整个Hadoop家族成员很多,“势力”很庞大,下面画个图,简单概括下。 到这里本文内容已结束,下文是摘自网络上一些比较经典或者浅显易懂的相关文字,有兴趣的继续往下看。对初学者来说,如果上图能大概看懂,那下面的内容能更有利于你理解。 Google的分布式计算三驾马车: Hadoop的创始源头在于当年Google发布的3篇文章,被称为Google的分布式计算三驾马车。 Google File System( 中文 , 英文 )用来解决数据存储的问题,采用N多台廉价的电脑,使用冗余(也就是一份文件保存多份在不同的电脑之上)的方式,来取得读写速度与数据安全并存的结果。 Map-Reduce说穿了就是函数式编程,把所有的操作都分成两类,map与reduce,map用来将数据分成多份,分开处理,reduce将处理后的结果进行归并,得到最终的结果。但是在其中解决了容错性的问题。 BigTable是在分布式系统上存储结构化数据的一个解决方案

【HBase SQL插件 Phoenix Squirrel】Phoenix入门 2019_12_29

拈花ヽ惹草 提交于 2019-12-30 01:13:22
Phenix 简介 优势 架构 资源 部署 测试 表操作 C 创建 R 显示 U 更新 D 删除 H-P 表映射 视图映射 案例 表映射 案例1 案例2 P-H 二级索引 配置修改 二级索引 Global Index Local Index 删除索引 三种优化查询方法 加盐表 盐值设定规则 格式 P-Spark Maven 依赖 示例代码 P 可视化工具 资源 安装 连接 简介 Apache Phoenix 是 HBase 开源 SQL 皮肤,使用标准 JDBC API 代替 HBase-Client API 来 DDL,DML HBase数据库。 优势 令 hbase 支持标准化 SQL,替代繁复 hbase 命令,降低 hbase 学习成本 完美支持 Hbase 二级索引创建 更加便捷集成 Spark,Hive,Pig,Flume 和 MapReduce 架构 服务器:HBase 集成 Phoenix 十分简单,只需将 Phoenix.Jars 分发到 所有RegionServer HBase_HOME/lib 目录下即可 客户端:使用 org.apache.phoenix.jdbc.PhoenixDriver 即可,究极简单 资源 官网:http://phoenix.apache.org/index.html 下载:http://phoenix.apache.org

面试题_HBase

混江龙づ霸主 提交于 2019-12-29 16:35:54
1.HBase 和 HDFS 关系 HDFS是Hadoop分布式文件系统。 HBase的数据通常存储在HDFS上。HDFS为HBase提供了高可靠性的底层存储支持。 Hbase是Hadoop database即Hadoop数据库。它是一个适合于非结构化数据存储的数据库,HBase基于列的而不是基于行的模式。 HBase是Google Bigtable的开源实现,类似Google Bigtable利用GFS作为其文件存储系统,HBase利用Hadoop HDFS作为其文件存储系统;Google运行MapReduce来处理Bigtable中的海量数据,HBase同样利用Hadoop MapReduce来处理HBase中的海量数据。 HDFS为HBase提供了高可靠性的底层存储支持,Hadoop MapReduce为HBase提供了高性能的计算能力,Zookeeper为HBase提供了稳定服务和failover机制。Pig和Hive还为HBase提供了高层语言支持,使得在HBase上进行数据统计处理变的非常简单。 Sqoop则为HBase提供了方便的RDBMS(关系型数据库)数据导入功能,使得传统数据库数据向HBase中迁移变的非常方便。 2.hbase的ha,zookeeper在其中的作用 3.Hbase主键设计、hbase为啥比mysql快、为什么项目选用hbase 4

Ambari-java python多用混合

泄露秘密 提交于 2019-12-29 15:26:25
由于 Ambari Metrics 存储的是集群运行情况信息,在当前集群运行良好情况下,不是特别重要;所以我们采取删除重建的方式修复。以下为主要步骤: 删除 Ambari Metrics 元数据 Ambari Metrics 使用 hbase 存储数据。hbase 元数据存储在 zookeeper 上。 查看 ams-hbase-site 配置 zookeeper.znode.parent 项,确定其元数据存储路径,然后使用zkClient进行删除。 删除 Ambari Metrics 历史数据 Ambari Metrics 使用 hbase 存储数据。hbase 数据存储在本地目录(单节点)或hdfs中(高可用)。 查看 ams-hbase-site 配置 hbase.rootdir 项,确定数据存储路径,使用命令行进行删除。 删除 Ambari Metrics 临时文件 Ambari Metrics 临时文件包含: a. Aggregator checkpoint 目录:配置在 Metrics Collector 的 Aggregator checkpoint directory 项中。 b. hbase 本地文件:配置在 ams-hbase-site 的 hbase.local.dir 项中。 c. phoenix spool 目录:配置在 ams-hbase-site 的

Writing to HBase via Spark: Task not serializable

巧了我就是萌 提交于 2019-12-29 14:57:24
问题 I'm trying to write some simple data in HBase (0.96.0-hadoop2) using Spark 1.0 but I keep getting getting serialization problems. Here is the relevant code: import org.apache.hadoop.hbase.client._ import org.apache.hadoop.hbase.io.ImmutableBytesWritable import org.apache.hadoop.hbase.util.Bytes import org.apache.spark.rdd.NewHadoopRDD import org.apache.hadoop.hbase.HBaseConfiguration import org.apache.hadoop.mapred.JobConf import org.apache.spark.SparkContext import java.util.Properties

HBase (Easy): How to Perform Range Prefix Scan in hbase shell

那年仲夏 提交于 2019-12-29 02:51:32
问题 I am designing an app to run on hbase and want to interactively explore the contents of my cluster. I am in the hbase shell and I want to perform a scan of all keys starting with the chars "abc". Such keys might inlcude "abc4", "abc92", "abc20014" etc... I tried a scan hbase(main):003:0> scan 'mytable', {STARTROW => 'abc', ENDROW => 'abc'} But this does not seem to return anything since there is technically no rowkey "abc" only rowkeys starting with "abc" What I want is something like hbase

Hbase的架构

限于喜欢 提交于 2019-12-28 16:26:04
- Client : hbase客户端, 1.包含访问hbase的接口。比如,linux shell,java api。 2.除此之外,它会维护缓存来加速访问hbase的速度。比如region的位置信息。 - Zookeeper : 1.监控Hmaster的状态,保证有且仅有一个活跃的Hmaster。达到高可用。 2.它可以存储所有region的寻址入口。如:root表在哪一台服务器上。 3. 实时监控HregionServer的状态,感知HRegionServer的上下线信息,并实时通知给Hmaster。 4. 存储hbase的部分元数据。 - HMaster : 1. 为HRegionServer分配Region(新建表等)。 2. 负责HRegionServer的负载均衡。 3. 负责Region的重新分配(HRegionServer宕机之后的Region分配,HRegion裂变:当Region过大之后的拆分)。 4. Hdfs上的垃圾回收。 5. 处理schema的更新请求 - HRegionServer : 1. 维护HMaster分配给的Region(管理本机的Region)。 2. 处理client对这些region的读写请求,并和HDFS进行交互。 3. 负责切分在运行过程中组件变大的Region。 - HLog : 1. 对HBase的操作进行记录

Which HBase connector for Spark 2.0 should I use?

ぐ巨炮叔叔 提交于 2019-12-28 13:51:51
问题 Our stack is composed of Google Data Proc (Spark 2.0) and Google BigTable (HBase 1.2.0) and I am looking for a connector working with these versions. The Spark 2.0 and the new DataSet API support is not clear to me for the connectors I have found: spark-hbase : https://github.com/apache/hbase/tree/master/hbase-spark spark-hbase-connector : https://github.com/nerdammer/spark-hbase-connector hortonworks-spark/shc : https://github.com/hortonworks-spark/shc The project is written in Scala 2.11