Created
August 12, 2012 11:09
-
-
Save ueshin/3331431 to your computer and use it in GitHub Desktop.
FizzBuzzRegionObserver
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> create 'fizzbuzz', | |
{ NAME => 'num', VERSIONS => JInteger::MAX_VALUE }, | |
{ NAME => 'fizz', VERSIONS => JInteger::MAX_VALUE }, | |
{ NAME => 'buzz', VERSIONS => JInteger::MAX_VALUE }, | |
{ NAME => 'fizzbuzz', VERSIONS => JInteger::MAX_VALUE } | |
> create 'fb', 'family' | |
> disable 'fb' | |
> alter 'fb', METHOD => 'table_att','coprocessor' => 'maprfs:////user/ueshin/hbase-coprocessors-0.0.2-SNAPSHOT.jar|st.happy_camper.hbase.coprocessors.fizzbuzz.FizzBuzzRegionObserver|1000|targets=family' | |
> enable 'fb' | |
> put 'fb', '1', 'family:a', "\x00\x00\x00\x01" | |
> scan 'fizzbuzz' | |
ROW COLUMN+CELL | |
\x00\x00\x00\x01:1 column=num:\x00\x00\x00\x02fb\x00\x00\x019\x1AHY\x8F\x00\x011\x00\x06family\x00\x00\x00\ | |
x01a, timestamp=1344765712783, value=\x00\x00\x00\x01 | |
1 row(s) in 0.0310 seconds | |
> put 'fb', '15', 'family:f', "\x00\x00\x00\x0f" | |
> scan 'fizzbuzz' | |
ROW COLUMN+CELL | |
\x00\x00\x00\x01:1 column=num:\x00\x00\x00\x02fb\x00\x00\x019\x1AHY\x8F\x00\x011\x00\x06family\x00\x00\x00\ | |
x01a, timestamp=1344765712783, value=\x00\x00\x00\x01 | |
\x00\x00\x00\x0F:FizzBuzz column=fizzbuzz:\x00\x00\x00\x02fb\x00\x00\x019\x1AH\xEC\xC3\x00\x0215\x00\x06family\x00 | |
\x00\x00\x01f, timestamp=1344765750467, value=\x00\x00\x00\x0F | |
2 row(s) in 0.0300 seconds | |
> scan 'fizzbuzz', { COLUMNS => 'fizzbuzz' } | |
ROW COLUMN+CELL | |
\x00\x00\x00\x0F:FizzBuzz column=fizzbuzz:\x00\x00\x00\x02fb\x00\x00\x019\x1AH\xEC\xC3\x00\x0215\x00\x06family\x00 | |
\x00\x00\x01f, timestamp=1344765750467, value=\x00\x00\x00\x0F | |
1 row(s) in 0.0150 seconds | |
> put 'fb', '30', 'family:f', "\x00\x00\x00\x0f" | |
> scan 'fizzbuzz', { COLUMNS => 'fizzbuzz' } | |
ROW COLUMN+CELL | |
\x00\x00\x00\x0F:FizzBuzz column=fizzbuzz:\x00\x00\x00\x02fb\x00\x00\x019\x1AH\xEC\xC3\x00\x0215\x00\x06family\x00 | |
\x00\x00\x01f, timestamp=1344765750467, value=\x00\x00\x00\x0F | |
\x00\x00\x00\x0F:FizzBuzz column=fizzbuzz:\x00\x00\x00\x02fb\x00\x00\x019\x1AI\xD3\x90\x00\x0230\x00\x06family\x00 | |
\x00\x00\x01f, timestamp=1344765809552, value=\x00\x00\x00\x0F | |
1 row(s) in 0.0160 seconds |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment