Github user szvasas commented on a diff in the pull request:

    https://github.com/apache/sqoop/pull/38#discussion_r130062375
  
    --- Diff: src/java/org/apache/sqoop/tool/JobTool.java ---
    @@ -346,8 +361,21 @@ public void applyOptions(CommandLine in, SqoopOptions 
out)
         this.storageDescriptor = new TreeMap<String, String>();
     
         if (in.hasOption(STORAGE_METASTORE_ARG)) {
    -      this.storageDescriptor.put(HsqldbJobStorage.META_CONNECT_KEY,
    -          in.getOptionValue(STORAGE_METASTORE_ARG));
    +      String metaConnectString = in.getOptionValue(STORAGE_METASTORE_ARG);
    +      this.storageDescriptor.put(GenericJobStorage.META_CONNECT_KEY, 
metaConnectString);
    +
    +      String metaUserString = in.getOptionValue(METASTORE_USER_ARG, null);
    +      this.storageDescriptor.put(GenericJobStorage.META_USERNAME_KEY, 
metaUserString);
    +
    +      String metaPassString = in.getOptionValue(METASTORE_PASS_ARG, null);
    +      this.storageDescriptor.put(GenericJobStorage.META_PASSWORD_KEY, 
metaPassString);
    +
    +      String driverString = chooseDriverType(metaConnectString);
    +      this.storageDescriptor.put(GenericJobStorage.META_DRIVER_KEY, 
driverString);
    +    }
    +    else if (in.hasOption(METASTORE_USER_ARG) || 
in.hasOption(METASTORE_PASS_ARG)) {
    --- End diff --
    
    I think this validation should go in validateOptions method.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to