Author: abayer Date: Tue Aug 14 17:43:47 2012 New Revision: 1372995 URL: http://svn.apache.org/viewvc?rev=1372995&view=rev Log: Cleaning up bad/partial commit of WHIRR-525
Added: whirr/trunk/services/hbase-oldtests/ whirr/trunk/services/hbase-oldtests/pom.xml (with props) whirr/trunk/services/hbase-oldtests/src/ whirr/trunk/services/hbase-oldtests/src/test/ whirr/trunk/services/hbase-oldtests/src/test/java/ whirr/trunk/services/hbase-oldtests/src/test/java/org/ whirr/trunk/services/hbase-oldtests/src/test/java/org/apache/ whirr/trunk/services/hbase-oldtests/src/test/java/org/apache/whirr/ whirr/trunk/services/hbase-oldtests/src/test/java/org/apache/whirr/service/ whirr/trunk/services/hbase-oldtests/src/test/java/org/apache/whirr/service/hbase/ whirr/trunk/services/hbase-oldtests/src/test/java/org/apache/whirr/service/hbase/integration/ whirr/trunk/services/hbase-oldtests/src/test/java/org/apache/whirr/service/hbase/integration/HBase090ServiceTest.java (with props) whirr/trunk/services/hbase-oldtests/src/test/java/org/apache/whirr/service/hbase/integration/HBase090SingleNodeServiceTest.java (with props) whirr/trunk/services/hbase-oldtests/src/test/java/org/apache/whirr/service/hbase/integration/HBaseOldServiceController.java (with props) whirr/trunk/services/hbase-oldtests/src/test/java/org/apache/whirr/service/hbase/integration/HBaseOldServiceTest.java (with props) whirr/trunk/services/hbase-oldtests/src/test/resources/ whirr/trunk/services/hbase-oldtests/src/test/resources/log4j.xml (with props) whirr/trunk/services/hbase-oldtests/src/test/resources/whirr-hbase-0.90-singlenode-test.properties (with props) whirr/trunk/services/hbase-oldtests/src/test/resources/whirr-hbase-0.90-test.properties (with props) whirr/trunk/services/hbase/src/test/java/org/apache/whirr/service/hbase/integration/HBase092ServiceTest.java (with props) whirr/trunk/services/hbase/src/test/java/org/apache/whirr/service/hbase/integration/HBase092SingleNodeServiceTest.java (with props) whirr/trunk/services/hbase/src/test/resources/whirr-hbase-0.92-singlenode-test.properties (with props) whirr/trunk/services/hbase/src/test/resources/whirr-hbase-0.92-test.properties (with props) Removed: whirr/trunk/services/hbase/src/test/java/org/apache/whirr/service/hbase/integration/HBase089ServiceTest.java whirr/trunk/services/hbase/src/test/java/org/apache/whirr/service/hbase/integration/HBase090ServiceTest.java whirr/trunk/services/hbase/src/test/java/org/apache/whirr/service/hbase/integration/HBase090SingleNodeServiceTest.java whirr/trunk/services/hbase/src/test/resources/whirr-hbase-0.90-singlenode-test.properties whirr/trunk/services/hbase/src/test/resources/whirr-hbase-0.90-test.properties whirr/trunk/services/hbase/src/test/resources/whirr-hbase-test.properties Added: whirr/trunk/services/hbase-oldtests/pom.xml URL: http://svn.apache.org/viewvc/whirr/trunk/services/hbase-oldtests/pom.xml?rev=1372995&view=auto ============================================================================== --- whirr/trunk/services/hbase-oldtests/pom.xml (added) +++ whirr/trunk/services/hbase-oldtests/pom.xml Tue Aug 14 17:43:47 2012 @@ -0,0 +1,133 @@ +<!-- + 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. +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.apache.whirr</groupId> + <artifactId>whirr</artifactId> + <version>0.8.0-SNAPSHOT</version> + <relativePath>../../pom.xml</relativePath> + </parent> + <groupId>org.apache.whirr</groupId> + <artifactId>whirr-hbase-oldtests</artifactId> + <packaging>jar</packaging> + <version>0.8.0-SNAPSHOT</version> + <name>Apache Whirr HBase Old Tests</name> + <dependencies> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>whirr-core</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>whirr-core</artifactId> + <version>${project.version}</version> + <type>test-jar</type> + <scope>test</scope> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>whirr-hadoop</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>whirr-hbase</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>whirr-zookeeper</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + </dependency> + <dependency> + <groupId>org.hamcrest</groupId> + <artifactId>hamcrest-all</artifactId> + </dependency> + <dependency> + <groupId>commons-configuration</groupId> + <artifactId>commons-configuration</artifactId> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.jcraft</groupId> + <artifactId>jsch</artifactId> + </dependency> + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.zookeeper</groupId> + <artifactId>zookeeper</artifactId> + <version>${zookeeper.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>dnsjava</groupId> + <artifactId>dnsjava</artifactId> + </dependency> + <dependency> + <groupId>org.apache.hadoop</groupId> + <artifactId>hadoop-core</artifactId> + <version>${hadoop.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.cloudera.hbase</groupId> + <artifactId>hbase</artifactId> + <version>0.89.20100924-28</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.cloudera.hbase</groupId> + <artifactId>hbase</artifactId> + <version>0.89.20100924-28</version> + <classifier>tests</classifier> + <scope>test</scope> + </dependency> + </dependencies> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-site-plugin</artifactId> + <configuration> + <skip>true</skip> + </configuration> + </plugin> + </plugins> + </build> +</project> + + + Propchange: whirr/trunk/services/hbase-oldtests/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Added: whirr/trunk/services/hbase-oldtests/src/test/java/org/apache/whirr/service/hbase/integration/HBase090ServiceTest.java URL: http://svn.apache.org/viewvc/whirr/trunk/services/hbase-oldtests/src/test/java/org/apache/whirr/service/hbase/integration/HBase090ServiceTest.java?rev=1372995&view=auto ============================================================================== --- whirr/trunk/services/hbase-oldtests/src/test/java/org/apache/whirr/service/hbase/integration/HBase090ServiceTest.java (added) +++ whirr/trunk/services/hbase-oldtests/src/test/java/org/apache/whirr/service/hbase/integration/HBase090ServiceTest.java Tue Aug 14 17:43:47 2012 @@ -0,0 +1,29 @@ +/** + * 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. + */ + +package org.apache.whirr.service.hbase.integration; + +import org.junit.BeforeClass; + +public class HBase090ServiceTest extends HBaseOldServiceTest { + @BeforeClass + public static void setUp() throws Exception { + controller = HBaseOldServiceController.getInstance("whirr-hbase-0.90-test.properties"); + controller.ensureClusterRunning(); + } +} Propchange: whirr/trunk/services/hbase-oldtests/src/test/java/org/apache/whirr/service/hbase/integration/HBase090ServiceTest.java ------------------------------------------------------------------------------ svn:eol-style = native Added: whirr/trunk/services/hbase-oldtests/src/test/java/org/apache/whirr/service/hbase/integration/HBase090SingleNodeServiceTest.java URL: http://svn.apache.org/viewvc/whirr/trunk/services/hbase-oldtests/src/test/java/org/apache/whirr/service/hbase/integration/HBase090SingleNodeServiceTest.java?rev=1372995&view=auto ============================================================================== --- whirr/trunk/services/hbase-oldtests/src/test/java/org/apache/whirr/service/hbase/integration/HBase090SingleNodeServiceTest.java (added) +++ whirr/trunk/services/hbase-oldtests/src/test/java/org/apache/whirr/service/hbase/integration/HBase090SingleNodeServiceTest.java Tue Aug 14 17:43:47 2012 @@ -0,0 +1,29 @@ +/** + * 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. + */ + +package org.apache.whirr.service.hbase.integration; + +import org.junit.BeforeClass; + +public class HBase090SingleNodeServiceTest extends HBaseOldServiceTest { + @BeforeClass + public static void setUp() throws Exception { + controller = HBaseOldServiceController.getInstance("whirr-hbase-0.90-singlenode-test.properties"); + controller.ensureClusterRunning(); + } +} Propchange: whirr/trunk/services/hbase-oldtests/src/test/java/org/apache/whirr/service/hbase/integration/HBase090SingleNodeServiceTest.java ------------------------------------------------------------------------------ svn:eol-style = native Added: whirr/trunk/services/hbase-oldtests/src/test/java/org/apache/whirr/service/hbase/integration/HBaseOldServiceController.java URL: http://svn.apache.org/viewvc/whirr/trunk/services/hbase-oldtests/src/test/java/org/apache/whirr/service/hbase/integration/HBaseOldServiceController.java?rev=1372995&view=auto ============================================================================== --- whirr/trunk/services/hbase-oldtests/src/test/java/org/apache/whirr/service/hbase/integration/HBaseOldServiceController.java (added) +++ whirr/trunk/services/hbase-oldtests/src/test/java/org/apache/whirr/service/hbase/integration/HBaseOldServiceController.java Tue Aug 14 17:43:47 2012 @@ -0,0 +1,166 @@ +/** + * 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. + */ + +package org.apache.whirr.service.hbase.integration; + +import java.io.IOException; +import java.net.InetAddress; +import java.util.HashMap; +import java.util.Map; +import java.util.Map.Entry; + +import org.apache.commons.configuration.CompositeConfiguration; +import org.apache.commons.configuration.PropertiesConfiguration; +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.hbase.HBaseConfiguration; +import org.apache.hadoop.hbase.HConstants; +import org.apache.hadoop.hbase.thrift.generated.Hbase; +import org.apache.hadoop.hbase.thrift.generated.IOError; +import org.apache.hadoop.hbase.thrift.generated.IllegalArgument; +import org.apache.hadoop.hbase.util.Bytes; +import org.apache.thrift.TException; +import org.apache.thrift.protocol.TBinaryProtocol; +import org.apache.thrift.protocol.TProtocol; +import org.apache.thrift.transport.TSocket; +import org.apache.thrift.transport.TTransport; +import org.apache.whirr.Cluster; +import org.apache.whirr.ClusterController; +import org.apache.whirr.ClusterSpec; +import org.apache.whirr.RolePredicates; +import org.apache.whirr.service.hadoop.HadoopProxy; +import org.apache.whirr.service.hbase.HBaseThriftServerClusterActionHandler; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class HBaseOldServiceController { + + private final String configResource; + + private static final Logger LOG = + LoggerFactory.getLogger(HBaseOldServiceController.class); + + private static final Map<String, HBaseOldServiceController> INSTANCES = new HashMap<String, HBaseOldServiceController>(); + + public static HBaseOldServiceController getInstance(String configResource) { + HBaseOldServiceController controller = INSTANCES.get(configResource); + if (controller == null) { + controller = new HBaseOldServiceController(configResource); + INSTANCES.put(configResource, controller); + } + return controller; + } + + private boolean running; + private ClusterSpec clusterSpec; + private ClusterController controller; + private HadoopProxy proxy; + private Cluster cluster; + private Hbase.Client thriftClient; + + private HBaseOldServiceController(String configResource) { + this.configResource = configResource; + } + + public synchronized boolean ensureClusterRunning() throws Exception { + if (running) { + LOG.info("Cluster already running."); + return false; + } else { + startup(); + return true; + } + } + + public synchronized void startup() throws Exception { + LOG.info("Starting up cluster..."); + CompositeConfiguration config = new CompositeConfiguration(); + if (System.getProperty("config") != null) { + config.addConfiguration(new PropertiesConfiguration(System.getProperty("config"))); + } + config.addConfiguration(new PropertiesConfiguration(this.configResource)); + clusterSpec = ClusterSpec.withTemporaryKeys(config); + controller = new ClusterController(); + + cluster = controller.launchCluster(clusterSpec); + proxy = new HadoopProxy(clusterSpec, cluster); + proxy.start(); + + waitForMaster(); + running = true; + } + + public Configuration getConfiguration() { + Configuration conf = HBaseConfiguration.create(); + for (Entry<Object, Object> entry : cluster.getConfiguration().entrySet()) { + conf.set(entry.getKey().toString(), entry.getValue().toString()); + } + return conf; + } + + private void waitForMaster() + throws IOException, TException, IOError, IllegalArgument { + LOG.info("Waiting for master..."); + InetAddress thriftAddress = cluster.getInstanceMatching(RolePredicates.role( + HBaseThriftServerClusterActionHandler.ROLE)).getPublicAddress(); + + while (true) { + try { + getScanner(thriftAddress); + break; + } catch (Exception e) { + try { + System.out.print("."); + Thread.sleep(1000); + } catch (InterruptedException ex) { + break; + } + } + } + System.out.println(); + LOG.info("Master reported in. Continuing."); + } + + private void getScanner(InetAddress thriftAddress) throws Exception { + TTransport transport = new TSocket(thriftAddress.getHostName(), + HBaseThriftServerClusterActionHandler.PORT); + transport.open(); + LOG.info("Connected to thrift server."); + LOG.info("Waiting for .META. table..."); + TProtocol protocol = new TBinaryProtocol(transport, true, true); + Hbase.Client client = new Hbase.Client(protocol); + int scannerId = client.scannerOpen(HConstants.META_TABLE_NAME, + Bytes.toBytes(""), null); + client.scannerClose(scannerId); + thriftClient = client; + } + + public synchronized void shutdown() throws IOException, InterruptedException { + LOG.info("Shutting down cluster..."); + if (proxy != null) { + proxy.stop(); + } + if (controller != null) { + controller.destroyCluster(clusterSpec); + } + running = false; + } + + public Hbase.Client getThriftClient() { + return thriftClient; + } +} Propchange: whirr/trunk/services/hbase-oldtests/src/test/java/org/apache/whirr/service/hbase/integration/HBaseOldServiceController.java ------------------------------------------------------------------------------ svn:eol-style = native Added: whirr/trunk/services/hbase-oldtests/src/test/java/org/apache/whirr/service/hbase/integration/HBaseOldServiceTest.java URL: http://svn.apache.org/viewvc/whirr/trunk/services/hbase-oldtests/src/test/java/org/apache/whirr/service/hbase/integration/HBaseOldServiceTest.java?rev=1372995&view=auto ============================================================================== --- whirr/trunk/services/hbase-oldtests/src/test/java/org/apache/whirr/service/hbase/integration/HBaseOldServiceTest.java (added) +++ whirr/trunk/services/hbase-oldtests/src/test/java/org/apache/whirr/service/hbase/integration/HBaseOldServiceTest.java Tue Aug 14 17:43:47 2012 @@ -0,0 +1,84 @@ +/** + * 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. + */ + +package org.apache.whirr.service.hbase.integration; + +import com.google.common.collect.Lists; +import org.apache.hadoop.hbase.thrift.generated.ColumnDescriptor; +import org.apache.hadoop.hbase.thrift.generated.Hbase; +import org.apache.hadoop.hbase.thrift.generated.Mutation; +import org.apache.hadoop.hbase.thrift.generated.TRowResult; +import org.apache.hadoop.hbase.util.Bytes; +import org.apache.whirr.TestConstants; +import org.junit.AfterClass; +import org.junit.Test; + +import java.util.ArrayList; +import java.util.List; + +import static org.hamcrest.Matchers.is; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; + +public abstract class HBaseOldServiceTest { + + private static final byte[] FIRST = Bytes.toBytes(""); + private static final byte[] TABLE = Bytes.toBytes("testtable"); + private static final byte[] ROW = Bytes.toBytes("testRow"); + private static final byte[] FAMILY1 = Bytes.toBytes("testFamily1"); + private static final byte[] FAMILY2 = Bytes.toBytes("testFamily2"); + private static final byte[] COLUMN = Bytes.toBytes("testFamily1:testColumn"); + private static final byte[] VALUE = Bytes.toBytes("testValue"); + + protected static HBaseOldServiceController controller; + + @AfterClass + public static void tearDown() throws Exception { + controller.shutdown(); + } + + @Test(timeout = TestConstants.ITEST_TIMEOUT) + public void test() throws Exception { + ArrayList<ColumnDescriptor> columns = new ArrayList<ColumnDescriptor>(); + ColumnDescriptor cd = new ColumnDescriptor(); + cd.name = FAMILY1; + columns.add(cd); + cd = new ColumnDescriptor(); + cd.name = FAMILY2; + columns.add(cd); + + Hbase.Client client = controller.getThriftClient(); + client.createTable(TABLE, columns); + + ArrayList<Mutation> mutations = new ArrayList<Mutation>(); + mutations.add(new Mutation(false, COLUMN, VALUE)); + client.mutateRow(TABLE, ROW, mutations); + + int scan1 = client.scannerOpen(TABLE, FIRST, Lists.newArrayList(FAMILY1)); + List<TRowResult> rows = client.scannerGet(scan1); + assertThat(rows.size(), is(1)); + assertThat(Bytes.toString(rows.get(0).getRow()), is("testRow")); + assertTrue("No more rows", client.scannerGet(scan1).isEmpty()); + client.scannerClose(scan1); + + int scan2 = client.scannerOpen(TABLE, FIRST, Lists.newArrayList(FAMILY2)); + assertTrue("No more rows", client.scannerGet(scan2).isEmpty()); + client.scannerClose(scan2); + } + +} Propchange: whirr/trunk/services/hbase-oldtests/src/test/java/org/apache/whirr/service/hbase/integration/HBaseOldServiceTest.java ------------------------------------------------------------------------------ svn:eol-style = native Added: whirr/trunk/services/hbase-oldtests/src/test/resources/log4j.xml URL: http://svn.apache.org/viewvc/whirr/trunk/services/hbase-oldtests/src/test/resources/log4j.xml?rev=1372995&view=auto ============================================================================== --- whirr/trunk/services/hbase-oldtests/src/test/resources/log4j.xml (added) +++ whirr/trunk/services/hbase-oldtests/src/test/resources/log4j.xml Tue Aug 14 17:43:47 2012 @@ -0,0 +1,216 @@ +<?xml version="1.0" encoding="UTF-8"?> + <!-- + 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. + --> +<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> + + <!-- + For more configuration infromation and examples see the Apache + Log4j website: http://logging.apache.org/log4j/ + --> +<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" + debug="false"> + + <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender"> + <param name="Threshold" value="INFO" /> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d %-5p [%c] (%t) %m%n"/> + </layout> + </appender> + + <!-- A time/date based rolling appender --> + <appender name="WIREFILE" class="org.apache.log4j.DailyRollingFileAppender"> + <param name="File" value="target/test-data/jclouds-wire.log" /> + <param name="Append" value="true" /> + + <!-- Rollover at midnight each day --> + <param name="DatePattern" value="'.'yyyy-MM-dd" /> + + <param name="Threshold" value="TRACE" /> + + <layout class="org.apache.log4j.PatternLayout"> + <!-- The default pattern: Date Priority [Category] Message\n --> + <param name="ConversionPattern" value="%d %-5p [%c] (%t) %m%n" /> + + <!-- + The full pattern: Date MS Priority [Category] + (Thread:NDC) Message\n <param name="ConversionPattern" + value="%d %-5r %-5p [%c] (%t:%x) %m%n"/> + --> + </layout> + </appender> + + <!-- A time/date based rolling appender --> + <appender name="FILE" class="org.apache.log4j.DailyRollingFileAppender"> + <param name="File" value="target/test-data/jclouds.log" /> + <param name="Append" value="true" /> + + <!-- Rollover at midnight each day --> + <param name="DatePattern" value="'.'yyyy-MM-dd" /> + + <param name="Threshold" value="TRACE" /> + + <layout class="org.apache.log4j.PatternLayout"> + <!-- The default pattern: Date Priority [Category] Message\n --> + <param name="ConversionPattern" value="%d %-5p [%c] (%t) %m%n" /> + + <!-- + The full pattern: Date MS Priority [Category] + (Thread:NDC) Message\n <param name="ConversionPattern" + value="%d %-5r %-5p [%c] (%t:%x) %m%n"/> + --> + </layout> + </appender> + + <!-- A time/date based rolling appender --> + <appender name="BLOBSTOREFILE" class="org.apache.log4j.DailyRollingFileAppender"> + <param name="File" value="target/test-data/jclouds-blobstore.log" /> + <param name="Append" value="true" /> + <param name="DatePattern" value="'.'yyyy-MM-dd" /> + <param name="Threshold" value="TRACE" /> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d %-5p [%c] (%t) %m%n" /> + </layout> + </appender> + + + <!-- A time/date based rolling appender --> + <appender name="COMPUTEFILE" class="org.apache.log4j.DailyRollingFileAppender"> + <param name="File" value="target/test-data/jclouds-compute.log" /> + <param name="Append" value="true" /> + + <!-- Rollover at midnight each day --> + <param name="DatePattern" value="'.'yyyy-MM-dd" /> + + <param name="Threshold" value="TRACE" /> + + <layout class="org.apache.log4j.PatternLayout"> + <!-- The default pattern: Date Priority [Category] Message\n --> + <param name="ConversionPattern" value="%d %-5p [%c] (%t) %m%n" /> + + <!-- + The full pattern: Date MS Priority [Category] + (Thread:NDC) Message\n <param name="ConversionPattern" + value="%d %-5r %-5p [%c] (%t:%x) %m%n"/> + --> + </layout> + </appender> + + <!-- A time/date based rolling appender --> + <appender name="WHIRRFILE" class="org.apache.log4j.DailyRollingFileAppender"> + <param name="File" value="target/test-data/whirr.log" /> + <param name="Append" value="true" /> + + <!-- Rollover at midnight each day --> + <param name="DatePattern" value="'.'yyyy-MM-dd" /> + + <param name="Threshold" value="TRACE" /> + + <layout class="org.apache.log4j.PatternLayout"> + <!-- The default pattern: Date Priority [Category] Message\n --> + <param name="ConversionPattern" value="%d %-5p [%c] (%t) %m%n" /> + + <!-- + The full pattern: Date MS Priority [Category] + (Thread:NDC) Message\n <param name="ConversionPattern" + value="%d %-5r %-5p [%c] (%t:%x) %m%n"/> + --> + </layout> + </appender> + + <!-- A time/date based rolling appender --> + <appender name="SSHFILE" class="org.apache.log4j.DailyRollingFileAppender"> + <param name="File" value="target/test-data/jclouds-ssh.log" /> + <param name="Append" value="true" /> + <param name="DatePattern" value="'.'yyyy-MM-dd" /> + <param name="Threshold" value="TRACE" /> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d %-5p [%c] (%t) %m%n" /> + </layout> + </appender> + + <appender name="ASYNCCOMPUTE" class="org.apache.log4j.AsyncAppender"> + <appender-ref ref="COMPUTEFILE" /> + </appender> + <appender name="ASYNC" class="org.apache.log4j.AsyncAppender"> + <appender-ref ref="FILE" /> + </appender> + + <appender name="ASYNCWIRE" class="org.apache.log4j.AsyncAppender"> + <appender-ref ref="WIREFILE" /> + </appender> + + <appender name="ASYNCBLOBSTORE" class="org.apache.log4j.AsyncAppender"> + <appender-ref ref="BLOBSTOREFILE" /> + </appender> + + <appender name="ASYNCSSH" class="org.apache.log4j.AsyncAppender"> + <appender-ref ref="SSHFILE" /> + </appender> + <!-- ================ --> + <!-- Limit categories --> + <!-- ================ --> + <category name="jclouds.blobstore"> + <priority value="DEBUG" /> + <appender-ref ref="ASYNCBLOBSTORE" /> + </category> + + <category name="org.jclouds"> + <priority value="DEBUG" /> + <appender-ref ref="ASYNC" /> + </category> + + <category name="org.apache.whirr"> + <priority value="DEBUG" /> + <appender-ref ref="WHIRRFILE" /> + </category> + + <category name="jclouds.headers"> + <priority value="DEBUG" /> + <appender-ref ref="ASYNCWIRE" /> + </category> + <category name="jclouds.compute"> + <priority value="DEBUG" /> + <appender-ref ref="ASYNCCOMPUTE" /> + </category> + + <category name="jclouds.ssh"> + <priority value="TRACE" /> + <appender-ref ref="ASYNCSSH" /> + </category> + + <category name="jclouds.wire"> + <priority value="DEBUG" /> + <appender-ref ref="ASYNCWIRE" /> + </category><!-- + + <category name="jclouds.signature"> + <priority value="DEBUG" /> + <appender-ref ref="ASYNCWIRE" /> + </category> + + + --><!-- ======================= --> + <!-- Setup the Root category --> + <!-- ======================= --> + + <root> + <priority value="WARN" /> + <appender-ref ref="CONSOLE" /> + </root> + +</log4j:configuration> Propchange: whirr/trunk/services/hbase-oldtests/src/test/resources/log4j.xml ------------------------------------------------------------------------------ svn:eol-style = native Added: whirr/trunk/services/hbase-oldtests/src/test/resources/whirr-hbase-0.90-singlenode-test.properties URL: http://svn.apache.org/viewvc/whirr/trunk/services/hbase-oldtests/src/test/resources/whirr-hbase-0.90-singlenode-test.properties?rev=1372995&view=auto ============================================================================== --- whirr/trunk/services/hbase-oldtests/src/test/resources/whirr-hbase-0.90-singlenode-test.properties (added) +++ whirr/trunk/services/hbase-oldtests/src/test/resources/whirr-hbase-0.90-singlenode-test.properties Tue Aug 14 17:43:47 2012 @@ -0,0 +1,28 @@ +# +# 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. +# +whirr.cluster-name=hbase-0-90-single-node-itest-${sys:whirr.test.provider}-${sys:user.name} +whirr.instance-templates=1 hadoop-namenode+hadoop-jobtracker+zookeeper+hbase-master+hbase-thriftserver+hadoop-datanode+hadoop-tasktracker+hbase-regionserver + +whirr.provider=${sys:whirr.test.provider} +whirr.identity=${sys:whirr.test.identity} +whirr.credential=${sys:whirr.test.credential} + +whirr.hardware-min-ram=4096 + +whirr.hbase.tarball.url=http://apache.osuosl.org/hbase/hbase-0.90.5/hbase-0.90.5.tar.gz +whirr.hadoop.tarball.url=http://archive.cloudera.com/cdh/3/hadoop-0.20.2-cdh3u0.tar.gz Propchange: whirr/trunk/services/hbase-oldtests/src/test/resources/whirr-hbase-0.90-singlenode-test.properties ------------------------------------------------------------------------------ svn:eol-style = native Added: whirr/trunk/services/hbase-oldtests/src/test/resources/whirr-hbase-0.90-test.properties URL: http://svn.apache.org/viewvc/whirr/trunk/services/hbase-oldtests/src/test/resources/whirr-hbase-0.90-test.properties?rev=1372995&view=auto ============================================================================== --- whirr/trunk/services/hbase-oldtests/src/test/resources/whirr-hbase-0.90-test.properties (added) +++ whirr/trunk/services/hbase-oldtests/src/test/resources/whirr-hbase-0.90-test.properties Tue Aug 14 17:43:47 2012 @@ -0,0 +1,28 @@ +# +# 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. +# +whirr.cluster-name=hbase-0-90-itest-${sys:whirr.test.provider}-${sys:user.name} +whirr.instance-templates=1 hadoop-namenode+hadoop-jobtracker+zookeeper+hbase-master+hbase-thriftserver,1 hadoop-datanode+hadoop-tasktracker+hbase-regionserver + +whirr.provider=${sys:whirr.test.provider} +whirr.identity=${sys:whirr.test.identity} +whirr.credential=${sys:whirr.test.credential} + +whirr.hbase.tarball.url=http://apache.osuosl.org/hbase/hbase-0.90.5/hbase-0.90.5.tar.gz +whirr.hadoop.tarball.url=http://archive.cloudera.com/cdh/3/hadoop-0.20.2-cdh3u0.tar.gz + + Propchange: whirr/trunk/services/hbase-oldtests/src/test/resources/whirr-hbase-0.90-test.properties ------------------------------------------------------------------------------ svn:eol-style = native Added: whirr/trunk/services/hbase/src/test/java/org/apache/whirr/service/hbase/integration/HBase092ServiceTest.java URL: http://svn.apache.org/viewvc/whirr/trunk/services/hbase/src/test/java/org/apache/whirr/service/hbase/integration/HBase092ServiceTest.java?rev=1372995&view=auto ============================================================================== --- whirr/trunk/services/hbase/src/test/java/org/apache/whirr/service/hbase/integration/HBase092ServiceTest.java (added) +++ whirr/trunk/services/hbase/src/test/java/org/apache/whirr/service/hbase/integration/HBase092ServiceTest.java Tue Aug 14 17:43:47 2012 @@ -0,0 +1,29 @@ +/** + * 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. + */ + +package org.apache.whirr.service.hbase.integration; + +import org.junit.BeforeClass; + +public class HBase092ServiceTest extends HBaseServiceTest { + @BeforeClass + public static void setUp() throws Exception { + controller = HBaseServiceController.getInstance("whirr-hbase-0.92-test.properties"); + controller.ensureClusterRunning(); + } +} Propchange: whirr/trunk/services/hbase/src/test/java/org/apache/whirr/service/hbase/integration/HBase092ServiceTest.java ------------------------------------------------------------------------------ svn:eol-style = native Added: whirr/trunk/services/hbase/src/test/java/org/apache/whirr/service/hbase/integration/HBase092SingleNodeServiceTest.java URL: http://svn.apache.org/viewvc/whirr/trunk/services/hbase/src/test/java/org/apache/whirr/service/hbase/integration/HBase092SingleNodeServiceTest.java?rev=1372995&view=auto ============================================================================== --- whirr/trunk/services/hbase/src/test/java/org/apache/whirr/service/hbase/integration/HBase092SingleNodeServiceTest.java (added) +++ whirr/trunk/services/hbase/src/test/java/org/apache/whirr/service/hbase/integration/HBase092SingleNodeServiceTest.java Tue Aug 14 17:43:47 2012 @@ -0,0 +1,29 @@ +/** + * 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. + */ + +package org.apache.whirr.service.hbase.integration; + +import org.junit.BeforeClass; + +public class HBase092SingleNodeServiceTest extends HBaseServiceTest { + @BeforeClass + public static void setUp() throws Exception { + controller = HBaseServiceController.getInstance("whirr-hbase-0.92-singlenode-test.properties"); + controller.ensureClusterRunning(); + } +} Propchange: whirr/trunk/services/hbase/src/test/java/org/apache/whirr/service/hbase/integration/HBase092SingleNodeServiceTest.java ------------------------------------------------------------------------------ svn:eol-style = native Added: whirr/trunk/services/hbase/src/test/resources/whirr-hbase-0.92-singlenode-test.properties URL: http://svn.apache.org/viewvc/whirr/trunk/services/hbase/src/test/resources/whirr-hbase-0.92-singlenode-test.properties?rev=1372995&view=auto ============================================================================== --- whirr/trunk/services/hbase/src/test/resources/whirr-hbase-0.92-singlenode-test.properties (added) +++ whirr/trunk/services/hbase/src/test/resources/whirr-hbase-0.92-singlenode-test.properties Tue Aug 14 17:43:47 2012 @@ -0,0 +1,28 @@ +# +# 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. +# +whirr.cluster-name=hbase-0-92-single-node-itest-${sys:whirr.test.provider}-${sys:user.name} +whirr.instance-templates=1 hadoop-namenode+hadoop-jobtracker+zookeeper+hbase-master+hbase-thriftserver+hadoop-datanode+hadoop-tasktracker+hbase-regionserver + +whirr.provider=${sys:whirr.test.provider} +whirr.identity=${sys:whirr.test.identity} +whirr.credential=${sys:whirr.test.credential} + +whirr.hardware-min-ram=4096 + +whirr.hbase.tarball.url=http://apache.osuosl.org/hbase/hbase-0.92.1/hbase-0.92.1.tar.gz +whirr.hadoop.tarball.url=http://apache.osuosl.org/hadoop/common/hadoop-1.0.3/hadoop-1.0.3.tar.gz Propchange: whirr/trunk/services/hbase/src/test/resources/whirr-hbase-0.92-singlenode-test.properties ------------------------------------------------------------------------------ svn:eol-style = native Added: whirr/trunk/services/hbase/src/test/resources/whirr-hbase-0.92-test.properties URL: http://svn.apache.org/viewvc/whirr/trunk/services/hbase/src/test/resources/whirr-hbase-0.92-test.properties?rev=1372995&view=auto ============================================================================== --- whirr/trunk/services/hbase/src/test/resources/whirr-hbase-0.92-test.properties (added) +++ whirr/trunk/services/hbase/src/test/resources/whirr-hbase-0.92-test.properties Tue Aug 14 17:43:47 2012 @@ -0,0 +1,28 @@ +# +# 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. +# +whirr.cluster-name=hbase-0-92-itest-${sys:whirr.test.provider}-${sys:user.name} +whirr.instance-templates=1 hadoop-namenode+hadoop-jobtracker+zookeeper+hbase-master+hbase-thriftserver,1 hadoop-datanode+hadoop-tasktracker+hbase-regionserver + +whirr.provider=${sys:whirr.test.provider} +whirr.identity=${sys:whirr.test.identity} +whirr.credential=${sys:whirr.test.credential} + +whirr.hbase.tarball.url=http://apache.osuosl.org/hbase/hbase-0.92.1/hbase-0.92.1.tar.gz +whirr.hadoop.tarball.url=http://apache.osuosl.org/hadoop/common/hadoop-1.0.3/hadoop-1.0.3.tar.gz + + Propchange: whirr/trunk/services/hbase/src/test/resources/whirr-hbase-0.92-test.properties ------------------------------------------------------------------------------ svn:eol-style = native