1
0

[HUDI-1582] Throw an exception when syncHoodieTable() fails, with RuntimeException (#2536)

This commit is contained in:
Balajee Nagasubramaniam
2021-02-17 17:34:15 -08:00
committed by GitHub
parent 9431aabfab
commit b0010bf3b4
2 changed files with 3 additions and 2 deletions

View File

@@ -102,7 +102,7 @@ public class DLASyncTool extends AbstractSyncTool {
throw new InvalidTableException(hoodieDLAClient.getBasePath());
}
} catch (RuntimeException re) {
LOG.error("Got runtime exception when dla syncing", re);
throw new HoodieException("Got runtime exception when dla syncing " + cfg.tableName, re);
} finally {
hoodieDLAClient.close();
}

View File

@@ -21,6 +21,7 @@ package org.apache.hudi.hive;
import org.apache.hudi.common.fs.FSUtils;
import org.apache.hudi.common.model.HoodieFileFormat;
import org.apache.hudi.common.util.Option;
import org.apache.hudi.exception.HoodieException;
import org.apache.hudi.exception.InvalidTableException;
import org.apache.hudi.hadoop.utils.HoodieInputFormatUtils;
import org.apache.hudi.sync.common.AbstractSyncHoodieClient.PartitionEvent;
@@ -104,7 +105,7 @@ public class HiveSyncTool extends AbstractSyncTool {
throw new InvalidTableException(hoodieHiveClient.getBasePath());
}
} catch (RuntimeException re) {
LOG.error("Got runtime exception when hive syncing", re);
throw new HoodieException("Got runtime exception when hive syncing " + cfg.tableName, re);
} finally {
hoodieHiveClient.close();
}