ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMBARI-11202) templeton.hive.properties property value substitution should be done by ambari-server
Date Wed, 20 May 2015 19:13:00 GMT

    [ https://issues.apache.org/jira/browse/AMBARI-11202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14552889#comment-14552889
] 

Hudson commented on AMBARI-11202:
---------------------------------

FAILURE: Integrated in Ambari-trunk-Commit #2660 (See [https://builds.apache.org/job/Ambari-trunk-Commit/2660/])
AMBARI-11202. templeton.hive.properties property value substitution should be done by ambari-server
(rlevas) (rlevas: http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=6c7f47c3601fca103c5ec551727a1a745272410c)
* ambari-web/app/controllers/main/admin/kerberos/step4_controller.js
* ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosDescriptorTest.java
* ambari-server/src/main/java/org/apache/ambari/server/state/kerberos/AbstractKerberosDescriptor.java
* ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java
* ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/kerberos.json
* ambari-server/src/main/java/org/apache/ambari/server/state/kerberos/KerberosPrincipalDescriptor.java
* ambari-server/src/main/java/org/apache/ambari/server/state/kerberos/KerberosKeytabDescriptor.java
Revert "AMBARI-11202. templeton.hive.properties property value substitution should be done
by ambari-server (rlevas)" (rlevas: http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=64ed815a844412a63c05eac692a762c1245e6652)
* ambari-web/app/controllers/main/admin/kerberos/step4_controller.js
* ambari-server/src/main/java/org/apache/ambari/server/state/kerberos/KerberosPrincipalDescriptor.java
* ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosDescriptorTest.java
* ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/kerberos.json
* ambari-server/src/main/java/org/apache/ambari/server/state/kerberos/KerberosKeytabDescriptor.java
* ambari-server/src/main/java/org/apache/ambari/server/state/kerberos/AbstractKerberosDescriptor.java
* ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java
AMBARI-11202. templeton.hive.properties property value substitution should be done by ambari-server
(rlevas) (rlevas: http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=dac2f08c655991ec04160875ed94f37be2bf5fca)
* ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelper.java
* ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/kerberos.json
* ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/VariableReplacementHelperTest.java
* ambari-server/src/main/java/org/apache/ambari/server/state/kerberos/VariableReplacementHelper.java
* ambari-server/src/main/java/org/apache/ambari/server/state/kerberos/KerberosPrincipalDescriptor.java
* ambari-server/src/main/java/org/apache/ambari/server/state/kerberos/AbstractKerberosDescriptor.java
* ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosDescriptorTest.java
* ambari-server/src/main/java/org/apache/ambari/server/state/kerberos/KerberosKeytabDescriptor.java


> templeton.hive.properties property value substitution should be done by ambari-server
> -------------------------------------------------------------------------------------
>
>                 Key: AMBARI-11202
>                 URL: https://issues.apache.org/jira/browse/AMBARI-11202
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-server
>    Affects Versions: 2.1.0
>            Reporter: Robert Levas
>            Assignee: Robert Levas
>            Priority: Critical
>              Labels: kerberos, kerberos_descriptor
>             Fix For: 2.1.0
>
>         Attachments: AMBARI-11202_01.patch, AMBARI-11202_02.patch
>
>
> The webhcat-site/templeton.hive.properties property value substitution should be done
by ambari-server.  This value is more complicated than others since the (embedded) hive.metastore.uris
property is a list of thrift URIs generated using the set of hosts the Hive Metastore is installed
on.  This list of hosts comes from the clusterHostInfo/hive_metastore_host value, which in
the KerberosHelper (org.apache.ambari.server.controller.KerberosHelper) is available as a
comma-delimited list of hosts.
> {code}
> clusterHostInfo/hive_metastore_host = "host1,host2,host3"
> {code}
> To generate configuration values when enabling Kerberos, the KerberosHelper class uses
org.apache.ambari.server.state.kerberos.AbstractKerberosDescriptor#replaceVariables to replace
variables specified in the Kerberos Descriptor.  Currently this mechanism uses a simple replacement
scheme, which is not sufficient to generate string using a delimited list of values. 
> In order to solve this issue, "functions" need to be applied to replacement data before
making the substitution.  In this case a "function" named "each" will be created that takes
the following arguments:
> * pattern with placeholders
> * delimiter to use to concatenate values generated using the patter
> * regex to use to split the original string
> For example: 
> {code:title=function declaration, commas are escaped when not intended to separate function
args}
> each(thrift://%s:9083, \\,, \s*\,\s*)
> {code}
> To indicate this function is to be used, the following Kerberos Descriptor variable replacement
syntax is to be used:
> {code}
> ${clusterHostInfo/hive_metastore_host|each(thrift://%s:9083, \\,, \s*\,\s*)}
> {code}
> Note: \ characters need to be escaped in JSON structure values.  For example: 
> {code}
> "some.property" : "${clusterHostInfo/hive_metastore_host|each(thrift://%s:9083, \\\\,,
\\s*\\,\\s*)}"
> {code}
> If clusterHostInfo/hive_metastore_host = "host1,host2,host3", the result would be 
> {code}
> thrift://host1:9083\,thrift://host2:9083\,thrift://host3:9083
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message