Uploaded image for project: 'Sqoop (Retired)'
  1. Sqoop (Retired)
  2. SQOOP-2283

Support usage of --exec and --password-alias

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.4.6, 1.4.7
    • None
    • None

    Description

      Currently, passwords are being queried for even when --password-alias is provided during job creation.

      https://github.com/apache/sqoop/blob/trunk/src/java/org/apache/sqoop/SqoopOptions.java#L750

        private void writePasswordProperty(Properties props) {
          if (getPasswordFilePath() != null) { // short-circuit
            putProperty(props, "db.password.file", getPasswordFilePath());
            return;
          }
      
          if (this.getConf().getBoolean(
            METASTORE_PASSWORD_KEY, METASTORE_PASSWORD_DEFAULT)) {
            // If the user specifies, we may store the password in the metastore.
            putProperty(props, "db.password", this.password);
            putProperty(props, "db.require.password", "false");
          } else if (this.password != null) {
            // Otherwise, if the user has set a password, we just record
            // a flag stating that the password will need to be reentered.
            putProperty(props, "db.require.password", "true");
          } else {
            // No password saved or required.
            putProperty(props, "db.require.password", "false");
          }
        }
      

      We should be aware of `db.password.alias` and set `db.require.password` appropriately.

      Attachments

        1. SQOOP-2283.patch
          2 kB
          Abraham Elmahrek

        Activity

          People

            abec Abraham Elmahrek
            abec Abraham Elmahrek
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: