[jira] [Updated] (HIVE-5046) Hcatalog's bin/hcat script doesn't respect HIVE_HOME
[ https://issues.apache.org/jira/browse/HIVE-5046?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brock Noland updated HIVE-5046: --- Resolution: Fixed Fix Version/s: 0.12.0 Status: Resolved (was: Patch Available) Committed to trunk! Thanks Mark for your contribution! Hcatalog's bin/hcat script doesn't respect HIVE_HOME Key: HIVE-5046 URL: https://issues.apache.org/jira/browse/HIVE-5046 Project: Hive Issue Type: Bug Components: HCatalog Affects Versions: 0.11.0 Reporter: Mark Grover Assignee: Mark Grover Fix For: 0.12.0 Attachments: HIVE-5046.1.patch https://github.com/apache/hive/blob/trunk/hcatalog/bin/hcat#L81 The quoted snippet (see below) intends to set HIVE_HOME if it's not set (i.e. HIVE_HOME is currently null). {code} if [ -n ${HIVE_HOME} ]; then {code} However, {{-n}} checks if the variable is _not_ null. So, the above code ends up setting HIVE_HOME to the default value if it is actually set already, overriding the set value. This condition needs to be negated. Moreover, {{-n}} checks requires the string being tested to be enclosed in quotes. Reference: http://tldp.org/LDP/abs/html/comparison-ops.html -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HIVE-5046) Hcatalog's bin/hcat script doesn't respect HIVE_HOME
[ https://issues.apache.org/jira/browse/HIVE-5046?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mark Grover updated HIVE-5046: -- Description: https://github.com/apache/hive/blob/trunk/hcatalog/bin/hcat#L81 The quoted snippet (see below) intends to set HIVE_HOME if it's not set (i.e. HIVE_HOME is currently null). {code} if [ -n ${HIVE_HOME} ]; then {code} However, {{-n}} checks if the variable is _not_ null. So, the above code ends up setting HIVE_HOME to the default value if it is actually set already, overriding the set value. This condition needs to be negated. Moreover, {{-n}} checks requires the string being tested to be enclosed in quotes. Reference: http://tldp.org/LDP/abs/html/comparison-ops.html was: https://github.com/apache/hive/blob/trunk/hcatalog/bin/hcat#L81 The quoted snippet (see below) intends to set HIVE_HOME if it's not set (i.e. HIVE_HOME is currently null). {code} if [ -n ${HIVE_HOME} ]; then {code} However, {{-n}} checks if the variable is _not_ null. So, the condition is checking for the boolean inverse of what it's supposed to be checking for. Moreover, {{-n}} checks requires the string being tested to be enclosed in quotes. Reference: http://tldp.org/LDP/abs/html/comparison-ops.html Hcatalog's bin/hcat script doesn't respect HIVE_HOME Key: HIVE-5046 URL: https://issues.apache.org/jira/browse/HIVE-5046 Project: Hive Issue Type: Bug Components: HCatalog Affects Versions: 0.11.0 Reporter: Mark Grover Assignee: Mark Grover https://github.com/apache/hive/blob/trunk/hcatalog/bin/hcat#L81 The quoted snippet (see below) intends to set HIVE_HOME if it's not set (i.e. HIVE_HOME is currently null). {code} if [ -n ${HIVE_HOME} ]; then {code} However, {{-n}} checks if the variable is _not_ null. So, the above code ends up setting HIVE_HOME to the default value if it is actually set already, overriding the set value. This condition needs to be negated. Moreover, {{-n}} checks requires the string being tested to be enclosed in quotes. Reference: http://tldp.org/LDP/abs/html/comparison-ops.html -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HIVE-5046) Hcatalog's bin/hcat script doesn't respect HIVE_HOME
[ https://issues.apache.org/jira/browse/HIVE-5046?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mark Grover updated HIVE-5046: -- Attachment: HIVE-5046.1.patch Hcatalog's bin/hcat script doesn't respect HIVE_HOME Key: HIVE-5046 URL: https://issues.apache.org/jira/browse/HIVE-5046 Project: Hive Issue Type: Bug Components: HCatalog Affects Versions: 0.11.0 Reporter: Mark Grover Assignee: Mark Grover Attachments: HIVE-5046.1.patch https://github.com/apache/hive/blob/trunk/hcatalog/bin/hcat#L81 The quoted snippet (see below) intends to set HIVE_HOME if it's not set (i.e. HIVE_HOME is currently null). {code} if [ -n ${HIVE_HOME} ]; then {code} However, {{-n}} checks if the variable is _not_ null. So, the above code ends up setting HIVE_HOME to the default value if it is actually set already, overriding the set value. This condition needs to be negated. Moreover, {{-n}} checks requires the string being tested to be enclosed in quotes. Reference: http://tldp.org/LDP/abs/html/comparison-ops.html -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HIVE-5046) Hcatalog's bin/hcat script doesn't respect HIVE_HOME
[ https://issues.apache.org/jira/browse/HIVE-5046?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mark Grover updated HIVE-5046: -- Status: Patch Available (was: Open) Hcatalog's bin/hcat script doesn't respect HIVE_HOME Key: HIVE-5046 URL: https://issues.apache.org/jira/browse/HIVE-5046 Project: Hive Issue Type: Bug Components: HCatalog Affects Versions: 0.11.0 Reporter: Mark Grover Assignee: Mark Grover Attachments: HIVE-5046.1.patch https://github.com/apache/hive/blob/trunk/hcatalog/bin/hcat#L81 The quoted snippet (see below) intends to set HIVE_HOME if it's not set (i.e. HIVE_HOME is currently null). {code} if [ -n ${HIVE_HOME} ]; then {code} However, {{-n}} checks if the variable is _not_ null. So, the above code ends up setting HIVE_HOME to the default value if it is actually set already, overriding the set value. This condition needs to be negated. Moreover, {{-n}} checks requires the string being tested to be enclosed in quotes. Reference: http://tldp.org/LDP/abs/html/comparison-ops.html -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira