Skip to Content
HBASE技術手冊
book

HBASE技術手冊

by Lars George
December 2012
Intermediate to advanced
572 pages
13h 8m
Chinese
GoTop Information, Inc.
Content preview from HBASE技術手冊
用戶端 API:進階功能
|
177
最後,你可以使用
incr
呼叫的增量值,不僅是累加計數器,也可以取得目前的值和減
少它的值。事實上,你可以完全地忽略它,同時預設值是
1
hbase(main):004:0>
incr 'counters', '20110101',
'daily:hits'
COUNTER VALUE = 3
hbase(main):005:0>
incr 'counters', '20110101', 'daily:hits'
COUNTER VALUE = 4
hbase(main):006:0>
incr 'counters', '20110101', 'daily:hits', 0
COUNTER VALUE = 4
hbase(main):007:0>
incr 'counters', '20110101', 'daily:hits', -1
COUNTER VALUE = 3
hbase(main):008:0>
incr 'counters', '20110101', 'daily:hits', -1
COUNTER VALUE = 2
使用累加值(
incr
命令的最後一個參數),所實現的行為如表 4-6 所示。
4-6 累加值和它在計數器累加上的效果
效果
greater than zero
計數器指定的增量值。
zero
取得計數器目前的值。和使用
get_counter
shell 命令一樣。
less than zero
計數器指定的減量值。
顯然,使用 shell
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.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Java数据科学实战

Java数据科学实战

Michael R. Brzustowicz, PhD
SQL经典实例(第2版)

SQL经典实例(第2版)

Anthony Molinaro, Robert de Graaf
機器學習|工作現場的評估、導入與實作

機器學習|工作現場的評估、導入與實作

有賀康顕, 中山心太, 西林孝

Publisher Resources

ISBN: 9789862765968