Return-Path: X-Original-To: apmail-accumulo-commits-archive@www.apache.org Delivered-To: apmail-accumulo-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2780DF179 for ; Wed, 24 Apr 2013 00:18:14 +0000 (UTC) Received: (qmail 91649 invoked by uid 500); 24 Apr 2013 00:18:13 -0000 Delivered-To: apmail-accumulo-commits-archive@accumulo.apache.org Received: (qmail 91600 invoked by uid 500); 24 Apr 2013 00:18:13 -0000 Mailing-List: contact commits-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list commits@accumulo.apache.org Received: (qmail 91592 invoked by uid 99); 24 Apr 2013 00:18:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Apr 2013 00:18:13 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Apr 2013 00:18:12 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 18CBB23888E7; Wed, 24 Apr 2013 00:17:52 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1471210 - in /accumulo/contrib/instamo-archetype/branches/1.4: ./ src/main/resources/archetype-resources/ src/main/resources/archetype-resources/src/main/java/ src/main/resources/archetype-resources/src/test/java/ Date: Wed, 24 Apr 2013 00:17:51 -0000 To: commits@accumulo.apache.org From: elserj@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130424001752.18CBB23888E7@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: elserj Date: Wed Apr 24 00:17:50 2013 New Revision: 1471210 URL: http://svn.apache.org/r1471210 Log: ACCUMULO-1166 "Undo" all of the fixes made in 1.5 to the client to get Instamo working against 1.4 since MAC was backported. Modified: accumulo/contrib/instamo-archetype/branches/1.4/pom.xml accumulo/contrib/instamo-archetype/branches/1.4/src/main/resources/archetype-resources/pom.xml accumulo/contrib/instamo-archetype/branches/1.4/src/main/resources/archetype-resources/src/main/java/AccumuloApp.java accumulo/contrib/instamo-archetype/branches/1.4/src/main/resources/archetype-resources/src/main/java/MapReduceExample.java accumulo/contrib/instamo-archetype/branches/1.4/src/main/resources/archetype-resources/src/test/java/ExampleAccumuloUnitTest.java Modified: accumulo/contrib/instamo-archetype/branches/1.4/pom.xml URL: http://svn.apache.org/viewvc/accumulo/contrib/instamo-archetype/branches/1.4/pom.xml?rev=1471210&r1=1471209&r2=1471210&view=diff ============================================================================== Binary files - no diff available. Modified: accumulo/contrib/instamo-archetype/branches/1.4/src/main/resources/archetype-resources/pom.xml URL: http://svn.apache.org/viewvc/accumulo/contrib/instamo-archetype/branches/1.4/src/main/resources/archetype-resources/pom.xml?rev=1471210&r1=1471209&r2=1471210&view=diff ============================================================================== Binary files - no diff available. Modified: accumulo/contrib/instamo-archetype/branches/1.4/src/main/resources/archetype-resources/src/main/java/AccumuloApp.java URL: http://svn.apache.org/viewvc/accumulo/contrib/instamo-archetype/branches/1.4/src/main/resources/archetype-resources/src/main/java/AccumuloApp.java?rev=1471210&r1=1471209&r2=1471210&view=diff ============================================================================== --- accumulo/contrib/instamo-archetype/branches/1.4/src/main/resources/archetype-resources/src/main/java/AccumuloApp.java (original) +++ accumulo/contrib/instamo-archetype/branches/1.4/src/main/resources/archetype-resources/src/main/java/AccumuloApp.java Wed Apr 24 00:17:50 2013 @@ -23,28 +23,29 @@ import java.util.Map.Entry; import org.apache.accumulo.core.Constants; import org.apache.accumulo.core.client.BatchWriter; -import org.apache.accumulo.core.client.BatchWriterConfig; import org.apache.accumulo.core.client.Connector; import org.apache.accumulo.core.client.Instance; import org.apache.accumulo.core.client.Scanner; import org.apache.accumulo.core.client.ZooKeeperInstance; -import org.apache.accumulo.core.client.security.tokens.AuthenticationToken; import org.apache.accumulo.core.data.Key; import org.apache.accumulo.core.data.Mutation; import org.apache.accumulo.core.data.Value; public class AccumuloApp { + private static final Long MAX_MEMORY = 50 * 1024 * 1024l; + private static final Long MAX_LATENCY = 2 * 60 * 1000l; + private static final Integer MAX_WRITE_THREADS = 3; - public static void run(String instanceName, String zookeepers, AuthenticationToken token, String args[]) throws Exception { + public static void run(String instanceName, String zookeepers, byte[] password, String args[]) throws Exception { // edit this method to play with Accumulo Instance instance = new ZooKeeperInstance(instanceName, zookeepers); - Connector conn = instance.getConnector("root", token); + Connector conn = instance.getConnector("root", password); conn.tableOperations().create("foo"); - BatchWriter bw = conn.createBatchWriter("foo", new BatchWriterConfig()); + BatchWriter bw = conn.createBatchWriter("foo", MAX_MEMORY, MAX_LATENCY, MAX_WRITE_THREADS); Mutation m = new Mutation("r1"); m.put("cf1", "cq1", "v1"); m.put("cf1", "cq2", "v3"); Modified: accumulo/contrib/instamo-archetype/branches/1.4/src/main/resources/archetype-resources/src/main/java/MapReduceExample.java URL: http://svn.apache.org/viewvc/accumulo/contrib/instamo-archetype/branches/1.4/src/main/resources/archetype-resources/src/main/java/MapReduceExample.java?rev=1471210&r1=1471209&r2=1471210&view=diff ============================================================================== --- accumulo/contrib/instamo-archetype/branches/1.4/src/main/resources/archetype-resources/src/main/java/MapReduceExample.java (original) +++ accumulo/contrib/instamo-archetype/branches/1.4/src/main/resources/archetype-resources/src/main/java/MapReduceExample.java Wed Apr 24 00:17:50 2013 @@ -22,9 +22,9 @@ package ${package}; import java.io.File; import java.util.UUID; +import org.apache.accumulo.server.test.continuous.ContinuousIngest; +import org.apache.accumulo.server.test.continuous.ContinuousVerify; import org.apache.accumulo.test.MiniAccumuloCluster; -import org.apache.accumulo.test.continuous.ContinuousIngest; -import org.apache.accumulo.test.continuous.ContinuousVerify; import org.apache.commons.io.FileUtils; /** @@ -33,17 +33,21 @@ import org.apache.commons.io.FileUtils; public class MapReduceExample { public static void run(String instanceName, String zookeepers, String rootPassword, String args[]) throws Exception { + final String MAX_SHORT = Short.toString(Short.MAX_VALUE); + final String MAX_LONG = Long.toString(Long.MAX_VALUE); + final String MAX_LATENCY = Integer.toString(2 * 60 * 1000); + final String MAX_THREADS = "3"; // run continuous ingest to create data. This is not a map reduce job - ContinuousIngest.main(new String[] {"-i", instanceName, "-z", zookeepers, "-u", "root", "-p", rootPassword, "--table", "ci", "--num", "5000000", - "--batchMemory", "1000000"}); + ContinuousIngest.main(new String[] {instanceName, zookeepers, "root", rootPassword, "ci", "5000000", "0", MAX_LONG, + MAX_SHORT, MAX_SHORT, "1000000", MAX_LATENCY, MAX_THREADS, "false"}); String outputDir = FileUtils.getTempDirectoryPath() + File.separator + "ci_verify" + UUID.randomUUID().toString(); try { // run verify map reduce job locally. This jobs looks for holes in the linked list create by continuous ingest - ContinuousVerify.main(new String[] {"-D", "mapred.job.tracker=local", "-D", "fs.default.name=file:///", "-i", instanceName, "-z", zookeepers, "-u", - "root", "-p", rootPassword, "--table", "ci", "--output", outputDir, "--maxMappers", "4", "--reducers", "1"}); + ContinuousVerify.main(new String[] {"-D", "mapred.job.tracker=local", "-D", "fs.default.name=file:///", instanceName, zookeepers, "root", rootPassword, "ci", outputDir, "4", "1", "false"}); + } finally { // delete output dir of mapreduce job FileUtils.deleteQuietly(new File(outputDir)); Modified: accumulo/contrib/instamo-archetype/branches/1.4/src/main/resources/archetype-resources/src/test/java/ExampleAccumuloUnitTest.java URL: http://svn.apache.org/viewvc/accumulo/contrib/instamo-archetype/branches/1.4/src/main/resources/archetype-resources/src/test/java/ExampleAccumuloUnitTest.java?rev=1471210&r1=1471209&r2=1471210&view=diff ============================================================================== --- accumulo/contrib/instamo-archetype/branches/1.4/src/main/resources/archetype-resources/src/test/java/ExampleAccumuloUnitTest.java (original) +++ accumulo/contrib/instamo-archetype/branches/1.4/src/main/resources/archetype-resources/src/test/java/ExampleAccumuloUnitTest.java Wed Apr 24 00:17:50 2013 @@ -19,7 +19,6 @@ */ package ${package}; -import org.apache.accumulo.core.client.security.tokens.PasswordToken; import org.apache.accumulo.test.MiniAccumuloCluster; import org.junit.AfterClass; import org.junit.BeforeClass; @@ -49,7 +48,7 @@ public class ExampleAccumuloUnitTest { @Test(timeout = 30000) public void test() throws Exception { - AccumuloApp.run(accumulo.getInstanceName(), accumulo.getZooKeepers(), new PasswordToken("superSecret"), new String[0]); + AccumuloApp.run(accumulo.getInstanceName(), accumulo.getZooKeepers(), "superSecret".getBytes(), new String[0]); } @AfterClass