Repository: incubator-slider Updated Branches: refs/heads/develop f11ea7812 -> 243c5b275
SLIDER-860 copy more properties from accumulo-site to accumulo client.conf and verify in a funtest Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/243c5b27 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/243c5b27 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/243c5b27 Branch: refs/heads/develop Commit: 243c5b275db1218d7386787f8a76776e6262410f Parents: f11ea78 Author: Billie Rinaldi <[email protected]> Authored: Thu Apr 23 14:11:28 2015 -0700 Committer: Billie Rinaldi <[email protected]> Committed: Thu Apr 23 14:42:11 2015 -0700 ---------------------------------------------------------------------- .../accumulo/configuration/accumulo-site.xml | 24 +++++++++++++++ app-packages/accumulo/configuration/client.xml | 20 ++++++++++++ .../accumulo/package/scripts/accumulo_client.py | 8 +++-- app-packages/accumulo/pom.xml | 10 ++++++ .../funtest/accumulo/AccumuloScriptIT.groovy | 32 ++++++++++++++++++++ 5 files changed, 91 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/243c5b27/app-packages/accumulo/configuration/accumulo-site.xml ---------------------------------------------------------------------- diff --git a/app-packages/accumulo/configuration/accumulo-site.xml b/app-packages/accumulo/configuration/accumulo-site.xml index 27653c7..db14695 100644 --- a/app-packages/accumulo/configuration/accumulo-site.xml +++ b/app-packages/accumulo/configuration/accumulo-site.xml @@ -28,6 +28,12 @@ </property> <property> + <name>instance.zookeeper.timeout</name> + <value>30s</value> + <description>Zookeeper timeout.</description> + </property> + + <property> <name>tserver.memory.maps.max</name> <value>80M</value> </property> @@ -76,6 +82,24 @@ </property> <property> + <name>rpc.sasl.qop</name> + <value>auth</value> + <description>Quality of protection used for SASL.</description> + </property> + + <property> + <name>rpc.useJsse</name> + <value>false</value> + <description>Use JSSE system properties to configure SSL.</description> + </property> + + <property> + <name>trace.span.receivers</name> + <value>org.apache.accumulo.tracer.ZooTraceClient</value> + <description>Span receivers for Accumulo tracing.</description> + </property> + + <property> <name>trace.zookeeper.path</name> <value>/tracers</value> <description>ZooKeeper path where Accumulo tracers register.</description> http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/243c5b27/app-packages/accumulo/configuration/client.xml ---------------------------------------------------------------------- diff --git a/app-packages/accumulo/configuration/client.xml b/app-packages/accumulo/configuration/client.xml index 81d9103..275f1e4 100644 --- a/app-packages/accumulo/configuration/client.xml +++ b/app-packages/accumulo/configuration/client.xml @@ -32,6 +32,11 @@ <description>Zookeeper hosts.</description> </property> <property> + <name>instance.zookeeper.timeout</name> + <value>${@//site/accumulo-site/instance.zookeeper.timeout}</value> + <description>Zookeeper timeout.</description> + </property> + <property> <name>instance.rpc.ssl.enabled</name> <value>${@//site/accumulo-site/instance.rpc.ssl.enabled}</value> <description>SSL enabled.</description> @@ -47,6 +52,21 @@ <description>SASL enabled.</description> </property> <property> + <name>rpc.sasl.qop</name> + <value>${@//site/accumulo-site/rpc.sasl.qop}</value> + <description>Quality of protection used for SASL.</description> + </property> + <property> + <name>rpc.useJsse</name> + <value>${@//site/accumulo-site/rpc.useJsse}</value> + <description>Use JSSE system properties to configure SSL.</description> + </property> + <property> + <name>trace.span.receivers</name> + <value>${@//site/accumulo-site/trace.span.receivers}</value> + <description>Span receivers for Accumulo tracing.</description> + </property> + <property> <name>trace.zookeeper.path</name> <value>${@//site/accumulo-site/trace.zookeeper.path}</value> <description>ZooKeeper path where Accumulo tracers register.</description> http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/243c5b27/app-packages/accumulo/package/scripts/accumulo_client.py ---------------------------------------------------------------------- diff --git a/app-packages/accumulo/package/scripts/accumulo_client.py b/app-packages/accumulo/package/scripts/accumulo_client.py index 0680e52..5dcf7c2 100644 --- a/app-packages/accumulo/package/scripts/accumulo_client.py +++ b/app-packages/accumulo/package/scripts/accumulo_client.py @@ -92,6 +92,9 @@ class AccumuloClient(Script): index = line.find("=") if index > 0: configs[line[0:index]] = line[index+1:].rstrip() + for key, value in site.iteritems(): + if key.startswith("trace.span.receiver."): + configs[key] = value if 'instance.rpc.ssl.enabled' in configs and configs['instance.rpc.ssl.enabled']=='true': Logger.info("Configuring client SSL") self.check_provider_contains(client_params.credential_provider, @@ -103,9 +106,6 @@ class AccumuloClient(Script): configs['rpc.javax.net.ssl.keyStoreType'] = client_params.store_type configs['rpc.javax.net.ssl.trustStore'] = client_params.truststore_path configs['rpc.javax.net.ssl.trustStoreType'] = client_params.store_type - PropertiesFile(format("{conf_download_dir}/client.conf"), - properties = configs - ) Execute( format("SLIDER_CONF_DIR={slider_conf_dir} " "{slider_home_dir}/bin/slider client --getcertstore " "--keystore {keystore_path} " @@ -116,6 +116,8 @@ class AccumuloClient(Script): "--truststore {truststore_path} " "--name {app_name} --alias {truststore_alias} " "--provider {credential_provider}")) + PropertiesFile(format("{conf_download_dir}/client.conf"), + properties = configs) Directory(client_params.client_conf, content=format("{client_conf}/templates")) Directory(client_params.client_conf, http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/243c5b27/app-packages/accumulo/pom.xml ---------------------------------------------------------------------- diff --git a/app-packages/accumulo/pom.xml b/app-packages/accumulo/pom.xml index c45d0f6..cd84848 100644 --- a/app-packages/accumulo/pom.xml +++ b/app-packages/accumulo/pom.xml @@ -336,6 +336,16 @@ <artifactId>slf4j-api</artifactId> <scope>test</scope> </dependency> + <dependency> + <groupId>commons-configuration</groupId> + <artifactId>commons-configuration</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.codehaus.jettison</groupId> + <artifactId>jettison</artifactId> + <scope>test</scope> + </dependency> </dependencies> </project> http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/243c5b27/app-packages/accumulo/src/test/groovy/org/apache/slider/funtest/accumulo/AccumuloScriptIT.groovy ---------------------------------------------------------------------- diff --git a/app-packages/accumulo/src/test/groovy/org/apache/slider/funtest/accumulo/AccumuloScriptIT.groovy b/app-packages/accumulo/src/test/groovy/org/apache/slider/funtest/accumulo/AccumuloScriptIT.groovy index 762339f..24b6e22 100644 --- a/app-packages/accumulo/src/test/groovy/org/apache/slider/funtest/accumulo/AccumuloScriptIT.groovy +++ b/app-packages/accumulo/src/test/groovy/org/apache/slider/funtest/accumulo/AccumuloScriptIT.groovy @@ -19,9 +19,11 @@ package org.apache.slider.funtest.accumulo import groovy.util.logging.Slf4j import org.apache.accumulo.examples.simple.helloworld.InsertWithBatchWriter import org.apache.accumulo.examples.simple.helloworld.ReadData +import org.apache.commons.configuration.PropertiesConfiguration import org.apache.hadoop.registry.client.api.RegistryConstants import org.apache.slider.api.ClusterDescription import org.apache.slider.client.SliderClient +import org.apache.slider.core.conf.ConfTree import org.apache.slider.funtest.framework.AccumuloSliderShell import org.apache.slider.funtest.framework.FuntestProperties import org.apache.slider.funtest.framework.SliderShell @@ -38,6 +40,27 @@ class AccumuloScriptIT extends AccumuloBasicIT { public static final File ACCUMULO_TOOL_SCRIPT = new File(CLIENT_HOME_DIR + "/bin", "tool.sh").canonicalFile public static final File ACCUMULO_CLIENT_CONF = new File(CLIENT_HOME_DIR + "/conf", "client.conf").canonicalFile + public static final Map<String,String> customProps = new HashMap<String,String>() + + @BeforeClass + public static void setProps() { + customProps.put("instance.zookeeper.timeout", "60s") + customProps.put("trace.zookeeper.path", "/tracers2") + customProps.put("trace.span.receiver.some.property", "some.value"); + customProps.put("trace.span.receiver.other.property", "comma,separated,value"); + } + + protected String templateName() { + return sysprop("test.app.resources.dir") + "/appConfig_script.json" + } + + protected ConfTree modifyTemplate(ConfTree confTree) { + for (Map.Entry<String,String> p : customProps.entrySet()) { + confTree.global.put("site.accumulo-site." + p.getKey(), p.getValue()) + } + return confTree + } + @Override public String getClusterName() { return "test_script"; @@ -90,6 +113,15 @@ class AccumuloScriptIT extends AccumuloBasicIT { assert ACCUMULO_CLIENT_CONF.exists(), "client.conf did not exist after " + "client install command" + PropertiesConfiguration conf = new PropertiesConfiguration() + conf.setDelimiterParsingDisabled(true) + conf.load(ACCUMULO_CLIENT_CONF) + + for (Map.Entry<String,String> p : customProps.entrySet()) { + assert conf.getString(p.getKey()).equals(p.getValue()), "client.conf " + + "did not contain expected property $p" + } + accumulo_slider("--app $clusterName quicklinks") accumulo("shell -u $USER -p $PASSWORD -e tables")
