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

Classes

class  CdhVersion
 

Public Member Functions

 JniFrontend (boolean lazy, String serverName, String authorizationPolicyFile, String sentryConfigFile, String authPolicyProviderClass, int impalaLogLevel, int otherLogLevel) throws InternalException
 
byte[] createExecRequest (byte[] thriftQueryContext) throws ImpalaException
 
byte[] updateCatalogCache (byte[] thriftCatalogUpdate) throws ImpalaException
 
byte[] loadTableData (byte[] thriftLoadTableDataParams) throws ImpalaException, IOException
 
String getExplainPlan (byte[] thriftQueryContext) throws ImpalaException
 
byte[] getTableNames (byte[] thriftGetTablesParams) throws ImpalaException
 
byte[] getTableFiles (byte[] thriftShowFilesParams) throws ImpalaException
 
byte[] getDbNames (byte[] thriftGetTablesParams) throws ImpalaException
 
byte[] getDataSrcMetadata (byte[] thriftParams) throws ImpalaException
 
byte[] getStats (byte[] thriftShowStatsParams) throws ImpalaException
 
byte[] getFunctions (byte[] thriftGetFunctionsParams) throws ImpalaException
 
byte[] getCatalogObject (byte[] thriftParams) throws ImpalaException, TException
 
byte[] describeTable (byte[] thriftDescribeTableParams) throws ImpalaException
 
String showCreateTable (byte[] thriftTableName) throws ImpalaException
 
byte[] getRoles (byte[] showRolesParams) throws ImpalaException
 
byte[] getRolePrivileges (byte[] showGrantRolesParams) throws ImpalaException
 
byte[] execHiveServer2MetadataOp (byte[] metadataOpsParams) throws ImpalaException
 
void setCatalogInitialized ()
 
byte[] getAllHadoopConfigs () throws ImpalaException
 
byte[] getHadoopConfig (byte[] serializedRequest) throws ImpalaException
 
String checkConfiguration ()
 

Private Member Functions

String checkLogFilePermission ()
 
CdhVersion guessCdhVersionFromNnWebUi ()
 
URI getCurrentNameNodeAddress () throws Exception
 
String checkShortCircuitRead (Configuration conf)
 
String checkShortCircuitReadCdh41 (Configuration conf)
 
void cdh41ShortCircuitReadDatanodeCheck (StringBuilder errorCause, String prefix)
 
String checkBlockLocationTracking (Configuration conf)
 
String checkFileSystem (Configuration conf)
 

Private Attributes

final Frontend frontend_
 

Static Private Attributes

static final Logger LOG = LoggerFactory.getLogger(JniFrontend.class)
 
static final
TBinaryProtocol.Factory 
protocolFactory_
 
static final long MIN_DFS_CLIENT_FILE_BLOCK_STORAGE_LOCATIONS_TIMEOUT_MS
 
static final Configuration CONF = new Configuration()
 

Detailed Description

JNI-callable interface onto a wrapped Frontend instance. The main point is to serialise and deserialise thrift structures between C and Java.

Definition at line 99 of file JniFrontend.java.

Constructor & Destructor Documentation

com.cloudera.impala.service.JniFrontend.JniFrontend ( boolean  lazy,
String  serverName,
String  authorizationPolicyFile,
String  sentryConfigFile,
String  authPolicyProviderClass,
int  impalaLogLevel,
int  otherLogLevel 
) throws InternalException
inline

Create a new instance of the Jni Frontend.

Definition at line 113 of file JniFrontend.java.

References com.cloudera.impala.service.JniFrontend.frontend_.

Member Function Documentation

void com.cloudera.impala.service.JniFrontend.cdh41ShortCircuitReadDatanodeCheck ( StringBuilder  errorCause,
String  prefix 
)
inlineprivate

Checks the data node's server side configuration by reading the CONF from the data node. This appends error messages to errorCause prefixed by prefix if data node configuration is not properly set.

Definition at line 749 of file JniFrontend.java.

String com.cloudera.impala.service.JniFrontend.checkBlockLocationTracking ( Configuration  conf)
inlineprivate

Return an empty string if block location tracking is properly enabled. If not, return an error string describing the issues.

Definition at line 794 of file JniFrontend.java.

References com.cloudera.impala.service.JniFrontend.MIN_DFS_CLIENT_FILE_BLOCK_STORAGE_LOCATIONS_TIMEOUT_MS.

Referenced by com.cloudera.impala.service.JniFrontend.checkConfiguration().

String com.cloudera.impala.service.JniFrontend.checkConfiguration ( )
inline
String com.cloudera.impala.service.JniFrontend.checkFileSystem ( Configuration  conf)
inlineprivate

Return an empty string if the default FileSystem configured in CONF refers to a DistributedFileSystem and Impala can list the root directory "/". Otherwise, return an error string describing the issues.

Definition at line 831 of file JniFrontend.java.

References com.cloudera.impala.service.JniFrontend.CONF.

Referenced by com.cloudera.impala.service.JniFrontend.checkConfiguration().

String com.cloudera.impala.service.JniFrontend.checkLogFilePermission ( )
inlineprivate

Returns an empty string if Impala has permission to write to FE log files. If not, returns an error string describing the issues.

Definition at line 575 of file JniFrontend.java.

Referenced by com.cloudera.impala.service.JniFrontend.checkConfiguration().

String com.cloudera.impala.service.JniFrontend.checkShortCircuitRead ( Configuration  conf)
inlineprivate

Return an empty string if short circuit read is properly enabled. If not, return an error string describing the issues.

Definition at line 652 of file JniFrontend.java.

Referenced by com.cloudera.impala.service.JniFrontend.checkConfiguration().

String com.cloudera.impala.service.JniFrontend.checkShortCircuitReadCdh41 ( Configuration  conf)
inlineprivate

Check short circuit read for CDH 4.1. Return an empty string if short circuit read is properly enabled. If not, return an error string describing the issues.

Definition at line 706 of file JniFrontend.java.

Referenced by com.cloudera.impala.service.JniFrontend.checkConfiguration().

byte [] com.cloudera.impala.service.JniFrontend.createExecRequest ( byte[]  thriftQueryContext) throws ImpalaException
inline

Jni wrapper for Frontend.createExecRequest(). Accepts a serialized TQueryContext; returns a serialized TQueryExecRequest.

Definition at line 140 of file JniFrontend.java.

References com.cloudera.impala.service.JniFrontend.LOG, and com.cloudera.impala.service.JniFrontend.protocolFactory_.

byte [] com.cloudera.impala.service.JniFrontend.describeTable ( byte[]  thriftDescribeTableParams) throws ImpalaException
inline

Returns a list of the columns making up a table. The argument is a serialized TDescribeTableParams object. The return type is a serialised TDescribeTableResult object.

See Also
Frontend::describeTable

Definition at line 370 of file JniFrontend.java.

References com.cloudera.impala.service.JniFrontend.protocolFactory_.

byte [] com.cloudera.impala.service.JniFrontend.execHiveServer2MetadataOp ( byte[]  metadataOpsParams) throws ImpalaException
inline

Executes a HiveServer2 metadata operation and returns a TResultSet

Definition at line 452 of file JniFrontend.java.

References com.cloudera.impala.service.JniFrontend.protocolFactory_.

byte [] com.cloudera.impala.service.JniFrontend.getAllHadoopConfigs ( ) throws ImpalaException
inline

Returns a string of all loaded Hadoop configuration parameters as a table of keys and values. If asText is true, output in raw text. Otherwise, output in html.

Definition at line 477 of file JniFrontend.java.

References com.cloudera.impala.service.JniFrontend.CONF, and com.cloudera.impala.service.JniFrontend.protocolFactory_.

byte [] com.cloudera.impala.service.JniFrontend.getCatalogObject ( byte[]  thriftParams) throws ImpalaException, TException
inline

Gets the thrift representation of a catalog object.

Definition at line 355 of file JniFrontend.java.

References com.cloudera.impala.service.JniFrontend.protocolFactory_.

URI com.cloudera.impala.service.JniFrontend.getCurrentNameNodeAddress ( ) throws Exception
inlineprivate

Derive the namenode http address from the current filesystem, either default or as set by "-fs" in the generic options.

Returns
Returns http address or null if failure.

Definition at line 637 of file JniFrontend.java.

References com.cloudera.impala.service.JniFrontend.CONF.

Referenced by com.cloudera.impala.service.JniFrontend.guessCdhVersionFromNnWebUi().

byte [] com.cloudera.impala.service.JniFrontend.getDataSrcMetadata ( byte[]  thriftParams) throws ImpalaException
inline

Returns a list of data sources matching an optional pattern. The argument is a serialized TGetDataSrcsResult object. The return type is a serialised TGetDataSrcsResult object.

See Also
Frontend::getDataSrcs

Definition at line 280 of file JniFrontend.java.

References com.cloudera.impala.service.JniFrontend.protocolFactory_.

byte [] com.cloudera.impala.service.JniFrontend.getDbNames ( byte[]  thriftGetTablesParams) throws ImpalaException
inline

Returns a list of table names matching an optional pattern. The argument is a serialized TGetTablesParams object. The return type is a serialised TGetTablesResult object.

See Also
Frontend::getTableNames

Definition at line 254 of file JniFrontend.java.

References com.cloudera.impala.util.TSessionStateUtil.getEffectiveUser(), and com.cloudera.impala.service.JniFrontend.protocolFactory_.

String com.cloudera.impala.service.JniFrontend.getExplainPlan ( byte[]  thriftQueryContext) throws ImpalaException
inline

Return an explain plan based on thriftQueryContext, a serialized TQueryContext. This call is thread-safe.

Definition at line 192 of file JniFrontend.java.

References com.cloudera.impala.service.JniFrontend.protocolFactory_.

byte [] com.cloudera.impala.service.JniFrontend.getFunctions ( byte[]  thriftGetFunctionsParams) throws ImpalaException
inline

Returns a list of function names matching an optional pattern. The argument is a serialized TGetFunctionsParams object. The return type is a serialised TGetFunctionsResult object.

See Also
Frontend::getTableNames

Definition at line 330 of file JniFrontend.java.

References com.cloudera.impala.service.JniFrontend.protocolFactory_.

byte [] com.cloudera.impala.service.JniFrontend.getHadoopConfig ( byte[]  serializedRequest) throws ImpalaException
inline

Returns the corresponding config value for the given key as a serialized TGetHadoopConfigResponse. If the config value is null, the 'value' field in the thrift response object will not be set.

Definition at line 497 of file JniFrontend.java.

References com.cloudera.impala.service.JniFrontend.protocolFactory_.

byte [] com.cloudera.impala.service.JniFrontend.getRolePrivileges ( byte[]  showGrantRolesParams) throws ImpalaException
inline
byte [] com.cloudera.impala.service.JniFrontend.getRoles ( byte[]  showRolesParams) throws ImpalaException
inline

Gets all roles

Definition at line 399 of file JniFrontend.java.

References com.cloudera.impala.service.JniFrontend.protocolFactory_.

byte [] com.cloudera.impala.service.JniFrontend.getStats ( byte[]  thriftShowStatsParams) throws ImpalaException
inline
byte [] com.cloudera.impala.service.JniFrontend.getTableFiles ( byte[]  thriftShowFilesParams) throws ImpalaException
inline

Returns files info of a table or partition. The argument is a serialized TShowFilesParams object. The return type is a serialised TResultSet object.

See Also
Frontend::getTableFiles

Definition at line 235 of file JniFrontend.java.

References com.cloudera.impala.service.JniFrontend.protocolFactory_.

byte [] com.cloudera.impala.service.JniFrontend.getTableNames ( byte[]  thriftGetTablesParams) throws ImpalaException
inline

Returns a list of table names matching an optional pattern. The argument is a serialized TGetTablesParams object. The return type is a serialised TGetTablesResult object.

See Also
Frontend::getTableNames

Definition at line 207 of file JniFrontend.java.

References com.cloudera.impala.util.TSessionStateUtil.getEffectiveUser(), and com.cloudera.impala.service.JniFrontend.protocolFactory_.

CdhVersion com.cloudera.impala.service.JniFrontend.guessCdhVersionFromNnWebUi ( )
inlineprivate

Guess the CDH version by looking at the version info string from the Namenode web UI Return the CDH version or null (if we can't determine the version)

Definition at line 597 of file JniFrontend.java.

References com.cloudera.impala.service.JniFrontend.getCurrentNameNodeAddress().

Referenced by com.cloudera.impala.service.JniFrontend.checkConfiguration().

byte [] com.cloudera.impala.service.JniFrontend.loadTableData ( byte[]  thriftLoadTableDataParams) throws ImpalaException, IOException
inline

Loads a table or partition with one or more data files. If the "overwrite" flag in the request is true, all existing data in the table/partition will be replaced. If the "overwrite" flag is false, the files will be added alongside any existing data files.

Definition at line 175 of file JniFrontend.java.

References com.cloudera.impala.service.JniFrontend.protocolFactory_.

void com.cloudera.impala.service.JniFrontend.setCatalogInitialized ( )
inline

Definition at line 466 of file JniFrontend.java.

String com.cloudera.impala.service.JniFrontend.showCreateTable ( byte[]  thriftTableName) throws ImpalaException
inline

Returns a SQL DDL string for creating the specified table.

Definition at line 388 of file JniFrontend.java.

References com.cloudera.impala.service.JniFrontend.protocolFactory_.

byte [] com.cloudera.impala.service.JniFrontend.updateCatalogCache ( byte[]  thriftCatalogUpdate) throws ImpalaException
inline

Member Data Documentation

final Frontend com.cloudera.impala.service.JniFrontend.frontend_
private
final Logger com.cloudera.impala.service.JniFrontend.LOG = LoggerFactory.getLogger(JniFrontend.class)
staticprivate
final long com.cloudera.impala.service.JniFrontend.MIN_DFS_CLIENT_FILE_BLOCK_STORAGE_LOCATIONS_TIMEOUT_MS
staticprivate
Initial value:
=
10 * 1000

Definition at line 107 of file JniFrontend.java.

Referenced by com.cloudera.impala.service.JniFrontend.checkBlockLocationTracking().


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