public class Utils extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Utils.ReplDumpState |
| Constructor and Description |
|---|
Utils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
create(org.apache.hadoop.fs.Path outputFile,
HiveConf hiveConf) |
static boolean |
fileExists(org.apache.hadoop.fs.Path filePath,
HiveConf hiveConf) |
static Collection<String> |
getAllTables(Hive db,
String dbName,
org.apache.hadoop.hive.common.repl.ReplScope replScope) |
static boolean |
isBootstrapDumpInProgress(Hive hiveDb,
String dbName) |
static List<String> |
matchesDb(Hive db,
String dbPattern) |
static Iterable<String> |
matchesTbl(Hive db,
String dbName,
org.apache.hadoop.hive.common.repl.ReplScope replScope) |
static Iterable<String> |
matchesTbl(Hive db,
String dbName,
String tblPattern) |
static String |
replaceHost(String originalURIStr,
String newHost) |
static String |
replaceNameserviceInEncodedURI(String cmEncodedURI,
HiveConf hiveConf)
Given a ReplChangeManger's encoded uri, it replaces the nameservice and returns the modified encoded uri.
|
static void |
resetDbBootstrapDumpState(Hive hiveDb,
String dbName,
String uniqueKey) |
static String |
setDbBootstrapDumpState(Hive hiveDb,
String dbName) |
static boolean |
shouldDumpMetaDataOnly(HiveConf conf) |
static boolean |
shouldDumpMetaDataOnlyForExternalTables(Table table,
HiveConf conf) |
static boolean |
shouldReplicate(org.apache.hadoop.hive.metastore.api.NotificationEvent tableForEvent,
ReplicationSpec replicationSpec,
Hive db,
boolean isEventDump,
Set<String> bootstrapTableList,
org.apache.hadoop.hive.common.repl.ReplScope oldReplScope,
HiveConf hiveConf) |
static boolean |
shouldReplicate(ReplicationSpec replicationSpec,
Table tableHandle,
boolean isEventDump,
Set<String> bootstrapTableList,
org.apache.hadoop.hive.common.repl.ReplScope oldReplScope,
HiveConf hiveConf)
validates if a table can be exported, similar to EximUtil.shouldExport with few replication
specific checks.
|
static long |
writeFile(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path exportFilePath,
InputStream is,
HiveConf conf) |
static void |
writeOutput(List<List<String>> listValues,
org.apache.hadoop.fs.Path outputFile,
HiveConf hiveConf) |
static void |
writeOutput(List<List<String>> listValues,
org.apache.hadoop.fs.Path outputFile,
HiveConf hiveConf,
boolean update) |
static void |
writeOutput(String content,
org.apache.hadoop.fs.Path outputFile,
HiveConf hiveConf) |
static void |
writeStackTrace(Throwable e,
org.apache.hadoop.fs.Path outputFile,
HiveConf conf) |
public static void writeOutput(List<List<String>> listValues, org.apache.hadoop.fs.Path outputFile, HiveConf hiveConf) throws SemanticException
SemanticExceptionpublic static String replaceNameserviceInEncodedURI(String cmEncodedURI, HiveConf hiveConf) throws SemanticException
SemanticExceptionpublic static String replaceHost(String originalURIStr, String newHost) throws SemanticException
SemanticExceptionpublic static void writeOutput(List<List<String>> listValues, org.apache.hadoop.fs.Path outputFile, HiveConf hiveConf, boolean update) throws SemanticException
SemanticExceptionpublic static long writeFile(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path exportFilePath,
InputStream is,
HiveConf conf)
throws SemanticException
SemanticExceptionpublic static void writeStackTrace(Throwable e, org.apache.hadoop.fs.Path outputFile, HiveConf conf) throws SemanticException
SemanticExceptionpublic static void writeOutput(String content, org.apache.hadoop.fs.Path outputFile, HiveConf hiveConf) throws SemanticException
SemanticExceptionpublic static void create(org.apache.hadoop.fs.Path outputFile,
HiveConf hiveConf)
throws SemanticException
SemanticExceptionpublic static boolean fileExists(org.apache.hadoop.fs.Path filePath,
HiveConf hiveConf)
throws IOException
IOExceptionpublic static List<String> matchesDb(Hive db, String dbPattern) throws HiveException
HiveExceptionpublic static Iterable<String> matchesTbl(Hive db, String dbName, String tblPattern) throws HiveException
HiveExceptionpublic static Iterable<String> matchesTbl(Hive db, String dbName, org.apache.hadoop.hive.common.repl.ReplScope replScope) throws HiveException
HiveExceptionpublic static Collection<String> getAllTables(Hive db, String dbName, org.apache.hadoop.hive.common.repl.ReplScope replScope) throws HiveException
HiveExceptionpublic static String setDbBootstrapDumpState(Hive hiveDb, String dbName) throws HiveException
HiveExceptionpublic static void resetDbBootstrapDumpState(Hive hiveDb, String dbName, String uniqueKey) throws HiveException
HiveExceptionpublic static boolean isBootstrapDumpInProgress(Hive hiveDb, String dbName) throws HiveException
HiveExceptionpublic static boolean shouldReplicate(ReplicationSpec replicationSpec, Table tableHandle, boolean isEventDump, Set<String> bootstrapTableList, org.apache.hadoop.hive.common.repl.ReplScope oldReplScope, HiveConf hiveConf)
public static boolean shouldReplicate(org.apache.hadoop.hive.metastore.api.NotificationEvent tableForEvent, ReplicationSpec replicationSpec, Hive db, boolean isEventDump, Set<String> bootstrapTableList, org.apache.hadoop.hive.common.repl.ReplScope oldReplScope, HiveConf hiveConf)
public static boolean shouldDumpMetaDataOnly(HiveConf conf)
Copyright © 2022 The Apache Software Foundation. All rights reserved.