accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [accumulo] 01/01: Merge branch '1.9'
Date Sat, 22 Sep 2018 03:05:36 GMT
This is an automated email from the ASF dual-hosted git repository.

ctubbsii pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/accumulo.git

commit 16795c526f6d39d1cffd5be39168850bd1d6fbbd
Merge: d55ce35 a590a0f
Author: Christopher Tubbs <ctubbsii@apache.org>
AuthorDate: Fri Sep 21 23:04:52 2018 -0400

    Merge branch '1.9'

 .../org/apache/accumulo/plugin/it/PluginIT.java    | 26 +++++++++++-----------
 maven-plugin/src/it/settings.xml                   |  8 ++++---
 pom.xml                                            |  5 +++++
 3 files changed, 23 insertions(+), 16 deletions(-)

diff --cc maven-plugin/src/it/plugin-test/src/test/java/org/apache/accumulo/plugin/it/PluginIT.java
index a00c241,e9518bf..0d58a05
--- a/maven-plugin/src/it/plugin-test/src/test/java/org/apache/accumulo/plugin/it/PluginIT.java
+++ b/maven-plugin/src/it/plugin-test/src/test/java/org/apache/accumulo/plugin/it/PluginIT.java
@@@ -23,8 -23,6 +23,8 @@@ import java.io.File
  import java.io.IOException;
  import java.util.Map.Entry;
  
- import org.apache.accumulo.core.Accumulo;
++import org.apache.accumulo.core.client.Accumulo;
 +import org.apache.accumulo.core.client.AccumuloClient;
  import org.apache.accumulo.core.client.AccumuloException;
  import org.apache.accumulo.core.client.AccumuloSecurityException;
  import org.apache.accumulo.core.client.BatchWriter;
@@@ -46,41 -45,42 +46,41 @@@ import org.junit.Test
  
  public class PluginIT {
  
 -  private static Instance instance;
 -  private static Connector connector;
 +  private static ClientInfo info;
-   private static AccumuloClient connector;
++  private static AccumuloClient client;
  
    @BeforeClass
    public static void setUp() throws Exception {
      String instanceName = "plugin-it-instance";
 -    instance = new MiniAccumuloInstance(instanceName, new File("target/accumulo-maven-plugin/"
+ instanceName));
 -    connector = instance.getConnector("root", new PasswordToken("ITSecret"));
 +    info = MiniAccumuloCluster.getClientInfo(new File("target/accumulo-maven-plugin/" +
instanceName));
-     connector = Accumulo.newClient().usingClientInfo(info).build();
++    client = Accumulo.newClient().usingClientInfo(info).build();
    }
  
    @Test
 -  public void testInstanceConnection() {
 -    assertTrue(instance != null);
 -    assertTrue(instance instanceof MiniAccumuloInstance);
 -    assertTrue(connector != null);
 -    assertTrue(connector instanceof Connector);
 +  public void testConnection() {
 +    assertTrue(info != null);
-     assertTrue(connector != null);
-     assertTrue(connector instanceof AccumuloClient);
++    assertTrue(client != null);
++    assertTrue(client instanceof AccumuloClient);
    }
  
    @Test
    public void testCreateTable() throws AccumuloException, AccumuloSecurityException, TableExistsException,
IOException {
      String tableName = "testCreateTable";
--    connector.tableOperations().create(tableName);
--    assertTrue(connector.tableOperations().exists(tableName));
 -    assertTrue(new File("target/accumulo-maven-plugin/" + instance.getInstanceName() + "/testCreateTablePassed").createNewFile());
++    client.tableOperations().create(tableName);
++    assertTrue(client.tableOperations().exists(tableName));
 +    assertTrue(new File("target/accumulo-maven-plugin/" + info.getInstanceName() + "/testCreateTablePassed").createNewFile());
    }
  
    @Test
    public void writeToTable() throws AccumuloException, AccumuloSecurityException, TableExistsException,
TableNotFoundException, IOException {
      String tableName = "writeToTable";
--    connector.tableOperations().create(tableName);
--    BatchWriter bw = connector.createBatchWriter(tableName, new BatchWriterConfig());
++    client.tableOperations().create(tableName);
++    BatchWriter bw = client.createBatchWriter(tableName, new BatchWriterConfig());
      Mutation m = new Mutation("ROW");
      m.put("CF", "CQ", "V");
      bw.addMutation(m);
      bw.close();
--    Scanner scanner = connector.createScanner(tableName, Authorizations.EMPTY);
++    Scanner scanner = client.createScanner(tableName, Authorizations.EMPTY);
      int count = 0;
      for (Entry<Key,Value> entry : scanner) {
        count++;
@@@ -96,8 -96,8 +96,8 @@@
    @Test
    public void checkIterator() throws IOException, AccumuloException, AccumuloSecurityException,
TableExistsException, TableNotFoundException {
      String tableName = "checkIterator";
--    connector.tableOperations().create(tableName);
--    BatchWriter bw = connector.createBatchWriter(tableName, new BatchWriterConfig());
++    client.tableOperations().create(tableName);
++    BatchWriter bw = client.createBatchWriter(tableName, new BatchWriterConfig());
      Mutation m = new Mutation("ROW1");
      m.put("allowed", "CQ1", "V1");
      m.put("denied", "CQ2", "V2");
@@@ -111,7 -111,7 +111,7 @@@
      bw.close();
  
      // check filter
--    Scanner scanner = connector.createScanner(tableName, Authorizations.EMPTY);
++    Scanner scanner = client.createScanner(tableName, Authorizations.EMPTY);
      IteratorSetting is = new IteratorSetting(5, CustomFilter.class);
      scanner.addScanIterator(is);
      int count = 0;


Mime
View raw message