public class ReplUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ReplUtils.MetricName
Replication Metrics.
|
static class |
ReplUtils.ReplLoadOpType
Bootstrap REPL LOAD operation type on the examined object based on ckpt state.
|
static class |
ReplUtils.TimeSerializer |
| Modifier and Type | Field and Description |
|---|---|
static String |
CONSTRAINTS_ROOT_DIR_NAME |
static String |
DEFAULT_FS_CONFIG |
static String |
DFS_MAX_DIR_ITEMS_CONFIG |
static String |
DISTCP_JOB_ID_CONF |
static String |
DISTCP_JOB_ID_CONF_DEFAULT |
static String |
FUNCTIONS_ROOT_DIR_NAME |
static String |
HIVE_RANGER_POLICIES_FILE_NAME |
static String |
INC_BOOTSTRAP_ROOT_DIR_NAME |
static String |
LAST_REPL_ID_KEY |
static String |
RANGER_AUTHORIZER |
static String |
RANGER_CONFIGURATION_RESOURCE_NAME |
static String |
RANGER_HIVE_SERVICE_NAME |
static String |
RANGER_REST_URL |
static String |
REPL_ATLAS_BASE_DIR |
static String |
REPL_ATLAS_EXPORT_FILE_NAME |
static String |
REPL_ATLAS_SERVICE |
static String |
REPL_DUMP_INCLUDE_ACID_TABLES |
static String |
REPL_HIVE_BASE_DIR |
static String |
REPL_HIVE_SERVICE |
static String |
REPL_RANGER_BASE_DIR |
static String |
REPL_RANGER_SERVICE |
static String |
REPL_TABLE_LIST_DIR_NAME |
static int |
RESERVED_DIR_ITEMS_COUNT |
| Constructor and Description |
|---|
ReplUtils() |
public static final String LAST_REPL_ID_KEY
public static final String FUNCTIONS_ROOT_DIR_NAME
public static final String CONSTRAINTS_ROOT_DIR_NAME
public static final String INC_BOOTSTRAP_ROOT_DIR_NAME
public static final String REPL_HIVE_BASE_DIR
public static final String REPL_RANGER_BASE_DIR
public static final String REPL_ATLAS_BASE_DIR
public static final String REPL_ATLAS_EXPORT_FILE_NAME
public static final String DEFAULT_FS_CONFIG
public static final String REPL_TABLE_LIST_DIR_NAME
public static final String REPL_DUMP_INCLUDE_ACID_TABLES
public static final String DFS_MAX_DIR_ITEMS_CONFIG
public static final int RESERVED_DIR_ITEMS_COUNT
public static final String RANGER_AUTHORIZER
public static final String HIVE_RANGER_POLICIES_FILE_NAME
public static final String RANGER_REST_URL
public static final String RANGER_HIVE_SERVICE_NAME
public static final String RANGER_CONFIGURATION_RESOURCE_NAME
public static final String REPL_HIVE_SERVICE
public static final String REPL_RANGER_SERVICE
public static final String REPL_ATLAS_SERVICE
public static final String DISTCP_JOB_ID_CONF
public static final String DISTCP_JOB_ID_CONF_DEFAULT
public static Map<Integer,List<ExprNodeGenericFuncDesc>> genPartSpecs(Table table, List<Map<String,String>> partitions) throws SemanticException
SemanticExceptionpublic static void unsetDbPropIfSet(org.apache.hadoop.hive.metastore.api.Database db, String prop, Hive hiveDb) throws HiveException
HiveExceptionpublic static Task<?> getTableReplLogTask(ImportTableDesc tableDesc, ReplLogger replLogger, HiveConf conf, ReplicationMetricCollector metricCollector, String dumpRoot) throws SemanticException
SemanticExceptionpublic static Task<?> getTableCheckpointTask(ImportTableDesc tableDesc, HashMap<String,String> partSpec, String dumpRoot, ReplicationMetricCollector metricCollector, HiveConf conf) throws SemanticException
SemanticExceptionpublic static boolean replCkptStatus(String dbName, Map<String,String> props, String dumpRoot) throws org.apache.hadoop.hive.metastore.api.InvalidOperationException
public static String getNonEmpty(String configParam, HiveConf hiveConf, String errorMsgFormat) throws SemanticException
SemanticExceptionpublic static List<Task<?>> addTasksForLoadingColStats(org.apache.hadoop.hive.metastore.api.ColumnStatistics colStats, HiveConf conf, UpdatedMetaDataTracker updatedMetadata, org.apache.hadoop.hive.metastore.api.Table tableObj, long writeId, String nonRecoverableMarkPath, ReplicationMetricCollector metricCollector) throws IOException, org.apache.thrift.TException
IOExceptionorg.apache.thrift.TExceptionpublic static org.apache.hadoop.fs.PathFilter getEventsDirectoryFilter(org.apache.hadoop.fs.FileSystem fs)
public static org.apache.hadoop.fs.PathFilter getBootstrapDirectoryFilter(org.apache.hadoop.fs.FileSystem fs)
public static int handleException(boolean isReplication,
Throwable e,
String nonRecoverablePath,
ReplicationMetricCollector metricCollector,
String stageName,
HiveConf conf)
public static List<Long> getOpenTxns(ValidTxnList validTxnList)
public static List<Long> getOpenTxns(HiveTxnManager hiveTxnManager, ValidTxnList validTxnList, String dbName) throws LockException
LockExceptionpublic static MessageDeserializer getEventDeserializer(org.apache.hadoop.hive.metastore.api.NotificationEvent event)
public static org.apache.hadoop.hive.metastore.api.EnvironmentContext setReplDataLocationChangedFlag(org.apache.hadoop.hive.metastore.api.EnvironmentContext envContext)
public static boolean includeAcidTableInDump(HiveConf conf)
public static boolean tableIncludedInReplScope(org.apache.hadoop.hive.common.repl.ReplScope replScope, String tableName)
public static boolean failedWithNonRecoverableError(org.apache.hadoop.fs.Path dumpRoot,
HiveConf conf)
throws SemanticException
SemanticExceptionpublic static org.apache.hadoop.fs.Path getEncodedDumpRootPath(HiveConf conf, String dbname) throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic static org.apache.hadoop.fs.Path getLatestDumpPath(org.apache.hadoop.fs.Path dumpRoot,
HiveConf conf)
throws IOException
IOExceptionpublic static String convertToHumanReadableTime(long time)
time - time to humanize.public static void addLoggerTask(ReplLogger replLogger, List<Task<?>> tasks, HiveConf conf)
public static void reportStatusInReplicationMetrics(String stageName, Status status, String errorLogPath, HiveConf conf) throws SemanticException
SemanticExceptionpublic static boolean isErrorRecoverable(Throwable e)
public static boolean filterTransactionOperations(HiveConf conf)
Copyright © 2022 The Apache Software Foundation. All rights reserved.