Permalink
Browse files

WHIRR-211. Fix checkstyle errors for 0.3.0.

git-svn-id: https://svn.apache.org/repos/asf/incubator/whirr/trunk@1059499 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent 72b70f9 commit afdb5aed5df28978b39ae85357d572029cc73df2 Thomas White committed Jan 16, 2011
View
@@ -118,6 +118,8 @@ Trunk (unreleased changes)
WHIRR-210. Remove unneeded dependent libraries. (tomwhite)
+ WHIRR-211. Fix checkstyle errors for 0.3.0. (tomwhite)
+
Release 0.2.0 - 2010-11-04
NEW FEATURES
@@ -20,7 +20,6 @@
import static org.apache.whirr.service.ClusterSpec.Property.CLUSTER_NAME;
import static org.apache.whirr.service.ClusterSpec.Property.IDENTITY;
-import static org.apache.whirr.service.ClusterSpec.Property.SERVICE_NAME;
import java.util.EnumSet;
import java.util.Map;
@@ -35,7 +35,6 @@
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
-import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -27,7 +27,6 @@
import java.util.Set;
import org.apache.cassandra.thrift.Cassandra;
-import org.apache.cassandra.thrift.TokenRange;
import org.apache.commons.configuration.CompositeConfiguration;
import org.apache.commons.configuration.PropertiesConfiguration;
import org.apache.thrift.TException;
@@ -40,7 +39,6 @@
import org.apache.whirr.service.ClusterSpec;
import org.apache.whirr.service.Service;
import org.apache.whirr.service.cassandra.CassandraClusterActionHandler;
-import org.apache.whirr.ssh.KeyPair;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -19,7 +19,6 @@
package org.apache.whirr.service.hadoop.integration;
import java.io.IOException;
-import java.util.Map;
import java.util.Map.Entry;
import org.apache.commons.configuration.CompositeConfiguration;
@@ -35,7 +34,6 @@
import org.apache.whirr.service.ClusterSpec;
import org.apache.whirr.service.Service;
import org.apache.whirr.service.hadoop.HadoopProxy;
-import org.apache.whirr.ssh.KeyPair;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -18,16 +18,20 @@
package org.apache.whirr.service.hbase;
-import org.apache.whirr.net.DnsUtil;
-import org.apache.whirr.service.*;
-import org.apache.whirr.service.jclouds.FirewallSettings;
-import org.apache.whirr.service.zookeeper.ZooKeeperCluster;
-import org.jclouds.compute.ComputeServiceContext;
+import static org.apache.whirr.service.RolePredicates.role;
import java.io.IOException;
import java.net.InetAddress;
-import static org.apache.whirr.service.RolePredicates.role;
+import org.apache.whirr.net.DnsUtil;
+import org.apache.whirr.service.Cluster;
+import org.apache.whirr.service.ClusterActionEvent;
+import org.apache.whirr.service.ClusterActionHandlerSupport;
+import org.apache.whirr.service.ClusterSpec;
+import org.apache.whirr.service.ComputeServiceContextBuilder;
+import org.apache.whirr.service.jclouds.FirewallSettings;
+import org.apache.whirr.service.zookeeper.ZooKeeperCluster;
+import org.jclouds.compute.ComputeServiceContext;
/**
* Provides a base class for servers like REST or Avro.
@@ -18,27 +18,32 @@
package org.apache.whirr.service.hbase;
+import static org.apache.whirr.service.RolePredicates.role;
+
import com.google.common.base.Charsets;
import com.google.common.base.Joiner;
import com.google.common.io.Files;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.util.Map.Entry;
+import java.util.Properties;
+
import org.apache.whirr.net.DnsUtil;
-import org.apache.whirr.service.*;
+import org.apache.whirr.service.Cluster;
import org.apache.whirr.service.Cluster.Instance;
+import org.apache.whirr.service.ClusterActionEvent;
+import org.apache.whirr.service.ClusterActionHandlerSupport;
+import org.apache.whirr.service.ClusterSpec;
+import org.apache.whirr.service.ComputeServiceContextBuilder;
import org.apache.whirr.service.hadoop.HadoopProxy;
import org.apache.whirr.service.jclouds.FirewallSettings;
import org.apache.whirr.service.zookeeper.ZooKeeperCluster;
import org.jclouds.compute.ComputeServiceContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import java.io.File;
-import java.io.IOException;
-import java.net.InetAddress;
-import java.util.Map.Entry;
-import java.util.Properties;
-
-import static org.apache.whirr.service.RolePredicates.role;
-
public class HBaseMasterClusterActionHandler extends ClusterActionHandlerSupport {
private static final Logger LOG =
@@ -18,18 +18,22 @@
package org.apache.whirr.service.hbase;
+import static org.apache.whirr.service.RolePredicates.role;
+
+import java.io.IOException;
+import java.net.InetAddress;
+
import org.apache.whirr.net.DnsUtil;
-import org.apache.whirr.service.*;
+import org.apache.whirr.service.Cluster;
import org.apache.whirr.service.Cluster.Instance;
+import org.apache.whirr.service.ClusterActionEvent;
+import org.apache.whirr.service.ClusterActionHandlerSupport;
+import org.apache.whirr.service.ClusterSpec;
+import org.apache.whirr.service.ComputeServiceContextBuilder;
import org.apache.whirr.service.jclouds.FirewallSettings;
import org.apache.whirr.service.zookeeper.ZooKeeperCluster;
import org.jclouds.compute.ComputeServiceContext;
-import java.io.IOException;
-import java.net.InetAddress;
-
-import static org.apache.whirr.service.RolePredicates.role;
-
public class HBaseRegionServerClusterActionHandler extends ClusterActionHandlerSupport {
public static final String ROLE = "hbase-regionserver";
@@ -29,12 +29,10 @@
import org.apache.whirr.service.ClusterSpec;
import org.apache.whirr.service.Service;
import org.apache.whirr.service.hadoop.HadoopProxy;
-import org.apache.whirr.ssh.KeyPair;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.IOException;
-import java.util.Map;
import java.util.Map.Entry;
public class HBaseServiceController {
@@ -18,24 +18,26 @@
package org.apache.whirr.service.hbase.integration;
+import static org.junit.Assert.assertTrue;
+
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.HBaseTestingUtility;
-import org.apache.hadoop.hbase.client.*;
+import org.apache.hadoop.hbase.client.HTable;
+import org.apache.hadoop.hbase.client.Put;
+import org.apache.hadoop.hbase.client.Result;
+import org.apache.hadoop.hbase.client.ResultScanner;
+import org.apache.hadoop.hbase.client.Scan;
import org.apache.hadoop.hbase.util.Bytes;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
public class HBaseServiceTest {
- private static byte [] ROW = Bytes.toBytes("testRow");
- private static byte [] FAMILY = Bytes.toBytes("testFamily");
- private static byte [] QUALIFIER = Bytes.toBytes("testQualifier");
- private static byte [] VALUE = Bytes.toBytes("testValue");
+ private static final byte [] ROW = Bytes.toBytes("testRow");
+ private static final byte [] FAMILY = Bytes.toBytes("testFamily");
+ private static final byte [] QUALIFIER = Bytes.toBytes("testQualifier");
+ private static final byte [] VALUE = Bytes.toBytes("testValue");
private static HBaseServiceController controller =
HBaseServiceController.getInstance();
@@ -54,13 +56,13 @@ public static void tearDown() throws Exception {
public void test() throws Exception {
Configuration conf = controller.getConfiguration();
HBaseTestingUtility testUtil = new HBaseTestingUtility(conf);
- byte [] TABLE = Bytes.toBytes("testtable");
- HTable ht = testUtil.createTable(TABLE, FAMILY);
+ byte [] table = Bytes.toBytes("testtable");
+ HTable ht = testUtil.createTable(table, FAMILY);
Put put = new Put(ROW);
put.add(FAMILY, QUALIFIER, VALUE);
ht.put(put);
Scan scan = new Scan();
- scan.addColumn(FAMILY, TABLE);
+ scan.addColumn(FAMILY, table);
ResultScanner scanner = ht.getScanner(scan);
Result result = scanner.next();
assertTrue("Expected null result", result == null);
@@ -21,7 +21,6 @@
import static junit.framework.Assert.assertEquals;
import java.io.IOException;
-import java.util.Map;
import java.util.concurrent.CountDownLatch;
import org.apache.commons.configuration.CompositeConfiguration;
@@ -30,7 +29,6 @@
import org.apache.whirr.service.ClusterSpec;
import org.apache.whirr.service.Service;
import org.apache.whirr.service.zookeeper.ZooKeeperCluster;
-import org.apache.whirr.ssh.KeyPair;
import org.apache.zookeeper.CreateMode;
import org.apache.zookeeper.WatchedEvent;
import org.apache.zookeeper.Watcher;

0 comments on commit afdb5ae

Please sign in to comment.