[ 
https://issues.apache.org/jira/browse/HIVE-25016?focusedWorklogId=584862&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-584862
 ]

ASF GitHub Bot logged work on HIVE-25016:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 19/Apr/21 04:37
            Start Date: 19/Apr/21 04:37
    Worklog Time Spent: 10m 
      Work Description: 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]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 584862)
    Time Spent: 20m  (was: 10m)

> Error while running repl dump with with db regex
> ------------------------------------------------
>
>                 Key: HIVE-25016
>                 URL: https://issues.apache.org/jira/browse/HIVE-25016
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Arko Sharma
>            Assignee: Arko Sharma
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Doing incremental dump with create-database event with dbRegex `*` gives the 
> following exception : 
> org.apache.hive.service.cli.HiveSQLException: Error while compiling 
> statement: FAILED: Execution Error, return code -101 from 
> org.apache.hadoop.hive.ql.exec.repl.ReplDumpTask. 
> java.lang.NullPointerException
>         at 
> org.apache.hadoop.hive.ql.parse.EximUtil.updateIfCustomDbLocations(EximUtil.java:388)
>         at 
> org.apache.hadoop.hive.ql.parse.EximUtil.createDbExportDump(EximUtil.java:357)
>         at 
> org.apache.hadoop.hive.ql.parse.repl.dump.events.CreateDatabaseHandler.handle(CreateDatabaseHandler.java:42)
>         at 
> org.apache.hadoop.hive.ql.exec.repl.ReplDumpTask.dumpEvent(ReplDumpTask.java:827)
>         at 
> org.apache.hadoop.hive.ql.exec.repl.ReplDumpTask.incrementalDump(ReplDumpTask.java:632)
>         at 
> org.apache.hadoop.hive.ql.exec.repl.ReplDumpTask.execute(ReplDumpTask.java:209)
>         at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:213)
>         at 
> org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:105)
>         at org.apache.hadoop.hive.ql.Executor.launchTask(Executor.java:357)
>         at org.apache.hadoop.hive.ql.Executor.launchTasks(Executor.java:330)
>         at org.apache.hadoop.hive.ql.Executor.runTasks(Executor.java:246)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to