Class: SerializedCellsReader

hypertable. SerializedCellsReader

Decodes cells from a serialized cells buffer.

Constructor

new SerializedCellsReader(buffer)

Used for decoding cells from a serialized cells buffer.
Parameters:
Name Type Description
buffer Buffer Buffer holding serialized cells
Source:
Example
var reader = new hypertable.SerializedCellsReader(buffer);
while (reader.next()) {
  var cell = reader.getCell();
  // do something with cell ...
}

Members

buffer :Buffer

Serialized cells buffer.
Type:
  • Buffer
Source:

offset :Number

Current decode offset within buffer.
Type:
  • Number
Source:

Methods

flipBytes(length)

Flips length bytes of buffer starting at offset. For example:
12345678 -> 87654321
Parameters:
Name Type Description
length Number Length of bytes to flip
Source:

getCell() → {Cell}

Returns cell extracted from last call to next.
Source:
Returns:
Cell extracted from last call to next.
Type
Cell

getCellFlag() → {Number}

Returns cell flag of cell extracted from last call to next.
Source:
Returns:
Cell flag of cell extracted from last call to next.
Type
Number

getColumnFamily() → {String}

Returns column family of cell extracted from last call to next.
Source:
Returns:
Column family of cell extracted from last call to next.
Type
String

getColumnQualifier() → {String}

Returns column qualifier of cell extracted from last call to next.
Source:
Returns:
Column qualifier of cell extracted from last call to next.
Type
String

getKey() → {Key}

Returns key of cell extracted from last call to next.
Source:
Returns:
Key of cell extracted from last call to next.
Type
Key

getRevision() → {Int64}

Returns revision of cell extracted from last call to next.
Source:
Returns:
Revision of cell extracted from last call to next.
Type
Int64

getRow() → {String}

Returns row of cell extracted from last call to next.
Source:
Returns:
Row of cell extracted from last call to next.
Type
String

getTimestamp() → {Int64}

Returns timestamp of cell extracted from last call to next.
Source:
Returns:
Timestamp of cell extracted from last call to next.
Type
Int64

getValue() → {Buffer}

Returns value of cell extracted from last call to next.
Source:
Returns:
Value of cell extracted from last call to next.
Type
Buffer

next() → {Boolean}

Extracts next cell from buffer. Advances offset to first byte past extracted cell. The extracted cell, or portion thereof, can be subsequently obtain with one of the following methods:

getCell()Cell
getKey()Key
getRow()Row
getColumnFamily()Column family
getColumnQualifier()Column qualifier
getColumnTimestamp()Timestamp
getColumnRevision()Revision
getValue()Value
getCellFlag()Cell flag
Source:
Returns:
true if cell successfully extracted, false if end of buffer.
Type
Boolean