Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
impala::HBaseTable Class Reference

Class to wrap JNI calls into HTable. More...

#include <hbase-table.h>

Collaboration diagram for impala::HBaseTable:

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...
 

Detailed Description

Class to wrap JNI calls into HTable.

Definition at line 29 of file hbase-table.h.

Constructor & Destructor Documentation

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_.

Member Function Documentation

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_.

Status impala::HBaseTable::InitJNI ( )
static
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.

Member Data Documentation

jclass impala::HBaseTable::bytes_cl_ = NULL
staticprivate

Bytes class and static methods.

Definition at line 73 of file hbase-table.h.

Referenced by Init(), and InitJNI().

jmethodID impala::HBaseTable::bytes_to_bytes_id_ = NULL
staticprivate

Bytes.toBytes(String)

Definition at line 76 of file hbase-table.h.

Referenced by Init(), and InitJNI().

jobject impala::HBaseTable::conf_
private

Definition at line 53 of file hbase-table.h.

Referenced by Init().

jobject impala::HBaseTable::executor_
private

Definition at line 54 of file hbase-table.h.

Referenced by Init().

jobject impala::HBaseTable::htable_
private

Definition at line 55 of file hbase-table.h.

Referenced by Close(), GetResultScanner(), Init(), Put(), and ~HBaseTable().

jclass impala::HBaseTable::htable_cl_ = NULL
staticprivate

org.apache.hadoop.hbase.client.HTable

Definition at line 58 of file hbase-table.h.

Referenced by Init(), and InitJNI().

jmethodID impala::HBaseTable::htable_close_id_ = NULL
staticprivate

htable.close()

Definition at line 64 of file hbase-table.h.

Referenced by Close(), and InitJNI().

jmethodID impala::HBaseTable::htable_ctor_ = NULL
staticprivate

new HTable(Configuration, ExecutorService)

Definition at line 61 of file hbase-table.h.

Referenced by Init(), and InitJNI().

jmethodID impala::HBaseTable::htable_get_scanner_id_ = NULL
staticprivate

htable.getScannerId(Scan)

Definition at line 67 of file hbase-table.h.

Referenced by GetResultScanner(), and InitJNI().

jmethodID impala::HBaseTable::htable_put_id_ = NULL
staticprivate

htable.put(List<Put> puts

Definition at line 70 of file hbase-table.h.

Referenced by InitJNI(), and Put().

std::string impala::HBaseTable::table_name_
private

Definition at line 52 of file hbase-table.h.

Referenced by Init().


The documentation for this class was generated from the following files: