Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
|
#include <external-data-source-executor.h>
Public Member Functions | |
ExternalDataSourceExecutor () | |
virtual | ~ExternalDataSourceExecutor () |
Status | Init (const std::string &jar_path, const std::string &class_name, const std::string &api_version) |
Status | Open (const impala::extdatasource::TOpenParams ¶ms, impala::extdatasource::TOpenResult *result) |
Calls ExternalDataSource.open() More... | |
Status | GetNext (const impala::extdatasource::TGetNextParams ¶ms, impala::extdatasource::TGetNextResult *result) |
Calls ExternalDataSource.getNext() More... | |
Status | Close (const impala::extdatasource::TCloseParams ¶ms, impala::extdatasource::TCloseResult *result) |
Private Attributes | |
bool | is_initialized_ |
jclass | executor_class_ |
Class reference for com.cloudera.impala.extdatasource.ExternalDataSourceExecutor. More... | |
jobject | executor_ |
Instance of com.cloudera.impala.extdatasource.ExternalDataSourceExecutor. More... | |
jmethodID | ctor_ |
jmethodID | open_id_ |
jmethodID | get_next_id_ |
jmethodID | close_id_ |
Wraps the Java class ExternalDataSourceExecutor to call a data source. There is an explicit Init() method (rather than initializing in the c'tor) so that the initialization can return an error status if an error occurs.
Definition at line 30 of file external-data-source-executor.h.
|
inline |
Definition at line 32 of file external-data-source-executor.h.
|
virtual |
Definition at line 31 of file external-data-source-executor.cc.
Status ExternalDataSourceExecutor::Close | ( | const impala::extdatasource::TCloseParams & | params, |
impala::extdatasource::TCloseResult * | result | ||
) |
Calls ExternalDataSource.close() and deletes the reference to the external_data_source_executor_. After calling Close(), this should no longer be used.
Definition at line 111 of file external-data-source-executor.cc.
References CallJniMethod(), impala::executor_, getJNIEnv(), impala::JniUtil::GetJniExceptionMsg(), and impala::Status::MergeStatus().
Status ExternalDataSourceExecutor::GetNext | ( | const impala::extdatasource::TGetNextParams & | params, |
impala::extdatasource::TGetNextResult * | result | ||
) |
Calls ExternalDataSource.getNext()
Definition at line 105 of file external-data-source-executor.cc.
References CallJniMethod(), and impala::executor_.
Status ExternalDataSourceExecutor::Init | ( | const std::string & | jar_path, |
const std::string & | class_name, | ||
const std::string & | api_version | ||
) |
Initialize the data source library. jar_path is the HDFS location of the jar containing the ExternalDataSource implementation specified by class_name. The class must implement the specified api_version.
Definition at line 35 of file external-data-source-executor.cc.
References impala::executor_, getJNIEnv(), impala::LibCache::instance(), impala::JniUtil::LoadJniMethod(), impala::Status::OK, impala::JniLocalFrame::push(), RETURN_ERROR_IF_EXC, RETURN_IF_ERROR, and impala::LibCache::TYPE_JAR.
Status ExternalDataSourceExecutor::Open | ( | const impala::extdatasource::TOpenParams & | params, |
impala::extdatasource::TOpenResult * | result | ||
) |
Calls ExternalDataSource.open()
Definition at line 100 of file external-data-source-executor.cc.
References CallJniMethod(), and impala::executor_.
|
private |
Definition at line 69 of file external-data-source-executor.h.
|
private |
Definition at line 66 of file external-data-source-executor.h.
|
private |
Instance of com.cloudera.impala.extdatasource.ExternalDataSourceExecutor.
Definition at line 65 of file external-data-source-executor.h.
|
private |
Class reference for com.cloudera.impala.extdatasource.ExternalDataSourceExecutor.
Definition at line 62 of file external-data-source-executor.h.
|
private |
Definition at line 68 of file external-data-source-executor.h.
|
private |
Definition at line 59 of file external-data-source-executor.h.
|
private |
Definition at line 67 of file external-data-source-executor.h.