Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
|
Public Member Functions | |
Run (Sorter *parent, TupleDescriptor *sort_tuple_desc, bool materialize_slots) | |
Status | Init () |
template<bool has_var_len_data> | |
Status | AddBatch (RowBatch *batch, int start_index, int *num_processed) |
Status | UnpinAllBlocks () |
void | DeleteAllBlocks () |
Status | GetNextBatch (RowBatch **sorted_batch) |
Private Member Functions | |
template<bool convert_offset_to_ptr> | |
Status | GetNext (RowBatch *output_batch, bool *eos) |
bool | CanExtendRun () const |
void | CollectNonNullVarSlots (Tuple *src, vector< StringValue * > *var_len_values, int *total_var_len) |
Status | TryAddBlock (vector< BufferedBlockMgr::Block * > *block_sequence, bool *added) |
Status | PrepareRead () |
void | CopyVarLenData (char *dest, const vector< StringValue * > &var_values) |
void | CopyVarLenDataConvertOffset (char *dest, int64_t offset, const vector< StringValue * > &var_values) |
Private Attributes | |
const Sorter * | sorter_ |
const TupleDescriptor * | sort_tuple_desc_ |
const int | sort_tuple_size_ |
const int | block_size_ |
const bool | has_var_len_slots_ |
const bool | materialize_slots_ |
bool | is_sorted_ |
bool | is_pinned_ |
vector< BufferedBlockMgr::Block * > | fixed_len_blocks_ |
vector< BufferedBlockMgr::Block * > | var_len_blocks_ |
BufferedBlockMgr::Block * | var_len_copy_block_ |
int64_t | num_tuples_ |
int64_t | num_tuples_returned_ |
scoped_ptr< RowBatch > | buffered_batch_ |
int | fixed_len_blocks_index_ |
int | var_len_blocks_index_ |
bool | pin_next_fixed_len_block_ |
bool | pin_next_var_len_block_ |
int | fixed_len_block_offset_ |
Friends | |
class | Sorter |
class | TupleSorter |
impala::Sorter::Run::Run | ( | Sorter * | parent, |
TupleDescriptor * | sort_tuple_desc, | ||
bool | materialize_slots | ||
) |
Status impala::Sorter::Run::AddBatch | ( | RowBatch * | batch, |
int | start_index, | ||
int * | num_processed | ||
) |
Definition at line 372 of file sorter.cc.
References impala::BufferedBlockMgr::Block::Allocate(), impala::BufferedBlockMgr::Block::BytesRemaining(), impala::RowBatch::GetRow(), impala::TupleRow::GetTuple(), impala::Tuple::MaterializeExprs(), impala::RowBatch::num_rows(), offset, impala::Status::OK, RETURN_IF_ERROR, impala::BufferedBlockMgr::Block::ReturnAllocation(), impala::RowBatch::row_desc(), and impala::RowDescriptor::tuple_descriptors().
Referenced by impala::Sorter::AddBatch().
|
private |
|
private |
Definition at line 702 of file sorter.cc.
References impala::Tuple::GetSlot(), impala::Tuple::IsNull(), impala::StringValue::len, impala::SlotDescriptor::null_indicator_offset(), and impala::SlotDescriptor::tuple_offset().
|
private |
Definition at line 739 of file sorter.cc.
References impala::StringValue::len, and impala::StringValue::ptr.
|
private |
Definition at line 747 of file sorter.cc.
References impala::StringValue::len, offset, and impala::StringValue::ptr.
void impala::Sorter::Run::DeleteAllBlocks | ( | ) |
Definition at line 468 of file sorter.cc.
References impala::BufferedBlockMgr::Block::Delete().
Referenced by impala::Sorter::~Sorter().
|
private |
Definition at line 609 of file sorter.cc.
References impala::RowBatch::AddRow(), impala::RowBatch::AtCapacity(), impala::BufferedBlockMgr::Block::buffer(), impala::RowBatch::CommitLastRow(), impala::RowBatch::GetRow(), impala::Tuple::GetSlot(), impala::Tuple::IsNull(), impala::SlotDescriptor::null_indicator_offset(), impala::Status::OK, impala::BufferedBlockMgr::Block::Pin(), RETURN_IF_ERROR, impala::TupleRow::SetTuple(), impala::SlotDescriptor::tuple_offset(), impala::ColumnType::type, impala::SlotDescriptor::type(), impala::TYPE_STRING, and impala::BufferedBlockMgr::Block::valid_data_len().
Definition at line 573 of file sorter.cc.
References impala::Sorter::has_var_len_slots_, impala::Status::OK, and RETURN_IF_ERROR.
Referenced by impala::Sorter::CreateMerger().
Status impala::Sorter::Run::Init | ( | ) |
Definition at line 350 of file sorter.cc.
References impala::Sorter::has_var_len_slots_, impala::Status::OK, and RETURN_IF_ERROR.
Referenced by impala::Sorter::Init().
|
private |
Definition at line 535 of file sorter.cc.
References impala::Status::AddDetail(), impala::Sorter::has_var_len_slots_, impala::Status::MEM_LIMIT_EXCEEDED, impala::Status::OK, impala::PIN_FAILED_ERROR_MSG, and RETURN_IF_ERROR.
Referenced by impala::Sorter::CreateMerger().
|
private |
Definition at line 716 of file sorter.cc.
References impala::Status::OK, and RETURN_IF_ERROR.
Status impala::Sorter::Run::UnpinAllBlocks | ( | ) |
Definition at line 478 of file sorter.cc.
References impala::BufferedBlockMgr::Block::Allocate(), impala::BufferedBlockMgr::Block::buffer(), impala::BufferedBlockMgr::Block::BytesRemaining(), impala::BufferedBlockMgr::Block::Delete(), impala::Sorter::has_var_len_slots_, impala::Status::OK, RETURN_IF_ERROR, impala::BufferedBlockMgr::Block::Unpin(), and impala::BufferedBlockMgr::Block::valid_data_len().
|
friend |
|
private |
|
private |
Definition at line 159 of file sorter.cc.
Referenced by impala::Sorter::SortRun(), and impala::Sorter::TupleSorter::TupleIterator::TupleIterator().
|
private |
|
private |
Definition at line 150 of file sorter.cc.
Referenced by impala::Sorter::TupleSorter::Sort().
|
private |
|
private |
|
private |
|
private |
Definition at line 165 of file sorter.cc.
Referenced by impala::Sorter::SortRun().
|
private |
Definition at line 170 of file sorter.cc.
Referenced by impala::Sorter::SortRun().