Updated Branches: refs/heads/ACCUMULO-210 9ae51d7ad -> e1c278467 (forced update)
http://git-wip-us.apache.org/repos/asf/accumulo/blob/88079cc3/server/tserver/pom.xml ---------------------------------------------------------------------- diff --git a/server/tserver/pom.xml b/server/tserver/pom.xml new file mode 100644 index 0000000..a57de79 --- /dev/null +++ b/server/tserver/pom.xml @@ -0,0 +1,130 @@ +<?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. +--> +<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.accumulo</groupId> + <artifactId>accumulo-server-parent</artifactId> + <version>1.6.0-SNAPSHOT</version> + </parent> + <artifactId>accumulo-tserver</artifactId> + <name>Tablet Server</name> + <dependencies> + <dependency> + <groupId>com.beust</groupId> + <artifactId>jcommander</artifactId> + </dependency> + <dependency> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + </dependency> + <dependency> + <groupId>jline</groupId> + <artifactId>jline</artifactId> + </dependency> + <dependency> + <groupId>org.apache.accumulo</groupId> + <artifactId>accumulo-core</artifactId> + </dependency> + <dependency> + <groupId>org.apache.accumulo</groupId> + <artifactId>accumulo-fate</artifactId> + </dependency> + <dependency> + <groupId>org.apache.accumulo</groupId> + <artifactId>accumulo-server-base</artifactId> + </dependency> + <dependency> + <groupId>org.apache.accumulo</groupId> + <artifactId>accumulo-start</artifactId> + </dependency> + <dependency> + <groupId>org.apache.accumulo</groupId> + <artifactId>accumulo-trace</artifactId> + </dependency> + <dependency> + <groupId>org.apache.thrift</groupId> + <artifactId>libthrift</artifactId> + </dependency> + <dependency> + <groupId>commons-codec</groupId> + <artifactId>commons-codec</artifactId> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>commons-collections</groupId> + <artifactId>commons-collections</artifactId> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>commons-configuration</groupId> + <artifactId>commons-configuration</artifactId> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>commons-io</groupId> + <artifactId>commons-io</artifactId> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.apache.hadoop</groupId> + <artifactId>hadoop-client</artifactId> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.apache.zookeeper</groupId> + <artifactId>zookeeper</artifactId> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.mortbay.jetty</groupId> + <artifactId>jetty</artifactId> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + <scope>test</scope> + </dependency> + </dependencies> +</project> http://git-wip-us.apache.org/repos/asf/accumulo/blob/88079cc3/test/src/main/java/org/apache/accumulo/test/GetMasterStats.java ---------------------------------------------------------------------- diff --git a/test/src/main/java/org/apache/accumulo/test/GetMasterStats.java b/test/src/main/java/org/apache/accumulo/test/GetMasterStats.java index a2337dc..5ec13f3 100644 --- a/test/src/main/java/org/apache/accumulo/test/GetMasterStats.java +++ b/test/src/main/java/org/apache/accumulo/test/GetMasterStats.java @@ -25,9 +25,9 @@ import org.apache.accumulo.core.master.thrift.MasterMonitorInfo; import org.apache.accumulo.core.master.thrift.RecoveryStatus; import org.apache.accumulo.core.master.thrift.TableInfo; import org.apache.accumulo.core.master.thrift.TabletServerStatus; -import org.apache.accumulo.monitor.Monitor; import org.apache.accumulo.server.client.HdfsZooInstance; import org.apache.accumulo.server.security.SystemCredentials; +import org.apache.accumulo.server.util.TableInfoUtil; import org.apache.accumulo.trace.instrument.Tracer; public class GetMasterStats { @@ -75,7 +75,7 @@ public class GetMasterStats { out(0, "Tablet Servers"); long now = System.currentTimeMillis(); for (TabletServerStatus server : stats.tServerInfo) { - TableInfo summary = Monitor.summarizeTableStats(server); + TableInfo summary = TableInfoUtil.summarizeTableStats(server); out(1, "Name: %s", server.name); out(2, "Ingest: %.2f", summary.ingestRate); out(2, "Last Contact: %s", server.lastContact); http://git-wip-us.apache.org/repos/asf/accumulo/blob/88079cc3/test/src/main/java/org/apache/accumulo/test/continuous/ContinuousStatsCollector.java ---------------------------------------------------------------------- diff --git a/test/src/main/java/org/apache/accumulo/test/continuous/ContinuousStatsCollector.java b/test/src/main/java/org/apache/accumulo/test/continuous/ContinuousStatsCollector.java index 006b0f7..f8cb0a8 100644 --- a/test/src/main/java/org/apache/accumulo/test/continuous/ContinuousStatsCollector.java +++ b/test/src/main/java/org/apache/accumulo/test/continuous/ContinuousStatsCollector.java @@ -40,12 +40,12 @@ import org.apache.accumulo.core.metadata.MetadataTable; import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.DataFileColumnFamily; import org.apache.accumulo.core.util.CachedConfiguration; import org.apache.accumulo.core.util.Stat; -import org.apache.accumulo.monitor.Monitor; import org.apache.accumulo.server.ServerConstants; import org.apache.accumulo.server.cli.ClientOnRequiredTable; import org.apache.accumulo.server.fs.VolumeManager; import org.apache.accumulo.server.fs.VolumeManagerImpl; import org.apache.accumulo.server.security.SystemCredentials; +import org.apache.accumulo.server.util.TableInfoUtil; import org.apache.accumulo.trace.instrument.Tracer; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.ContentSummary; @@ -146,8 +146,8 @@ public class ContinuousStatsCollector { tableSummary = new TableInfo(); tableSummaries.put(info.getKey(), tableSummary); } - Monitor.add(tableSummary, info.getValue()); - Monitor.add(all, info.getValue()); + TableInfoUtil.add(tableSummary, info.getValue()); + TableInfoUtil.add(all, info.getValue()); } } http://git-wip-us.apache.org/repos/asf/accumulo/blob/88079cc3/test/src/main/java/org/apache/accumulo/test/functional/SplitRecoveryTest.java ---------------------------------------------------------------------- diff --git a/test/src/main/java/org/apache/accumulo/test/functional/SplitRecoveryTest.java b/test/src/main/java/org/apache/accumulo/test/functional/SplitRecoveryTest.java index e8724e3..f39ecf8 100644 --- a/test/src/main/java/org/apache/accumulo/test/functional/SplitRecoveryTest.java +++ b/test/src/main/java/org/apache/accumulo/test/functional/SplitRecoveryTest.java @@ -47,11 +47,11 @@ import org.apache.accumulo.fate.zookeeper.IZooReaderWriter; import org.apache.accumulo.fate.zookeeper.ZooLock.LockLossReason; import org.apache.accumulo.fate.zookeeper.ZooLock.LockWatcher; import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeExistsPolicy; +import org.apache.accumulo.master.state.Assignment; +import org.apache.accumulo.master.state.TServerInstance; import org.apache.accumulo.server.ServerConstants; import org.apache.accumulo.server.client.HdfsZooInstance; import org.apache.accumulo.server.fs.FileRef; -import org.apache.accumulo.server.master.state.Assignment; -import org.apache.accumulo.server.master.state.TServerInstance; import org.apache.accumulo.server.security.SystemCredentials; import org.apache.accumulo.server.tabletserver.TabletServer; import org.apache.accumulo.server.tabletserver.TabletTime; http://git-wip-us.apache.org/repos/asf/accumulo/blob/88079cc3/test/src/main/java/org/apache/accumulo/test/performance/metadata/MetadataBatchScanTest.java ---------------------------------------------------------------------- diff --git a/test/src/main/java/org/apache/accumulo/test/performance/metadata/MetadataBatchScanTest.java b/test/src/main/java/org/apache/accumulo/test/performance/metadata/MetadataBatchScanTest.java index 3545170..38a2e6d 100644 --- a/test/src/main/java/org/apache/accumulo/test/performance/metadata/MetadataBatchScanTest.java +++ b/test/src/main/java/org/apache/accumulo/test/performance/metadata/MetadataBatchScanTest.java @@ -41,7 +41,7 @@ import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.Da import org.apache.accumulo.core.security.Authorizations; import org.apache.accumulo.core.util.AddressUtil; import org.apache.accumulo.core.util.Stat; -import org.apache.accumulo.server.master.state.TServerInstance; +import org.apache.accumulo.master.state.TServerInstance; import org.apache.accumulo.server.security.SystemCredentials; import org.apache.hadoop.io.Text; http://git-wip-us.apache.org/repos/asf/accumulo/blob/88079cc3/test/src/main/java/org/apache/accumulo/test/performance/thrift/NullTserver.java ---------------------------------------------------------------------- diff --git a/test/src/main/java/org/apache/accumulo/test/performance/thrift/NullTserver.java b/test/src/main/java/org/apache/accumulo/test/performance/thrift/NullTserver.java index cd1b1a3..0ff0948 100644 --- a/test/src/main/java/org/apache/accumulo/test/performance/thrift/NullTserver.java +++ b/test/src/main/java/org/apache/accumulo/test/performance/thrift/NullTserver.java @@ -59,13 +59,13 @@ import org.apache.accumulo.core.tabletserver.thrift.TabletClientService.Iface; import org.apache.accumulo.core.tabletserver.thrift.TabletClientService.Processor; import org.apache.accumulo.core.tabletserver.thrift.TabletStats; import org.apache.accumulo.core.util.UtilWaitThread; +import org.apache.accumulo.master.state.Assignment; +import org.apache.accumulo.master.state.MetaDataStateStore; +import org.apache.accumulo.master.state.MetaDataTableScanner; +import org.apache.accumulo.master.state.TServerInstance; +import org.apache.accumulo.master.state.TabletLocationState; import org.apache.accumulo.server.client.ClientServiceHandler; import org.apache.accumulo.server.client.HdfsZooInstance; -import org.apache.accumulo.server.master.state.Assignment; -import org.apache.accumulo.server.master.state.MetaDataStateStore; -import org.apache.accumulo.server.master.state.MetaDataTableScanner; -import org.apache.accumulo.server.master.state.TServerInstance; -import org.apache.accumulo.server.master.state.TabletLocationState; import org.apache.accumulo.server.security.SystemCredentials; import org.apache.accumulo.server.util.TServerUtils; import org.apache.accumulo.server.zookeeper.TransactionWatcher; http://git-wip-us.apache.org/repos/asf/accumulo/blob/88079cc3/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Shutdown.java ---------------------------------------------------------------------- diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Shutdown.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Shutdown.java index 62d298f..657a604 100644 --- a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Shutdown.java +++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Shutdown.java @@ -23,8 +23,8 @@ import org.apache.accumulo.core.client.impl.MasterClient; import org.apache.accumulo.core.master.thrift.MasterClientService.Client; import org.apache.accumulo.core.master.thrift.MasterGoalState; import org.apache.accumulo.core.util.UtilWaitThread; +import org.apache.accumulo.master.state.SetGoalState; import org.apache.accumulo.server.client.HdfsZooInstance; -import org.apache.accumulo.server.master.state.SetGoalState; import org.apache.accumulo.server.security.SystemCredentials; import org.apache.accumulo.test.randomwalk.State; import org.apache.accumulo.test.randomwalk.Test; http://git-wip-us.apache.org/repos/asf/accumulo/blob/88079cc3/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/StartAll.java ---------------------------------------------------------------------- diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/StartAll.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/StartAll.java index 7d0da11..2427d1e 100644 --- a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/StartAll.java +++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/StartAll.java @@ -24,8 +24,8 @@ import org.apache.accumulo.core.master.thrift.MasterClientService.Client; import org.apache.accumulo.core.master.thrift.MasterGoalState; import org.apache.accumulo.core.master.thrift.MasterMonitorInfo; import org.apache.accumulo.core.util.UtilWaitThread; +import org.apache.accumulo.master.state.SetGoalState; import org.apache.accumulo.server.client.HdfsZooInstance; -import org.apache.accumulo.server.master.state.SetGoalState; import org.apache.accumulo.server.security.SystemCredentials; import org.apache.accumulo.test.randomwalk.State; import org.apache.accumulo.test.randomwalk.Test; http://git-wip-us.apache.org/repos/asf/accumulo/blob/88079cc3/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/StopTabletServer.java ---------------------------------------------------------------------- diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/StopTabletServer.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/StopTabletServer.java index 337d318..e319bb7 100644 --- a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/StopTabletServer.java +++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/StopTabletServer.java @@ -28,7 +28,7 @@ import org.apache.accumulo.core.client.Instance; import org.apache.accumulo.core.util.AddressUtil; import org.apache.accumulo.core.zookeeper.ZooUtil; import org.apache.accumulo.fate.zookeeper.ZooReader; -import org.apache.accumulo.server.master.state.TServerInstance; +import org.apache.accumulo.master.state.TServerInstance; import org.apache.accumulo.test.randomwalk.State; import org.apache.accumulo.test.randomwalk.Test; import org.apache.zookeeper.KeeperException; http://git-wip-us.apache.org/repos/asf/accumulo/blob/88079cc3/test/src/test/java/org/apache/accumulo/test/functional/ChaoticBalancerIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/ChaoticBalancerIT.java b/test/src/test/java/org/apache/accumulo/test/functional/ChaoticBalancerIT.java index 08d2536..11c6766 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/ChaoticBalancerIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/ChaoticBalancerIT.java @@ -23,8 +23,8 @@ import java.util.TreeSet; import org.apache.accumulo.core.client.Connector; import org.apache.accumulo.core.conf.Property; +import org.apache.accumulo.master.balancer.ChaoticLoadBalancer; import org.apache.accumulo.minicluster.MiniAccumuloConfig; -import org.apache.accumulo.server.master.balancer.ChaoticLoadBalancer; import org.apache.accumulo.test.TestIngest; import org.apache.accumulo.test.VerifyIngest; import org.apache.hadoop.io.Text; http://git-wip-us.apache.org/repos/asf/accumulo/blob/88079cc3/test/src/test/java/org/apache/accumulo/test/functional/MasterFailoverIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/MasterFailoverIT.java b/test/src/test/java/org/apache/accumulo/test/functional/MasterFailoverIT.java index f617a20..a6e3162 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/MasterFailoverIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/MasterFailoverIT.java @@ -20,10 +20,10 @@ import java.util.Collections; import org.apache.accumulo.core.client.Connector; import org.apache.accumulo.core.conf.Property; +import org.apache.accumulo.master.Master; import org.apache.accumulo.minicluster.MiniAccumuloConfig; import org.apache.accumulo.minicluster.ProcessReference; import org.apache.accumulo.minicluster.ServerType; -import org.apache.accumulo.server.master.Master; import org.apache.accumulo.test.TestIngest; import org.apache.accumulo.test.VerifyIngest; import org.junit.Test; http://git-wip-us.apache.org/repos/asf/accumulo/blob/88079cc3/test/src/test/java/org/apache/accumulo/test/functional/RestartIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/RestartIT.java b/test/src/test/java/org/apache/accumulo/test/functional/RestartIT.java index 1567d7b..d38378a 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/RestartIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/RestartIT.java @@ -31,10 +31,10 @@ import org.apache.accumulo.core.client.Connector; import org.apache.accumulo.core.conf.Property; import org.apache.accumulo.core.metadata.MetadataTable; import org.apache.accumulo.core.util.UtilWaitThread; +import org.apache.accumulo.gc.SimpleGarbageCollector; import org.apache.accumulo.minicluster.MiniAccumuloConfig; import org.apache.accumulo.minicluster.ProcessReference; import org.apache.accumulo.minicluster.ServerType; -import org.apache.accumulo.server.gc.SimpleGarbageCollector; import org.apache.accumulo.server.util.Admin; import org.apache.accumulo.test.TestIngest; import org.apache.accumulo.test.VerifyIngest; @@ -43,7 +43,7 @@ import org.junit.Test; public class RestartIT extends ConfigurableMacIT { @Override public void configure(MiniAccumuloConfig cfg) { - Map<String, String> props = new HashMap<String, String>(); + Map<String,String> props = new HashMap<String,String>(); props.put(Property.INSTANCE_ZK_TIMEOUT.getKey(), "5s"); props.put(Property.GC_CYCLE_DELAY.getKey(), "1s"); props.put(Property.GC_CYCLE_START.getKey(), "1s"); @@ -54,14 +54,12 @@ public class RestartIT extends ConfigurableMacIT { private static final ScannerOpts SOPTS = new ScannerOpts(); private static final VerifyIngest.Opts VOPTS = new VerifyIngest.Opts(); private static final BatchWriterOpts BWOPTS = new BatchWriterOpts(); - + @Test(timeout = 2 * 60 * 1000) public void restartMaster() throws Exception { Connector c = getConnector(); c.tableOperations().create("test_ingest"); - Process ingest = cluster.exec(TestIngest.class, - "-u", "root", "-p", ROOT_PASSWORD, - "-i", cluster.getInstanceName(), "-z", cluster.getZooKeepers()); + Process ingest = cluster.exec(TestIngest.class, "-u", "root", "-p", ROOT_PASSWORD, "-i", cluster.getInstanceName(), "-z", cluster.getZooKeepers()); for (ProcessReference master : cluster.getProcesses().get(ServerType.MASTER)) { cluster.killProcess(ServerType.MASTER, master); } @@ -70,7 +68,7 @@ public class RestartIT extends ConfigurableMacIT { VerifyIngest.verifyIngest(c, VOPTS, SOPTS); ingest.destroy(); } - + @Test(timeout = 4 * 60 * 1000) public void restartMasterRecovery() throws Exception { Connector c = getConnector(); @@ -90,15 +88,13 @@ public class RestartIT extends ConfigurableMacIT { cluster.start(); VerifyIngest.verifyIngest(c, VOPTS, SOPTS); } - + @Test(timeout = 4 * 60 * 1000) public void restartMasterSplit() throws Exception { Connector c = getConnector(); c.tableOperations().create("test_ingest"); c.tableOperations().setProperty("test_ingest", Property.TABLE_SPLIT_THRESHOLD.getKey(), "5K"); - Process ingest = cluster.exec(TestIngest.class, - "-u", "root", "-p", ROOT_PASSWORD, - "-i", cluster.getInstanceName(), "-z", cluster.getZooKeepers()); + Process ingest = cluster.exec(TestIngest.class, "-u", "root", "-p", ROOT_PASSWORD, "-i", cluster.getInstanceName(), "-z", cluster.getZooKeepers()); for (ProcessReference master : cluster.getProcesses().get(ServerType.MASTER)) { cluster.killProcess(ServerType.MASTER, master); } @@ -107,7 +103,7 @@ public class RestartIT extends ConfigurableMacIT { VerifyIngest.verifyIngest(c, VOPTS, SOPTS); ingest.destroy(); } - + @Test(timeout = 2 * 60 * 1000) public void killedTabletServer() throws Exception { Connector c = getConnector(); @@ -148,7 +144,7 @@ public class RestartIT extends ConfigurableMacIT { cluster.killProcess(ServerType.TABLET_SERVER, procs.get(0)); assertEquals(0, cluster.exec(Admin.class, "stopAll").waitFor()); } - + @Test(timeout = 2 * 60 * 1000) public void shutdownDuringCompactingSplitting() throws Exception { Connector c = getConnector();
