[HUDI-1582] Throw an exception when syncHoodieTable() fails, with RuntimeException (#2536)
This commit is contained in:
committed by
GitHub
parent
9431aabfab
commit
b0010bf3b4
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user