5
0
mirror of https://github.com/apache/sqoop.git synced 2025-05-03 07:42:00 +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:
Andrew Bayer 2011-07-22 20:04:12 +00:00
parent 1f7635e1d1
commit 57141e1fc7

View File

@ -349,9 +349,12 @@ public void importTable(ImportJobContext context)
}
}
if (!DirectImportUtils.isLocalhost(hostname) || port != -1) {
if (!DirectImportUtils.isLocalhost(hostname)) {
args.add("--host");
args.add(hostname);
}
if (port != -1) {
args.add("--port");
args.add(Integer.toString(port));
}