16 #ifndef IMPALA_EXEC_HBASE_SCAN_NODE_H_
17 #define IMPALA_EXEC_HBASE_SCAN_NODE_H_
19 #include <boost/scoped_ptr.hpp>
56 virtual void DebugString(
int indentation_level, std::stringstream* out)
const;
100 std::vector<const HBaseTableDescriptor::HBaseColumnDescriptor* >
sorted_cols_;
125 const std::string& family,
const std::string& qualifier,
virtual Status Prepare(RuntimeState *state)
virtual Status GetNext(RuntimeState *state, RowBatch *row_batch, bool *eos)
A tuple with 0 materialised slots is represented as NULL.
int suggested_max_caching_
int tuple_idx_
Tuple index in tuple row.
std::vector< THBaseFilter > filters_
HBase Filters to be set in HBaseTableScanner.
int num_errors_
Counts the total number of conversion errors for this table.
virtual Status Open(RuntimeState *state)
Start HBase scan using hbase_scanner_.
std::vector< const HBaseTableDescriptor::HBaseColumnDescriptor * > sorted_cols_
TupleId tuple_id_
Tuple id resolved in Prepare() to set tuple_desc_;.
HBaseScanNode(ObjectPool *pool, const TPlanNode &tnode, const DescriptorTbl &descs)
std::string DebugString() const
Returns a string representation in DFS order of the plan rooted at this.
void WriteTextSlot(const std::string &family, const std::string &qualifier, void *value, int value_length, SlotDescriptor *slot, RuntimeState *state, bool *error_in_row)
Tuple * tuple_
Current tuple.
SlotDescriptor * row_key_slot_
int tuple_buffer_size_
Size of tuple buffer determined by size of tuples and capacity of row batches.
boost::scoped_ptr< MemPool > tuple_pool_
Pool for allocating tuple data, including all varying-length slots.
virtual Status Reset(RuntimeState *state)
NYI.
HBaseTableScanner::ScanRangeVector scan_range_vector_
scan ranges of a region server
Abstract base class of all scan nodes; introduces SetScanRange().
static bool CmpColPos(const SlotDescriptor *a, const SlotDescriptor *b)
Compare two slots based on their column position, to sort them ascending.
std::vector< ScanRange > ScanRangeVector
boost::scoped_ptr< HBaseTableScanner > hbase_scanner_
Jni helper for scanning an HBase table.
bool row_key_binary_encoded_
True, if row key is binary encoded.
static const int ROW_KEY
Column 0 in the Impala metadata refers to the HBasw row key.
std::vector< SlotDescriptor * > sorted_non_key_slots_
List of non-row-key slots sorted by col_pos(). Populated in Prepare().
const std::string table_name_
Name of HBase table (not necessarily the table name mapped to Hive).
const int suggested_max_caching() const
boost::scoped_ptr< TextConverter > text_converter_
Helper class for converting text to other types;.
const TupleDescriptor * tuple_desc_
Descriptor of tuples read from HBase table.
virtual void Close(RuntimeState *state)
Close the hbase_scanner_, and report errors.
static const int SKIP_COLUMN