Skip to content
Permalink
Browse files
ACCUMULO-1166 General cleanup for the instamo archetype that for the
1.4 series releases

Change dependency from 1.4.4-SNAPSHOT to 1.4.4. Remove a bunch of
in the pom. Only run one tserver in the unit test to make things run a
little bit faster. A log4j for test time. Also added some System.exit to
make sure the maven-exec-plugin doesn't inaccurately report failure on
the ShellExample.
  • Loading branch information
Josh Elser committed Sep 17, 2013
1 parent 7103f5b commit bc4678b933fb08d4868e315a4c2933097c6a9e6a
Showing 7 changed files with 136 additions and 83 deletions.
@@ -0,0 +1,3 @@
.project
.settings
/target
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.4.4-SNAPSHOT</version>
<packaging>maven-archetype</packaging>
<name>instamo-archetype</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/accumulo/contrib/instamo-archetype/branches/1.4</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/accumulo/contrib/instamo-archetype/branches/1.4</developerConnection>
<url>http://svn.apache.org/viewvc/accumulo/contrib/instamo-archetype/branches/1.4</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.4.4-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>
@@ -25,8 +25,8 @@
<url>http://accumulo.apache.org</url>

<properties>
<accumulo.version>1.4.4-SNAPSHOT</accumulo.version>
<hadoop-one.version>1.0.4</hadoop-one.version>
<accumulo.version>1.4.4</accumulo.version>
<hadoop-one.version>1.2.1</hadoop-one.version>
<hadoop-two.version>2.0.2-alpha</hadoop-two.version>
<maclass>${package}.MapReduceExample</maclass>
</properties>
@@ -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);
}
}
@@ -31,6 +31,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;
@@ -42,6 +44,7 @@
*/

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

public static TemporaryFolder folder = new TemporaryFolder();

@@ -52,7 +55,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();

@@ -101,7 +110,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 bc4678b

Please sign in to comment.