mirror of
https://github.com/apache/sqoop.git
synced 2025-05-03 20:40:58 +08:00
SQOOP-38. Direct PostgreSQL import only works when providing a port.
From: Lars Francke <lars.francke@gmail.com> git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149962 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1f7635e1d1
commit
57141e1fc7
@ -349,9 +349,12 @@ public void importTable(ImportJobContext context)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!DirectImportUtils.isLocalhost(hostname) || port != -1) {
|
if (!DirectImportUtils.isLocalhost(hostname)) {
|
||||||
args.add("--host");
|
args.add("--host");
|
||||||
args.add(hostname);
|
args.add(hostname);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (port != -1) {
|
||||||
args.add("--port");
|
args.add("--port");
|
||||||
args.add(Integer.toString(port));
|
args.add(Integer.toString(port));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user