public class ImportSemanticAnalyzer extends BaseSemanticAnalyzer
BaseSemanticAnalyzer.AnalyzeRewriteContext, BaseSemanticAnalyzer.TableSpecacidFileSinks, cacheUsage, cContext, columnAccessInfo, conf, console, ctx, db, fetchTask, HIVE_COLUMN_NULLS_FIRST, HIVE_COLUMN_NULLS_LAST, HIVE_COLUMN_ORDER_ASC, HIVE_COLUMN_ORDER_DESC, idToTableNameMap, inputs, linfo, LOG, outputs, queryProperties, queryState, rootTasks, STATIC_LOG, tableAccessInfo, transactionalInQuery, txnManager, updateColumnAccessInfo| Constructor and Description |
|---|
ImportSemanticAnalyzer(QueryState queryState) |
| Modifier and Type | Method and Description |
|---|---|
void |
analyzeInternal(ASTNode ast) |
static void |
checkTargetLocationEmpty(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path targetPath,
ReplicationSpec replicationSpec,
org.slf4j.Logger logger) |
boolean |
existsTable() |
static boolean |
isPartitioned(ImportTableDesc tblDesc) |
static String |
partSpecToString(Map<String,String> partSpec) |
static boolean |
prepareImport(boolean isImportCmd,
boolean isLocationSet,
boolean isExternalSet,
boolean isPartSpecSet,
boolean waitOnPrecursor,
String parsedLocation,
String parsedTableName,
String overrideDBName,
LinkedHashMap<String,String> parsedPartSpec,
String fromLocn,
EximUtil.SemanticAnalyzerWrapperContext x,
UpdatedMetaDataTracker updatedMetadata,
HiveTxnManager txnMgr)
The same code is used from both the "repl load" as well as "import".
|
static Table |
tableIfExists(ImportTableDesc tblDesc,
Hive db)
Utility method that returns a table if one corresponding to the destination
tblDesc is found.
|
analyze, analyzeDDLSkewedValues, analyzeSkewedTablDDLColNames, analyzeStoredAdDirs, charSetString, constructListBucketingCtx, createFetchTask, createHiveDB, escapeSQLString, getAcidDdlDesc, getAcidFileSinks, getAllInputs, getAllOutputs, getAllRootTasks, getAutoCommitValue, getCacheUsage, getColumnAccessInfo, getColumnNames, getColumnNamesOrder, getColumns, getColumns, getColumns, getDatabase, getDatabase, getDb, getDbTableNamePair, getDotName, getFetchTask, getIdToTableNameMap, getInputs, getLineageInfo, getOutputs, getPartition, getPartitions, getQualifiedTableName, getQueryProperties, getQueryState, getResultSchema, getRootTasks, getSkewedValueFromASTNode, getSkewedValuesFromASTNode, getTable, getTable, getTable, getTable, getTable, getTableAccessInfo, getTxnMgr, getTypeStringFromAST, getUnescapedName, getUnescapedName, getUnescapedUnqualifiedTableName, getUpdateColumnAccessInfo, hasEnabledOrValidatedConstraints, hasTransactionalInQuery, init, initCtx, isValidPrefixSpec, processCheckConstraints, processDefaultConstraints, processForeignKeys, processNotNullConstraints, processPrimaryKeys, processPrimaryKeys, processUniqueConstraints, processUniqueConstraints, readProps, reset, setCacheUsage, setColumnAccessInfo, setFetchTask, setLineageInfo, setTableAccessInfo, setUpdateColumnAccessInfo, skipAuthorization, stripIdentifierQuotes, stripQuotes, toMessage, toReadEntity, toReadEntity, toReadEntity, toWriteEntity, toWriteEntity, toWriteEntity, tryQualifyPath, unescapeIdentifier, unescapeSQLString, validate, validateCheckConstraint, validatePartColumnType, validatePartSpecpublic ImportSemanticAnalyzer(QueryState queryState) throws SemanticException
SemanticExceptionpublic boolean existsTable()
public void analyzeInternal(ASTNode ast) throws SemanticException
analyzeInternal in class BaseSemanticAnalyzerSemanticExceptionpublic static boolean prepareImport(boolean isImportCmd,
boolean isLocationSet,
boolean isExternalSet,
boolean isPartSpecSet,
boolean waitOnPrecursor,
String parsedLocation,
String parsedTableName,
String overrideDBName,
LinkedHashMap<String,String> parsedPartSpec,
String fromLocn,
EximUtil.SemanticAnalyzerWrapperContext x,
UpdatedMetaDataTracker updatedMetadata,
HiveTxnManager txnMgr)
throws IOException,
org.apache.hadoop.hive.metastore.api.MetaException,
HiveException,
URISyntaxException
IOExceptionorg.apache.hadoop.hive.metastore.api.MetaExceptionHiveExceptionURISyntaxExceptionpublic static void checkTargetLocationEmpty(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path targetPath,
ReplicationSpec replicationSpec,
org.slf4j.Logger logger)
throws IOException,
SemanticException
IOExceptionSemanticExceptionpublic static boolean isPartitioned(ImportTableDesc tblDesc)
public static Table tableIfExists(ImportTableDesc tblDesc, Hive db) throws HiveException
HiveExceptionCopyright © 2019 The Apache Software Foundation. All Rights Reserved.