accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [1/8] accumulo git commit: Revert "ACCUMULO-2589 Drop deprecated code from 1.x"
Date Mon, 22 Aug 2016 22:07:10 GMT
Repository: accumulo
Updated Branches:
  refs/heads/master 5ead817bc -> 4f2e64728


http://git-wip-us.apache.org/repos/asf/accumulo/blob/4f2e6472/shell/src/test/resources/shelltest.txt
----------------------------------------------------------------------
diff --git a/shell/src/test/resources/shelltest.txt b/shell/src/test/resources/shelltest.txt
new file mode 100644
index 0000000..d2eb955
--- /dev/null
+++ b/shell/src/test/resources/shelltest.txt
@@ -0,0 +1,16 @@
+# 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.
+exit
+foo

http://git-wip-us.apache.org/repos/asf/accumulo/blob/4f2e6472/test/src/main/java/org/apache/accumulo/test/BulkImportDirectory.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/BulkImportDirectory.java b/test/src/main/java/org/apache/accumulo/test/BulkImportDirectory.java
index 1022f6a..4cbba8e 100644
--- a/test/src/main/java/org/apache/accumulo/test/BulkImportDirectory.java
+++ b/test/src/main/java/org/apache/accumulo/test/BulkImportDirectory.java
@@ -16,6 +16,8 @@
  */
 package org.apache.accumulo.test;
 
+import static java.nio.charset.StandardCharsets.UTF_8;
+
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
@@ -23,8 +25,10 @@ import java.util.List;
 import org.apache.accumulo.core.client.AccumuloException;
 import org.apache.accumulo.core.client.AccumuloSecurityException;
 import org.apache.accumulo.core.client.TableNotFoundException;
+import org.apache.accumulo.core.client.security.tokens.PasswordToken;
 import org.apache.accumulo.core.util.CachedConfiguration;
 import org.apache.accumulo.server.cli.ClientOnRequiredTable;
