Skip to Main Content
Hadoop数据分析
book

Hadoop数据分析

by Benjamin Bengfort, Jenny Kim
April 2018
Intermediate to advanced content levelIntermediate to advanced
229 pages
6h 19m
Chinese
Posts & Telecom Press
Content preview from Hadoop数据分析
118
6
样可以更快地进行扫描范围,但在读
/
写操作期间,它也可能导致个别服务器的负载不均
匀(称为“
RegionServer hotspotting
”)。因此,除了要实现我们的数据访问用例之外,还需
要考虑各个
region
之间的行键分布。
以当前示例为例,假设我们使用唯一的反向链接
URL
作为行键。强烈推荐你阅读
Apache HBase Reference Guide
”中的“
HBase and Schema Design
”(
http://hbase.apache.
org/0.94/book/schema.html
),了解优秀的行键设计案例。
4.
使用
put
插入数据
现在这个表可以存储数据了——我们想在
linkshare
应用程序中存储关于链接的描述性数
据(例如其标题),同时维护一个跟踪链接共享次数的频率计数器。
我们可以在指定的表
/
/
列和可选时间戳坐标的单元格中插入或 put 一个值。要将一个
单元格值放入 linkshare 表、行键为 org.hbase.www 的行、link 列族下的当前时间戳的
title 列,可以执行以下操作:
hbase> put 'linkshare', 'org.hbase.www', 'link:title', 'Apache HBase'
hbase> put 'linkshare', 'org.hadoop.www', 'link:title', 'Apache Hadoop'
hbase> put 'linkshare', 'com.oreilly.www', ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Kudu:构建高性能实时数据分析存储系统

Kudu:构建高性能实时数据分析存储系统

Jean-Marc Spaggiari, Mladen Kovacevic, Brock Noland, Ryan Bosshart
Java并发编程实战

Java并发编程实战

Brian Goetz, Tim Peierls
面向机器学习的自然语言标注

面向机器学习的自然语言标注

James Pustejovsky, Amber Stubbs

Publisher Resources

ISBN: 9787115479648