accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject [accumulo-maven-plugin] branch master updated: updates for Accumulo alpha-2 (#1)
Date Mon, 11 Feb 2019 19:35:07 GMT
This is an automated email from the ASF dual-hosted git repository.

kturner pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/accumulo-maven-plugin.git


The following commit(s) were added to refs/heads/master by this push:
     new c4cb6de  updates for Accumulo alpha-2 (#1)
c4cb6de is described below

commit c4cb6de2b0300e35e9448865d5bcb4e8105b02f8
Author: Keith Turner <kturner@apache.org>
AuthorDate: Mon Feb 11 14:35:02 2019 -0500

    updates for Accumulo alpha-2 (#1)
---
 pom.xml                                                  |  2 +-
 .../java/org/apache/accumulo/plugin/it/PluginIT.java     | 16 ++++++++--------
 .../accumulo/maven/plugin/AbstractAccumuloMojo.java      |  2 +-
 .../java/org/apache/accumulo/maven/plugin/StartMojo.java |  4 ++--
 .../java/org/apache/accumulo/maven/plugin/StopMojo.java  |  5 +----
 5 files changed, 13 insertions(+), 16 deletions(-)

diff --git a/pom.xml b/pom.xml
index aee4c40..5c14f61 100644
--- a/pom.xml
+++ b/pom.xml
@@ -89,7 +89,7 @@
     <url>https://travis-ci.org/apache/accumulo-maven-plugin</url>
   </ciManagement>
   <properties>
-    <accumulo.version>2.0.0-alpha-1</accumulo.version>
+    <accumulo.version>2.0.0-alpha-2</accumulo.version>
     <eclipseFormatterStyle>contrib/Eclipse-Accumulo-Codestyle.xml</eclipseFormatterStyle>
     <!-- extra release args for testing -->
     <extraReleaseArguments />
diff --git a/src/it/plugin-test/src/test/java/org/apache/accumulo/plugin/it/PluginIT.java
b/src/it/plugin-test/src/test/java/org/apache/accumulo/plugin/it/PluginIT.java
index 0d58a05..962bc39 100644
--- a/src/it/plugin-test/src/test/java/org/apache/accumulo/plugin/it/PluginIT.java
+++ b/src/it/plugin-test/src/test/java/org/apache/accumulo/plugin/it/PluginIT.java
@@ -22,6 +22,7 @@ import static org.junit.Assert.assertTrue;
 import java.io.File;
 import java.io.IOException;
 import java.util.Map.Entry;
+import java.util.Properties;
 
 import org.apache.accumulo.core.client.Accumulo;
 import org.apache.accumulo.core.client.AccumuloClient;
@@ -29,7 +30,6 @@ import org.apache.accumulo.core.client.AccumuloException;
 import org.apache.accumulo.core.client.AccumuloSecurityException;
 import org.apache.accumulo.core.client.BatchWriter;
 import org.apache.accumulo.core.client.BatchWriterConfig;
-import org.apache.accumulo.core.client.ClientInfo;
 import org.apache.accumulo.core.client.IteratorSetting;
 import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.client.TableExistsException;
@@ -46,19 +46,19 @@ import org.junit.Test;
 
 public class PluginIT {
 
-  private static ClientInfo info;
+  private static Properties props;
   private static AccumuloClient client;
 
   @BeforeClass
   public static void setUp() throws Exception {
     String instanceName = "plugin-it-instance";
-    info = MiniAccumuloCluster.getClientInfo(new File("target/accumulo-maven-plugin/" + instanceName));
-    client = Accumulo.newClient().usingClientInfo(info).build();
+    props = MiniAccumuloCluster.getClientProperties(new File("target/accumulo-maven-plugin/"
+ instanceName));
+    client = Accumulo.newClient().from(props).build();
   }
 
   @Test
   public void testConnection() {
-    assertTrue(info != null);
+    assertTrue(props != null);
     assertTrue(client != null);
     assertTrue(client instanceof AccumuloClient);
   }
@@ -68,7 +68,7 @@ public class PluginIT {
     String tableName = "testCreateTable";
     client.tableOperations().create(tableName);
     assertTrue(client.tableOperations().exists(tableName));
-    assertTrue(new File("target/accumulo-maven-plugin/" + info.getInstanceName() + "/testCreateTablePassed").createNewFile());
+    assertTrue(new File("target/accumulo-maven-plugin/" + props.getProperty("instance.name")
+ "/testCreateTablePassed").createNewFile());
   }
 
   @Test
@@ -90,7 +90,7 @@ public class PluginIT {
       assertEquals("V", entry.getValue().toString());
     }
     assertEquals(1, count);
-    assertTrue(new File("target/accumulo-maven-plugin/" + info.getInstanceName() + "/testWriteToTablePassed").createNewFile());
+    assertTrue(new File("target/accumulo-maven-plugin/" + props.getProperty("instance.name")
+ "/testWriteToTablePassed").createNewFile());
   }
 
   @Test
@@ -131,7 +131,7 @@ public class PluginIT {
       assertEquals("denied", entry.getKey().getColumnFamily().toString());
     }
     assertEquals(2, count);
-    assertTrue(new File("target/accumulo-maven-plugin/" + info.getInstanceName() + "/testCheckIteratorPassed").createNewFile());
+    assertTrue(new File("target/accumulo-maven-plugin/" + props.getProperty("instance.name")
+ "/testCheckIteratorPassed").createNewFile());
   }
 
 }
diff --git a/src/main/java/org/apache/accumulo/maven/plugin/AbstractAccumuloMojo.java b/src/main/java/org/apache/accumulo/maven/plugin/AbstractAccumuloMojo.java
index 18e3bfb..5e192a7 100644
--- a/src/main/java/org/apache/accumulo/maven/plugin/AbstractAccumuloMojo.java
+++ b/src/main/java/org/apache/accumulo/maven/plugin/AbstractAccumuloMojo.java
@@ -21,7 +21,7 @@ import java.net.MalformedURLException;
 import java.util.ArrayList;
 import java.util.Arrays;
 
-import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl;
+import org.apache.accumulo.miniclusterImpl.MiniAccumuloConfigImpl;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugins.annotations.Parameter;
diff --git a/src/main/java/org/apache/accumulo/maven/plugin/StartMojo.java b/src/main/java/org/apache/accumulo/maven/plugin/StartMojo.java
index ebd441e..56d8ddf 100644
--- a/src/main/java/org/apache/accumulo/maven/plugin/StartMojo.java
+++ b/src/main/java/org/apache/accumulo/maven/plugin/StartMojo.java
@@ -23,8 +23,8 @@ import java.util.HashSet;
 import java.util.Set;
 
 import org.apache.accumulo.minicluster.MiniAccumuloCluster;
-import org.apache.accumulo.minicluster.impl.MiniAccumuloClusterImpl;
-import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl;
+import org.apache.accumulo.miniclusterImpl.MiniAccumuloClusterImpl;
+import org.apache.accumulo.miniclusterImpl.MiniAccumuloConfigImpl;
 import org.apache.commons.io.FileUtils;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugins.annotations.LifecyclePhase;
diff --git a/src/main/java/org/apache/accumulo/maven/plugin/StopMojo.java b/src/main/java/org/apache/accumulo/maven/plugin/StopMojo.java
index fb96088..2025836 100644
--- a/src/main/java/org/apache/accumulo/maven/plugin/StopMojo.java
+++ b/src/main/java/org/apache/accumulo/maven/plugin/StopMojo.java
@@ -17,8 +17,7 @@
 package org.apache.accumulo.maven.plugin;
 
 import org.apache.accumulo.minicluster.MiniAccumuloCluster;
-import org.apache.accumulo.minicluster.impl.MiniAccumuloClusterImpl;
-import org.apache.accumulo.minicluster.impl.MiniAccumuloClusterImpl.LogWriter;
+import org.apache.accumulo.miniclusterImpl.MiniAccumuloClusterImpl;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugins.annotations.LifecyclePhase;
 import org.apache.maven.plugins.annotations.Mojo;
@@ -41,8 +40,6 @@ public class StopMojo extends AbstractAccumuloMojo {
       getLog().info("Stopping MiniAccumuloCluster: " + mac.getInstanceName());
       try {
         mac.stop();
-        for (LogWriter log : mac.getLogWriters())
-          log.flush();
       } catch (Exception e) {
         throw new MojoExecutionException(
             "Unable to start " + MiniAccumuloCluster.class.getSimpleName(), e);


Mime
View raw message