Review Board 1.7.22


SQOOP-825 Warning for incorrect usage of hive parameters is not checking HIVE_HOME correctly

Review Request #8918 - Created Jan. 10, 2013 and submitted

Jarek Cecho
SQOP-825
Reviewers
Sqoop
sqoop-trunk
I've put the missing "!" into the condition.
I've verified that logs from all unit tests do not show this warning and also run this change on several conditions on real cluster.

Diff revision 1 (Latest)

  1. src/java/org/apache/sqoop/tool/BaseSqoopTool.java: Loading...
src/java/org/apache/sqoop/tool/BaseSqoopTool.java
Revision c0221c97fc6e2fb971c384ee8e9a7b73915342dc New Change
[20] 1018 lines
[+20] [+] protected void validateHiveOptions(SqoopOptions options)
1019
    }
1019
    }
1020

    
   
1020

   
1021
    // Warn about using hive specific arguments without hive import itself
1021
    // Warn about using hive specific arguments without hive import itself
1022
    if (!options.doHiveImport()
1022
    if (!options.doHiveImport()
1023
      && ((options.getHiveHome() != null
1023
      && ((options.getHiveHome() != null
1024
            && options.getHiveHome().equals(SqoopOptions.getHiveHomeDefault()))
1024
            && !options.getHiveHome().equals(SqoopOptions.getHiveHomeDefault()))
1025
        || options.doOverwriteHiveTable()
1025
        || options.doOverwriteHiveTable()
1026
        || options.doFailIfHiveTableExists()
1026
        || options.doFailIfHiveTableExists()
1027
        || (options.getHiveTableName() != null
1027
        || (options.getHiveTableName() != null
1028
            && !options.getHiveTableName().equals(options.getTableName()))
1028
            && !options.getHiveTableName().equals(options.getTableName()))
1029
        || options.getHivePartitionKey() != null
1029
        || options.getHivePartitionKey() != null
[+20] [20] 50 lines
  1. src/java/org/apache/sqoop/tool/BaseSqoopTool.java: Loading...