Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
|
Class to wrap JNI calls into HTable. More...
#include <hbase-table.h>
Public Member Functions | |
HBaseTable (const std::string &table_name, jobject &conf, jobject &executor) | |
~HBaseTable () | |
void | Close (RuntimeState *state) |
Close and release the HTable wrapped by this class. More... | |
Status | Init () |
Status | GetResultScanner (const jobject &scan, jobject *result_scanner) |
Status | Put (const jobject &puts_list) |
Send an list of puts to hbase through an HTable. More... | |
Static Public Member Functions | |
static Status | InitJNI () |
Call this to initialize the HBase HTable jni references. More... | |
Private Attributes | |
std::string | table_name_ |
jobject | conf_ |
jobject | executor_ |
jobject | htable_ |
Static Private Attributes | |
static jclass | htable_cl_ = NULL |
org.apache.hadoop.hbase.client.HTable More... | |
static jmethodID | htable_ctor_ = NULL |
new HTable(Configuration, ExecutorService) More... | |
static jmethodID | htable_close_id_ = NULL |
htable.close() More... | |
static jmethodID | htable_get_scanner_id_ = NULL |
htable.getScannerId(Scan) More... | |
static jmethodID | htable_put_id_ = NULL |
htable.put(List<Put> puts More... | |
static jclass | bytes_cl_ = NULL |
Bytes class and static methods. More... | |
static jmethodID | bytes_to_bytes_id_ = NULL |
Bytes.toBytes(String) More... | |
Class to wrap JNI calls into HTable.
Definition at line 29 of file hbase-table.h.
impala::HBaseTable::HBaseTable | ( | const std::string & | table_name, |
jobject & | conf, | ||
jobject & | executor | ||
) |
impala::HBaseTable::~HBaseTable | ( | ) |
Definition at line 43 of file hbase-table.cc.
References htable_.
void impala::HBaseTable::Close | ( | RuntimeState * | state | ) |
Close and release the HTable wrapped by this class.
Definition at line 47 of file hbase-table.cc.
References getJNIEnv(), impala::JniUtil::GetJniExceptionMsg(), htable_, htable_close_id_, impala::RuntimeState::LogError(), impala::Status::msg(), and impala::Status::ok().
Status impala::HBaseTable::GetResultScanner | ( | const jobject & | scan, |
jobject * | result_scanner | ||
) |
From a java Scan object get a result scanner that will iterate over KeyValues from HBase.
Definition at line 132 of file hbase-table.cc.
References getJNIEnv(), htable_, htable_get_scanner_id_, impala::Status::OK, and RETURN_ERROR_IF_EXC.
Status impala::HBaseTable::Init | ( | ) |
Create all needed java side objects. This call can cause connections to HBase and Zookeeper to be created.
Definition at line 68 of file hbase-table.cc.
References bytes_cl_, bytes_to_bytes_id_, conf_, executor_, getJNIEnv(), htable_, htable_cl_, htable_ctor_, impala::JniUtil::LocalToGlobalRef(), impala::Status::OK, impala::JniLocalFrame::push(), RETURN_ERROR_IF_EXC, RETURN_IF_ERROR, and table_name_.
|
static |
Call this to initialize the HBase HTable jni references.
Definition at line 92 of file hbase-table.cc.
References bytes_cl_, bytes_to_bytes_id_, impala::JniUtil::GetGlobalClassRef(), getJNIEnv(), htable_cl_, htable_close_id_, htable_ctor_, htable_get_scanner_id_, htable_put_id_, impala::Status::OK, RETURN_ERROR_IF_EXC, and RETURN_IF_ERROR.
Referenced by impala::HBaseTableFactory::Init().
Status impala::HBaseTable::Put | ( | const jobject & | puts_list | ) |
Send an list of puts to hbase through an HTable.
Definition at line 143 of file hbase-table.cc.
References getJNIEnv(), htable_, htable_put_id_, impala::Status::OK, and RETURN_ERROR_IF_EXC.
|
staticprivate |
Bytes class and static methods.
Definition at line 73 of file hbase-table.h.
|
staticprivate |
Bytes.toBytes(String)
Definition at line 76 of file hbase-table.h.
|
private |
Definition at line 53 of file hbase-table.h.
Referenced by Init().
|
private |
Definition at line 54 of file hbase-table.h.
Referenced by Init().
|
private |
Definition at line 55 of file hbase-table.h.
Referenced by Close(), GetResultScanner(), Init(), Put(), and ~HBaseTable().
|
staticprivate |
org.apache.hadoop.hbase.client.HTable
Definition at line 58 of file hbase-table.h.
|
staticprivate |
|
staticprivate |
new HTable(Configuration, ExecutorService)
Definition at line 61 of file hbase-table.h.
|
staticprivate |
htable.getScannerId(Scan)
Definition at line 67 of file hbase-table.h.
Referenced by GetResultScanner(), and InitJNI().
|
staticprivate |
htable.put(List<Put> puts
Definition at line 70 of file hbase-table.h.
|
private |
Definition at line 52 of file hbase-table.h.
Referenced by Init().