aasha commented on a change in pull request #1367:
URL: https://github.com/apache/hive/pull/1367#discussion_r468307420
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/repl/util/ReplUtils.java
##########
@@ -366,4 +371,26 @@ public static boolean includeAcidTableInDump(HiveConf
conf) {
public static boolean tableIncludedInReplScope(ReplScope replScope, String
tableName) {
return ((replScope == null) ||
replScope.tableIncludedInReplScope(tableName));
}
+
+ public static boolean failedWithNonRecoverableError(Path dumpRoot, HiveConf
conf) throws SemanticException {
+ if (dumpRoot == null) {
+ return false;
+ }
+ Retryable retryable = Retryable.builder()
+ .withHiveConf(conf)
+ .withRetryOnException(IOException.class).build();
+ try {
+ return retryable.executeCallable(() -> {
+ FileSystem fs = dumpRoot.getFileSystem(conf);
+ if (fs.exists(dumpRoot)) {
+ if (fs.exists(new Path(dumpRoot,
NON_RECOVERABLE_MARKER.toString()))) {
Review comment:
if dumpRoot itself doesn't exist, we should return false. If dumpRoot
exists but NON_RECOVERABLE_MARKER doesn't exist we should return true.
----------------------------------------------------------------
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]