sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jar...@apache.org
Subject git commit: SQOOP-1671: Fix incorrect merge from SQOOP-1645
Date Tue, 04 Nov 2014 15:21:38 GMT
Repository: sqoop
Updated Branches:
  refs/heads/sqoop2 aabd40b93 -> bb52e54ee


SQOOP-1671: Fix incorrect merge from SQOOP-1645

(Veena Basavaraj via Jarek Jarcec Cecho)


Project: http://git-wip-us.apache.org/repos/asf/sqoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/sqoop/commit/bb52e54e
Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/bb52e54e
Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/bb52e54e

Branch: refs/heads/sqoop2
Commit: bb52e54eea035004215622073cb2857ccd166961
Parents: aabd40b
Author: Jarek Jarcec Cecho <jarcec@apache.org>
Authored: Tue Nov 4 07:21:16 2014 -0800
Committer: Jarek Jarcec Cecho <jarcec@apache.org>
Committed: Tue Nov 4 07:21:16 2014 -0800

----------------------------------------------------------------------
 .../sqoop/connector/jdbc/GenericJdbcPartitioner.java      | 10 +++++-----
 .../sqoop/connector/jdbc/configuration/FromJobConfig.java |  2 +-
 .../org/apache/sqoop/connector/jdbc/TestPartitioner.java  |  2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/bb52e54e/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcPartitioner.java
----------------------------------------------------------------------
diff --git a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcPartitioner.java
b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcPartitioner.java
index 2411169..b68d8d0 100644
--- a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcPartitioner.java
+++ b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcPartitioner.java
@@ -44,7 +44,7 @@ public class GenericJdbcPartitioner extends Partitioner<LinkConfiguration,
FromJ
   private int partitionColumnType;
   private String partitionMinValue;
   private String partitionMaxValue;
-  private Boolean partitionColumnNull;
+  private Boolean allowNullValueInPartitionColumn;
 
   @Override
   public List<Partition> getPartitions(PartitionerContext context, LinkConfiguration
linkConfig,
@@ -57,9 +57,9 @@ public class GenericJdbcPartitioner extends Partitioner<LinkConfiguration,
FromJ
     partitionMinValue = context.getString(GenericJdbcConnectorConstants.CONNECTOR_JDBC_PARTITION_MINVALUE);
     partitionMaxValue = context.getString(GenericJdbcConnectorConstants.CONNECTOR_JDBC_PARTITION_MAXVALUE);
 
-    partitionColumnNull = fromJobConfig.fromJobConfig.partitionColumnNull;
-    if (partitionColumnNull == null) {
-      partitionColumnNull = false;
+    allowNullValueInPartitionColumn = fromJobConfig.fromJobConfig.allowNullValueInPartitionColumn;
+    if (allowNullValueInPartitionColumn == null) {
+      allowNullValueInPartitionColumn = false;
     }
 
     if (partitionMinValue == null && partitionMaxValue == null) {
@@ -69,7 +69,7 @@ public class GenericJdbcPartitioner extends Partitioner<LinkConfiguration,
FromJ
       return partitions;
     }
 
-    if (partitionColumnNull) {
+    if (allowNullValueInPartitionColumn) {
       GenericJdbcPartition partition = new GenericJdbcPartition();
       partition.setConditions(partitionColumnName + " IS NULL");
       partitions.add(partition);

http://git-wip-us.apache.org/repos/asf/sqoop/blob/bb52e54e/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/configuration/FromJobConfig.java
----------------------------------------------------------------------
diff --git a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/configuration/FromJobConfig.java
b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/configuration/FromJobConfig.java
index 7c29a92..65e829c 100644
--- a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/configuration/FromJobConfig.java
+++ b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/configuration/FromJobConfig.java
@@ -46,7 +46,7 @@ public class FromJobConfig {
   public String partitionColumn;
 
   @Input
-  public Boolean partitionColumnNull;
+  public Boolean allowNullValueInPartitionColumn;
 
   @Input(size = 50)
   public String boundaryQuery;

http://git-wip-us.apache.org/repos/asf/sqoop/blob/bb52e54e/connector/connector-generic-jdbc/src/test/java/org/apache/sqoop/connector/jdbc/TestPartitioner.java
----------------------------------------------------------------------
diff --git a/connector/connector-generic-jdbc/src/test/java/org/apache/sqoop/connector/jdbc/TestPartitioner.java
b/connector/connector-generic-jdbc/src/test/java/org/apache/sqoop/connector/jdbc/TestPartitioner.java
index 3ae64f0..dee0242 100644
--- a/connector/connector-generic-jdbc/src/test/java/org/apache/sqoop/connector/jdbc/TestPartitioner.java
+++ b/connector/connector-generic-jdbc/src/test/java/org/apache/sqoop/connector/jdbc/TestPartitioner.java
@@ -490,7 +490,7 @@ public class TestPartitioner {
 
     LinkConfiguration linkConfig = new LinkConfiguration();
     FromJobConfiguration jobConfig = new FromJobConfiguration();
-    jobConfig.fromJobConfig.partitionColumnNull = true;
+    jobConfig.fromJobConfig.allowNullValueInPartitionColumn = true;
 
     Partitioner partitioner = new GenericJdbcPartitioner();
     PartitionerContext partitionerContext = new PartitionerContext(context, 5, null);


Mime
View raw message