15 #ifndef IMPALA_EXEC_HBASE_TABLE_WRITER_H
16 #define IMPALA_EXEC_HBASE_TABLE_WRITER_H
19 #include <boost/thread.hpp>
20 #include <boost/scoped_ptr.hpp>
44 const std::vector<ExprContext*>& output_expr_ctxs,
61 Status CreatePut(JNIEnv* env,
const void* rk,
int rk_len, jobject* put);
86 boost::scoped_ptr<HBaseTable>
table_;
static jmethodID put_add_id_
Put::add(byte[], byte[], byte[])
jobject put_list_
jni ArrayList<Put>
Status CreatePutList(JNIEnv *env, int num_puts)
std::vector< int > output_exprs_byte_sizes_
output_exprs_byte_sizes_[i] is the byte size of output_expr_ctxs_[i]->root()'s type.
std::vector< jbyteArray > qual_arrays_
qual_arrays_[i-1] is the column family qualifier jbyteArray for column i.
static jmethodID put_ctor_
new Put(byte[])
Status CreatePut(JNIEnv *env, const void *rk, int rk_len, jobject *put)
static jmethodID list_add_id_
ArrayList::add(V);.
std::vector< jbyteArray > cf_arrays_
cf_arrays_[i-1] is the column family jbyteArray for column i.
const std::vector< ExprContext * > output_expr_ctxs_
The expressions that are run to create tuples to be written to hbase.
RuntimeProfile * runtime_profile_
Parent table sink's profile.
static jclass put_cl_
org.apache.hadoop.hbase.client.Put
static Status InitJNI()
Grab all of the Java classes needed to get data into and out of HBase.
HBaseTableWriter(HBaseTableDescriptor *table_desc, const std::vector< ExprContext * > &output_expr_ctxs, RuntimeProfile *profile)
RuntimeProfile::Counter * htable_put_timer_
Status Init(RuntimeState *state)
Status CreateByteArray(JNIEnv *env, const std::string &s, jbyteArray *j_array)
Create a byte array containing the string's chars.
Status AppendRowBatch(RowBatch *batch)
RuntimeProfile::Counter * encoding_timer_
static jclass list_cl_
java.util.ArrayList
void Close(RuntimeState *state)
Calls to Close release the HBaseTable.
HBaseTableDescriptor * table_desc_
Owned by RuntimeState not by this object.
static jmethodID list_ctor_
new ArrayList<V>(starting_capacity)
boost::scoped_ptr< HBaseTable > table_