aasha commented on a change in pull request #2180:
URL: https://github.com/apache/hive/pull/2180#discussion_r615537717
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ReplDumpTask.java
##########
@@ -676,40 +676,42 @@ private Long incrementalDump(Path dumpRoot, DumpMetaData
dmd, Path cmRoot, Hive
conf.getBoolVar(REPL_EXTERNAL_WAREHOUSE_SINGLE_COPY_TASK)
&& work.replScope.includeAllTables();
boolean isExternalTablePresent = false;
- for (String tableName : Utils.matchesTbl(hiveDb, dbName,
work.replScope)) {
- try {
- Table table = hiveDb.getTable(dbName, tableName);
-
- // Dump external table locations if required.
- if (TableType.EXTERNAL_TABLE.equals(table.getTableType())
- && shouldDumpExternalTableLocation()) {
- dbPath = new Path(hiveDb.getDatabase(dbName).getLocationUri());
- externalTablesWriter.dataLocationDump(table, extTableFileList,
dbPath,
- !isSingleCopyTaskForExternalTables, conf);
- isExternalTablePresent=true;
- }
-
- // Dump the table to be bootstrapped if required.
- if (shouldBootstrapDumpTable(table)) {
- HiveWrapper.Tuple<Table> tableTuple = new HiveWrapper(hiveDb,
dbName).table(table);
- dumpTable(dbName, tableName, validTxnList, dbRootMetadata,
dbRootData, bootDumpBeginReplId,
- hiveDb, tableTuple, managedTblList, dataCopyAtLoad);
+ for(String matchedDbName : Utils.matchesDb(hiveDb,
work.dbNameOrPattern)) {
+ for (String tableName : Utils.matchesTbl(hiveDb, matchedDbName,
work.replScope)) {
+ try {
+ Table table = hiveDb.getTable(matchedDbName, tableName);
+
+ // Dump external table locations if required.
+ if (TableType.EXTERNAL_TABLE.equals(table.getTableType())
+ && shouldDumpExternalTableLocation()) {
+ dbPath = new
Path(hiveDb.getDatabase(matchedDbName).getLocationUri());
+ externalTablesWriter.dataLocationDump(table, extTableFileList,
dbPath,
+ !isSingleCopyTaskForExternalTables, conf);
+ isExternalTablePresent = true;
+ }
+
+ // Dump the table to be bootstrapped if required.
+ if (shouldBootstrapDumpTable(table)) {
+ HiveWrapper.Tuple<Table> tableTuple = new HiveWrapper(hiveDb,
matchedDbName).table(table);
+ dumpTable(matchedDbName, tableName, validTxnList,
dbRootMetadata, dbRootData, bootDumpBeginReplId,
+ hiveDb, tableTuple, managedTblList, dataCopyAtLoad);
+ }
+ if (tableList != null && isTableSatifiesConfig(table)) {
+ tableList.add(tableName);
+ }
+ } catch (InvalidTableException te) {
+ // Repl dump shouldn't fail if the table is dropped/renamed
while dumping it.
+ // Just log a debug message and skip it.
+ LOG.debug(te.getMessage());
}
- if (tableList != null && isTableSatifiesConfig(table)) {
Review comment:
why did you remove this?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]