Repository: incubator-slider Updated Branches: refs/heads/develop 27bddaa1d -> 38e356d23
SLIDER-626 adjust accumulo appConfig defaults Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/38e356d2 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/38e356d2 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/38e356d2 Branch: refs/heads/develop Commit: 38e356d23fe390615ab47ccf114055dbc65a13dd Parents: 27bddaa Author: Billie Rinaldi <[email protected]> Authored: Fri Nov 7 11:03:02 2014 -0800 Committer: Billie Rinaldi <[email protected]> Committed: Fri Nov 7 12:59:18 2014 -0800 ---------------------------------------------------------------------- app-packages/accumulo/appConfig-default.json | 2 +- .../accumulo/appConfig-secured-default.json | 2 +- app-packages/accumulo/getconf.sh | 21 ++++++++++++++++++++ app-packages/accumulo/pom.xml | 10 ++++++++++ .../providers/agent/AgentProviderService.java | 1 + 5 files changed, 34 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/38e356d2/app-packages/accumulo/appConfig-default.json ---------------------------------------------------------------------- diff --git a/app-packages/accumulo/appConfig-default.json b/app-packages/accumulo/appConfig-default.json index 6450bc7..9d11bae 100644 --- a/app-packages/accumulo/appConfig-default.json +++ b/app-packages/accumulo/appConfig-default.json @@ -10,7 +10,7 @@ "site.global.app_user": "${app.user}", "site.global.user_group": "${app.user.group}", - "site.accumulo-env.java_home": "${app.java.home}", + "site.accumulo-env.java_home": "${JAVA_HOME}", "site.accumulo-env.tserver_heapsize": "256m", "site.accumulo-env.master_heapsize": "128m", "site.accumulo-env.monitor_heapsize": "64m", http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/38e356d2/app-packages/accumulo/appConfig-secured-default.json ---------------------------------------------------------------------- diff --git a/app-packages/accumulo/appConfig-secured-default.json b/app-packages/accumulo/appConfig-secured-default.json index e8f64e0..b493ccc 100644 --- a/app-packages/accumulo/appConfig-secured-default.json +++ b/app-packages/accumulo/appConfig-secured-default.json @@ -10,7 +10,7 @@ "site.global.app_user": "${USER}", "site.global.user_group": "${USER}", - "site.accumulo-env.java_home": "${app.java.home}", + "site.accumulo-env.java_home": "${JAVA_HOME}", "site.accumulo-env.tserver_heapsize": "256m", "site.accumulo-env.master_heapsize": "128m", "site.accumulo-env.monitor_heapsize": "64m", http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/38e356d2/app-packages/accumulo/getconf.sh ---------------------------------------------------------------------- diff --git a/app-packages/accumulo/getconf.sh b/app-packages/accumulo/getconf.sh new file mode 100755 index 0000000..7d6a1ac --- /dev/null +++ b/app-packages/accumulo/getconf.sh @@ -0,0 +1,21 @@ +# 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. + +CLUSTER=$1 + +slider registry --getconf accumulo-site --name $CLUSTER --format xml --dest accumulo-site.xml +slider registry --getconf client --name $CLUSTER --format properties --dest client.conf +slider registry --getconf accumulo-env --name $CLUSTER --format json --dest accumulo-env.json +python -c "import json; file = open('accumulo-env.json'); content = json.load(file); file.close(); print content['content']" > accumulo-env.sh http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/38e356d2/app-packages/accumulo/pom.xml ---------------------------------------------------------------------- diff --git a/app-packages/accumulo/pom.xml b/app-packages/accumulo/pom.xml index 012fb7b..4c22bb1 100644 --- a/app-packages/accumulo/pom.xml +++ b/app-packages/accumulo/pom.xml @@ -57,6 +57,16 @@ <profiles> <profile> + <id>hdp</id> + <properties> + <hadoop.dir>/usr/hdp/current/hadoop-client</hadoop.dir> + <hdfs.dir>/usr/hdp/current/hadoop-hdfs-client</hdfs.dir> + <yarn.dir>/usr/hdp/current/hadoop-yarn-client</yarn.dir> + <mapred.dir>/usr/hdp/current/hadoop-mapreduce-client</mapred.dir> + <zk.dir>/usr/hdp/current/zookeeper-client</zk.dir> + </properties> + </profile> + <profile> <id>accumulo-app-package</id> <build> <plugins> http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/38e356d2/slider-core/src/main/java/org/apache/slider/providers/agent/AgentProviderService.java ---------------------------------------------------------------------- diff --git a/slider-core/src/main/java/org/apache/slider/providers/agent/AgentProviderService.java b/slider-core/src/main/java/org/apache/slider/providers/agent/AgentProviderService.java index 4720ced..c86eabd 100644 --- a/slider-core/src/main/java/org/apache/slider/providers/agent/AgentProviderService.java +++ b/slider-core/src/main/java/org/apache/slider/providers/agent/AgentProviderService.java @@ -1836,6 +1836,7 @@ public class AgentProviderService extends AbstractProviderService implements .getInternalsSnapshot() .getGlobalOptions() .getMandatoryOption(InternalKeys.INTERNAL_DATA_DIR_PATH)); + tokens.put("${JAVA_HOME}", appConf.get(AgentKeys.JAVA_HOME)); return tokens; }
