MCPcopy Create free account
hub / github.com/apache/impala / Prepare

Method Prepare

be/src/exec/hbase/hbase-table-sink.cc:46–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44 hbase_table_writer_(NULL) {}
45
46Status HBaseTableSink::Prepare(RuntimeState* state, MemTracker* parent_mem_tracker) {
47 RETURN_IF_ERROR(DataSink::Prepare(state, parent_mem_tracker));
48 SCOPED_TIMER(profile()->total_time_counter());
49
50 // Get the hbase table descriptor. The table name will be used.
51 table_desc_ = static_cast<HBaseTableDescriptor*>(
52 state->desc_tbl().GetTableDescriptor(table_id_));
53 // Now that expressions are ready to materialize tuples, create the writer.
54 hbase_table_writer_.reset(
55 new HBaseTableWriter(table_desc_, output_expr_evals_, profile()));
56
57 // Try and init the table writer. This can create connections to HBase and
58 // to zookeeper.
59 RETURN_IF_ERROR(hbase_table_writer_->Init(state));
60
61 // Add a 'root partition' status in which to collect insert statistics
62 state->dml_exec_state()->AddPartition(ROOT_PARTITION_KEY, -1L, nullptr, nullptr);
63 return Status::OK();
64}
65
66Status HBaseTableSink::Send(RuntimeState* state, RowBatch* batch) {
67 SCOPED_TIMER(profile()->total_time_counter());

Callers

nothing calls this directly

Calls 7

OKFunction · 0.85
total_time_counterMethod · 0.80
GetTableDescriptorMethod · 0.80
AddPartitionMethod · 0.80
resetMethod · 0.65
InitMethod · 0.45
dml_exec_stateMethod · 0.45

Tested by

no test coverage detected