Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
com.cloudera.impala.extdatasource.ExternalDataSourceExecutor Class Reference
Collaboration diagram for com.cloudera.impala.extdatasource.ExternalDataSourceExecutor:

Public Member Functions

 ExternalDataSourceExecutor (String jarPath, String className, String apiVersionStr) throws ImpalaException
 
byte[] prepare (byte[] thriftParams) throws ImpalaException
 
byte[] open (byte[] thriftParams) throws ImpalaException
 
byte[] getNext (byte[] thriftParams) throws ImpalaException
 
byte[] close (byte[] thriftParams) throws ImpalaException
 
TPrepareResult prepare (TPrepareParams params)
 
TOpenResult open (TOpenParams params)
 
TGetNextResult getNext (TGetNextParams params)
 
TCloseResult close (TCloseParams params)
 

Private Member Functions

TStatus logAndMakeErrorStatus (String opName, Exception e)
 

Private Attributes

final ApiVersion apiVersion_
 
final ExternalDataSource dataSource_
 
final String jarPath_
 
final String className_
 

Static Private Attributes

static final Logger LOG
 
static final
TBinaryProtocol.Factory 
protocolFactory_
 

Detailed Description

Wraps and executes an ExternalDataSource specified in an external jar. Used in planning to call prepare() and in the backend to fetch results. The executor takes the API version and abstracts the versioning from the caller, e.g. calling the correct API interface and massaging any parameters that can be handled here. There are thrift structures for all param and return types representing the necessary structures. If future versions of the API are added, the executor should be updated to call the appropriate API and handle any differences. It is assumed that the API is updated in a way that backwards compatibility is possible.

Definition at line 58 of file ExternalDataSourceExecutor.java.

Constructor & Destructor Documentation

com.cloudera.impala.extdatasource.ExternalDataSourceExecutor.ExternalDataSourceExecutor ( String  jarPath,
String  className,
String  apiVersionStr 
) throws ImpalaException
inline
Parameters
jarPathThe local path to the jar containing the ExternalDataSource.
classNameThe name of the class implementing the ExternalDataSource.
apiVersionStrThe API version the ExternalDataSource implements. Must be a valid value of ApiVersion.

Definition at line 75 of file ExternalDataSourceExecutor.java.

References com.cloudera.impala.extdatasource.ExternalDataSourceExecutor.apiVersion_, com.cloudera.impala.extdatasource.ExternalDataSourceExecutor.className_, com.cloudera.impala.extdatasource.ExternalDataSourceExecutor.dataSource_, and com.cloudera.impala.extdatasource.ExternalDataSourceExecutor.jarPath_.

Member Function Documentation

byte [] com.cloudera.impala.extdatasource.ExternalDataSourceExecutor.close ( byte[]  thriftParams) throws ImpalaException
inline
TCloseResult com.cloudera.impala.extdatasource.ExternalDataSourceExecutor.close ( TCloseParams  params)
inline
byte [] com.cloudera.impala.extdatasource.ExternalDataSourceExecutor.getNext ( byte[]  thriftParams) throws ImpalaException
inline
TGetNextResult com.cloudera.impala.extdatasource.ExternalDataSourceExecutor.getNext ( TGetNextParams  params)
inline
byte [] com.cloudera.impala.extdatasource.ExternalDataSourceExecutor.open ( byte[]  thriftParams) throws ImpalaException
inline
TOpenResult com.cloudera.impala.extdatasource.ExternalDataSourceExecutor.open ( TOpenParams  params)
inline
byte [] com.cloudera.impala.extdatasource.ExternalDataSourceExecutor.prepare ( byte[]  thriftParams) throws ImpalaException
inline
TPrepareResult com.cloudera.impala.extdatasource.ExternalDataSourceExecutor.prepare ( TPrepareParams  params)
inline

Member Data Documentation

final ApiVersion com.cloudera.impala.extdatasource.ExternalDataSourceExecutor.apiVersion_
private
final String com.cloudera.impala.extdatasource.ExternalDataSourceExecutor.className_
private
final ExternalDataSource com.cloudera.impala.extdatasource.ExternalDataSourceExecutor.dataSource_
private
final String com.cloudera.impala.extdatasource.ExternalDataSourceExecutor.jarPath_
private
final Logger com.cloudera.impala.extdatasource.ExternalDataSourceExecutor.LOG
staticprivate
Initial value:
= LoggerFactory.getLogger(
ExternalDataSourceExecutor.class)

Definition at line 59 of file ExternalDataSourceExecutor.java.

final TBinaryProtocol.Factory com.cloudera.impala.extdatasource.ExternalDataSourceExecutor.protocolFactory_
staticprivate

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