Class: HBaseRb::Scanner
- Inherits:
-
Object
- Object
- HBaseRb::Scanner
- Defined in:
- lib/hbaserb/scanner.rb
Instance Method Summary collapse
- #close ⇒ Object
- #each ⇒ Object
-
#initialize(client, scanner_id) ⇒ Scanner
constructor
A new instance of Scanner.
- #next_row ⇒ Object
Constructor Details
#initialize(client, scanner_id) ⇒ Scanner
Returns a new instance of Scanner.
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/hbaserb/scanner.rb', line 4 def initialize(client, scanner_id) @client = client @sid = scanner_id if block_given? n = next_row while n.length > 0 yield n.first n = next_row end close end end |
Instance Method Details
#close ⇒ Object
21 22 23 |
# File 'lib/hbaserb/scanner.rb', line 21 def close call :scannerClose end |
#each ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/hbaserb/scanner.rb', line 25 def each n = next_row while n.length > 0 yield n.first n = next_row end end |
#next_row ⇒ Object
17 18 19 |
# File 'lib/hbaserb/scanner.rb', line 17 def next_row call :scannerGet end |