Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
|
#include <hbase-table-factory.h>
Public Member Functions | |
~HBaseTableFactory () | |
Status | GetTable (const std::string &table_name, boost::scoped_ptr< HBaseTable > *hbase_table) |
Static Public Member Functions | |
static Status | Init () |
Static Private Attributes | |
static jclass | executor_cl_ = NULL |
ExecutorService class and methods. More... | |
static jmethodID | executor_shutdown_id_ = NULL |
static jobject | conf_ = NULL |
Configuration and executor jobject's. Initialized in Init(). More... | |
static jobject | executor_ = NULL |
A (process-wide) factory of HTable java objects. This object keeps java objects around to ease creation of HTables that share a pool of threads and connections. TODO: Consider writing factory in Java to save JNI logic (and to avoid having to mark objects as global refs) TODO: Implement a cache to avoid creating more HTables than necessary TODO: Add metrics to track the number of tables outstanding
Definition at line 34 of file hbase-table-factory.h.
impala::HBaseTableFactory::~HBaseTableFactory | ( | ) |
Definition at line 93 of file hbase-table-factory.cc.
References conf_, executor_, executor_shutdown_id_, and getJNIEnv().
Status impala::HBaseTableFactory::GetTable | ( | const std::string & | table_name, |
boost::scoped_ptr< HBaseTable > * | hbase_table | ||
) |
create an HTable java object for the given table name. The new htable is returned in global_htable It is the caller's responsibility to close the HBaseTable using HBaseTable::Close().
Definition at line 107 of file hbase-table-factory.cc.
References conf_, executor_, impala::Status::OK, and RETURN_IF_ERROR.
Referenced by impala::HBaseTableWriter::Init(), and impala::HBaseTableScanner::ScanSetup().
|
static |
JNI setup. Create global references to classes, and find method ids.
Definition at line 32 of file hbase-table-factory.cc.
References conf_, executor_, executor_cl_, executor_shutdown_id_, getJNIEnv(), impala::HBaseTable::InitJNI(), impala::JniUtil::LocalToGlobalRef(), impala::Status::OK, RETURN_ERROR_IF_EXC, and RETURN_IF_ERROR.
Referenced by main().
|
staticprivate |
Configuration and executor jobject's. Initialized in Init().
Definition at line 55 of file hbase-table-factory.h.
Referenced by GetTable(), Init(), and ~HBaseTableFactory().
|
staticprivate |
Definition at line 56 of file hbase-table-factory.h.
Referenced by GetTable(), Init(), and ~HBaseTableFactory().
|
staticprivate |
ExecutorService class and methods.
Definition at line 51 of file hbase-table-factory.h.
Referenced by Init().
|
staticprivate |
Definition at line 52 of file hbase-table-factory.h.
Referenced by Init(), and ~HBaseTableFactory().