sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jar...@apache.org
Subject sqoop git commit: SQOOP-2640: Not possible to enter "last value" when creating incremental job
Date Tue, 27 Oct 2015 22:27:59 GMT
Repository: sqoop
Updated Branches:
  refs/heads/sqoop2 ecdb8167b -> c54f92854


SQOOP-2640: Not possible to enter "last value" when creating incremental job

(Abraham Fine 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/c54f9285
Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/c54f9285
Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/c54f9285

Branch: refs/heads/sqoop2
Commit: c54f92854746cb16995d11b3dcf9c395839af358
Parents: ecdb816
Author: Jarek Jarcec Cecho <jarcec@apache.org>
Authored: Tue Oct 27 15:26:59 2015 -0700
Committer: Jarek Jarcec Cecho <jarcec@apache.org>
Committed: Tue Oct 27 15:26:59 2015 -0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/sqoop/shell/utils/ConfigFiller.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/c54f9285/shell/src/main/java/org/apache/sqoop/shell/utils/ConfigFiller.java
----------------------------------------------------------------------
diff --git a/shell/src/main/java/org/apache/sqoop/shell/utils/ConfigFiller.java b/shell/src/main/java/org/apache/sqoop/shell/utils/ConfigFiller.java
index 852330e..6a2a96d 100644
--- a/shell/src/main/java/org/apache/sqoop/shell/utils/ConfigFiller.java
+++ b/shell/src/main/java/org/apache/sqoop/shell/utils/ConfigFiller.java
@@ -433,7 +433,7 @@ public final class ConfigFiller {
     String opt = ConfigOptions.getOptionKey(prefix, input);
     if (line.hasOption(opt)) {
       String value = line.getOptionValue(ConfigOptions.getOptionKey(prefix, input));
-      if(value.length() > input.getMaxLength()) {
+      if((input.getMaxLength() >= 0) && (value.length() > input.getMaxLength()))
{
         errorMessage(input, "Size of input exceeds allowance for this input"
           + " field. Maximal allowed size is " + input.getMaxLength());
       }
@@ -1039,7 +1039,7 @@ public final class ConfigFiller {
       input.setValue(userTyped);
 
       // Check that it did not exceeds maximal allowance for given input
-      if(userTyped.length() > input.getMaxLength()) {
+      if((input.getMaxLength() >= 0) && (userTyped.length() > input.getMaxLength()))
{
         errorMessage("Size of input exceeds allowance for this input"
           + " field. Maximal allowed size is " + input.getMaxLength());
         return fillInputStringWithBundle(input, reader, bundle);


Mime
View raw message