sqoop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From szvasas <...@git.apache.org>
Subject [GitHub] sqoop pull request #38: Metastore
Date Fri, 28 Jul 2017 13:09:43 GMT
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message