mirror of
https://github.com/apache/sqoop.git
synced 2025-05-04 06:22:46 +08:00
SQOOP-854: Return value of pg_bulkload utility is being ignored
(Jarek Jarcec Cecho via Cheolsoo Park)
This commit is contained in:
parent
9de589e83c
commit
144d31e62a
@ -206,11 +206,16 @@ protected void cleanup(Context context)
|
||||
thread.join();
|
||||
} finally {
|
||||
// block until the process is done.
|
||||
int result = 0;
|
||||
if (null != process) {
|
||||
while (true) {
|
||||
try {
|
||||
result = process.waitFor();
|
||||
int returnValue = process.waitFor();
|
||||
|
||||
// Check pg_bulkload's process return value
|
||||
if (returnValue != 0) {
|
||||
throw new RuntimeException(
|
||||
"Unexpected return value from pg_bulkload: "+ returnValue);
|
||||
}
|
||||
} catch (InterruptedException ie) {
|
||||
// interrupted; loop around.
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user