+import org.apache.accumulo.server.client.HdfsZooInstance;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 
@@ -43,9 +47,22 @@ public class BulkImportDirectory {
   public static void main(String[] args) throws IOException, AccumuloException, AccumuloSecurityException,
TableNotFoundException {
     final FileSystem fs = FileSystem.get(CachedConfiguration.getInstance());
     Opts opts = new Opts();
-    opts.parseArgs(BulkImportDirectory.class.getName(), args);
-    fs.delete(new Path(opts.failures), true);
-    fs.mkdirs(new Path(opts.failures));
-    opts.getConnector().tableOperations().importDirectory(opts.getTableName(), opts.source,
opts.failures, false);
+    if (args.length == 5) {
+      System.err.println("Deprecated syntax for BulkImportDirectory, please use the new style
(see --help)");
+      final String user = args[0];
+      final byte[] pass = args[1].getBytes(UTF_8);
+      final String tableName = args[2];
+      final String dir = args[3];
+      final String failureDir = args[4];
+      final Path failureDirPath = new Path(failureDir);
+      fs.delete(failureDirPath, true);
+      fs.mkdirs(failureDirPath);
+      HdfsZooInstance.getInstance().getConnector(user, new PasswordToken(pass)).tableOperations().importDirectory(tableName,
dir, failureDir, false);
+    } else {
+      opts.parseArgs(BulkImportDirectory.class.getName(), args);
+      fs.delete(new Path(opts.failures), true);
+      fs.mkdirs(new Path(opts.failures));
+      opts.getConnector().tableOperations().importDirectory(opts.getTableName(), opts.source,
opts.failures, false);
+    }
   }
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/4f2e6472/test/src/main/java/org/apache/accumulo/test/CreateTableWithNewTableConfigIT.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/CreateTableWithNewTableConfigIT.java
b/test/src/main/java/org/apache/accumulo/test/CreateTableWithNewTableConfigIT.java
index eefa604..7fd2dd1 100644
--- a/test/src/main/java/org/apache/accumulo/test/CreateTableWithNewTableConfigIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/CreateTableWithNewTableConfigIT.java
@@ -102,6 +102,7 @@ public class CreateTableWithNewTableConfigIT extends SharedMiniClusterBase
{
     return false;
   }
 
+  @SuppressWarnings("deprecation")
   @Test
   public void tableNameOnly() throws Exception {
     log.info("Starting tableNameOnly");
@@ -112,7 +113,7 @@ public class CreateTableWithNewTableConfigIT extends SharedMiniClusterBase
{
     connector.tableOperations().create(tableName, new NewTableConfiguration());
 
     String tableNameOrig = "original";
-    connector.tableOperations().create(tableNameOrig);
+    connector.tableOperations().create(tableNameOrig, true);
 
     int countNew = numProperties(connector, tableName);
     int countOrig = compareProperties(connector, tableNameOrig, tableName, null);
@@ -121,6 +122,50 @@ public class CreateTableWithNewTableConfigIT extends SharedMiniClusterBase
{
     Assert.assertTrue("Wrong TimeType", checkTimeType(connector, tableName, TimeType.MILLIS));
   }
 
+  @SuppressWarnings("deprecation")
+  @Test
+  public void tableNameAndLimitVersion() throws Exception {
+    log.info("Starting tableNameAndLimitVersion");
+
+    // Create a table with the initial properties
+    Connector connector = getConnector();
+    String tableName = getUniqueNames(2)[0];
+    boolean limitVersion = false;
+    connector.tableOperations().create(tableName, new NewTableConfiguration().withoutDefaultIterators());
+
+    String tableNameOrig = "originalWithLimitVersion";
+    connector.tableOperations().create(tableNameOrig, limitVersion);
+
+    int countNew = numProperties(connector, tableName);
+    int countOrig = compareProperties(connector, tableNameOrig, tableName, null);
+
+    Assert.assertEquals("Extra properties using the new create method", countOrig, countNew);
+    Assert.assertTrue("Wrong TimeType", checkTimeType(connector, tableName, TimeType.MILLIS));
+  }
+
+  @SuppressWarnings("deprecation")
+  @Test
+  public void tableNameLimitVersionAndTimeType() throws Exception {
+    log.info("Starting tableNameLimitVersionAndTimeType");
+
+    // Create a table with the initial properties
+    Connector connector = getConnector();
+    String tableName = getUniqueNames(2)[0];
+    boolean limitVersion = false;
+    TimeType tt = TimeType.LOGICAL;
+    connector.tableOperations().create(tableName, new NewTableConfiguration().withoutDefaultIterators().setTimeType(tt));
+
+    String tableNameOrig = "originalWithLimitVersionAndTimeType";
+    connector.tableOperations().create(tableNameOrig, limitVersion, tt);
+
+    int countNew = numProperties(connector, tableName);
+    int countOrig = compareProperties(connector, tableNameOrig, tableName, null);
+
+    Assert.assertEquals("Extra properties using the new create method", countOrig, countNew);
+    Assert.assertTrue("Wrong TimeType", checkTimeType(connector, tableName, tt));
+  }
+
+  @SuppressWarnings("deprecation")
   @Test
   public void addCustomPropAndChangeExisting() throws Exception {
     log.info("Starting addCustomPropAndChangeExisting");
@@ -141,7 +186,7 @@ public class CreateTableWithNewTableConfigIT extends SharedMiniClusterBase
{
     connector.tableOperations().create(tableName, new NewTableConfiguration().setProperties(properties));
 
     String tableNameOrig = "originalWithTableName";
-    connector.tableOperations().create(tableNameOrig);
+    connector.tableOperations().create(tableNameOrig, true);
 
     int countNew = numProperties(connector, tableName);
     int countOrig = compareProperties(connector, tableNameOrig, tableName, propertyName);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/4f2e6472/test/src/main/java/org/apache/accumulo/test/ShellServerIT.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/ShellServerIT.java b/test/src/main/java/org/apache/accumulo/test/ShellServerIT.java
index d6cfa79..78ad958 100644
--- a/test/src/main/java/org/apache/accumulo/test/ShellServerIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/ShellServerIT.java
@@ -40,7 +40,6 @@ import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Random;
 import java.util.concurrent.TimeUnit;
-import java.util.stream.Stream;
 
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.ClientConfiguration;
@@ -153,7 +152,7 @@ public class ShellServerIT extends SharedMiniClusterBase {
     public StringInputStream input;
     public Shell shell;
 
-    TestShell(String user, String rootPass, String instanceName, String zookeepers, File
configFile, String... extraArgs) throws IOException {
+    TestShell(String user, String rootPass, String instanceName, String zookeepers, File
configFile) throws IOException {
       ClientConfiguration clientConf;
       try {
         clientConf = new ClientConfiguration(configFile);
@@ -165,14 +164,12 @@ public class ShellServerIT extends SharedMiniClusterBase {
       input = new StringInputStream();
       shell = new Shell(new ConsoleReader(input, output));
       shell.setLogErrorsToConsole();
-      String[] shellArgs = null;
       if (clientConf.getBoolean(ClientProperty.INSTANCE_RPC_SASL_ENABLED.getKey(), false))
{
         // Pull the kerberos principal out when we're using SASL
-        shellArgs = new String[] {"-u", user, "-z", instanceName, zookeepers, "--config-file",
configFile.getAbsolutePath()};
+        shell.config("-u", user, "-z", instanceName, zookeepers, "--config-file", configFile.getAbsolutePath());
       } else {
-        shellArgs = new String[] {"-u", user, "-p", rootPass, "-z", instanceName, zookeepers,
"--config-file", configFile.getAbsolutePath()};
+        shell.config("-u", user, "-p", rootPass, "-z", instanceName, zookeepers, "--config-file",
configFile.getAbsolutePath());
       }
-      shell.config(Stream.concat(Arrays.stream(shellArgs), Arrays.stream(extraArgs)).toArray(String[]::new));
       exec("quit", true);
       shell.start();
       shell.setExit(false);
@@ -233,10 +230,6 @@ public class ShellServerIT extends SharedMiniClusterBase {
         assertEquals(s + " present in " + output.get() + " was not " + stringPresent, stringPresent,
output.get().contains(s));
     }
 
-    void assertBadExit(String s, boolean stringPresent) {
-      assertBadExit(s, stringPresent, noop);
-    }
-
     void assertBadExit(String s, boolean stringPresent, ErrorMessageCallback callback) {
       shellLog.debug(output.get());
       if (0 == shell.getExitCode()) {
@@ -248,19 +241,6 @@ public class ShellServerIT extends SharedMiniClusterBase {
         assertEquals(s + " present in " + output.get() + " was not " + stringPresent, stringPresent,
output.get().contains(s));
       shell.resetExitCode();
     }
-
-    void execExpectList(String cmd, boolean expecteGoodExit, List<String> expectedStrings)
throws IOException {
-      exec(cmd);
-      if (expecteGoodExit) {
-        assertGoodExit("", true);
-      } else {
-        assertBadExit("", true);
-      }
-
-      for (String expectedString : expectedStrings) {
-        assertTrue(expectedString + " was not present in " + output.get(), output.get().contains(expectedString));
-      }
-    }
   }
 
   private static final NoOpErrorMessageCallback noop = new NoOpErrorMessageCallback();
@@ -414,6 +394,24 @@ public class ShellServerIT extends SharedMiniClusterBase {
   }
 
   @Test
+  public void setscaniterDeletescaniter() throws Exception {
+    final String table = name.getMethodName();
+
+    // setscaniter, deletescaniter
+    ts.exec("createtable " + table);
+    ts.exec("insert a cf cq 1");
+    ts.exec("insert a cf cq 1");
+    ts.exec("insert a cf cq 1");
+    ts.input.set("true\n\n\n\nSTRING");
+    ts.exec("setscaniter -class org.apache.accumulo.core.iterators.user.SummingCombiner -p
10 -n name", true);
+    ts.exec("scan", true, "3", true);
+    ts.exec("deletescaniter -n name", true);
+    ts.exec("scan", true, "1", true);
+    ts.exec("deletetable -f " + table);
+
+  }
+
+  @Test
   public void execfile() throws Exception {
     // execfile
     File file = File.createTempFile("ShellServerIT.execfile", ".conf", new File(rootPath));
@@ -1307,7 +1305,7 @@ public class ShellServerIT extends SharedMiniClusterBase {
   public void help() throws Exception {
     ts.exec("help -np", true, "Help Commands", true);
     ts.exec("?", true, "Help Commands", true);
-    for (String c : ("bye exit quit " + "about help info ? " + "deleteiter listiter setiter
"
+    for (String c : ("bye exit quit " + "about help info ? " + "deleteiter deletescaniter
listiter setiter setscaniter "
         + "grant revoke systempermissions tablepermissions userpermissions " + "execfile
history " + "authenticate cls clear notable sleep table user whoami "
         + "clonetable config createtable deletetable droptable du exporttable importtable
offline online renametable tables "
         + "addsplits compact constraint flush getgropus getsplits merge setgroups " + "addauths
createuser deleteuser dropuser getauths passwd setauths users "
@@ -1846,204 +1844,6 @@ public class ShellServerIT extends SharedMiniClusterBase {
     }
   }
 
-  @Test
-  public void aboutTest() throws IOException {
-    ts.exec("about", true, "Shell - Apache Accumulo Interactive Shell");
-    ts.exec("about -v", true, "Current user:");
-    ts.exec("about arg", false, "java.lang.IllegalArgumentException: Expected 0 arguments");
-  }
-
-  @Test
-  public void addGetSplitsTest() throws IOException {
-    ts.exec("addsplits arg", false, "java.lang.IllegalStateException: Not in a table context");
-    ts.exec("createtable test", true);
-    ts.exec("addsplits 1 \\x80", true);
-    ts.exec("getsplits", true, "1\n\\x80");
-    ts.exec("getsplits -m 1", true, "1");
-    ts.exec("getsplits -b64", true, "MQ==\ngA==");
-    ts.exec("deletetable test -f", true, "Table: [test] has been deleted");
-  }
-
-  @Test
-  public void insertDeleteScanTest() throws IOException {
-    ts.exec("insert r f q v", false, "java.lang.IllegalStateException: Not in a table context");
-    ts.exec("delete r f q", false, "java.lang.IllegalStateException: Not in a table context");
-    ts.exec("createtable test", true);
-    ts.exec("insert r f q v", true);
-    ts.exec("scan", true, "r f:q []    v");
-    ts.exec("delete r f q", true);
-    ts.exec("scan", true, "r f:q []    v", false);
-    ts.exec("insert \\x90 \\xa0 \\xb0 \\xc0\\xd0\\xe0\\xf0", true);
-    ts.exec("scan", true, "\\x90 \\xA0:\\xB0 []    \\xC0\\xD0");
-    ts.exec("scan -f 2", true, "\\x90 \\xA0:\\xB0 []    \\xC0\\xD0");
-    ts.exec("scan -f 2", true, "\\x90 \\xA0:\\xB0 []    \\xC0\\xD0\\xE0", false);
-    ts.exec("scan -b \\x90 -e \\x90 -c \\xA0", true, "\\x90 \\xA0:\\xB0 []    \\xC0");
-    ts.exec("scan -b \\x90 -e \\x90 -c \\xA0:\\xB0", true, "\\x90 \\xA0:\\xB0 []    \\xC0");
-    ts.exec("scan -b \\x90 -be", true, "\\x90 \\xA0:\\xB0 []    \\xC0", false);
-    ts.exec("scan -e \\x90 -ee", true, "\\x90 \\xA0:\\xB0 []    \\xC0", false);
-    ts.exec("scan -b \\x90\\x00", true, "\\x90 \\xA0:\\xB0 []    \\xC0", false);
-    ts.exec("scan -e \\x8f", true, "\\x90 \\xA0:\\xB0 []    \\xC0", false);
-    ts.exec("delete \\x90 \\xa0 \\xb0", true);
-    ts.exec("scan", true, "\\x90 \\xA0:\\xB0 []    \\xC0", false);
-    ts.exec("deletetable test -f", true, "Table: [test] has been deleted");
-  }
-
-  @Test
-  public void deleteManyTest() throws IOException {
-    ts.exec("deletemany", false, "java.lang.IllegalStateException: Not in a table context");
-    ts.exec("createtable test", true);
-    ts.exec("deletemany", true, "\n");
-
-    ts.exec("insert 0 0 0 0 -ts 0");
-    ts.exec("insert 0 0 0 0 -l 0 -ts 0");
-    ts.exec("insert 1 1 1 1 -ts 1");
-    ts.exec("insert 2 2 2 2 -ts 2");
-
-    // prompts for delete, and rejects by default
-    ts.exec("deletemany", true, "[SKIPPED] 0 0:0 []");
-    ts.exec("deletemany -r 0", true, "[SKIPPED] 0 0:0 []");
-    ts.exec("deletemany -r 0 -f", true, "[DELETED] 0 0:0 []");
-
-    // with auths, can delete the other record
-    ts.exec("setauths -s 0");
-    ts.exec("deletemany -r 0 -f", true, "[DELETED] 0 0:0 [0]");
-
-    // delete will show the timestamp
-    ts.exec("deletemany -r 1 -f -st", true, "[DELETED] 1 1:1 [] 1");
-
-    // DeleteManyCommand has its own Formatter (DeleterFormatter), so it does not honor the
-fm flag
-    ts.exec("deletemany -r 2 -f -st -fm org.apache.accumulo.core.util.format.DateStringFormatter",
true, "[DELETED] 2 2:2 [] 2");
-
-    ts.exec("setauths -c ", true);
-    ts.exec("deletetable test -f", true, "Table: [test] has been deleted");
-  }
-
-  @Test
-  public void authsTest() throws Exception {
-    ts.exec("setauths x,y,z", false, "Missing required option");
-    ts.exec("setauths -s x,y,z -u notauser", false, "user does not exist");
-    ts.exec("setauths -s y,z,x", true);
-    ts.exec("getauths -u notauser", false, "user does not exist");
-    ts.execExpectList("getauths", true, Arrays.asList("x", "y", "z"));
-    ts.exec("addauths -u notauser", false, "Missing required option");
-    ts.exec("addauths -u notauser -s foo", false, "user does not exist");
-    ts.exec("addauths -s a", true);
-    ts.execExpectList("getauths", true, Arrays.asList("x", "y", "z", "a"));
-    ts.exec("setauths -c", true);
-  }
-
-  @Test
-  public void duContextTest() throws Exception {
-    ts.exec("createtable t", true);
-    ts.exec("du", true, "0 [t]");
-    ts.exec("deletetable t -f", true, "Table: [t] has been deleted");
-  }
-
-  @Test
-  public void duTest() throws IOException {
-    ts.exec("createtable t", true);
-    ts.exec("du t", true, "0 [t]");
-    ts.exec("deletetable t -f", true, "Table: [t] has been deleted");
-  }
-
-  @Test
-  public void duPatternTest() throws IOException {
-    ts.exec("createnamespace n", true);
-    ts.exec("createtable n.t", true);
-    ts.exec("createtable n.tt", true);
-    ts.exec("du -p n[.]t.*", true, "0 [n.t, n.tt]");
-    ts.exec("deletetable n.t -f", true, "Table: [n.t] has been deleted");
-    ts.exec("deletetable n.tt -f", true, "Table: [n.tt] has been deleted");
-    ts.exec("deletenamespace -f n", true);
-  }
-
-  @Test
-  public void scanTimestampTest() throws IOException {
-    ts.exec("createtable test", true);
-    ts.exec("insert r f q v -ts 0", true);
-    ts.exec("scan -st", true, "r f:q [] 0    v");
-    ts.exec("scan -st -f 0", true, " : [] 0   ");
-    ts.exec("deletemany -f", true);
-    ts.exec("deletetable test -f", true, "Table: [test] has been deleted");
-  }
-
-  @Test
-  public void scanFewTest() throws IOException {
-    ts.exec("createtable test", true);
-    // historically, showing few did not pertain to ColVis or Timestamp
-    ts.exec("insert 1 123 123456 -l '12345678' -ts 123456789 1234567890", true);
-    ts.exec("setauths -s 12345678", true);
-    String expected = "1 123:123456 [12345678] 123456789    1234567890";
-    String expectedFew = "1 123:12345 [12345678] 123456789    12345";
-    ts.exec("scan -st", true, expected);
-    ts.exec("scan -st -f 5", true, expectedFew);
-    // also prove that BinaryFormatter behaves same as the default
-    ts.exec("scan -st -fm org.apache.accumulo.core.util.format.BinaryFormatter", true, expected);
-    ts.exec("scan -st -f 5 -fm org.apache.accumulo.core.util.format.BinaryFormatter", true,
expectedFew);
-    ts.exec("setauths -c", true);
-    ts.exec("deletetable test -f", true, "Table: [test] has been deleted");
-  }
-
-  @Test
-  public void grepTest() throws IOException {
-    ts.exec("grep", false, "java.lang.IllegalStateException: Not in a table context");
-    ts.exec("createtable t", true);
-    ts.exec("setauths -s vis", true);
-    ts.exec("insert r f q v -ts 0 -l vis", true);
-
-    String expected = "r f:q [vis]    v";
-    String expectedTimestamp = "r f:q [vis] 0    v";
-    ts.exec("grep", false, "No terms specified");
-    ts.exec("grep non_matching_string", true, "");
-    // historically, showing few did not pertain to ColVis or Timestamp
-    ts.exec("grep r", true, expected);
-    ts.exec("grep r -f 1", true, expected);
-    ts.exec("grep r -st", true, expectedTimestamp);
-    ts.exec("grep r -st -f 1", true, expectedTimestamp);
-    ts.exec("setauths -c", true);
-    ts.exec("deletetable t -f", true, "Table: [t] has been deleted");
-  }
-
-  @Test
-  public void commentTest() throws IOException {
-    ts.exec("#", true, "Unknown command", false);
-    ts.exec("# foo", true, "Unknown command", false);
-    ts.exec("- foo", true, "Unknown command", true);
-  }
-
-  @Test
-  public void execFileTest() throws IOException {
-    TestShell configTestShell = new TestShell(getPrincipal(), getRootPassword(), getCluster().getConfig().getInstanceName(),
getCluster().getConfig()
-        .getZooKeepers(), getCluster().getConfig().getClientConfFile(), "-f", "src/test/resources/shelltest.txt");
-    configTestShell.assertGoodExit("Unknown command", false);
-  }
-
-  @Test
-  public void setIterTest() throws IOException {
-    ts.exec("createtable t", true);
-
-    String cmdJustClass = "setiter -class VersioningIterator -p 1";
-    ts.exec(cmdJustClass, false, "java.lang.IllegalArgumentException", false);
-    ts.exec(cmdJustClass, false, "fully qualified package name", true);
-
-    String cmdFullPackage = "setiter -class o.a.a.foo -p 1";
-    ts.exec(cmdFullPackage, false, "java.lang.IllegalArgumentException", false);
-    ts.exec(cmdFullPackage, false, "class not found", true);
-
-    String cmdNoOption = "setiter -class java.lang.String -p 1";
-    ts.exec(cmdNoOption, false, "loaded successfully but does not implement SortedKeyValueIterator",
true);
-
-    ts.input.set("\n\n");
-    ts.exec("setiter -scan -class org.apache.accumulo.core.iterators.ColumnFamilyCounter
-p 30 -name foo", true);
-
-    ts.input.set("bar\nname value\n");
-    ts.exec("setiter -scan -class org.apache.accumulo.core.iterators.ColumnFamilyCounter
-p 31", true);
-
-    // TODO can't verify this as config -t fails, functionality verified in ShellServerIT
-
-    ts.exec("deletetable t -f", true, "Table: [t] has been deleted");
-  }
-
   private void make10() throws IOException {
     for (int i = 0; i < 10; i++) {
       ts.exec(String.format("insert row%d cf col%d value", i, i));

http://git-wip-us.apache.org/repos/asf/accumulo/blob/4f2e6472/test/src/main/java/org/apache/accumulo/test/VolumeIT.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/VolumeIT.java b/test/src/main/java/org/apache/accumulo/test/VolumeIT.java
index 553cb14..f9a6a326 100644
--- a/test/src/main/java/org/apache/accumulo/test/VolumeIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/VolumeIT.java
@@ -82,11 +82,6 @@ import org.junit.Test;
 
 public class VolumeIT extends ConfigurableMacBase {
 
-  @SuppressWarnings("deprecation")
-  private static final Property INSTANCE_DFS_DIR = Property.INSTANCE_DFS_DIR;
-  @SuppressWarnings("deprecation")
-  private static final Property INSTANCE_DFS_URI = Property.INSTANCE_DFS_URI;
-
   private static final Text EMPTY = new Text();
   private static final Value EMPTY_VALUE = new Value(new byte[] {});
   private File volDirBase;
@@ -97,6 +92,7 @@ public class VolumeIT extends ConfigurableMacBase {
     return 5 * 60;
   }
 
+  @SuppressWarnings("deprecation")
   @Override
   public void configure(MiniAccumuloConfigImpl cfg, Configuration hadoopCoreSite) {
     File baseDir = cfg.getDir();
@@ -108,8 +104,8 @@ public class VolumeIT extends ConfigurableMacBase {
 
     // Run MAC on two locations in the local file system
     URI v1Uri = v1.toUri();
-    cfg.setProperty(INSTANCE_DFS_DIR, v1Uri.getPath());
-    cfg.setProperty(INSTANCE_DFS_URI, v1Uri.getScheme() + v1Uri.getHost());
+    cfg.setProperty(Property.INSTANCE_DFS_DIR, v1Uri.getPath());
+    cfg.setProperty(Property.INSTANCE_DFS_URI, v1Uri.getScheme() + v1Uri.getHost());
     cfg.setProperty(Property.INSTANCE_VOLUMES, v1.toString() + "," + v2.toString());
     cfg.setProperty(Property.INSTANCE_ZK_TIMEOUT, "15s");
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/4f2e6472/test/src/main/java/org/apache/accumulo/test/functional/WALSunnyDayIT.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/WALSunnyDayIT.java b/test/src/main/java/org/apache/accumulo/test/functional/WALSunnyDayIT.java
index 0831812..2f5ee81 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/WALSunnyDayIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/WALSunnyDayIT.java
@@ -238,7 +238,7 @@ public class WALSunnyDayIT extends ConfigurableMacBase {
     }
 
     fail("Unable to get the correct number of WALs, expected " + expectedCount + " but got
" + wals.toString());
-    return new HashMap<String,Boolean>();
+    return new HashMap<>();
   }
 
   private int getWaitFactor() {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/4f2e6472/test/src/main/java/org/apache/accumulo/test/server/security/SystemCredentialsIT.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/server/security/SystemCredentialsIT.java
b/test/src/main/java/org/apache/accumulo/test/server/security/SystemCredentialsIT.java
index 150eee4..9752916 100644
--- a/test/src/main/java/org/apache/accumulo/test/server/security/SystemCredentialsIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/server/security/SystemCredentialsIT.java
@@ -18,6 +18,7 @@ package org.apache.accumulo.test.server.security;
 
 import static org.junit.Assert.assertEquals;
 
+import java.nio.ByteBuffer;
 import java.util.List;
 import java.util.Map.Entry;
 
@@ -31,6 +32,7 @@ import org.apache.accumulo.core.client.impl.Credentials;
 import org.apache.accumulo.core.client.security.SecurityErrorCode;
 import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
 import org.apache.accumulo.core.client.security.tokens.PasswordToken;
+import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.metadata.RootTable;
@@ -63,6 +65,12 @@ public class SystemCredentialsIT extends ConfigurableMacBase {
     if (args[0].equals("bad")) {
       Instance inst = new Instance() {
 
+        @Deprecated
+        @Override
+        public void setConfiguration(AccumuloConfiguration conf) {
+          throw new UnsupportedOperationException();
+        }
+
         @Override
         public int getZooKeepersSessionTimeOut() {
           throw new UnsupportedOperationException();
@@ -98,6 +106,30 @@ public class SystemCredentialsIT extends ConfigurableMacBase {
           throw new UnsupportedOperationException();
         }
 
+        @Deprecated
+        @Override
+        public Connector getConnector(String user, CharSequence pass) throws AccumuloException,
AccumuloSecurityException {
+          throw new UnsupportedOperationException();
+        }
+
+        @Deprecated
+        @Override
+        public Connector getConnector(String user, ByteBuffer pass) throws AccumuloException,
AccumuloSecurityException {
+          throw new UnsupportedOperationException();
+        }
+
+        @Deprecated
+        @Override
+        public Connector getConnector(String user, byte[] pass) throws AccumuloException,
AccumuloSecurityException {
+          throw new UnsupportedOperationException();
+        }
+
+        @Deprecated
+        @Override
+        public AccumuloConfiguration getConfiguration() {
+          throw new UnsupportedOperationException();
+        }
+
       };
       creds = SystemCredentials.get(inst);
     } else if (args[0].equals("good")) {
@@ -140,6 +172,36 @@ public class SystemCredentialsIT extends ConfigurableMacBase {
           throw new UnsupportedOperationException();
         }
 
+        @Deprecated
+        @Override
+        public Connector getConnector(String user, CharSequence pass) throws AccumuloException,
AccumuloSecurityException {
+          throw new UnsupportedOperationException();
+        }
+
+        @Deprecated
+        @Override
+        public Connector getConnector(String user, ByteBuffer pass) throws AccumuloException,
AccumuloSecurityException {
+          throw new UnsupportedOperationException();
+        }
+
+        @Deprecated
+        @Override
+        public Connector getConnector(String user, byte[] pass) throws AccumuloException,
AccumuloSecurityException {
+          throw new UnsupportedOperationException();
+        }
+
+        @Deprecated
+        @Override
+        public AccumuloConfiguration getConfiguration() {
+          throw new UnsupportedOperationException();
+        }
+
+        @Deprecated
+        @Override
+        public void setConfiguration(AccumuloConfiguration conf) {
+          throw new UnsupportedOperationException();
+        }
+
       };
       creds = new SystemCredentials(inst, "!SYSTEM", new PasswordToken("fake"));
     } else {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/4f2e6472/test/src/test/resources/shelltest.txt
----------------------------------------------------------------------
diff --git a/test/src/test/resources/shelltest.txt b/test/src/test/resources/shelltest.txt
deleted file mode 100644
index d2eb955..0000000
--- a/test/src/test/resources/shelltest.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-# 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.
-exit
-foo


Mime
View raw message