Merge branch '1.4' into 1.5
Conflicts:
pom.xml
diff --git a/pom.xml b/pom.xml
index ea24db5..ff4155b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -25,7 +25,7 @@
<groupId>org.apache.accumulo</groupId>
<artifactId>accumulo-instamo-archetype</artifactId>
- <version>1.4.4-SNAPSHOT</version>
+ <version>1.5.0-SNAPSHOT</version>
<packaging>maven-archetype</packaging>
<name>Accumulo Instamo Archetype</name>
<scm>
diff --git a/src/main/resources/archetype-resources/pom.xml b/src/main/resources/archetype-resources/pom.xml
index d7ec0ad..60779f5 100644
--- a/src/main/resources/archetype-resources/pom.xml
+++ b/src/main/resources/archetype-resources/pom.xml
@@ -25,8 +25,10 @@
<url>http://accumulo.apache.org</url>
<properties>
- <accumulo.version>1.4.4</accumulo.version>
+ <accumulo.version>1.5.0</accumulo.version>
<hadoop-one.version>1.2.1</hadoop-one.version>
+ <hadoop-two.version>2.1.0-beta</hadoop-two.version>
+ <slf4j.version>1.6.1</slf4j.version>
<maclass>${package}.MapReduceExample</maclass>
</properties>
@@ -42,6 +44,24 @@
</activation>
<properties>
<hadoop.version>${hadoop-one.version}</hadoop.version>
+ <httpclient.version>3.0.1</httpclient.version>
+ <slf4j.version>1.4.3</slf4j.version>
+ </properties>
+ </profile>
+ <!-- profile for building against Hadoop 2.1.x
+ Activate using: mvn -Dhadoop.profile=2.0 -->
+ <profile>
+ <id>hadoop-2.0</id>
+ <activation>
+ <property>
+ <name>hadoop.profile</name>
+ <value>2.0</value>
+ </property>
+ </activation>
+ <properties>
+ <hadoop.version>${hadoop-two.version}</hadoop.version>
+ <httpclient.version>3.1</httpclient.version>
+ <slf4j.version>1.6.1</slf4j.version>
</properties>
</profile>
<profile>
@@ -100,23 +120,57 @@
</dependency>
<dependency>
<groupId>org.apache.accumulo</groupId>
+ <artifactId>accumulo-fate</artifactId>
+ <version>${accumulo.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.accumulo</groupId>
<artifactId>accumulo-server</artifactId>
<version>${accumulo.version}</version>
</dependency>
<dependency>
<groupId>org.apache.accumulo</groupId>
+ <artifactId>accumulo-test</artifactId>
+ <version>${accumulo.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.accumulo</groupId>
+ <artifactId>accumulo-start</artifactId>
+ <version>${accumulo.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.accumulo</groupId>
+ <artifactId>accumulo-trace</artifactId>
+ <version>${accumulo.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.accumulo</groupId>
<artifactId>accumulo-minicluster</artifactId>
<version>${accumulo.version}</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
- <artifactId>hadoop-core</artifactId>
+ <artifactId>hadoop-client</artifactId>
<version>${hadoop.version}</version>
</dependency>
<dependency>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
<version>3.3.6</version>
+ <exclusions>
+ <exclusion>
+ <groupId>com.sun.jmx</groupId>
+ <artifactId>jmxri</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.sun.jdmk</groupId>
+ <artifactId>jmxtools</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.jms</groupId>
+ <artifactId>jms</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>commons-io</groupId>
@@ -128,6 +182,26 @@
<artifactId>guava</artifactId>
<version>14.0.1</version>
</dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>${slf4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>${slf4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-cli</groupId>
+ <artifactId>commons-cli</artifactId>
+ <version>1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ <version>${httpclient.version}</version>
+ </dependency>
</dependencies>
<build>
diff --git a/src/main/resources/archetype-resources/src/main/java/MapReduceExample.java b/src/main/resources/archetype-resources/src/main/java/MapReduceExample.java
index ecf6e10..3e0329c 100644
--- a/src/main/resources/archetype-resources/src/main/java/MapReduceExample.java
+++ b/src/main/resources/archetype-resources/src/main/java/MapReduceExample.java
@@ -23,8 +23,8 @@
import java.util.UUID;
import org.apache.accumulo.minicluster.MiniAccumuloCluster;
-import org.apache.accumulo.server.test.continuous.ContinuousIngest;
-import org.apache.accumulo.server.test.continuous.ContinuousVerify;
+import org.apache.accumulo.test.continuous.ContinuousIngest;
+import org.apache.accumulo.test.continuous.ContinuousVerify;
import org.apache.commons.io.FileUtils;
/**
@@ -33,21 +33,17 @@
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[] {instanceName, zookeepers, "root", rootPassword, "ci", "5000000", "0", MAX_LONG,
- MAX_SHORT, MAX_SHORT, "1000000", MAX_LATENCY, MAX_THREADS, "false"});
+ ContinuousIngest.main(new String[] {"-i", instanceName, "-z", zookeepers, "-u", "root", "-p", rootPassword, "--table", "ci", "--num", "5000000",
+ "--batchMemory", "1000000"});
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:///", instanceName, zookeepers, "root", rootPassword, "ci", outputDir, "4", "1", "false"});
-
+ 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"});
} finally {
// delete output dir of mapreduce job
FileUtils.deleteQuietly(new File(outputDir));
diff --git a/src/main/resources/archetype-resources/src/test/java/ExampleAccumuloUnitTest.java b/src/main/resources/archetype-resources/src/test/java/ExampleAccumuloUnitTest.java
index 2c9cce1..697c8b0 100644
--- a/src/main/resources/archetype-resources/src/test/java/ExampleAccumuloUnitTest.java
+++ b/src/main/resources/archetype-resources/src/test/java/ExampleAccumuloUnitTest.java
@@ -23,10 +23,12 @@
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.PasswordToken;
import org.apache.accumulo.core.data.Key;
import org.apache.accumulo.core.data.Mutation;
import org.apache.accumulo.core.data.Value;
@@ -73,11 +75,11 @@
Instance instance = new ZooKeeperInstance(accumulo.getInstanceName(), accumulo.getZooKeepers());
- Connector conn = instance.getConnector("root", "superSecret");
+ Connector conn = instance.getConnector("root", new PasswordToken("superSecret"));
conn.tableOperations().create("foo");
- BatchWriter bw = conn.createBatchWriter("foo", 10000000, 60000, 3);
+ BatchWriter bw = conn.createBatchWriter("foo", new BatchWriterConfig());
Mutation m = new Mutation("1234");
m.put("name", "first", "Alice");
m.put("friend", "5678", "");