Skip to content
Permalink
Browse files
ACCUMULO-1166 Merge branch '1.5'
Conflicts:
	pom.xml
	src/main/resources/archetype-resources/pom.xml
  • Loading branch information
Josh Elser committed Sep 17, 2013
2 parents eb4abac + 1e6f9d4 commit 07f705921c2fa81543e920ef51a51dc7d2e3bfb6
Show file tree
Hide file tree
Showing 8 changed files with 163 additions and 100 deletions.
@@ -0,0 +1,3 @@
.project
.settings
/target
@@ -17,5 +17,5 @@ Then, change to a new directory and run

`mvn archetype:generate -DarchetypeGroupId=org.apache.accumulo -DarchetypeArtifactId=instamo-archetype -DinteractiveMode=false`

Maven will prompt you to enter the rest of the necessary configuration
and Maven will prompt you to enter the rest of the necessary configuration
parameters (e.g. groupId, artifactId, version and Java package)
162 pom.xml
@@ -1,78 +1,84 @@
<?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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.accumulo</groupId>
<artifactId>instamo-archetype</artifactId>
<version>1.6.0-SNAPSHOT</version>
<packaging>maven-archetype</packaging>
<name>instamo-archetype</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/accumulo/contrib/instamo-archetype/trunk</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/accumulo/contrib/instamo-archetype/trunk</developerConnection>
<url>http://svn.apache.org/viewvc/accumulo/contrib/instamo-archetype/trunk</url>
</scm>
<url>http://accumulo.apache.org</url>
<build>
<extensions>
<extension>
<groupId>org.apache.maven.archetype</groupId>
<artifactId>archetype-packaging</artifactId>
<version>2.2</version>
</extension>
</extensions>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-archetype-plugin</artifactId>
<version>2.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<configuration>
<includePom>true</includePom>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
<?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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache</groupId>
<artifactId>apache</artifactId>
<version>10</version>
</parent>

<groupId>org.apache.accumulo</groupId>
<artifactId>instamo-archetype</artifactId>
<version>1.6.0-SNAPSHOT</version>
<packaging>maven-archetype</packaging>
<name>instamo-archetype</name>
<scm>
<connection>scm:git:git://git.apache.org/accumulo-instamo-archetype.git</connection>
<developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/accumulo-instamo-archetype.git</developerConnection>
<url>https://git-wip-us.apache.org/repos/asf?p=accumulo-instamo-archetype.git</url>
</scm>
<url>http://accumulo.apache.org</url>
<build>
<extensions>
<extension>
<groupId>org.apache.maven.archetype</groupId>
<artifactId>archetype-packaging</artifactId>
<version>2.2</version>
</extension>
</extensions>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-archetype-plugin</artifactId>
<version>2.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<configuration>
<includePom>true</includePom>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
@@ -27,7 +27,7 @@
<defaultValue>instamo</defaultValue>
</requiredProperty>
<requiredProperty key="version">
<defaultValue>1.0-SNAPSHOT</defaultValue>
<defaultValue>0.0.1-SNAPSHOT</defaultValue>
</requiredProperty>
<requiredProperty key="package">
<defaultValue>instamo</defaultValue>
@@ -26,14 +26,14 @@

<properties>
<accumulo.version>1.6.0-SNAPSHOT</accumulo.version>
<hadoop-one.version>1.0.4</hadoop-one.version>
<hadoop-two.version>2.0.2-alpha</hadoop-two.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>

<profiles>
<!-- profile for building against Hadoop 1.0.x
<!-- profile for building against Hadoop 1.2.x
Activate by not specifying hadoop.profile -->
<profile>
<id>hadoop-1.0</id>
@@ -44,16 +44,11 @@
</activation>
<properties>
<hadoop.version>${hadoop-one.version}</hadoop.version>
<httpclient.version>3.0.1</httpclient.version>
<slf4j.version>1.4.3</slf4j.version>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-core</artifactId>
<version>${hadoop.version}</version>
</dependency>
</dependencies>
</profile>
<!-- profile for building against Hadoop 2.0.x
<!-- profile for building against Hadoop 2.1.x
Activate using: mvn -Dhadoop.profile=2.0 -->
<profile>
<id>hadoop-2.0</id>
@@ -65,14 +60,9 @@
</activation>
<properties>
<hadoop.version>${hadoop-two.version}</hadoop.version>
<httpclient.version>3.1</httpclient.version>
<slf4j.version>1.6.1</slf4j.version>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client</artifactId>
<version>${hadoop.version}</version>
</dependency>
</dependencies>
</profile>
<profile>
<id>shell</id>
@@ -158,6 +148,11 @@
<artifactId>accumulo-minicluster</artifactId>
<version>${accumulo.version}</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client</artifactId>
<version>${hadoop.version}</version>
</dependency>
<dependency>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
@@ -197,6 +192,21 @@
<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-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>${httpclient.version}</version>
</dependency>
</dependencies>

<build>
@@ -50,8 +50,10 @@ public void run() {

} catch (InterruptedException e) {
System.err.println("Error starting MiniAccumuloCluster: " + e.getMessage());
System.exit(1);
} catch (IOException e) {
System.err.println("Error starting MiniAccumuloCluster: " + e.getMessage());
System.exit(1);
} finally {
if (null != tempDir) {
tempDir.delete();
@@ -62,8 +64,10 @@ public void run() {
mac.stop();
} catch (InterruptedException e) {
System.err.println("Error stopping MiniAccumuloCluster: " + e.getMessage());
System.exit(1);
} catch (IOException e) {
System.err.println("Error stopping MiniAccumuloCluster: " + e.getMessage());
System.exit(1);
}
}
}
@@ -74,5 +78,7 @@ public static void main(String[] args) {

ShellExample shell = new ShellExample();
shell.run();

System.exit(0);
}
}
@@ -33,6 +33,8 @@
import org.apache.accumulo.core.data.Mutation;
import org.apache.accumulo.core.data.Value;
import org.apache.accumulo.minicluster.MiniAccumuloCluster;
import org.apache.accumulo.minicluster.MiniAccumuloConfig;
import org.apache.log4j.Logger;

import org.junit.AfterClass;
import org.junit.BeforeClass;
@@ -44,6 +46,7 @@
*/

public class ExampleAccumuloUnitTest {
private static final Logger log = Logger.getLogger(ExampleAccumuloUnitTest.class);

public static TemporaryFolder folder = new TemporaryFolder();

@@ -54,7 +57,13 @@ public static void setupMiniCluster() throws Exception {

folder.create();

accumulo = new MiniAccumuloCluster(folder.getRoot(), "superSecret");
log.debug("Using " + folder.getRoot());

MiniAccumuloConfig config = new MiniAccumuloConfig(folder.getRoot(), "superSecret");
config.setNumTservers(1);


accumulo = new MiniAccumuloCluster(config);

accumulo.start();

@@ -103,7 +112,7 @@ public void test() throws Exception {

Scanner scanner = conn.createScanner("foo", Constants.NO_AUTHS);
for (Entry<Key,Value> entry : scanner) {
System.out.println(entry.getKey() + " " + entry.getValue());
log.debug(entry.getKey() + " " + entry.getValue());
}

//TODO use scanner to find common enemy ids between Alice and Bob, then
@@ -0,0 +1,29 @@
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )

# 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.


log4j.rootLogger=INFO, CA
log4j.appender.CA=org.apache.log4j.ConsoleAppender
log4j.appender.CA.layout=org.apache.log4j.PatternLayout
log4j.appender.CA.layout.ConversionPattern=[%t] %-5p %c %x - %m%n

log4j.logger.org.apache.zookeeper=ERROR,CA
log4j.logger.org.apache.accumulo.core.client.impl.ServerClient=ERROR,CA
log4j.logger.org.apache.accumulo.core.util.shell.Shell.audit=WARN,CA
log4j.logger.org.apache.commons.vfs2.impl.DefaultFileSystemManager=WARN,CA

0 comments on commit 07f7059

Please sign in to comment.