5
0
mirror of https://github.com/apache/sqoop.git synced 2025-05-13 23:41:56 +08:00

SQOOP-781 Improve logging in GenericJdbcImportInitializer

(Jarek Jarcec Cecho)
This commit is contained in:
Bilung Lee 2012-12-17 13:24:40 -08:00
parent 5c90d407fb
commit 53cb6caa70

View File

@ -191,15 +191,15 @@ private void configurePartitionProperties(MutableContext context, ConnectionConf
rs.next(); rs.next();
context.setString( int columnType = rsmd.getColumnType(1);
GenericJdbcConnectorConstants.CONNECTOR_JDBC_PARTITION_COLUMNTYPE, String min = rs.getString(1);
String.valueOf(rsmd.getColumnType(1))); String max = rs.getString(2);
context.setString(
GenericJdbcConnectorConstants.CONNECTOR_JDBC_PARTITION_MINVALUE, LOG.info("Boundaries: min=" + min + ", max=" + max + ", columnType=" + columnType);
rs.getString(1));
context.setString( context.setInteger(GenericJdbcConnectorConstants.CONNECTOR_JDBC_PARTITION_COLUMNTYPE, columnType);
GenericJdbcConnectorConstants.CONNECTOR_JDBC_PARTITION_MAXVALUE, context.setString(GenericJdbcConnectorConstants.CONNECTOR_JDBC_PARTITION_MINVALUE, min);
rs.getString(2)); context.setString(GenericJdbcConnectorConstants.CONNECTOR_JDBC_PARTITION_MAXVALUE, max);
} catch (SQLException e) { } catch (SQLException e) {
throw new SqoopException( throw new SqoopException(
@ -290,8 +290,10 @@ private void configureTableProperties(MutableContext context, ConnectionConfigur
GenericJdbcConnectorError.GENERIC_JDBC_CONNECTOR_0008); GenericJdbcConnectorError.GENERIC_JDBC_CONNECTOR_0008);
} }
context.setString(GenericJdbcConnectorConstants.CONNECTOR_JDBC_DATA_SQL, LOG.info("Using dataSql: " + dataSql);
dataSql.toString()); LOG.info("Field names: " + fieldNames);
context.setString(GenericJdbcConnectorConstants.CONNECTOR_JDBC_DATA_SQL, dataSql);
context.setString(Constants.JOB_ETL_FIELD_NAMES, fieldNames); context.setString(Constants.JOB_ETL_FIELD_NAMES, fieldNames);
} }
} }