Repository: ambari Updated Branches: refs/heads/trunk b4d7b388b -> 7113ce228
AMBARI-10611 Ensure Accumulo client conf is in sync with accumulo-site conf (billie) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7113ce22 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7113ce22 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7113ce22 Branch: refs/heads/trunk Commit: 7113ce22801baef6626ad49358a3d014064be6c4 Parents: b4d7b38 Author: Billie Rinaldi <[email protected]> Authored: Thu Apr 23 06:50:34 2015 -0700 Committer: Billie Rinaldi <[email protected]> Committed: Thu Apr 23 07:49:25 2015 -0700 ---------------------------------------------------------------------- .../1.6.1.2.2.0/configuration/client.xml | 24 ++++++++++++++++++++ .../ACCUMULO/1.6.1.2.2.0/metainfo.xml | 5 ++++ .../package/scripts/accumulo_configuration.py | 19 ++++++++++++++-- 3 files changed, 46 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/7113ce22/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/configuration/client.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/configuration/client.xml b/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/configuration/client.xml new file mode 100644 index 0000000..f1fa4de --- /dev/null +++ b/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/configuration/client.xml @@ -0,0 +1,24 @@ +<?xml version="1.0"?> +<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> +<!-- +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +--> + +<configuration> +</configuration> http://git-wip-us.apache.org/repos/asf/ambari/blob/7113ce22/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/metainfo.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/metainfo.xml b/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/metainfo.xml index 6604e53..7a6004c 100644 --- a/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/metainfo.xml @@ -125,6 +125,11 @@ <fileName>log4j.properties</fileName> <dictionaryName>accumulo-log4j</dictionaryName> </configFile> + <configFile> + <type>properties</type> + <fileName>client.conf</fileName> + <dictionaryName>client</dictionaryName> + </configFile> </configFiles> </component> </components> http://git-wip-us.apache.org/repos/asf/ambari/blob/7113ce22/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_configuration.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_configuration.py b/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_configuration.py index e4d8ed1..4652cc1 100644 --- a/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_configuration.py +++ b/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_configuration.py @@ -105,10 +105,21 @@ def setup_conf_dir(name=None): # 'master' or 'tserver' or 'monitor' or 'gc' or ' # create client.conf file configs = {} + if 'client' in params.config['configurations']: + configs.update(params.config['configurations']['client']) configs["instance.name"] = params.instance_name configs["instance.zookeeper.host"] = params.config['configurations']['accumulo-site']['instance.zookeeper.host'] - if 'instance.rpc.sasl.enabled' in params.config['configurations']['accumulo-site']: - configs["instance.rpc.sasl.enabled"] = params.config['configurations']['accumulo-site']['instance.rpc.sasl.enabled'] + copy_site_property(configs, 'instance.rpc.sasl.enabled') + copy_site_property(configs, 'rpc.sasl.qop') + copy_site_property(configs, 'rpc.useJsse') + copy_site_property(configs, 'instance.rpc.ssl.clientAuth') + copy_site_property(configs, 'instance.rpc.ssl.enabled') + copy_site_property(configs, 'instance.zookeeper.timeout') + copy_site_property(configs, 'trace.span.receivers') + copy_site_property(configs, 'trace.zookeeper.path') + for key,value in params.config['configurations']['accumulo-site'].iteritems(): + if key.startswith("trace.span.receiver."): + configs[key] = value PropertiesFile(format("{dest_conf_dir}/client.conf"), properties = configs, owner = params.accumulo_user, @@ -277,6 +288,10 @@ def setup_conf_dir(name=None): # 'master' or 'tserver' or 'monitor' or 'gc' or ' try_remove(rpassfile) try_remove(cmdfile) +def copy_site_property(configs, name): + import params + if name in params.config['configurations']['accumulo-site']: + configs[name] = params.config['configurations']['accumulo-site'][name] def create_user(user, password): import params
