You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by mw...@apache.org on 2017/01/10 19:49:54 UTC

accumulo git commit: ACCUMULO-4550 Removal of examples breaks ShellServerIT

Repository: accumulo
Updated Branches:
  refs/heads/master 1246aae1c -> cd4cd68f7


ACCUMULO-4550 Removal of examples breaks ShellServerIT

* Added classes that should not have been removed
* Also cleaned up dependencies


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/cd4cd68f
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/cd4cd68f
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/cd4cd68f

Branch: refs/heads/master
Commit: cd4cd68f724b55af05bef73e84432346ec899140
Parents: 1246aae
Author: Mike Walch <mw...@apache.org>
Authored: Tue Jan 10 13:24:35 2017 -0500
Committer: Mike Walch <mw...@apache.org>
Committed: Tue Jan 10 14:22:28 2017 -0500

----------------------------------------------------------------------
 test/pom.xml                                    |  8 ----
 .../accumulo/test/shell/DebugCommand.java       | 46 ++++++++++++++++++++
 .../test/shell/ExampleShellExtension.java       | 37 ++++++++++++++++
 3 files changed, 83 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/cd4cd68f/test/pom.xml
----------------------------------------------------------------------
diff --git a/test/pom.xml b/test/pom.xml
index 18a28dc..f5fb354 100644
--- a/test/pom.xml
+++ b/test/pom.xml
@@ -55,10 +55,6 @@
       <artifactId>commons-configuration</artifactId>
     </dependency>
     <dependency>
-      <groupId>commons-httpclient</groupId>
-      <artifactId>commons-httpclient</artifactId>
-    </dependency>
-    <dependency>
       <groupId>commons-io</groupId>
       <artifactId>commons-io</artifactId>
     </dependency>
@@ -132,10 +128,6 @@
       <artifactId>commons-lang3</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.apache.commons</groupId>
-      <artifactId>commons-math3</artifactId>
-    </dependency>
-    <dependency>
       <groupId>org.apache.hadoop</groupId>
       <artifactId>hadoop-client</artifactId>
     </dependency>

http://git-wip-us.apache.org/repos/asf/accumulo/blob/cd4cd68f/test/src/main/java/org/apache/accumulo/test/shell/DebugCommand.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/shell/DebugCommand.java b/test/src/main/java/org/apache/accumulo/test/shell/DebugCommand.java
new file mode 100644
index 0000000..a4cec2d
--- /dev/null
+++ b/test/src/main/java/org/apache/accumulo/test/shell/DebugCommand.java
@@ -0,0 +1,46 @@
+/*
+ * 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.
+ */
+package org.apache.accumulo.test.shell;
+
+import java.util.Set;
+import java.util.TreeSet;
+
+import org.apache.accumulo.shell.Shell;
+import org.apache.accumulo.shell.Shell.Command;
+import org.apache.commons.cli.CommandLine;
+
+public class DebugCommand extends Command {
+
+  @Override
+  public int execute(String fullCommand, CommandLine cl, Shell shellState) throws Exception {
+    Set<String> lines = new TreeSet<>();
+    lines.add("This is a test");
+    shellState.printLines(lines.iterator(), true);
+    return 0;
+  }
+
+  @Override
+  public String description() {
+    return "prints a message to test extension feature";
+  }
+
+  @Override
+  public int numArgs() {
+    return 0;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/cd4cd68f/test/src/main/java/org/apache/accumulo/test/shell/ExampleShellExtension.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/shell/ExampleShellExtension.java b/test/src/main/java/org/apache/accumulo/test/shell/ExampleShellExtension.java
new file mode 100644
index 0000000..3392fdc
--- /dev/null
+++ b/test/src/main/java/org/apache/accumulo/test/shell/ExampleShellExtension.java
@@ -0,0 +1,37 @@
+/*
+ * 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.
+ */
+package org.apache.accumulo.test.shell;
+
+import org.apache.accumulo.shell.Shell.Command;
+import org.apache.accumulo.shell.ShellExtension;
+
+import com.google.auto.service.AutoService;
+
+@AutoService(ShellExtension.class)
+public class ExampleShellExtension extends ShellExtension {
+
+  @Override
+  public String getExtensionName() {
+    return "ExampleShellExtension";
+  }
+
+  @Override
+  public Command[] getCommands() {
+    return new Command[] {new DebugCommand()};
+  }
+
+}