You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rya.apache.org by mi...@apache.org on 2017/08/04 13:37:45 UTC

[1/7] incubator-rya git commit: Added a temporary fix until RYA-331 is resolved.

Repository: incubator-rya
Updated Branches:
  refs/heads/master 8def4caca -> 2564ac0ab


Added a temporary fix until RYA-331 is resolved.

Project: http://git-wip-us.apache.org/repos/asf/incubator-rya/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-rya/commit/31a3f6cf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-rya/tree/31a3f6cf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-rya/diff/31a3f6cf

Branch: refs/heads/master
Commit: 31a3f6cfcb552681d63170db0e3d2b5479ea0cdf
Parents: 8def4ca
Author: jdasch <jd...@localhost.localdomain>
Authored: Thu Aug 3 16:25:30 2017 -0400
Committer: Aaron Mihalik <aa...@gmail.com>
Committed: Thu Aug 3 22:12:56 2017 -0400

----------------------------------------------------------------------
 pom.xml | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/31a3f6cf/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 93c6ed8..1f4241d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -946,6 +946,7 @@ under the License.
                         </goals>
                         <configuration>
                             <skipITs>${skip.rya.it}</skipITs>
+                            <reuseForks>false</reuseForks>  <!-- Temporary fix until RYA-331 is resolved. -->
                         </configuration>
                     </execution>
                 </executions>


[7/7] incubator-rya git commit: RYA-325 Renamed rya.console to rya.shell. Closes #194

Posted by mi...@apache.org.
RYA-325 Renamed rya.console to rya.shell. Closes #194


Project: http://git-wip-us.apache.org/repos/asf/incubator-rya/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-rya/commit/2564ac0a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-rya/tree/2564ac0a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-rya/diff/2564ac0a

Branch: refs/heads/master
Commit: 2564ac0ab7f1f0bbfad88d1bf671b9e7b0eea1f0
Parents: ec74291
Author: jdasch <jd...@localhost.localdomain>
Authored: Thu Aug 3 14:53:41 2017 -0400
Committer: Aaron Mihalik <aa...@gmail.com>
Committed: Thu Aug 3 22:16:26 2017 -0400

----------------------------------------------------------------------
 extras/pom.xml                                  |   2 +-
 extras/rya.console/.gitignore                   |   8 -
 extras/rya.console/pom.xml                      | 221 ---------
 .../src/main/assembly/binary-release.xml        |  33 --
 .../src/main/assembly/component-release.xml     |  90 ----
 .../src/main/config/log4j.properties            |  35 --
 .../rya.console/src/main/examples/Query1.sparql |  24 -
 .../src/main/examples/example.script            |  26 -
 extras/rya.console/src/main/examples/triples.nt |  25 -
 .../org/apache/rya/shell/RyaAdminCommands.java  | 388 ---------------
 .../org/apache/rya/shell/RyaBannerProvider.java |  97 ----
 .../java/org/apache/rya/shell/RyaCommands.java  | 166 -------
 .../apache/rya/shell/RyaConnectionCommands.java | 166 -------
 .../org/apache/rya/shell/RyaPromptProvider.java |  62 ---
 .../rya/shell/RyaShellHistoryProvider.java      |  51 --
 .../org/apache/rya/shell/SharedShellState.java  | 339 -------------
 .../apache/rya/shell/util/ConnectorFactory.java |  67 ---
 .../apache/rya/shell/util/ConsolePrinter.java   |  85 ----
 .../apache/rya/shell/util/InstallPrompt.java    | 139 ------
 .../rya/shell/util/InstanceNamesFormatter.java  |  78 ---
 .../org/apache/rya/shell/util/JLinePrompt.java  | 211 ---------
 .../apache/rya/shell/util/PasswordPrompt.java   |  72 ---
 .../rya/shell/util/RyaDetailsFormatter.java     | 120 -----
 .../org/apache/rya/shell/util/SparqlPrompt.java |  82 ----
 .../apache/rya/shell/util/UninstallPrompt.java  |  58 ---
 .../rya.console/src/main/resources/LICENSE.txt  |  16 -
 .../META-INF/spring/spring-shell-plugin.xml     |  50 --
 extras/rya.console/src/main/scripts/rya         |  33 --
 .../apache/rya/shell/RyaAdminCommandsTest.java  | 474 -------------------
 .../org/apache/rya/shell/RyaCommandsTest.java   | 278 -----------
 .../rya/shell/RyaConnectionCommandsIT.java      | 250 ----------
 .../apache/rya/shell/RyaPromptProviderTest.java |  80 ----
 .../org/apache/rya/shell/RyaShellITBase.java    | 102 ----
 .../apache/rya/shell/SharedShellStateTest.java  | 167 -------
 .../rya/shell/util/ConnectorFactoryIT.java      |  57 ---
 .../shell/util/InstanceNamesFormatterTest.java  |  81 ----
 .../rya/shell/util/RyaDetailsFormatterTest.java | 111 -----
 .../src/test/resources/Query1.sparql            |  20 -
 .../src/test/resources/RyaShellTest-context.xml |  63 ---
 extras/shell/.gitignore                         |   8 +
 extras/shell/pom.xml                            | 223 +++++++++
 .../shell/src/main/assembly/binary-release.xml  |  33 ++
 .../src/main/assembly/component-release.xml     |  90 ++++
 extras/shell/src/main/config/log4j.properties   |  35 ++
 extras/shell/src/main/examples/Query1.sparql    |  24 +
 extras/shell/src/main/examples/example.script   |  26 +
 extras/shell/src/main/examples/triples.nt       |  25 +
 .../org/apache/rya/shell/RyaAdminCommands.java  | 388 +++++++++++++++
 .../org/apache/rya/shell/RyaBannerProvider.java |  97 ++++
 .../java/org/apache/rya/shell/RyaCommands.java  | 166 +++++++
 .../apache/rya/shell/RyaConnectionCommands.java | 166 +++++++
 .../org/apache/rya/shell/RyaPromptProvider.java |  62 +++
 .../rya/shell/RyaShellHistoryProvider.java      |  51 ++
 .../org/apache/rya/shell/SharedShellState.java  | 339 +++++++++++++
 .../apache/rya/shell/util/ConnectorFactory.java |  67 +++
 .../apache/rya/shell/util/ConsolePrinter.java   |  85 ++++
 .../apache/rya/shell/util/InstallPrompt.java    | 139 ++++++
 .../rya/shell/util/InstanceNamesFormatter.java  |  78 +++
 .../org/apache/rya/shell/util/JLinePrompt.java  | 211 +++++++++
 .../apache/rya/shell/util/PasswordPrompt.java   |  72 +++
 .../rya/shell/util/RyaDetailsFormatter.java     | 120 +++++
 .../org/apache/rya/shell/util/SparqlPrompt.java |  82 ++++
 .../apache/rya/shell/util/UninstallPrompt.java  |  58 +++
 extras/shell/src/main/resources/LICENSE.txt     |  16 +
 .../META-INF/spring/spring-shell-plugin.xml     |  50 ++
 extras/shell/src/main/scripts/rya               |  33 ++
 .../apache/rya/shell/RyaAdminCommandsTest.java  | 474 +++++++++++++++++++
 .../org/apache/rya/shell/RyaCommandsTest.java   | 278 +++++++++++
 .../rya/shell/RyaConnectionCommandsIT.java      | 250 ++++++++++
 .../apache/rya/shell/RyaPromptProviderTest.java |  80 ++++
 .../org/apache/rya/shell/RyaShellITBase.java    | 102 ++++
 .../apache/rya/shell/SharedShellStateTest.java  | 167 +++++++
 .../rya/shell/util/ConnectorFactoryIT.java      |  57 +++
 .../shell/util/InstanceNamesFormatterTest.java  |  81 ++++
 .../rya/shell/util/RyaDetailsFormatterTest.java | 111 +++++
 extras/shell/src/test/resources/Query1.sparql   |  20 +
 .../src/test/resources/RyaShellTest-context.xml |  63 +++
 77 files changed, 4428 insertions(+), 4426 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/pom.xml
----------------------------------------------------------------------
diff --git a/extras/pom.xml b/extras/pom.xml
index a2c8d58..8823031 100644
--- a/extras/pom.xml
+++ b/extras/pom.xml
@@ -34,7 +34,7 @@ under the License.
         <module>rya.prospector</module>
         <module>rya.manual</module>
         <module>rya.periodic.service</module>
-        <module>rya.console</module>
+        <module>shell</module>
         <module>indexing</module>
         <module>rya.indexing.pcj</module>
         <module>indexingExample</module>

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/.gitignore
----------------------------------------------------------------------
diff --git a/extras/rya.console/.gitignore b/extras/rya.console/.gitignore
deleted file mode 100644
index 5d1172a..0000000
--- a/extras/rya.console/.gitignore
+++ /dev/null
@@ -1,8 +0,0 @@
-/.classpath
-/.project
-.settings/
-target/
-/log.roo
-*.log
-
-/bin/

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/pom.xml
----------------------------------------------------------------------
diff --git a/extras/rya.console/pom.xml b/extras/rya.console/pom.xml
deleted file mode 100644
index dec339b..0000000
--- a/extras/rya.console/pom.xml
+++ /dev/null
@@ -1,221 +0,0 @@
-<?xml version='1.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.
-
--->
-<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.rya</groupId>
-        <artifactId>rya.extras</artifactId>
-        <version>3.2.11-incubating-SNAPSHOT</version>
-    </parent>
-
-    <artifactId>rya.console</artifactId>
-    <name>Apache Rya Console</name>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.rya</groupId>
-            <artifactId>rya.api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.rya</groupId>
-            <artifactId>accumulo.rya</artifactId>
-            <exclusions>
-                <exclusion>
-                    <groupId>jline</groupId>
-                    <artifactId>jline</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.rya</groupId>
-            <artifactId>rya.indexing</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.rya</groupId>
-            <artifactId>rya.pcj.fluo.api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.fluo</groupId>
-            <artifactId>fluo-core</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.shell</groupId>
-            <artifactId>spring-shell</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.security</groupId>
-            <artifactId>spring-security-web</artifactId>
-            <version>4.1.0.RELEASE</version>
-        </dependency>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.mockito</groupId>
-            <artifactId>mockito-all</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.accumulo</groupId>
-            <artifactId>accumulo-minicluster</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.fluo</groupId>
-            <artifactId>fluo-mini</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.rya</groupId>
-            <artifactId>accumulo.rya</artifactId>
-            <version>${project.version}</version>
-            <type>test-jar</type>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <pluginManagement>
-            <plugins>
-                <plugin>
-                    <groupId>org.apache.rat</groupId>
-                    <artifactId>apache-rat-plugin</artifactId>
-                    <configuration>
-                        <excludes>
-                            <exclude>spring-shell.log</exclude>
-                        </excludes>
-                    </configuration>
-                </plugin>
-            </plugins>
-        </pluginManagement>
-        <plugins>
-            <!-- Automatically place Apache 2 license headers at the top of all of the project's Java files.
-                 Rat runs during the 'validate' lifecycle step, so it will fail the build before this one 
-                 executes if any of the headers are missing. Run the build with rat turned off to add
-                 missing headers to the Java files. -->
-            <plugin>
-                <groupId>com.mycila</groupId>
-                <artifactId>license-maven-plugin</artifactId>
-                <version>2.6</version>
-                <configuration>
-                    <!-- We use a custome Apache 2.0 license because we do not include a copywrite section. -->                
-                    <header>src/main/resources/LICENSE.txt</header>
-                </configuration>
-                <executions>
-                    <execution>
-                        <phase>process-sources</phase>
-                        <goals>
-                            <goal>format</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            
-            <!-- Create an executable jar file for the shell. -->
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-shade-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>shade</goal>
-                        </goals>
-                        <configuration>
-                            <transformers>
-                                <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
-                                    <resource>META-INF/spring.handlers</resource>
-                                </transformer>
-                                <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
-                                    <resource>META-INF/spring.schemas</resource>
-                                </transformer>
-                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
-                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
-                                    <mainClass>org.springframework.shell.Bootstrap</mainClass>
-                                </transformer>
-                            </transformers>
-                            <filters>
-                                <filter>
-                                    <!--
-                                        Shading signed JARs will fail without this.
-                                        http://stackoverflow.com/questions/999489/invalid-signature-file-when-attempting-to-run-a-jar
-                                    -->
-                                    <artifact>*:*</artifact>
-                                    <excludes>
-                                        <exclude>META-INF/*.SF</exclude>
-                                        <exclude>META-INF/*.DSA</exclude>
-                                        <exclude>META-INF/*.RSA</exclude>
-                                    </excludes>
-                                </filter>
-                            </filters>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            
-            <plugin>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>create-binary-distribution</id>
-                        <goals>
-                            <goal>single</goal>
-                        </goals>
-                        <phase>package</phase>
-                        <configuration>
-                            <descriptors>
-                                <descriptor>src/main/assembly/binary-release.xml</descriptor>
-                            </descriptors>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            
-            <!-- Generate Code Coverage report. -->
-            <plugin>
-                <groupId>org.jacoco</groupId>
-                <artifactId>jacoco-maven-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>default-prepare-agent</id>
-                        <goals>
-                            <goal>prepare-agent</goal>
-                        </goals>
-                    </execution>
-                    <execution>
-                        <id>default-report</id>
-                        <phase>prepare-package</phase>
-                        <goals>
-                            <goal>report</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/main/assembly/binary-release.xml
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/main/assembly/binary-release.xml b/extras/rya.console/src/main/assembly/binary-release.xml
deleted file mode 100644
index 374213f..0000000
--- a/extras/rya.console/src/main/assembly/binary-release.xml
+++ /dev/null
@@ -1,33 +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.
-
--->
-<assembly
-    xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd">
-    <id>bin</id>
-    <formats>
-        <format>tar.gz</format>
-    </formats>
-    <includeBaseDirectory>true</includeBaseDirectory>
-    <componentDescriptors>
-        <componentDescriptor>src/main/assembly/component-release.xml</componentDescriptor>
-    </componentDescriptors>
-</assembly>

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/main/assembly/component-release.xml
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/main/assembly/component-release.xml b/extras/rya.console/src/main/assembly/component-release.xml
deleted file mode 100644
index 72c74d1..0000000
--- a/extras/rya.console/src/main/assembly/component-release.xml
+++ /dev/null
@@ -1,90 +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.
-
--->
-<component
-    xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.3"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.3 http://maven.apache.org/xsd/component-1.1.3.xsd">
-    <fileSets>
-        <fileSet>
-            <directory>src/main/config</directory>
-            <outputDirectory>conf</outputDirectory>
-            <directoryMode>0755</directoryMode>
-            <fileMode>0644</fileMode>
-            <lineEnding>unix</lineEnding>
-            <filtered>false</filtered>
-            <includes>
-                <include>*.properties</include>
-            </includes>
-        </fileSet>
-        <fileSet>
-            <directory>src/main/scripts</directory>
-            <outputDirectory>bin</outputDirectory>
-            <directoryMode>0755</directoryMode>
-            <fileMode>0755</fileMode>
-            <includes>
-                <include>rya</include>
-            </includes>
-            <lineEnding>unix</lineEnding>
-            <filtered>true</filtered>
-        </fileSet>
-        <fileSet>
-            <directory>src/main/scripts</directory>
-            <outputDirectory>bin</outputDirectory>
-            <directoryMode>0755</directoryMode>
-            <fileMode>0644</fileMode>
-            <includes>
-                <include>*.bat</include>
-            </includes>
-            <lineEnding>dos</lineEnding>
-            <filtered>true</filtered>
-        </fileSet>
-        <fileSet>
-            <directory>src/main/examples</directory>
-            <outputDirectory>examples</outputDirectory>
-            <directoryMode>0755</directoryMode>
-            <fileMode>0644</fileMode>
-            <!-- <includes> <include>*.script</include> </includes> -->
-            <lineEnding>unix</lineEnding>
-            <filtered>false</filtered>
-        </fileSet>
-
-        <!-- create an empty directory for log files -->
-        <fileSet>
-            <directory>src/main/assembly</directory>
-            <outputDirectory>logs</outputDirectory>
-            <directoryMode>755</directoryMode>
-            <excludes>
-                <exclude>*</exclude>
-            </excludes>
-        </fileSet>
-
-
-        <fileSet>
-            <directory>${project.build.directory}</directory>
-            <outputDirectory>lib</outputDirectory>
-            <directoryMode>755</directoryMode>
-            <fileMode>0644</fileMode>
-            <includes>
-                <include>${project.artifactId}-${project.version}-shaded.jar</include>
-            </includes>
-        </fileSet>
-    </fileSets>
-</component>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/main/config/log4j.properties
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/main/config/log4j.properties b/extras/rya.console/src/main/config/log4j.properties
deleted file mode 100644
index 49d6822..0000000
--- a/extras/rya.console/src/main/config/log4j.properties
+++ /dev/null
@@ -1,35 +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.
-#
-
-# Valid levels:
-# TRACE, DEBUG, INFO, WARN, ERROR and FATAL
-log4j.rootCategory=INFO, LOGFILE
-
-# LOGFILE is set to be a File appender using a PatternLayout.
-log4j.appender.LOGFILE=org.apache.log4j.FileAppender
-log4j.appender.LOGFILE.File=${rya.shell.home}logs/rya-shell.log
-#log4j.appender.LOGFILE.Threshold=DEBUG
-log4j.appender.LOGFILE.Append=true
-
-log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
-log4j.appender.LOGFILE.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
-
-#log4j.appender.LOGFILE.layout=org.apache.log4j.EnhancedPatternLayout
-#log4j.appender.LOGFILE.layout.ConversionPattern=%d [%t] %-5p %c{1.} - %m%n
-

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/main/examples/Query1.sparql
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/main/examples/Query1.sparql b/extras/rya.console/src/main/examples/Query1.sparql
deleted file mode 100644
index 33619fb..0000000
--- a/extras/rya.console/src/main/examples/Query1.sparql
+++ /dev/null
@@ -1,24 +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.
-#
-
-PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
-SELECT ?thing ?name WHERE {
-  ?thing <http://predicates#name> ?name .
-  ?thing rdf:type <http://types#Monkey> .
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/main/examples/example.script
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/main/examples/example.script b/extras/rya.console/src/main/examples/example.script
deleted file mode 100644
index 529ea61..0000000
--- a/extras/rya.console/src/main/examples/example.script
+++ /dev/null
@@ -1,26 +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.
-#
-
-connect-accumulo --username accumulo_user --instanceName accumulo_instance --zookeepers zoo1,zoo2,zoo3,zoo4,zoo5
-install-with-parameters --instanceName rya_example_
-connect-rya --instance rya_example_
-#load-data --file examples/ontology.owl
-load-data --file examples/triples.nt
-sparql-query --file examples/Query1.sparql
-# uninstall
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/main/examples/triples.nt
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/main/examples/triples.nt b/extras/rya.console/src/main/examples/triples.nt
deleted file mode 100644
index 38b6c6f..0000000
--- a/extras/rya.console/src/main/examples/triples.nt
+++ /dev/null
@@ -1,25 +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.
-#
-
-<http://Thing1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://types#Monkey> .
-<http://Thing1> <http://predicates#name> "Thing 1".
-<http://Thing2> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://types#Gorilla> .
-<http://Thing2> <http://predicates#name> "Thing 2".
-<http://Thing3> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://types#Monkey> .
-<http://Thing3> <http://predicates#name> "Thing 3".

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/main/java/org/apache/rya/shell/RyaAdminCommands.java
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/main/java/org/apache/rya/shell/RyaAdminCommands.java b/extras/rya.console/src/main/java/org/apache/rya/shell/RyaAdminCommands.java
deleted file mode 100644
index 9239dc7..0000000
--- a/extras/rya.console/src/main/java/org/apache/rya/shell/RyaAdminCommands.java
+++ /dev/null
@@ -1,388 +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.
- */
-package org.apache.rya.shell;
-
-import static java.util.Objects.requireNonNull;
-
-import java.io.IOException;
-import java.util.Collections;
-import java.util.List;
-
-import org.apache.rya.api.client.GetInstanceDetails;
-import org.apache.rya.api.client.Install.DuplicateInstanceNameException;
-import org.apache.rya.api.client.Install.InstallConfiguration;
-import org.apache.rya.api.client.InstanceDoesNotExistException;
-import org.apache.rya.api.client.RyaClient;
-import org.apache.rya.api.client.RyaClientException;
-import org.apache.rya.api.instance.RyaDetails;
-import org.apache.rya.shell.SharedShellState.ConnectionState;
-import org.apache.rya.shell.SharedShellState.ShellState;
-import org.apache.rya.shell.util.InstallPrompt;
-import org.apache.rya.shell.util.InstanceNamesFormatter;
-import org.apache.rya.shell.util.RyaDetailsFormatter;
-import org.apache.rya.shell.util.SparqlPrompt;
-import org.apache.rya.shell.util.UninstallPrompt;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.shell.core.CommandMarker;
-import org.springframework.shell.core.annotation.CliAvailabilityIndicator;
-import org.springframework.shell.core.annotation.CliCommand;
-import org.springframework.shell.core.annotation.CliOption;
-import org.springframework.stereotype.Component;
-
-import com.google.common.base.Optional;
-
-/**
- * Rya Shell commands that have to do with administrative tasks.
- */
-@Component
-public class RyaAdminCommands implements CommandMarker {
-
-    public static final String CREATE_PCJ_CMD = "create-pcj";
-    public static final String DELETE_PCJ_CMD = "delete-pcj";
-    public static final String PRINT_INSTANCE_DETAILS_CMD = "print-instance-details";
-    public static final String INSTALL_CMD = "install";
-    public static final String INSTALL_PARAMETERS_CMD = "install-with-parameters";
-    public static final String LIST_INSTANCES_CMD = "list-instances";
-    public static final String UNINSTALL_CMD = "uninstall";
-    public static final String ADD_USER_CMD = "add-user";
-    public static final String REMOVE_USER_CMD = "remove-user";
-
-    private final SharedShellState state;
-    private final InstallPrompt installPrompt;
-    private final SparqlPrompt sparqlPrompt;
-    private final UninstallPrompt uninstallPrompt;
-
-    /**
-     * Constructs an instance of {@link RyaAdminCommands}.
-     *
-     * @param state - Holds shared state between all of the command classes. (not null)
-     * @param installPrompt - Prompts a user for installation details. (not null)
-     * @param sparqlPrompt - Prompts a user for a SPARQL query. (not null)
-     * @param uninstallPrompt - Prompts a user when uninstalling. (not null)
-     */
-    @Autowired
-    public RyaAdminCommands(
-            final SharedShellState state,
-            final InstallPrompt installPrompt,
-            final SparqlPrompt sparqlPrompt,
-            final UninstallPrompt uninstallPrompt) {
-        this.state = requireNonNull( state );
-        this.installPrompt = requireNonNull(installPrompt);
-        this.sparqlPrompt = requireNonNull(sparqlPrompt);
-        this.uninstallPrompt = requireNonNull(uninstallPrompt);
-    }
-
-    /**
-     * Enables commands that only become available once the Shell has been connected to a Rya Storage.
-     */
-    @CliAvailabilityIndicator({
-        LIST_INSTANCES_CMD,
-        INSTALL_CMD })
-    public boolean areStorageCommandsAvailable() {
-        switch(state.getShellState().getConnectionState()) {
-            case CONNECTED_TO_STORAGE:
-            case CONNECTED_TO_INSTANCE:
-                return true;
-            default:
-                return false;
-        }
-    }
-
-    /**
-     * Enables commands that are always available once the Shell is connected to a Rya Instance.
-     */
-    @CliAvailabilityIndicator({
-        PRINT_INSTANCE_DETAILS_CMD,
-        UNINSTALL_CMD,
-        ADD_USER_CMD,
-        REMOVE_USER_CMD})
-    public boolean areInstanceCommandsAvailable() {
-        switch(state.getShellState().getConnectionState()) {
-            case CONNECTED_TO_INSTANCE:
-                return true;
-            default:
-                return false;
-        }
-    }
-
-    /**
-     * Enables commands that are available when the Shell is connected to a Rya Instance that supports PCJ Indexing.
-     */
-    @CliAvailabilityIndicator({
-        CREATE_PCJ_CMD,
-        DELETE_PCJ_CMD })
-    public boolean arePCJCommandsAvailable() {
-        // The PCJ commands are only available if the Shell is connected to an instance of Rya
-        // that is new enough to use the RyaDetailsRepository and is configured to maintain PCJs.
-        final ShellState shellState = state.getShellState();
-        if(shellState.getConnectionState() == ConnectionState.CONNECTED_TO_INSTANCE) {
-            final GetInstanceDetails getInstanceDetails = shellState.getConnectedCommands().get().getGetInstanceDetails();
-            final String ryaInstanceName = state.getShellState().getRyaInstanceName().get();
-            try {
-                final Optional<RyaDetails> instanceDetails = getInstanceDetails.getDetails( ryaInstanceName );
-                if(instanceDetails.isPresent()) {
-                    return instanceDetails.get().getPCJIndexDetails().isEnabled();
-                }
-            } catch (final RyaClientException e) {
-                return false;
-            }
-        }
-        return false;
-    }
-
-    @CliCommand(value = LIST_INSTANCES_CMD, help = "List the names of the installed Rya instances.")
-    public String listInstances() {
-        // Fetch the command that is connected to the store.
-        final ShellState shellState = state.getShellState();
-        final RyaClient commands = shellState.getConnectedCommands().get();
-        final Optional<String> ryaInstance = shellState.getRyaInstanceName();
-
-        try {
-            // Sort the names alphabetically.
-            final List<String> instanceNames = commands.getListInstances().listInstances();
-            Collections.sort( instanceNames );
-
-            final String report;
-            final InstanceNamesFormatter formatter = new InstanceNamesFormatter();
-            if(ryaInstance.isPresent()) {
-                report = formatter.format(instanceNames, ryaInstance.get());
-            } else {
-                report = formatter.format(instanceNames);
-            }
-            return report;
-
-        } catch (final RyaClientException e) {
-            throw new RuntimeException("Can not list the Rya instances. Reason: " + e.getMessage(), e);
-        }
-    }
-
-    @CliCommand(value = INSTALL_CMD, help = "Create a new instance of Rya interactively.")
-    public String install() {
-        // Fetch the commands that are connected to the store.
-        final RyaClient commands = state.getShellState().getConnectedCommands().get();
-
-        String instanceName = null;
-        InstallConfiguration installConfig = null;
-        try {
-            boolean verified = false;
-            while(!verified) {
-                // Use the install prompt to fetch the user's installation options.
-                instanceName = installPrompt.promptInstanceName();
-                installConfig = installPrompt.promptInstallConfiguration(instanceName);
-
-                // Verify the configuration is what the user actually wants to do.
-                verified = installPrompt.promptVerified(instanceName, installConfig);
-            }
-
-            // Execute the command.
-            commands.getInstall().install(instanceName, installConfig);
-            return String.format("The Rya instance named '%s' has been installed.", instanceName);
-
-        } catch(final DuplicateInstanceNameException e) {
-            throw new RuntimeException(String.format("A Rya instance named '%s' already exists. Try again with a different name.", instanceName), e);
-        } catch (final IOException | RyaClientException e) {
-            throw new RuntimeException("Could not install a new instance of Rya. Reason: " + e.getMessage(), e);
-        }
-    }
-
-    @CliCommand(value = INSTALL_PARAMETERS_CMD, help = "Create a new instance of Rya with command line parameters.")
-    public String installWithParameters(
-            @CliOption(key = {"instanceName"}, mandatory = true, help = "The name of the Rya instance to create.")
-            final String instanceName,
-
-            @CliOption(key = {"enableTableHashPrefix"}, mandatory = false, help = "Use Shard Balancing (improves streamed input write speeds).", unspecifiedDefaultValue = "false", specifiedDefaultValue = "true")
-            final boolean enableTableHashPrefix,
-
-            @CliOption(key = {"enableEntityCentricIndex"}, mandatory = false, help = "Use Entity Centric Indexing.", unspecifiedDefaultValue = "false", specifiedDefaultValue = "true")
-            final boolean enableEntityCentricIndex,
-
-            @CliOption(key = {"enableFreeTextIndex"}, mandatory = false, help = "Use Free Text Indexing.", unspecifiedDefaultValue = "false", specifiedDefaultValue = "true")
-            final boolean enableFreeTextIndex,
-
-            @CliOption(key = {"enableGeospatialIndex"}, mandatory = false, help = "Use Geospatial Indexing.", unspecifiedDefaultValue = "false", specifiedDefaultValue = "true")
-            final boolean enableGeospatialIndex,
-
-            @CliOption(key = {"enableTemporalIndex"}, mandatory = false, help = "Use Temporal Indexing.", unspecifiedDefaultValue = "false", specifiedDefaultValue = "true")
-            final boolean enableTemporalIndex,
-
-            @CliOption(key = {"enablePcjIndex"}, mandatory = false, help = "Use Precomputed Join (PCJ) Indexing.", unspecifiedDefaultValue = "false", specifiedDefaultValue = "true")
-            final boolean enablePcjIndex,
-
-            @CliOption(key = {"fluoPcjAppName"}, mandatory = false, help = "Fluo Application Name for PCJ Index Updater (fluo app must be initialized and enablePcjIndex=true).")
-            final String fluoPcjAppName
-            ) {
-
-        // Fetch the commands that are connected to the store.
-        final RyaClient commands = state.getShellState().getConnectedCommands().get();
-
-        try {
-            final InstallConfiguration installConfig = InstallConfiguration.builder()
-                    .setEnableTableHashPrefix(enableTableHashPrefix)
-                    .setEnableEntityCentricIndex(enableEntityCentricIndex)
-                    .setEnableFreeTextIndex(enableFreeTextIndex)
-                    .setEnableGeoIndex(enableGeospatialIndex)
-                    .setEnableTemporalIndex(enableTemporalIndex)
-                    .setEnablePcjIndex(enablePcjIndex)
-                    .setFluoPcjAppName(fluoPcjAppName)
-                    .build();
-
-            // Verify the configuration is what the user actually wants to do.
-            if (!installPrompt.promptVerified(instanceName, installConfig)) {
-                return "Skipping Installation.";
-            }
-
-            // Execute the command.
-            commands.getInstall().install(instanceName, installConfig);
-            return String.format("The Rya instance named '%s' has been installed.", instanceName);
-
-        } catch(final DuplicateInstanceNameException e) {
-            throw new RuntimeException(String.format("A Rya instance named '%s' already exists. Try again with a different name.", instanceName), e);
-        } catch (final IOException | RyaClientException e) {
-            throw new RuntimeException("Could not install a new instance of Rya. Reason: " + e.getMessage(), e);
-        }
-    }
-
-    @CliCommand(value = PRINT_INSTANCE_DETAILS_CMD, help = "Print information about how the Rya instance is configured.")
-    public String printInstanceDetails() {
-        // Fetch the command that is connected to the store.
-        final ShellState shellState = state.getShellState();
-        final RyaClient commands = shellState.getConnectedCommands().get();
-        final String ryaInstance = shellState.getRyaInstanceName().get();
-
-        try {
-            final Optional<RyaDetails> details = commands.getGetInstanceDetails().getDetails(ryaInstance);
-            if(details.isPresent()) {
-                return new RyaDetailsFormatter().format(details.get());
-            } else {
-                return "This instance of Rya does not have a Rya Details table. Consider migrating to a newer version of Rya.";
-            }
-        } catch(final InstanceDoesNotExistException e) {
-            throw new RuntimeException(String.format("A Rya instance named '%s' does not exist.", ryaInstance), e);
-        } catch (final RyaClientException e) {
-            throw new RuntimeException("Could not get the instance details. Reason: " + e.getMessage(), e);
-        }
-    }
-
-    @CliCommand(value = CREATE_PCJ_CMD, help = "Creates and starts the maintenance of a new PCJ using a Fluo application.")
-    public String createPcj() {
-        // Fetch the command that is connected to the store.
-        final ShellState shellState = state.getShellState();
-        final RyaClient commands = shellState.getConnectedCommands().get();
-        final String ryaInstance = shellState.getRyaInstanceName().get();
-
-        try {
-            // Prompt the user for the SPARQL.
-            final Optional<String> sparql = sparqlPrompt.getSparql();
-            if (sparql.isPresent()) {
-                // Execute the command.
-                final String pcjId = commands.getCreatePCJ().createPCJ(ryaInstance, sparql.get());
-                // Return a message that indicates the ID of the newly created ID.
-                return String.format("The PCJ has been created. Its ID is '%s'.", pcjId);
-            } else {
-                return ""; // user aborted the SPARQL prompt.
-            }
-        } catch (final InstanceDoesNotExistException e) {
-            throw new RuntimeException(String.format("A Rya instance named '%s' does not exist.", ryaInstance), e);
-        } catch (final IOException | RyaClientException e) {
-            throw new RuntimeException("Could not create the PCJ. Provided reasons: " + e.getMessage(), e);
-        }
-    }
-
-    @CliCommand(value = DELETE_PCJ_CMD, help = "Deletes and halts maintenance of a PCJ.")
-    public String deletePcj(
-            @CliOption(key = {"pcjId"}, mandatory = true, help = "The ID of the PCJ that will be deleted.")
-            final String pcjId) {
-        // Fetch the command that is connected to the store.
-        final ShellState shellState = state.getShellState();
-        final RyaClient commands = shellState.getConnectedCommands().get();
-        final String ryaInstance = shellState.getRyaInstanceName().get();
-
-        try {
-            // Execute the command.
-            commands.getDeletePCJ().deletePCJ(ryaInstance, pcjId);
-            return "The PCJ has been deleted.";
-
-        } catch (final InstanceDoesNotExistException e) {
-            throw new RuntimeException(String.format("A Rya instance named '%s' does not exist.", ryaInstance), e);
-        } catch (final RyaClientException e) {
-            throw new RuntimeException("The PCJ could not be deleted. Provided reason: " + e.getMessage(), e);
-        }
-    }
-
-    @CliCommand(value = ADD_USER_CMD, help = "Adds an authorized user to the Rya instance.")
-    public void addUser(
-            @CliOption(key = {"username"}, mandatory = true, help = "The username of the user that will be granted access.")
-            final String username) {
-        // Fetch the Rya client that is connected to the store.
-        final ShellState shellState = state.getShellState();
-        final RyaClient ryaClient = shellState.getConnectedCommands().get();
-        final String ryaInstance = shellState.getRyaInstanceName().get();
-
-        try {
-            ryaClient.getAddUser().addUser(ryaInstance, username);
-        } catch (final InstanceDoesNotExistException e) {
-            throw new RuntimeException(String.format("A Rya instance named '%s' does not exist.", ryaInstance), e);
-        } catch (final RyaClientException e) {
-            throw new RuntimeException("The user's access could not be granted. Provided reason: " + e.getMessage(), e);
-        }
-    }
-
-    @CliCommand(value = REMOVE_USER_CMD, help = "Removes an authorized user from the Rya instance.")
-    public void removeUser(
-            @CliOption(key = {"username"}, mandatory = true, help = "The username of the user whose access will be revoked.")
-            final String username) {
-        // Fetch the Rya client that is connected to the store.
-        final ShellState shellState = state.getShellState();
-        final RyaClient ryaClient = shellState.getConnectedCommands().get();
-        final String ryaInstance = shellState.getRyaInstanceName().get();
-
-        try {
-            ryaClient.getRemoveUser().removeUser(ryaInstance, username);
-        } catch (final InstanceDoesNotExistException e) {
-            throw new RuntimeException(String.format("A Rya instance named '%s' does not exist.", ryaInstance), e);
-        } catch (final RyaClientException e) {
-            throw new RuntimeException("The user's access could not be revoked. Provided reason: " + e.getMessage(), e);
-        }
-    }
-
-    @CliCommand(value = UNINSTALL_CMD, help = "Uninstall an instance of Rya.")
-    public String uninstall() {
-        // Fetch the command that is connected to the store.
-        final ShellState shellState = state.getShellState();
-        final RyaClient commands = shellState.getConnectedCommands().get();
-        final String ryaInstanceName = shellState.getRyaInstanceName().get();
-
-        try {
-            // Make sure the user meant to uninstall the Rya instance.
-            if(!uninstallPrompt.promptAreYouSure(ryaInstanceName)) {
-                return "Cancelled.";
-            }
-
-            // Perform the uninstall.
-            commands.getUninstall().uninstall(ryaInstanceName);
-
-        } catch (final InstanceDoesNotExistException e) {
-            throw new RuntimeException(String.format("A Rya instance named '%s' does not exist.", ryaInstanceName), e);
-        } catch (final IOException | RyaClientException e) {
-            throw new RuntimeException("The Rya instance could not be uninstalled. Provided reason: " + e.getMessage(), e);
-        }
-
-        return "The Rya instance named '" + ryaInstanceName +"' has been uninstalled.";
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/main/java/org/apache/rya/shell/RyaBannerProvider.java
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/main/java/org/apache/rya/shell/RyaBannerProvider.java b/extras/rya.console/src/main/java/org/apache/rya/shell/RyaBannerProvider.java
deleted file mode 100644
index 42581ed..0000000
--- a/extras/rya.console/src/main/java/org/apache/rya/shell/RyaBannerProvider.java
+++ /dev/null
@@ -1,97 +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.
- */
-package org.apache.rya.shell;
-
-import java.io.IOException;
-import java.net.JarURLConnection;
-import java.net.URL;
-import java.util.jar.Attributes;
-import java.util.jar.Manifest;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.core.Ordered;
-import org.springframework.core.annotation.Order;
-import org.springframework.shell.core.CommandMarker;
-import org.springframework.shell.plugin.support.DefaultBannerProvider;
-import org.springframework.stereotype.Component;
-
-/**
- * Customizes the Rya Shell's banner.
- */
-@Component
-@Order(Ordered.HIGHEST_PRECEDENCE)
-public class RyaBannerProvider extends DefaultBannerProvider implements CommandMarker {
-    private final Logger log = LoggerFactory.getLogger(RyaBannerProvider.class);
-
-    private static final String BANNER =
-    " _____                _____ _          _ _ \n" +
-    "|  __ \\              / ____| |        | | |\n" +
-    "| |__) |   _  __ _  | (___ | |__   ___| | |\n" +
-    "|  _  / | | |/ _` |  \\___ \\| '_ \\ / _ \\ | |\n" +
-    "| | \\ \\ |_| | (_| |  ____) | | | |  __/ | |\n" +
-    "|_|  \\_\\__, |\\__,_| |_____/|_| |_|\\___|_|_|\n" +
-    "        __/ |                              \n" +
-    "       |___/                               ";
-
-    private String version = null;
-
-    @Override
-    public String getBanner() {
-        return BANNER + "\n" + getVersion() + "\n";
-    }
-
-    @Override
-    public String getWelcomeMessage() {
-        return "Welcome to the Rya Shell.\n" +
-                "\n" +
-                "Execute one of the connect commands to start interacting with an instance of Rya.\n" +
-                "You may press tab at any time to see which of the commands are available.";
-    }
-
-    @Override
-    public String getVersion() {
-        if(version == null) {
-            version = loadVersion();
-        }
-        return version;
-    }
-
-    /**
-     * Loads the version number from the Rya Shell's MANIFEST.MF file.
-     *
-     * @return The version number of the Rya Shell.
-     */
-    private String loadVersion() {
-        final String className = getClass().getSimpleName() + ".class";
-        final String classPath = getClass().getResource( className ).toString();
-
-        try {
-            final URL classUrl = new URL(classPath);
-            final JarURLConnection jarConnection = (JarURLConnection) classUrl.openConnection();
-            final Manifest manifest = jarConnection.getManifest();
-            final Attributes attributes = manifest.getMainAttributes();
-            return attributes.getValue("Implementation-Version");
-        } catch (final IOException e) {
-            log.error("Could not load the application's version from it's manifest.", e);
-        }
-
-        return "UNKNOWN";
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/main/java/org/apache/rya/shell/RyaCommands.java
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/main/java/org/apache/rya/shell/RyaCommands.java b/extras/rya.console/src/main/java/org/apache/rya/shell/RyaCommands.java
deleted file mode 100644
index 09ee410..0000000
--- a/extras/rya.console/src/main/java/org/apache/rya/shell/RyaCommands.java
+++ /dev/null
@@ -1,166 +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.
- */
-package org.apache.rya.shell;
-
-import static java.util.Objects.requireNonNull;
-
-import java.io.File;
-import java.io.IOException;
-import java.nio.charset.StandardCharsets;
-import java.nio.file.Files;
-import java.text.DecimalFormat;
-import java.util.Objects;
-
-import org.apache.rya.api.client.RyaClient;
-import org.apache.rya.api.client.RyaClientException;
-import org.apache.rya.shell.SharedShellState.ShellState;
-import org.apache.rya.shell.util.ConsolePrinter;
-import org.apache.rya.shell.util.SparqlPrompt;
-import org.openrdf.rio.RDFFormat;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.shell.core.CommandMarker;
-import org.springframework.shell.core.annotation.CliAvailabilityIndicator;
-import org.springframework.shell.core.annotation.CliCommand;
-import org.springframework.shell.core.annotation.CliOption;
-import org.springframework.stereotype.Component;
-
-import com.google.common.base.Optional;
-
-/**
- * Rya Shell commands that have to do with common tasks (loading and querying data)
- */
-@Component
-public class RyaCommands implements CommandMarker {
-
-    private static final Logger log = LoggerFactory.getLogger(RyaCommands.class);
-
-    public static final String LOAD_DATA_CMD = "load-data";
-    public static final String SPARQL_QUERY_CMD = "sparql-query";
-
-    private final SharedShellState state;
-    private final SparqlPrompt sparqlPrompt;
-    private final ConsolePrinter consolePrinter;
-
-    /**
-     * Constructs an instance of {@link RyaCommands}.
-     *
-     * @param state - Holds shared state between all of the command classes. (not null)
-     * @param sparqlPrompt - Prompts a user for a SPARQL query. (not null)
-     * @param consolePrinter - Allows the command to print feedback to the user. (not null)
-     */
-    @Autowired
-    public RyaCommands(final SharedShellState state, final SparqlPrompt sparqlPrompt,
-            final ConsolePrinter consolePrinter) {
-        this.state = Objects.requireNonNull(state);
-        this.sparqlPrompt = requireNonNull(sparqlPrompt);
-        this.consolePrinter = Objects.requireNonNull(consolePrinter);
-    }
-
-    /**
-     * Enables commands that are always available once the Shell is connected to a Rya Instance.
-     */
-    @CliAvailabilityIndicator({ LOAD_DATA_CMD, SPARQL_QUERY_CMD })
-    public boolean areInstanceCommandsAvailable() {
-        switch (state.getShellState().getConnectionState()) {
-        case CONNECTED_TO_INSTANCE:
-            return true;
-        default:
-            return false;
-        }
-    }
-
-    @CliCommand(value = LOAD_DATA_CMD, help = "Loads RDF Statement data from a local file to the connected Rya instance.")
-    public String loadData(
-            @CliOption(key = { "file" }, mandatory = true, help = "A local file containing RDF Statements that is to be loaded.")
-            final String file,
-            @CliOption(key = { "format" }, mandatory = false, help = "The format of the supplied RDF Statements file. [RDF/XML, N-Triples, Turtle, N3, TriX, TriG, BinaryRDF, N-Quads, JSON-LD, RDF/JSON, RDFa]")
-            final String format
-            ) {
-        // Fetch the command that is connected to the store.
-        final ShellState shellState = state.getShellState();
-        final RyaClient commands = shellState.getConnectedCommands().get();
-        final Optional<String> ryaInstanceName = shellState.getRyaInstanceName();
-        try {
-            final long start = System.currentTimeMillis();
-            final File rdfInputFile = new File(file);
-
-            RDFFormat rdfFormat = null;
-            if (format != null) {
-                rdfFormat = RDFFormat.valueOf(format);
-                if (rdfFormat == null) {
-                    throw new RuntimeException("Unsupported RDF Statement data input format: " + format);
-                }
-            }
-            if (rdfFormat == null) {
-                rdfFormat = RDFFormat.forFileName(rdfInputFile.getName());
-                if (rdfFormat == null) {
-                    throw new RuntimeException("Unable to detect RDF Statement data input format for file: " + rdfInputFile);
-                } else {
-                    consolePrinter.println("Detected RDF Format: " + rdfFormat);
-                    consolePrinter.flush();
-                }
-            }
-            commands.getLoadStatementsFile().loadStatements(ryaInstanceName.get(), rdfInputFile.toPath(), rdfFormat);
-
-            final String seconds = new DecimalFormat("0.0##").format((System.currentTimeMillis() - start) / 1000.0);
-            return "Loaded the file: '" + file + "' successfully in " + seconds + " seconds.";
-
-        } catch (final RyaClientException | IOException e) {
-            log.error("Error", e);
-            throw new RuntimeException("Can not load the RDF Statement data. Reason: " + e.getMessage(), e);
-        }
-    }
-
-    @CliCommand(value = SPARQL_QUERY_CMD, help = "Executes the provided SPARQL Query on the connected Rya instance.")
-    public String sparqlQuery(
-            @CliOption(key = { "file" }, mandatory = false, help = "A local file containing the SPARQL Query that is to be read and executed.")
-            final String file) {
-        // Fetch the command that is connected to the store.
-        final ShellState shellState = state.getShellState();
-        final RyaClient commands = shellState.getConnectedCommands().get();
-        final Optional<String> ryaInstanceName = shellState.getRyaInstanceName();
-
-        try {
-            // file option specified
-            String sparqlQuery;
-            if (file != null) {
-                sparqlQuery = new String(Files.readAllBytes(new File(file).toPath()), StandardCharsets.UTF_8);
-                consolePrinter.println("Loaded Query:");
-                consolePrinter.println(sparqlQuery);
-            } else {
-                // No Options specified. Show the user the SPARQL Prompt
-                final Optional<String> sparqlQueryOpt = sparqlPrompt.getSparql();
-                if (sparqlQueryOpt.isPresent()) {
-                    sparqlQuery = sparqlQueryOpt.get();
-                } else {
-                    return ""; // user aborted the SPARQL prompt.
-                }
-            }
-
-            consolePrinter.println("Executing Query...");
-            consolePrinter.flush();
-            return commands.getExecuteSparqlQuery().executeSparqlQuery(ryaInstanceName.get(), sparqlQuery);
-        } catch (final RyaClientException | IOException e) {
-            log.error("Error", e);
-            throw new RuntimeException("Can not execute the SPARQL Query. Reason: " + e.getMessage(), e);
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/main/java/org/apache/rya/shell/RyaConnectionCommands.java
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/main/java/org/apache/rya/shell/RyaConnectionCommands.java b/extras/rya.console/src/main/java/org/apache/rya/shell/RyaConnectionCommands.java
deleted file mode 100644
index f5ba451..0000000
--- a/extras/rya.console/src/main/java/org/apache/rya/shell/RyaConnectionCommands.java
+++ /dev/null
@@ -1,166 +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.
- */
-package org.apache.rya.shell;
-
-import static java.util.Objects.requireNonNull;
-
-import java.io.IOException;
-import java.nio.CharBuffer;
-
-import org.apache.accumulo.core.client.AccumuloException;
-import org.apache.accumulo.core.client.AccumuloSecurityException;
-import org.apache.accumulo.core.client.Connector;
-import org.apache.rya.api.client.InstanceExists;
-import org.apache.rya.api.client.RyaClient;
-import org.apache.rya.api.client.RyaClientException;
-import org.apache.rya.api.client.accumulo.AccumuloConnectionDetails;
-import org.apache.rya.api.client.accumulo.AccumuloRyaClientFactory;
-import org.apache.rya.shell.SharedShellState.ConnectionState;
-import org.apache.rya.shell.util.ConnectorFactory;
-import org.apache.rya.shell.util.PasswordPrompt;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.shell.core.CommandMarker;
-import org.springframework.shell.core.annotation.CliAvailabilityIndicator;
-import org.springframework.shell.core.annotation.CliCommand;
-import org.springframework.shell.core.annotation.CliOption;
-import org.springframework.stereotype.Component;
-
-import com.google.common.base.Optional;
-
-/**
- * Spring Shell commands that manage the connection that is used by the shell.
- */
-@Component
-public class RyaConnectionCommands implements CommandMarker {
-
-    // Command line commands.
-    public static final String PRINT_CONNECTION_DETAILS_CMD = "print-connection-details";
-    public static final String CONNECT_ACCUMULO_CMD = "connect-accumulo";
-    public static final String CONNECT_INSTANCE_CMD = "connect-rya";
-    public static final String DISCONNECT_COMMAND_NAME_CMD = "disconnect";
-
-    private final SharedShellState sharedState;
-    private final PasswordPrompt passwordPrompt;
-
-    /**
-     * Constructs an instance of {@link RyaConnectionCommands}.
-     *
-     * @param state - Holds shared state between all of the command classes. (not null)
-     * @param passwordPrompt - Prompts the user for their password when connecting to a Rya store. (not null)
-     */
-    @Autowired
-    public RyaConnectionCommands(final SharedShellState state, final PasswordPrompt passwordPrompt) {
-        this.sharedState = requireNonNull( state );
-        this.passwordPrompt = requireNonNull(passwordPrompt);
-    }
-
-    @CliAvailabilityIndicator({PRINT_CONNECTION_DETAILS_CMD})
-    public boolean isPrintConnectionDetailsAvailable() {
-        return true;
-    }
-
-    @CliAvailabilityIndicator({CONNECT_ACCUMULO_CMD})
-    public boolean areConnectCommandsAvailable() {
-        return sharedState.getShellState().getConnectionState() == ConnectionState.DISCONNECTED;
-    }
-
-    @CliAvailabilityIndicator({CONNECT_INSTANCE_CMD})
-    public boolean isConnectToInstanceAvailable() {
-        switch(sharedState.getShellState().getConnectionState()) {
-            case CONNECTED_TO_STORAGE:
-            case CONNECTED_TO_INSTANCE:
-                return true;
-            default:
-                return false;
-        }
-    }
-
-    @CliAvailabilityIndicator({DISCONNECT_COMMAND_NAME_CMD})
-    public boolean isDisconnectAvailable() {
-        return sharedState.getShellState().getConnectionState() != ConnectionState.DISCONNECTED;
-    }
-
-    @CliCommand(value = PRINT_CONNECTION_DETAILS_CMD, help = "Print information about the Shell's Rya storage connection.")
-    public String printConnectionDetails() {
-        final Optional<AccumuloConnectionDetails> detailsHolder = sharedState.getShellState().getConnectionDetails();
-
-        if(detailsHolder.isPresent()) {
-            final AccumuloConnectionDetails details = detailsHolder.get();
-            return "The shell is connected to an instance of Accumulo using the following parameters:\n" +
-                    "    Username: " + details.getUsername() + "\n" +
-                    "    Instance Name: " + details.getInstanceName() + "\n" +
-                    "    Zookeepers: " + details.getZookeepers();
-        } else {
-            return "The shell is not connected to anything.";
-        }
-    }
-
-    @CliCommand(value = CONNECT_ACCUMULO_CMD, help = "Connect the shell to an instance of Accumulo.")
-    public String connectToAccumulo(
-            @CliOption(key = {"username"}, mandatory = true, help = "The username that will be used to connect to Accummulo.")
-            final String username,
-            @CliOption(key = {"instanceName"}, mandatory = true, help = "The name of the Accumulo instance that will be connected to.")
-            final String instanceName,
-            @CliOption(key = {"zookeepers"}, mandatory = true, help = "A comma delimited list of zookeeper server hostnames.")
-            final String zookeepers
-            ) {
-
-        try {
-            // Prompt the user for their password.
-            final char[] password = passwordPrompt.getPassword();
-            final Connector connector= new ConnectorFactory().connect(username, CharBuffer.wrap(password), instanceName, zookeepers);
-
-            // Initialize the connected to Accumulo shared state.
-            final AccumuloConnectionDetails accumuloDetails = new AccumuloConnectionDetails(username, password, instanceName, zookeepers);
-            final RyaClient commands = AccumuloRyaClientFactory.build(accumuloDetails, connector);
-            sharedState.connectedToAccumulo(accumuloDetails, commands);
-
-        } catch(IOException | AccumuloException | AccumuloSecurityException e) {
-            throw new RuntimeException("Could not connect to Accumulo. Reason: " + e.getMessage(), e);
-        }
-
-        return "Connected. You must select a Rya instance to interact with next.";
-    }
-
-    @CliCommand(value = CONNECT_INSTANCE_CMD, help = "Connect to a specific Rya instance")
-    public void connectToInstance(
-            @CliOption(key = {"instance"}, mandatory = true, help = "The name of the Rya instance the shell will interact with.")
-            final String instance) {
-        try {
-            final InstanceExists instanceExists = sharedState.getShellState().getConnectedCommands().get().getInstanceExists();
-
-            // TODO gracefully fail if that version doen't support it. maybe the list command should go ahead
-
-            // Make sure the requested instance exists.
-            if(!instanceExists.exists(instance)) {
-                throw new RuntimeException(String.format("'%s' does not match an existing Rya instance.", instance));
-            }
-        } catch(final RyaClientException e) {
-            throw new RuntimeException("Could not connect to Rya instance. Reason: " + e.getMessage(), e);
-        }
-
-        // Store the instance name in the shared state.
-        sharedState.connectedToInstance(instance);
-    }
-
-    @CliCommand(value = DISCONNECT_COMMAND_NAME_CMD, help = "Disconnect the shell's Rya storage connection (Accumulo).")
-    public void disconnect() {
-        sharedState.disconnected();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/main/java/org/apache/rya/shell/RyaPromptProvider.java
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/main/java/org/apache/rya/shell/RyaPromptProvider.java b/extras/rya.console/src/main/java/org/apache/rya/shell/RyaPromptProvider.java
deleted file mode 100644
index ed5f261..0000000
--- a/extras/rya.console/src/main/java/org/apache/rya/shell/RyaPromptProvider.java
+++ /dev/null
@@ -1,62 +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.
- */
-package org.apache.rya.shell;
-
-import static java.util.Objects.requireNonNull;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.core.Ordered;
-import org.springframework.core.annotation.Order;
-import org.springframework.shell.plugin.support.DefaultPromptProvider;
-import org.springframework.stereotype.Component;
-
-import org.apache.rya.shell.SharedShellState.ShellState;
-
-/**
- * Customizes the Rya Shell's prompt.
- */
-@Component
-@Order(Ordered.HIGHEST_PRECEDENCE)
-public class RyaPromptProvider extends DefaultPromptProvider {
-
-    private final SharedShellState sharedState;
-
-    @Autowired
-    public RyaPromptProvider(final SharedShellState sharedState) {
-        this.sharedState = requireNonNull(sharedState);
-    }
-
-    @Override
-    public String getPrompt() {
-        final ShellState state = sharedState.getShellState();
-
-        switch(state.getConnectionState()) {
-            case DISCONNECTED:
-                return "rya> ";
-            case CONNECTED_TO_STORAGE:
-                return String.format("rya/%s> ", state.getConnectionDetails().get().getInstanceName());
-            case CONNECTED_TO_INSTANCE:
-                return String.format("rya/%s:%s> ",
-                        state.getConnectionDetails().get().getInstanceName(),
-                        state.getRyaInstanceName().get());
-            default:
-                return "rya> ";
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/main/java/org/apache/rya/shell/RyaShellHistoryProvider.java
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/main/java/org/apache/rya/shell/RyaShellHistoryProvider.java b/extras/rya.console/src/main/java/org/apache/rya/shell/RyaShellHistoryProvider.java
deleted file mode 100644
index b4ade8f..0000000
--- a/extras/rya.console/src/main/java/org/apache/rya/shell/RyaShellHistoryProvider.java
+++ /dev/null
@@ -1,51 +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.
- */
-package org.apache.rya.shell;
-
-import java.io.File;
-
-import org.springframework.core.Ordered;
-import org.springframework.core.annotation.Order;
-import org.springframework.shell.plugin.HistoryFileNameProvider;
-import org.springframework.stereotype.Component;
-
-/**
- * Customizes the Rya Shell's history file.
- */
-@Component
-@Order(Ordered.HIGHEST_PRECEDENCE)
-public class RyaShellHistoryProvider implements HistoryFileNameProvider {
-
-    public static final String RYA_SHELL_HISTORY_FILENAME = ".rya_shell_history";
-
-    @Override
-    public String getHistoryFileName() {
-        final String userHome = System.getProperty("user.home");
-        if(userHome == null) {
-            return RYA_SHELL_HISTORY_FILENAME;
-        } else {
-            return new File(userHome, RYA_SHELL_HISTORY_FILENAME).getAbsolutePath();
-        }
-    }
-
-    @Override
-    public String getProviderName() {
-        return this.getClass().getSimpleName();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/main/java/org/apache/rya/shell/SharedShellState.java
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/main/java/org/apache/rya/shell/SharedShellState.java b/extras/rya.console/src/main/java/org/apache/rya/shell/SharedShellState.java
deleted file mode 100644
index 526b031..0000000
--- a/extras/rya.console/src/main/java/org/apache/rya/shell/SharedShellState.java
+++ /dev/null
@@ -1,339 +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.
- */
-package org.apache.rya.shell;
-
-import static java.util.Objects.requireNonNull;
-
-import java.util.Objects;
-import java.util.concurrent.locks.ReentrantLock;
-
-import edu.umd.cs.findbugs.annotations.Nullable;
-import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
-import edu.umd.cs.findbugs.annotations.NonNull;
-import net.jcip.annotations.Immutable;
-import net.jcip.annotations.ThreadSafe;
-
-import com.google.common.base.Optional;
-
-import org.apache.rya.api.client.RyaClient;
-import org.apache.rya.api.client.accumulo.AccumuloConnectionDetails;
-
-/**
- * Holds values that are shared between the various Rya command classes.
- */
-@ThreadSafe
-@DefaultAnnotation(NonNull.class)
-public class SharedShellState {
-    // The shared nature of this object means we shouldn't assume only a single thread is accessing it.
-    private final ReentrantLock lock = new ReentrantLock();
-
-    // The current state.
-    private ShellState shellState = ShellState.builder()
-            .setConnectionState( ConnectionState.DISCONNECTED )
-            .build();
-
-    /**
-     * @return The values that define the state of the Rya Shell.
-     */
-    public ShellState getShellState() {
-        lock.lock();
-        try {
-            return shellState;
-        } finally {
-            lock.unlock();
-        }
-    }
-
-    /**
-     * This method indicates a shift into the {@link ConnectionState#CONNECTED_TO_STORAGE} state.
-     * <p/>
-     * Store the values used by an Accumulo Rya Storage connection. This may
-     * only be called when the shell is disconnected.
-     *
-     * @param connectionDetails - Metadata about the Accumulo connection. (not null)
-     * @param connectedCommands - Rya Commands that will execute against the Accumulo instance. (not null)
-     * @throws IllegalStateException Thrown if the shell is already connected to a Rya storage.
-     */
-    public void connectedToAccumulo(
-            final AccumuloConnectionDetails connectionDetails,
-            final RyaClient connectedCommands) throws IllegalStateException {
-        requireNonNull(connectionDetails);
-        requireNonNull(connectedCommands);
-
-        lock.lock();
-        try {
-            // Ensure the Rya Shell is disconnected.
-            if(shellState.getConnectionState() != ConnectionState.DISCONNECTED) {
-                throw new IllegalStateException("You must clear the old connection state before you may set a new connection state.");
-            }
-
-            // Store the connection details.
-            shellState = ShellState.builder()
-                .setConnectionState( ConnectionState.CONNECTED_TO_STORAGE )
-                .setAccumuloConnectionDetails( connectionDetails )
-                .setConnectedCommands( connectedCommands )
-                .build();
-        } finally {
-            lock.unlock();
-        }
-    }
-
-    /**
-     * This method indicates a shift into the {@link ConnectionState#CONNECTED_TO_INSTANCE} state.
-     * <p/>
-     * Store the name of the Rya instance all commands will be executed against.
-     *
-     * @param instanceName - The name of the Rya instance. (not null)
-     * @throws IllegalStateException Thrown if the shell is disconnected.
-     */
-    public void connectedToInstance(final String instanceName) throws IllegalStateException {
-        requireNonNull(instanceName);
-
-        lock.lock();
-        try {
-            // Verify the Rya Shell is connected to a storage.
-            if(shellState.getConnectionState() == ConnectionState.DISCONNECTED) {
-                throw new IllegalStateException("You can not set a Rya Instance Name before connecting to a Rya Storage.");
-            }
-
-            // Set the instance name.
-            shellState = ShellState.builder( shellState )
-                    .setConnectionState(ConnectionState.CONNECTED_TO_INSTANCE)
-                    .setRyaInstanceName( instanceName )
-                    .build();
-        } finally {
-            lock.unlock();
-        }
-    }
-
-    /**
-     * This method indicates a shift into the {@link DISCONNECTED} state.
-     * <p/>
-     * Clears all of the values associated with a Rya Storage/Instance connection.
-     * If the shell is already disconnected, then this method does not do anything.
-     */
-    public void disconnected() {
-        lock.lock();
-        try {
-            shellState = ShellState.builder()
-                .setConnectionState(ConnectionState.DISCONNECTED)
-                .build();
-        } finally {
-            lock.unlock();
-        }
-    }
-
-    /**
-     * Enumerates the various states a Rya Shell may be in.
-     */
-    public static enum ConnectionState {
-        /**
-         * The shell is not connected to a Rya Storage.
-         */
-        DISCONNECTED,
-
-        /**
-         * The shell is connected to a Rya Storage, but a specific instance hasn't been set.
-         */
-        CONNECTED_TO_STORAGE,
-
-        /**
-         * The shell is connected to Rya Storage and a specific Rya Instance.
-         */
-        CONNECTED_TO_INSTANCE;
-    }
-
-    /**
-     * Values that define the state of a Rya Shell.
-     */
-    @Immutable
-    @DefaultAnnotation(NonNull.class)
-    public static final class ShellState {
-        // Indicates the state of the shell.
-        private final ConnectionState connectionState;
-
-        // Connection specific values.
-        private final Optional<AccumuloConnectionDetails> connectionDetails;
-        private final Optional<RyaClient> connectedCommands;
-
-        // Instance specific values.
-        private final Optional<String> instanceName;
-
-        private ShellState(
-                final ConnectionState connectionState,
-                final Optional<AccumuloConnectionDetails> connectionDetails,
-                final Optional<RyaClient> connectedCommands,
-                final Optional<String> instanceName) {
-            this.connectionState = requireNonNull(connectionState);
-            this.connectionDetails = requireNonNull(connectionDetails);
-            this.connectedCommands = requireNonNull(connectedCommands);
-            this.instanceName = requireNonNull(instanceName);
-        }
-
-        /**
-         * @return The {@link ConnectionState} of the Rya Shell.
-         */
-        public ConnectionState getConnectionState() {
-            return connectionState;
-        }
-
-        /**
-         * @return Metadata about the Accumulo connection. The value will not be present
-         *   if the Rya Shell is not connected to a storage.
-         */
-        public Optional<AccumuloConnectionDetails> getConnectionDetails() {
-            return connectionDetails;
-        }
-
-        /**
-         * @return The {@link RyaClient} to use when a command on the shell is issued.
-         *   The value will not be present if the Rya Shell is not connected to a storage.
-         */
-        public Optional<RyaClient> getConnectedCommands() {
-            return connectedCommands;
-        }
-
-        /**
-         * @return The name of the Rya Instance the Rya Shell is issuing commands to.
-         *   The value will not be present if the Rya Shell is not connected to a
-         *   storage or if a target instance has not been set yet.
-         */
-        public Optional<String> getRyaInstanceName() {
-            return instanceName;
-        }
-
-        @Override
-        public int hashCode() {
-            return Objects.hash(connectionState, connectionDetails, connectedCommands, instanceName);
-        }
-
-        @Override
-        public boolean equals(final Object obj) {
-            if(this == obj) {
-                return true;
-            }
-            if(obj instanceof ShellState) {
-                final ShellState state = (ShellState)obj;
-                return Objects.equals(connectionState, state.connectionState) &&
-                        Objects.equals(connectionDetails, state.connectionDetails) &&
-                        Objects.equals(connectedCommands, state.connectedCommands) &&
-                        Objects.equals(instanceName, state.instanceName);
-            }
-            return false;
-        }
-
-        /**
-         * @return An empty instance of {@link Builder}.
-         */
-        public static Builder builder() {
-            return new Builder();
-        }
-
-        /**
-         * Create an instance of {@link Builder} populated with the values of {code shellState}.
-         *
-         * @param shellState - The initial state of the Builder.
-         * @return An instance of {@link Builder} populated with the values
-         *   of {code shellState}.
-         */
-        public static Builder builder(final ShellState shellState) {
-            return new Builder(shellState);
-        }
-
-        /**
-         * Builds instances of {@link ShellState}.
-         */
-        @DefaultAnnotation(NonNull.class)
-        public static class Builder {
-            private ConnectionState connectionState;
-
-            // Connection specific values.
-            private AccumuloConnectionDetails connectionDetails;
-            private RyaClient connectedCommands;
-
-            // Instance specific values.
-            private String instanceName;
-
-            /**
-             * Constructs an empty instance of {@link Builder}.
-             */
-            public Builder() { }
-
-            /**
-             * Constructs an instance of {@builder} initialized with the values
-             * of a {@link ShellState}.
-             *
-             * @param shellState - The initial state of the builder. (not null)
-             */
-            public Builder(final ShellState shellState) {
-                this.connectionState = shellState.getConnectionState();
-                this.connectionDetails = shellState.getConnectionDetails().orNull();
-                this.connectedCommands = shellState.getConnectedCommands().orNull();
-                this.instanceName = shellState.getRyaInstanceName().orNull();
-            }
-
-            /**
-             * @param connectionState - The {@link ConnectionState} of the Rya Shell.
-             * @return This {@link Builder} so that method invocations may be chained.
-             */
-            public Builder setConnectionState(@Nullable final ConnectionState connectionState) {
-                this.connectionState = connectionState;
-                return this;
-            }
-
-            /**
-             * @param connectionDetails - Metadata about the Accumulo connection.
-             * @return This {@link Builder} so that method invocations may be chained.
-             */
-            public Builder setAccumuloConnectionDetails(@Nullable final AccumuloConnectionDetails connectionDetails) {
-                this.connectionDetails = connectionDetails;
-                return this;
-            }
-
-            /**
-             * @param connectedCommands - The {@link RyaClient} to use when a command on the shell is issued.
-             * @return This {@link Builder} so that method invocations may be chained.
-             */
-            public Builder setConnectedCommands(@Nullable final RyaClient connectedCommands) {
-                this.connectedCommands = connectedCommands;
-                return this;
-            }
-
-            /**
-             * @param instanceName - The name of the Rya Instance the Rya Shell is issuing commands to.
-             * @return This {@link Builder} so that method invocations may be chained.
-             */
-            public Builder setRyaInstanceName(@Nullable final String instanceName) {
-                this.instanceName = instanceName;
-                return this;
-            }
-
-            /**
-             * @return An instance of {@link ShellState} built using this builder's values.
-             */
-            public ShellState build() {
-                return new ShellState(
-                        connectionState,
-                        Optional.fromNullable(connectionDetails),
-                        Optional.fromNullable(connectedCommands),
-                        Optional.fromNullable(instanceName));
-            }
-        }
-    }
-}
\ No newline at end of file



[6/7] incubator-rya git commit: RYA-325 Renamed rya.console to rya.shell. Closes #194

Posted by mi...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/main/java/org/apache/rya/shell/util/ConnectorFactory.java
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/main/java/org/apache/rya/shell/util/ConnectorFactory.java b/extras/rya.console/src/main/java/org/apache/rya/shell/util/ConnectorFactory.java
deleted file mode 100644
index d18c5c8..0000000
--- a/extras/rya.console/src/main/java/org/apache/rya/shell/util/ConnectorFactory.java
+++ /dev/null
@@ -1,67 +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.
- */
-package org.apache.rya.shell.util;
-
-import static java.util.Objects.requireNonNull;
-
-import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
-import edu.umd.cs.findbugs.annotations.NonNull;
-
-import org.apache.accumulo.core.client.AccumuloException;
-import org.apache.accumulo.core.client.AccumuloSecurityException;
-import org.apache.accumulo.core.client.Connector;
-import org.apache.accumulo.core.client.Instance;
-import org.apache.accumulo.core.client.ZooKeeperInstance;
-import org.apache.accumulo.core.client.security.tokens.PasswordToken;
-
-/**
- * Creates {@link Connector}s that are linked to an instance of Accumulo.
- */
-@DefaultAnnotation(NonNull.class)
-public class ConnectorFactory {
-
-    /**
-     * Create a {@link Connector} that uses the provided connection details.
-     *
-     * @param username - The username the connection will use. (not null)
-     * @param password - The password the connection will use. (not null)
-     * @param instanceName - The name of the Accumulo instance. (not null)
-     * @param zookeeperHostnames - A comma delimited list of the Zookeeper server hostnames. (not null)
-     * @return A {@link Connector} that may be used to access the instance of Accumulo.
-     * @throws AccumuloSecurityException Could not connect for security reasons.
-     * @throws AccumuloException Could not connect for other reasons.
-     */
-    public Connector connect(
-            final String username,
-            final CharSequence password,
-            final String instanceName,
-            final String zookeeperHostnames) throws AccumuloException, AccumuloSecurityException {
-        requireNonNull(username);
-        requireNonNull(password);
-        requireNonNull(instanceName);
-        requireNonNull(zookeeperHostnames);
-
-        // Setup the password token that will be used.
-        final PasswordToken token = new PasswordToken( password );
-
-        // Connect to the instance of Accumulo.
-        final Instance instance = new ZooKeeperInstance(instanceName, zookeeperHostnames);
-        return instance.getConnector(username, token);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/main/java/org/apache/rya/shell/util/ConsolePrinter.java
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/main/java/org/apache/rya/shell/util/ConsolePrinter.java b/extras/rya.console/src/main/java/org/apache/rya/shell/util/ConsolePrinter.java
deleted file mode 100644
index 4492a87..0000000
--- a/extras/rya.console/src/main/java/org/apache/rya/shell/util/ConsolePrinter.java
+++ /dev/null
@@ -1,85 +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.
- */
-package org.apache.rya.shell.util;
-
-import java.io.IOException;
-
-import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
-import edu.umd.cs.findbugs.annotations.NonNull;
-import jline.console.ConsoleReader;
-
-/**
- * A mechanism for printing content to the console.
- */
-@DefaultAnnotation(NonNull.class)
-public interface ConsolePrinter {
-
-    /**
-     * Prints the provided content to the console.
-     * @param cs - Output the specified String to the console.
-     * @throws IOException There was a problem reading the user's input.
-     */
-    public void print(CharSequence cs) throws IOException;
-
-    /**
-     * Prints the provided content to the console with a newline.
-     * @param cs - Output the specified String to the console.
-     * @throws IOException There was a problem reading the user's input.
-     */
-    public void println(CharSequence cs) throws IOException;
-
-    /**
-     * Prints a newline.
-     * @throws IOException There was a problem reading the user's input.
-     */
-    public void println() throws IOException;
-
-    /**
-     * Flush any pending console updates to the console output stream.
-     * @throws IOException
-     */
-    public void flush() throws IOException;
-
-    /**
-     * Prints to the console using a JLine {@link ConsoleReader}.
-     */
-    @DefaultAnnotation(NonNull.class)
-    public static class JLineConsolePrinter extends JLinePrompt implements ConsolePrinter {
-
-        @Override
-        public void print(final CharSequence cs) throws IOException {
-            getReader().print(cs);
-        }
-
-        @Override
-        public void println(final CharSequence cs) throws IOException {
-            getReader().println(cs);
-        }
-
-        @Override
-        public void println() throws IOException {
-            getReader().println();
-        }
-
-        @Override
-        public void flush() throws IOException {
-            getReader().flush();
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/main/java/org/apache/rya/shell/util/InstallPrompt.java
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/main/java/org/apache/rya/shell/util/InstallPrompt.java b/extras/rya.console/src/main/java/org/apache/rya/shell/util/InstallPrompt.java
deleted file mode 100644
index 5d9d48b..0000000
--- a/extras/rya.console/src/main/java/org/apache/rya/shell/util/InstallPrompt.java
+++ /dev/null
@@ -1,139 +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.
- */
-package org.apache.rya.shell.util;
-
-import java.io.IOException;
-
-import org.apache.rya.api.client.Install.InstallConfiguration;
-
-import com.google.common.base.Optional;
-
-import jline.console.ConsoleReader;
-
-/**
- * A mechanism for prompting a user of the application for a the parameters
- * that will be used when installing an instance of Rya.
- */
-public interface InstallPrompt {
-
-    /**
-     * Prompt the user for the name of the Rya instance that will be created.
-     *
-     * @return The value they entered.
-     * @throws IOException There was a problem reading the value.
-     */
-    public String promptInstanceName() throws IOException;
-
-    /**
-     * Prompt the user for which features of Rya they want enabled.
-     *
-     * @param instanceName - The Rya instance name.
-     * @return The value they entered.
-     * @throws IOException There was a problem reading the values.
-     */
-    public InstallConfiguration promptInstallConfiguration(String instanceName) throws IOException;
-
-    /**
-     * Prompt the user asking them if they are sure they would like to do the
-     * install.
-     *
-     * @return The value they entered.
-     * @throws IOException There was a problem reading the value.
-     */
-    public boolean promptVerified(String instanceName, InstallConfiguration installConfig) throws IOException;
-
-    /**
-     * Prompts a user for install information using a JLine {@link ConsoleReader}.
-     */
-    public static class JLineAccumuloInstallPrompt extends JLinePrompt implements InstallPrompt {
-
-        @Override
-        public String promptInstanceName() throws IOException {
-            final String prompt = makeFieldPrompt("Rya Instance Name", "rya_");
-            final String instanceName = promptString(prompt, Optional.of("rya_"));
-            return instanceName;
-        }
-
-        @Override
-        public InstallConfiguration promptInstallConfiguration(final String instanceName) throws IOException {
-            final InstallConfiguration.Builder builder = InstallConfiguration.builder();
-
-            String prompt = makeFieldPrompt("Use Shard Balancing (improves streamed input write speeds)", false);
-            final boolean enableTableHashPrefix = promptBoolean(prompt, Optional.of(false));
-            builder.setEnableTableHashPrefix( enableTableHashPrefix );
-
-            prompt = makeFieldPrompt("Use Entity Centric Indexing", true);
-            final boolean enableEntityCentricIndexing = promptBoolean(prompt, Optional.of(true));
-            builder.setEnableEntityCentricIndex( enableEntityCentricIndexing );
-
-            prompt = makeFieldPrompt("Use Free Text Indexing", true);
-            final boolean enableFreeTextIndexing = promptBoolean(prompt, Optional.of(true));
-            builder.setEnableFreeTextIndex( enableFreeTextIndexing );
-
-            prompt = makeFieldPrompt("Use Geospatial Indexing", true);
-            final boolean enableGeoIndexing = promptBoolean(prompt, Optional.of(true));
-            builder.setEnableGeoIndex( enableGeoIndexing );
-
-            prompt = makeFieldPrompt("Use Temporal Indexing", true);
-            final boolean useTemporalIndexing = promptBoolean(prompt, Optional.of(true));
-            builder.setEnableTemporalIndex( useTemporalIndexing );
-
-            prompt = makeFieldPrompt("Use Precomputed Join Indexing", true);
-            final boolean enablePCJIndexing = promptBoolean(prompt, Optional.of(true));
-            builder.setEnablePcjIndex( enablePCJIndexing );
-
-            if(enablePCJIndexing) {
-                final boolean useFluoApp = promptBoolean("Use a Fluo application to update the PCJ Index? (y/n) ", Optional.absent());
-
-                if(useFluoApp) {
-                    prompt = makeFieldPrompt("PCJ Updater Fluo Application Name (must be initialized)", instanceName + "pcj_updater");
-                    final String fluoAppName = promptString(prompt, Optional.of(instanceName + "pcj_updater"));
-                    builder.setFluoPcjAppName(fluoAppName);
-                }
-            }
-
-            return builder.build();
-        }
-
-        @Override
-        public boolean promptVerified(final String instanceName, final InstallConfiguration installConfig) throws IOException {
-            final ConsoleReader reader = getReader();
-            reader.println();
-            reader.println("A Rya instance will be installed using the following values:");
-            reader.println("   Instance Name: " + instanceName);
-            reader.println("   Use Shard Balancing: " + installConfig.isTableHashPrefixEnabled());
-            reader.println("   Use Entity Centric Indexing: " + installConfig.isEntityCentrixIndexEnabled());
-            reader.println("   Use Free Text Indexing: " + installConfig.isFreeTextIndexEnabled());
-            reader.println("   Use Geospatial Indexing: " + installConfig.isGeoIndexEnabled());
-            reader.println("   Use Temporal Indexing: " + installConfig.isTemporalIndexEnabled());
-            reader.println("   Use Precomputed Join Indexing: " + installConfig.isPcjIndexEnabled());
-            if(installConfig.isPcjIndexEnabled()) {
-                if(installConfig.getFluoPcjAppName().isPresent()) {
-                    reader.println("   PCJ Updater Fluo Application Name: " + installConfig.getFluoPcjAppName().get());
-                } else {
-                    reader.println("   Not using a PCJ Updater Fluo Application");
-                }
-            }
-
-            reader.println("");
-
-            return promptBoolean("Continue with the install? (y/n) ", Optional.absent());
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/main/java/org/apache/rya/shell/util/InstanceNamesFormatter.java
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/main/java/org/apache/rya/shell/util/InstanceNamesFormatter.java b/extras/rya.console/src/main/java/org/apache/rya/shell/util/InstanceNamesFormatter.java
deleted file mode 100644
index f50164b..0000000
--- a/extras/rya.console/src/main/java/org/apache/rya/shell/util/InstanceNamesFormatter.java
+++ /dev/null
@@ -1,78 +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.
- */
-package org.apache.rya.shell.util;
-
-import static java.util.Objects.requireNonNull;
-
-import java.util.List;
-
-import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
-import edu.umd.cs.findbugs.annotations.NonNull;
-
-/**
- * Pretty formats a list of Rya instance names.
- */
-@DefaultAnnotation(NonNull.class)
-public class InstanceNamesFormatter {
-
-    /**
-     * Formats the list of Rya instance names with a '*' next to whichever entry
-     * matches the connected name.
-     *
-     * @param names - The Rya instance names. (not null)
-     * @param connectedName - The instance name that will have a '*' next to it. (not null)
-     * @return A string holding the pretty formatted list.
-     */
-    public String format(final List<String> names, final String connectedName) {
-        requireNonNull(names);
-        requireNonNull(connectedName);
-
-        // Will be -1 if the connected name isn't in the list of names, so none will be starred.
-        final int connectedIndex = names.indexOf( connectedName );
-
-        final StringBuilder formatted = new StringBuilder("Rya instance names:\n");
-        for(int i = 0; i < names.size(); i++) {
-            if(i == connectedIndex) {
-                formatted.append(" * ");
-            } else {
-                formatted.append("   ");
-            }
-            formatted.append( names.get(i) ).append("\n");
-        }
-
-        return formatted.toString();
-    }
-
-    /**
-     * Formats the list of Rya instance names.
-     *
-     * @param names - The Rya instance names. (not null)
-     * @return A string holding the pretty formatted list.
-     */
-    public String format(final List<String> names) {
-        requireNonNull(names);
-
-        final StringBuilder formatted = new StringBuilder("Rya instance names:\n");
-        for(int i = 0; i < names.size(); i++) {
-            formatted.append("   ").append( names.get(i) ).append("\n");
-        }
-
-        return formatted.toString();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/main/java/org/apache/rya/shell/util/JLinePrompt.java
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/main/java/org/apache/rya/shell/util/JLinePrompt.java b/extras/rya.console/src/main/java/org/apache/rya/shell/util/JLinePrompt.java
deleted file mode 100644
index a259593..0000000
--- a/extras/rya.console/src/main/java/org/apache/rya/shell/util/JLinePrompt.java
+++ /dev/null
@@ -1,211 +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.
- */
-package org.apache.rya.shell.util;
-
-import static java.util.Objects.requireNonNull;
-
-import java.io.IOException;
-import java.util.Set;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.util.FieldUtils;
-import org.springframework.shell.core.Shell;
-
-import com.google.common.base.Optional;
-import com.google.common.collect.Sets;
-
-import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
-import edu.umd.cs.findbugs.annotations.NonNull;
-import jline.console.ConsoleReader;
-
-/**
- * Provides access to the host {@link Shell}'s {@link ConsoleReader} and some
- * utility functions for using it.
- */
-@DefaultAnnotation(NonNull.class)
-public abstract class JLinePrompt {
-
-    /**
-     * Defines things that may be typed in response to a boolean prompt that evaluate to true.
-     */
-    private static final Set<String> affirmativeStrings = Sets.newHashSet("true", "t", "yes", "y");
-
-    /**
-     * Defines things that may be typed in response to a boolean prompt that evaluate to false.
-     */
-    private static final Set<String> negativeStrings = Sets.newHashSet("false", "f", "no", "n");
-
-    @Autowired
-    private Shell shell;
-
-    /**
-     * @return The shell's {@link ConsoleReader}.
-     */
-    public ConsoleReader getReader() {
-        // XXX Spring Shell doesn't expose the reader that we need to use to
-        //     read values from a terminal, so use reflection to pull it out.
-        return (ConsoleReader) FieldUtils.getProtectedFieldValue("reader", shell);
-    }
-
-    /**
-     * Formats a prompt that shows a default value.
-     *
-     * @param fieldName - The text portion that appears before the default. (not null)
-     * @param defaultValue - The default value that will be shown in the prompt.
-     * @return A prompt that shows the default value for a field.
-     */
-    public String makeFieldPrompt(final String fieldName, final boolean defaultValue) {
-    	return makeFieldPrompt(fieldName, Boolean.toString(defaultValue));
-    }
-
-    /**
-     * Formats a prompt that shows a default value.
-     *
-     * @param fieldName - The text portion that appears before the default. (not null)
-     * @param defaultValue - The default value that will be shown in the prompt.
-     * @return A prompt that shows the default value for a field.
-     */
-    public String makeFieldPrompt(final String fieldName, final String defaultValue) {
-        return String.format("%s [default: %s]: ", fieldName, defaultValue);
-    }
-
-    /**
-     * Checks if a user's input matches one of the affirmative strings.
-     *
-     * @param input - The user's input. (not null)
-     * @return {@code true} if the input is one of the affirmative values; otherwise {@code false}.
-     */
-    private boolean isAffirmative(final String input) {
-        requireNonNull(input);
-        for(final String affirmativeString : affirmativeStrings) {
-            if( input.equalsIgnoreCase(affirmativeString) ) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
-     * Checks if a user's input matches one of the negative strings.
-     *
-     * @param input - The user's input. (not null)
-     * @return {@code true} if the input is one of the negative values; otherwise {@code false}.
-     */
-    private boolean isNegative(final String input) {
-        requireNonNull(input);
-        for(final String negativeString : negativeStrings) {
-            if( input.equalsIgnoreCase(negativeString) ) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
-     * Prompts a user for a boolean value. The prompt will be repeated until
-     * a value true/false string has been submitted. If a default value is
-     * provided, then it will be used if the user doens't enter anything.
-     *
-     * @param prompt - The prompt for the input. (not null)
-     * @param defaultValue - The default value for the input if one is provided. (not null)
-     * @return The value the user entered.
-     * @throws IOException There was a problem reading values from the user.
-     */
-    protected boolean promptBoolean(final String prompt, final Optional<Boolean> defaultValue) throws IOException {
-        requireNonNull(prompt);
-        requireNonNull(defaultValue);
-
-        final ConsoleReader reader = getReader();
-        reader.setPrompt(prompt);
-
-        Boolean value = null;
-        boolean prompting = true;
-
-        while(prompting) {
-            // An empty input means to use the default value.
-            final String input = reader.readLine();
-            if(input.isEmpty() && defaultValue.isPresent()) {
-                value = defaultValue.get();
-                prompting = false;
-            }
-
-            // Check if it is one of the affirmative answers.
-            if(isAffirmative(input)) {
-                value = true;
-                prompting = false;
-            }
-
-            // Check if it is one of the negative answers.
-            if(isNegative(input)) {
-                value = false;
-                prompting = false;
-            }
-
-            // If we are still prompting, the input was invalid.
-            if(prompting) {
-                reader.println("Invalid response (true/false)");
-            }
-        }
-
-        return value;
-    }
-
-    /**
-     * Prompts a user for a String value. The prompt will be repeated until a
-     * value has been submitted. If a default value is provided, then it will be
-     * used if the user doesn't enter anything.
-     *
-     * @param prompt - The prompt for the input. (not null)
-     * @param defaultValue - The default value for the input if one is provided. (not null)
-     * @return The value the user entered.
-     * @throws IOException There was a problem reading values from the user.
-     */
-    protected String promptString(final String prompt, final Optional<String> defaultValue) throws IOException {
-        requireNonNull(prompt);
-        requireNonNull(defaultValue);
-
-        final ConsoleReader reader = getReader();
-        reader.setPrompt(prompt);
-
-        String value = null;
-        boolean prompting = true;
-
-        while(prompting) {
-            // Read a line of input.
-            final String input = reader.readLine();
-
-            if(!input.isEmpty()) {
-                // If a value was provided, return it.
-                value = input;
-                prompting = false;
-            } else {
-                // Otherwise, if a default value was provided, return it;
-                if(defaultValue.isPresent()) {
-                    value = defaultValue.get();
-                    prompting = false;
-                } else {
-                    // Otherwise, the user must provide a value.
-                    reader.println("Invalid response. Must provide a value.");
-                }
-            }
-        }
-
-        return value;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/main/java/org/apache/rya/shell/util/PasswordPrompt.java
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/main/java/org/apache/rya/shell/util/PasswordPrompt.java b/extras/rya.console/src/main/java/org/apache/rya/shell/util/PasswordPrompt.java
deleted file mode 100644
index b61faf9..0000000
--- a/extras/rya.console/src/main/java/org/apache/rya/shell/util/PasswordPrompt.java
+++ /dev/null
@@ -1,72 +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.
- */
-package org.apache.rya.shell.util;
-
-import java.io.IOException;
-
-import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
-import edu.umd.cs.findbugs.annotations.NonNull;
-
-import jline.console.ConsoleReader;
-
-/**
- * A mechanism for prompting a user of the application for a password.
- */
-@DefaultAnnotation(NonNull.class)
-public interface PasswordPrompt {
-
-    /**
-     * Prompt the user for a password, wait for their input, and then get the
-     * value they entered.
-     *
-     * @return A character array holding the entered password.
-     * @throws IOEXception There was a problem reading the password.
-     */
-    public char[] getPassword() throws IOException;
-
-    /**
-     * Prompts a user for their password using a JLine {@link ConsoleReader}.
-     * <p>
-     * This prompt has a known security issue. ConsoleReader only reads passwords
-     * into Strings, so they can't easily be cleared out. We many an attempt to
-     * garbage collect the String after converting it to a character array, but
-     * this could be improved.
-     */
-    public static class JLinePasswordPrompt extends JLinePrompt implements PasswordPrompt {
-
-        @Override
-        public char[] getPassword() throws IOException {
-            char[] password = new char[0];
-
-            final ConsoleReader reader = getReader();
-            reader.setPrompt("Password: ");
-            String passwordStr = reader.readLine('*');
-            password = passwordStr.toCharArray();
-
-            // Reading the password into memory as a String is less safe than a char[]
-            // because the String is immutable. We can't clear it out. At best, we can
-            // remove all references to it and suggest the GC clean it up. There are no
-            // guarantees though.
-            passwordStr = null;
-            System.gc();
-
-            return password;
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/main/java/org/apache/rya/shell/util/RyaDetailsFormatter.java
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/main/java/org/apache/rya/shell/util/RyaDetailsFormatter.java b/extras/rya.console/src/main/java/org/apache/rya/shell/util/RyaDetailsFormatter.java
deleted file mode 100644
index dace754..0000000
--- a/extras/rya.console/src/main/java/org/apache/rya/shell/util/RyaDetailsFormatter.java
+++ /dev/null
@@ -1,120 +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.
- */
-package org.apache.rya.shell.util;
-
-import static java.util.Objects.requireNonNull;
-
-import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
-import edu.umd.cs.findbugs.annotations.NonNull;
-
-import org.apache.rya.api.instance.RyaDetails;
-import org.apache.rya.api.instance.RyaDetails.PCJIndexDetails;
-import org.apache.rya.api.instance.RyaDetails.PCJIndexDetails.PCJDetails;
-
-import com.google.common.base.Joiner;
-import com.google.common.base.Optional;
-import com.google.common.collect.ImmutableMap;
-
-/**
- * Formats an instance of {@link RyaDetails}.
- */
-@DefaultAnnotation(NonNull.class)
-public class RyaDetailsFormatter {
-
-    /**
-     * Pretty formats an instance of {@link RyaDetails}.
-     *
-     * @param details - The object to format. (not null)
-     * @return A pretty render of the object.
-     */
-    public String format(final RyaDetails details) {
-        requireNonNull(details);
-
-        final StringBuilder report = new StringBuilder();
-
-        report.append("General Metadata:\n");
-        report.append("  Instance Name: ").append(details.getRyaInstanceName()).append("\n");
-        report.append("  RYA Version: ").append( details.getRyaVersion() ).append("\n");
-        report.append("  Users: ").append( Joiner.on(", ").join(details.getUsers()) ).append("\n");
-
-        report.append("Secondary Indicies:\n");
-        report.append("  Entity Centric Index:\n");
-        report.append("    Enabled: ").append( details.getEntityCentricIndexDetails().isEnabled() ).append("\n");
-      //RYA-215        report.append("  Geospatial Index:\n");
-      //RYA-215        report.append("    Enabled: ").append( details.getGeoIndexDetails().isEnabled() ).append("\n");
-        report.append("  Free Text Index:\n");
-        report.append("    Enabled: ").append( details.getFreeTextIndexDetails().isEnabled() ).append("\n");
-        report.append("  Temporal Index:\n");
-        report.append("    Enabled: ").append( details.getTemporalIndexDetails().isEnabled() ).append("\n");
-
-        report.append("  PCJ Index:\n");
-        final PCJIndexDetails pcjDetails = details.getPCJIndexDetails();
-        report.append("    Enabled: ").append( pcjDetails.isEnabled() ).append("\n");
-        if(pcjDetails.isEnabled()) {
-            if(pcjDetails.getFluoDetails().isPresent()) {
-                final String fluoAppName = pcjDetails.getFluoDetails().get().getUpdateAppName();
-                report.append("    Fluo App Name: ").append(fluoAppName).append("\n");
-            }
-
-            final ImmutableMap<String, PCJDetails> pcjs = pcjDetails.getPCJDetails();
-            report.append("    PCJs:\n");
-            if(pcjs.isEmpty()) {
-                report.append("      No PCJs have been added yet.\n");
-            } else {
-                for(final PCJDetails pcj : pcjs.values()) {
-                    report.append("      ID: ").append(pcj.getId()).append("\n");
-
-                    final String updateStrategy = format( pcj.getUpdateStrategy(), "None" );
-                    report.append("        Update Strategy: ").append(updateStrategy).append("\n");
-
-                    final String lastUpdateTime = format( pcj.getLastUpdateTime(), "unavailable");
-                    report.append("        Last Update Time: ").append(lastUpdateTime).append("\n");
-                }
-            }
-        }
-
-        report.append("Statistics:\n");
-        report.append("  Prospector:\n");
-        final String prospectorLastUpdateTime = format(details.getProspectorDetails().getLastUpdated(), "unavailable");
-        report.append("    Last Update Time: ").append( prospectorLastUpdateTime).append("\n");
-
-        report.append("  Join Selectivity:\n");
-        final String jsLastUpdateTime = format(details.getJoinSelectivityDetails().getLastUpdated(), "unavailable");
-        report.append("    Last Updated Time: ").append( jsLastUpdateTime ).append("\n");
-
-        return report.toString();
-    }
-
-    /**
-     * Formats an optional value using the value's toString() value.
-     *
-     * @param value - The optional value that will be formatted. (not null)
-     * @param absentValue - The String that will be returned if the optional is absent. (not null)
-     * @return The String representation of the optional value.
-     */
-    private <T> String format(final Optional<T> value, final String absentValue) {
-        requireNonNull(value);
-
-        String formatted = "unavailable";
-        if(value.isPresent()) {
-            formatted = value.get().toString();
-        }
-        return formatted;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/main/java/org/apache/rya/shell/util/SparqlPrompt.java
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/main/java/org/apache/rya/shell/util/SparqlPrompt.java b/extras/rya.console/src/main/java/org/apache/rya/shell/util/SparqlPrompt.java
deleted file mode 100644
index 2574eea..0000000
--- a/extras/rya.console/src/main/java/org/apache/rya/shell/util/SparqlPrompt.java
+++ /dev/null
@@ -1,82 +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.
- */
-package org.apache.rya.shell.util;
-
-import java.io.IOException;
-
-import com.google.common.base.Optional;
-
-import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
-import edu.umd.cs.findbugs.annotations.NonNull;
-import jline.console.ConsoleReader;
-
-/**
- * A mechanism for prompting a user of the application for a SPARQL string.
- */
-@DefaultAnnotation(NonNull.class)
-public interface SparqlPrompt {
-
-    /**
-     * Prompt the user for a SPARQL query, wait for their input, and then get the value they entered.
-     *
-     * @return The user entered SPARQL query, or an empty string if the user aborts.
-     * @throws IOException There was a problem reading the user's input.
-     */
-    public Optional<String> getSparql() throws IOException;
-
-    /**
-     * Prompts a user for a SPARQL query using a JLine {@link ConsoleReader}.
-     */
-    @DefaultAnnotation(NonNull.class)
-    public static class JLineSparqlPrompt extends JLinePrompt implements SparqlPrompt {
-
-        private final String EXECUTE_COMMAND = "\\e";
-        private final String CLEAR_COMMAND = "\\c";
-
-        @Override
-        public Optional<String> getSparql() throws IOException {
-            final ConsoleReader reader = getReader();
-            reader.setCopyPasteDetection(true); // disable tab completion from activating
-            reader.setHistoryEnabled(false);    // don't store SPARQL fragments in the command history
-            try {
-                reader.println("Enter a SPARQL Query.");
-                reader.println("Type '" + EXECUTE_COMMAND + "' to execute the current query.");
-                reader.println("Type '" + CLEAR_COMMAND + "' to clear the current query.");
-                reader.flush();
-
-                final StringBuilder sb = new StringBuilder();
-                String line = reader.readLine("SPARQL> ");
-                while (!line.endsWith(CLEAR_COMMAND) && !line.endsWith(EXECUTE_COMMAND)) {
-                    sb.append(line).append("\n");
-                    line = reader.readLine("     -> ");
-                }
-
-                if (line.endsWith(EXECUTE_COMMAND)) {
-                    sb.append(line.substring(0, line.length() - EXECUTE_COMMAND.length()));
-                    return Optional.of(sb.toString());
-                }
-                return Optional.absent();
-            } finally {
-                reader.setHistoryEnabled(true);      // restore the ConsoleReader's settings
-                reader.setCopyPasteDetection(false); // restore tab completion
-            }
-        }
-    }
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/main/java/org/apache/rya/shell/util/UninstallPrompt.java
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/main/java/org/apache/rya/shell/util/UninstallPrompt.java b/extras/rya.console/src/main/java/org/apache/rya/shell/util/UninstallPrompt.java
deleted file mode 100644
index 628727c..0000000
--- a/extras/rya.console/src/main/java/org/apache/rya/shell/util/UninstallPrompt.java
+++ /dev/null
@@ -1,58 +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.
- */
-package org.apache.rya.shell.util;
-
-import static java.util.Objects.requireNonNull;
-
-import java.io.IOException;
-
-import com.google.common.base.Optional;
-
-import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
-import edu.umd.cs.findbugs.annotations.NonNull;
-import jline.console.ConsoleReader;
-
-/**
- * A mechanism for prompting a user of the application to ensure they want to
- * uninstall an instance of Rya.
- */
-@DefaultAnnotation(NonNull.class)
-public interface UninstallPrompt {
-
-    /**
-     * Prompt the user to make sure they want to uninstall the instance of Rya.
-     *
-     * @param ryaInstanceName - The name of the Rya instance being prompted for. (not null)
-     * @return The value they entered.
-     * @throws IOException There was a problem reading the values.
-     */
-    public boolean promptAreYouSure(final String ryaInstanceName) throws IOException;
-
-    /**
-     * Prompts a user for uninstall information using a JLine {@link ConsoleReader}.
-     */
-    public static class JLineUninstallPrompt extends JLinePrompt implements UninstallPrompt {
-        @Override
-        public boolean promptAreYouSure(final String ryaInstanceName) throws IOException {
-            requireNonNull(ryaInstanceName);
-            return promptBoolean("Are you sure you want to uninstall this instance of Rya named '" +
-                    ryaInstanceName + "'? ", Optional.<Boolean>absent());
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/main/resources/LICENSE.txt
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/main/resources/LICENSE.txt b/extras/rya.console/src/main/resources/LICENSE.txt
deleted file mode 100644
index 4a9fe83..0000000
--- a/extras/rya.console/src/main/resources/LICENSE.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.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/main/resources/META-INF/spring/spring-shell-plugin.xml
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/main/resources/META-INF/spring/spring-shell-plugin.xml b/extras/rya.console/src/main/resources/META-INF/spring/spring-shell-plugin.xml
deleted file mode 100644
index 48c4846..0000000
--- a/extras/rya.console/src/main/resources/META-INF/spring/spring-shell-plugin.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?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.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xmlns:context="http://www.springframework.org/schema/context"
-	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
-		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">
-
-    <!-- Tell Spring where it can find all of the Command components. -->
-    <context:component-scan base-package="org.apache.rya.shell"/>
-
-    <!-- Define the shell state bean that will be shared across all of the commands. -->
-    <bean id="sharedShellState" class="org.apache.rya.shell.SharedShellState" />
-    <bean id="passwordPrompt" class="org.apache.rya.shell.util.PasswordPrompt.JLinePasswordPrompt" />
-    <bean id="installPrompt" class="org.apache.rya.shell.util.InstallPrompt.JLineAccumuloInstallPrompt" />
-    <bean id="uninstallPrompt" class="org.apache.rya.shell.util.UninstallPrompt.JLineUninstallPrompt" />
-    <bean id="sparqlPrompt" class="org.apache.rya.shell.util.SparqlPrompt.JLineSparqlPrompt" />
-    <bean id="consolePrinter" class="org.apache.rya.shell.util.ConsolePrinter.JLineConsolePrinter" />
-    
-    <!-- Define each of the beans that hold onto commands used by the shell. -->
-    <bean id="ryaConnectionCommands" class="org.apache.rya.shell.RyaConnectionCommands" />
-    <bean id="ryaAdminCommands" class="org.apache.rya.shell.RyaAdminCommands" />
-    <bean id="ryaCommands" class="org.apache.rya.shell.RyaCommands" />
-    
-    <!--  
-    <bean id="springHelpCommands" class="org.springframework.shell.commands.HelpCommands" />
-    <bean id="springScriptCommands" class="org.springframework.shell.commands.ScriptCommands" />
-    <bean id="springExitCommands" class="org.springframework.shell.commands.ExitCommands" />
-    -->
-    
-</beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/main/scripts/rya
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/main/scripts/rya b/extras/rya.console/src/main/scripts/rya
deleted file mode 100644
index 5280286..0000000
--- a/extras/rya.console/src/main/scripts/rya
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/bash
-#
-# 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_HOME=$(dirname $(cd $(dirname $0) && pwd))
-#cd $PROJECT_HOME
-
-java -cp $PROJECT_HOME/lib/${project.artifactId}-${project.version}-shaded.jar \
-  -Drya.shell.home="${PROJECT_HOME}/" \
-  -Dlog4j.configuration="file://$PROJECT_HOME/conf/log4j.properties" \
-  org.springframework.shell.Bootstrap "$@"
-  
-# --profiles - Specifies values for the system property spring.profiles.active so that Spring 3.1 and greater profile support is enabled.
-# --cmdfile - Specifies a file to read that contains shell commands
-# --histsize - Specifies the maximum number of lines to store in the command history file. Default value is 3000.
-# --disableInternalCommands - Flag that disables all commands that would be pre-registered with the shell. There is no argument to this option. You can selectively add back any internal commands by referencing them in your shell plugin file. Look at the Spring Shell javadocs for specific commands located in the org.springframework.shell.commands package as well as the section in this documentation of Built in commands.

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/test/java/org/apache/rya/shell/RyaAdminCommandsTest.java
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/test/java/org/apache/rya/shell/RyaAdminCommandsTest.java b/extras/rya.console/src/test/java/org/apache/rya/shell/RyaAdminCommandsTest.java
deleted file mode 100644
index e3e8d98..0000000
--- a/extras/rya.console/src/test/java/org/apache/rya/shell/RyaAdminCommandsTest.java
+++ /dev/null
@@ -1,474 +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.
- */
-package org.apache.rya.shell;
-
-import static org.junit.Assert.assertEquals;
-import static org.mockito.Matchers.eq;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import java.io.IOException;
-import java.util.Date;
-import java.util.List;
-import java.util.TimeZone;
-
-import org.apache.rya.api.client.AddUser;
-import org.apache.rya.api.client.CreatePCJ;
-import org.apache.rya.api.client.DeletePCJ;
-import org.apache.rya.api.client.GetInstanceDetails;
-import org.apache.rya.api.client.Install;
-import org.apache.rya.api.client.Install.DuplicateInstanceNameException;
-import org.apache.rya.api.client.Install.InstallConfiguration;
-import org.apache.rya.api.client.InstanceDoesNotExistException;
-import org.apache.rya.api.client.ListInstances;
-import org.apache.rya.api.client.RemoveUser;
-import org.apache.rya.api.client.RyaClient;
-import org.apache.rya.api.client.RyaClientException;
-import org.apache.rya.api.client.Uninstall;
-import org.apache.rya.api.client.accumulo.AccumuloConnectionDetails;
-import org.apache.rya.api.instance.RyaDetails;
-import org.apache.rya.api.instance.RyaDetails.EntityCentricIndexDetails;
-import org.apache.rya.api.instance.RyaDetails.FreeTextIndexDetails;
-import org.apache.rya.api.instance.RyaDetails.JoinSelectivityDetails;
-import org.apache.rya.api.instance.RyaDetails.PCJIndexDetails;
-import org.apache.rya.api.instance.RyaDetails.PCJIndexDetails.FluoDetails;
-import org.apache.rya.api.instance.RyaDetails.PCJIndexDetails.PCJDetails;
-import org.apache.rya.api.instance.RyaDetails.PCJIndexDetails.PCJDetails.PCJUpdateStrategy;
-import org.apache.rya.api.instance.RyaDetails.ProspectorDetails;
-import org.apache.rya.api.instance.RyaDetails.TemporalIndexDetails;
-import org.apache.rya.shell.util.InstallPrompt;
-import org.apache.rya.shell.util.SparqlPrompt;
-import org.apache.rya.shell.util.UninstallPrompt;
-import org.junit.Test;
-
-import com.google.common.base.Optional;
-import com.google.common.collect.Lists;
-
-/**
- * Unit tests the methods of {@link RyaAdminCommands}.
- */
-public class RyaAdminCommandsTest {
-
-    @Test
-    public void createPCJ() throws InstanceDoesNotExistException, RyaClientException, IOException {
-        // Mock the object that performs the create operation.
-        final String instanceName = "unitTest";
-        final String sparql = "SELECT * WHERE { ?person <http://isA> ?noun }";
-        final String pcjId = "123412342";
-        final CreatePCJ mockCreatePCJ = mock(CreatePCJ.class);
-        when(mockCreatePCJ.createPCJ( eq(instanceName), eq(sparql) ) ).thenReturn( pcjId );
-
-        final RyaClient mockCommands = mock(RyaClient.class);
-        when(mockCommands.getCreatePCJ()).thenReturn( mockCreatePCJ );
-
-        final SharedShellState state = new SharedShellState();
-        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
-        state.connectedToInstance(instanceName);
-
-        final SparqlPrompt mockSparqlPrompt = mock(SparqlPrompt.class);
-        when(mockSparqlPrompt.getSparql()).thenReturn(Optional.of(sparql));
-
-        // Execute the command.
-        final RyaAdminCommands commands = new RyaAdminCommands(state, mock(InstallPrompt.class), mockSparqlPrompt, mock(UninstallPrompt.class));
-        final String message = commands.createPcj();
-
-        // Verify the values that were provided to the command were passed through to CreatePCJ.
-        verify(mockCreatePCJ).createPCJ(eq(instanceName), eq(sparql));
-
-        // Verify a message is returned that explains what was created.
-        final String expected = "The PCJ has been created. Its ID is '123412342'.";
-        assertEquals(expected, message);
-    }
-
-    @Test
-    public void createPCJ_cancelledPrompt() throws InstanceDoesNotExistException, RyaClientException, IOException {
-        // Mock the object that performs the create operation.
-        final String instanceName = "unitTest";
-
-        final RyaClient mockCommands = mock(RyaClient.class);
-
-        final SharedShellState state = new SharedShellState();
-        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
-        state.connectedToInstance(instanceName);
-
-        final SparqlPrompt mockSparqlPrompt = mock(SparqlPrompt.class);
-        when(mockSparqlPrompt.getSparql()).thenReturn(Optional.absent());
-
-        // Execute the command.
-        final RyaAdminCommands commands = new RyaAdminCommands(state, mock(InstallPrompt.class), mockSparqlPrompt, mock(UninstallPrompt.class));
-        final String message = commands.createPcj();
-
-        // Verify a message is returned that explains what was created.
-        final String expected = "";
-        assertEquals(expected, message);
-    }
-
-    @Test
-    public void deletePCJ() throws InstanceDoesNotExistException, RyaClientException {
-        // Mock the object that performs the delete operation.
-        final DeletePCJ mockDeletePCJ = mock(DeletePCJ.class);
-
-        final RyaClient mockCommands = mock(RyaClient.class);
-        when(mockCommands.getDeletePCJ()).thenReturn( mockDeletePCJ );
-
-        final SharedShellState state = new SharedShellState();
-        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
-        final String instanceName = "unitTests";
-        state.connectedToInstance(instanceName);
-
-        // Execute the command.
-        final String pcjId = "123412342";
-
-        final RyaAdminCommands commands = new RyaAdminCommands(state, mock(InstallPrompt.class), mock(SparqlPrompt.class), mock(UninstallPrompt.class));
-        final String message = commands.deletePcj(pcjId);
-
-        // Verify the values that were provided to the command were passed through to the DeletePCJ.
-        verify(mockDeletePCJ).deletePCJ(eq(instanceName), eq(pcjId));
-
-        // Verify a message is returned that explains what was deleted.
-        final String expected = "The PCJ has been deleted.";
-        assertEquals(expected, message);
-    }
-
-    @Test
-    public void getInstanceDetails() throws InstanceDoesNotExistException, RyaClientException {
-        // This test is failed if the default timezone was not EST, so now it's fixed at EST.
-        // If you get assert mismatch of EST!=EDT, try the deprecated getTimeZone("EST") instead.
-        TimeZone.setDefault(TimeZone.getTimeZone("America/New_York"));
-        // Mock the object that performs the get operation.
-        final GetInstanceDetails mockGetInstanceDetails = mock(GetInstanceDetails.class);
-        final String instanceName = "test_instance";
-        final RyaDetails details = RyaDetails.builder().setRyaInstanceName(instanceName)
-                .setRyaVersion("1.2.3.4")
-                .addUser("alice")
-                .addUser("bob")
-                .addUser("charlie")
-                .setEntityCentricIndexDetails( new EntityCentricIndexDetails(true) )
-              //RYA-215.setGeoIndexDetails( new GeoIndexDetails(true) )
-                .setTemporalIndexDetails( new TemporalIndexDetails(true) )
-                .setFreeTextDetails( new FreeTextIndexDetails(true) )
-                .setPCJIndexDetails(
-                        PCJIndexDetails.builder()
-                            .setEnabled(true)
-                            .setFluoDetails( new FluoDetails("test_instance_rya_pcj_updater") )
-                            .addPCJDetails(
-                                    PCJDetails.builder()
-                                        .setId("pcj 1")
-                                        .setUpdateStrategy(PCJUpdateStrategy.BATCH)
-                                        .setLastUpdateTime( new Date(1252521351L) ))
-                            .addPCJDetails(
-                                    PCJDetails.builder()
-                                        .setId("pcj 2")
-                                        .setUpdateStrategy(PCJUpdateStrategy.INCREMENTAL)))
-                .setProspectorDetails( new ProspectorDetails(Optional.of(new Date(12525211L))) )
-                .setJoinSelectivityDetails( new JoinSelectivityDetails(Optional.of(new Date(125221351L))) )
-                .build();
-
-        when(mockGetInstanceDetails.getDetails(eq(instanceName))).thenReturn( Optional.of(details) );
-
-        final RyaClient mockCommands = mock(RyaClient.class);
-        when(mockCommands.getGetInstanceDetails()).thenReturn( mockGetInstanceDetails );
-
-        final SharedShellState state = new SharedShellState();
-        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
-        state.connectedToInstance(instanceName);
-
-        // Execute the command.
-        final RyaAdminCommands commands = new RyaAdminCommands(state, mock(InstallPrompt.class), mock(SparqlPrompt.class), mock(UninstallPrompt.class));
-        final String message = commands.printInstanceDetails();
-
-        // Verify the values that were provided to the command were passed through to the GetInstanceDetails.
-        verify(mockGetInstanceDetails).getDetails(eq(instanceName));
-
-        // Verify a message is returned that includes the details.
-        final String expected =
-                "General Metadata:\n" +
-                "  Instance Name: test_instance\n" +
-                "  RYA Version: 1.2.3.4\n" +
-                "  Users: alice, bob, charlie\n" +
-                "Secondary Indicies:\n" +
-                "  Entity Centric Index:\n" +
-                "    Enabled: true\n" +
-              //RYA-215"  Geospatial Index:\n" +
-            //RYA-215"    Enabled: true\n" +
-                "  Free Text Index:\n" +
-                "    Enabled: true\n" +
-                "  Temporal Index:\n" +
-                "    Enabled: true\n" +
-                "  PCJ Index:\n" +
-                "    Enabled: true\n" +
-                "    Fluo App Name: test_instance_rya_pcj_updater\n" +
-                "    PCJs:\n" +
-                "      ID: pcj 1\n" +
-                "        Update Strategy: BATCH\n" +
-                "        Last Update Time: Thu Jan 15 06:55:21 EST 1970\n" +
-                "      ID: pcj 2\n" +
-                "        Update Strategy: INCREMENTAL\n" +
-                "        Last Update Time: unavailable\n" +
-                "Statistics:\n" +
-                "  Prospector:\n" +
-                "    Last Update Time: Wed Dec 31 22:28:45 EST 1969\n" +
-                "  Join Selectivity:\n" +
-                "    Last Updated Time: Fri Jan 02 05:47:01 EST 1970\n";
-        assertEquals(expected, message);
-    }
-
-    @Test
-    public void install() throws DuplicateInstanceNameException, RyaClientException, IOException {
-        // Mock the object that performs the install operation.
-        final Install mockInstall = mock(Install.class);
-
-        final RyaClient mockCommands = mock(RyaClient.class);
-        when(mockCommands.getInstall()).thenReturn( mockInstall );
-
-        final SharedShellState state = new SharedShellState();
-        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
-
-        // Execute the command.
-        final String instanceName = "unitTests";
-        final InstallConfiguration installConfig = InstallConfiguration.builder()
-                .setEnableGeoIndex(true)
-                .setEnablePcjIndex(true)
-                .build();
-
-        final InstallPrompt mockInstallPrompt = mock(InstallPrompt.class);
-        when(mockInstallPrompt.promptInstanceName()).thenReturn( instanceName );
-        when(mockInstallPrompt.promptInstallConfiguration(instanceName)).thenReturn( installConfig );
-        when(mockInstallPrompt.promptVerified(eq(instanceName), eq(installConfig))).thenReturn(true);
-
-        final RyaAdminCommands commands = new RyaAdminCommands(state, mockInstallPrompt, mock(SparqlPrompt.class), mock(UninstallPrompt.class));
-        final String message = commands.install();
-
-        // Verify the values that were provided to the command were passed through to the Install.
-        verify(mockInstall).install(eq(instanceName), eq(installConfig));
-
-        // Verify a message is returned that indicates the success of the operation.
-        final String expected = "The Rya instance named 'unitTests' has been installed.";
-        assertEquals(expected, message);
-    }
-
-    @Test
-    public void installWithParameters() throws DuplicateInstanceNameException, RyaClientException, IOException {
-        // Mock the object that performs the install operation.
-        final Install mockInstall = mock(Install.class);
-
-        final RyaClient mockCommands = mock(RyaClient.class);
-        when(mockCommands.getInstall()).thenReturn( mockInstall );
-
-        final SharedShellState state = new SharedShellState();
-        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
-
-        final String instanceName = "unitTests";
-        final boolean enableTableHashPrefix = false;
-        final boolean enableEntityCentricIndex = true;
-        final boolean enableFreeTextIndex = false;
-        final boolean enableGeospatialIndex = true;
-        final boolean enableTemporalIndex = false;
-        final boolean enablePcjIndex = true;
-        final String fluoPcjAppName = instanceName + "pcj_updater";
-
-        // Execute the command.
-        final InstallConfiguration installConfig = InstallConfiguration.builder()
-                .setEnableTableHashPrefix(enableTableHashPrefix)
-                .setEnableEntityCentricIndex(enableEntityCentricIndex)
-                .setEnableFreeTextIndex(enableFreeTextIndex)
-                .setEnableGeoIndex(enableGeospatialIndex)
-                .setEnableTemporalIndex(enableTemporalIndex)
-                .setEnablePcjIndex(enablePcjIndex)
-                .setFluoPcjAppName(fluoPcjAppName)
-                .build();
-
-        final InstallPrompt mockInstallPrompt = mock(InstallPrompt.class);
-        when(mockInstallPrompt.promptInstanceName()).thenReturn( instanceName );
-        when(mockInstallPrompt.promptInstallConfiguration(instanceName)).thenReturn( installConfig );
-        when(mockInstallPrompt.promptVerified(eq(instanceName), eq(installConfig))).thenReturn(true);
-
-        final RyaAdminCommands commands = new RyaAdminCommands(state, mockInstallPrompt, mock(SparqlPrompt.class), mock(UninstallPrompt.class));
-        final String message = commands.installWithParameters(instanceName, enableTableHashPrefix, enableEntityCentricIndex, enableFreeTextIndex, enableGeospatialIndex, enableTemporalIndex, enablePcjIndex, fluoPcjAppName);
-
-        // Verify the values that were provided to the command were passed through to the Install.
-        verify(mockInstall).install(eq(instanceName), eq(installConfig));
-
-        // Verify a message is returned that indicates the success of the operation.
-        final String expected = "The Rya instance named 'unitTests' has been installed.";
-        assertEquals(expected, message);
-    }
-
-    @Test
-    public void installWithParameters_userAbort() throws DuplicateInstanceNameException, RyaClientException, IOException {
-        // Mock the object that performs the install operation.
-        final Install mockInstall = mock(Install.class);
-
-        final RyaClient mockCommands = mock(RyaClient.class);
-        when(mockCommands.getInstall()).thenReturn( mockInstall );
-
-        final SharedShellState state = new SharedShellState();
-        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
-
-        final String instanceName = "unitTests";
-        final boolean enableTableHashPrefix = false;
-        final boolean enableEntityCentricIndex = true;
-        final boolean enableFreeTextIndex = false;
-        final boolean enableGeospatialIndex = true;
-        final boolean enableTemporalIndex = false;
-        final boolean enablePcjIndex = true;
-        final String fluoPcjAppName = instanceName + "pcj_updater";
-
-        // Execute the command.
-        final InstallConfiguration installConfig = InstallConfiguration.builder()
-                .setEnableTableHashPrefix(enableTableHashPrefix)
-                .setEnableEntityCentricIndex(enableEntityCentricIndex)
-                .setEnableFreeTextIndex(enableFreeTextIndex)
-                .setEnableGeoIndex(enableGeospatialIndex)
-                .setEnableTemporalIndex(enableTemporalIndex)
-                .setEnablePcjIndex(enablePcjIndex)
-                .setFluoPcjAppName(fluoPcjAppName)
-                .build();
-
-        final InstallPrompt mockInstallPrompt = mock(InstallPrompt.class);
-        when(mockInstallPrompt.promptInstanceName()).thenReturn( instanceName );
-        when(mockInstallPrompt.promptInstallConfiguration(instanceName)).thenReturn( installConfig );
-        when(mockInstallPrompt.promptVerified(eq(instanceName), eq(installConfig))).thenReturn(false);
-
-        final RyaAdminCommands commands = new RyaAdminCommands(state, mockInstallPrompt, mock(SparqlPrompt.class), mock(UninstallPrompt.class));
-        final String message = commands.installWithParameters(instanceName, enableTableHashPrefix, enableEntityCentricIndex, enableFreeTextIndex, enableGeospatialIndex, enableTemporalIndex, enablePcjIndex, fluoPcjAppName);
-
-        // Verify a message is returned that indicates the success of the operation.
-        final String expected = "Skipping Installation.";
-        assertEquals(expected, message);
-    }
-
-    @Test
-    public void listInstances() throws RyaClientException, IOException {
-        // Mock the object that performs the list operation.
-        final ListInstances mockListInstances = mock(ListInstances.class);
-        final List<String> instanceNames = Lists.newArrayList("a", "b", "c", "d");
-        when(mockListInstances.listInstances()).thenReturn(instanceNames);
-
-        final RyaClient mockCommands = mock(RyaClient.class);
-        when(mockCommands.getListInstances()).thenReturn( mockListInstances );
-
-        final SharedShellState state = new SharedShellState();
-        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
-        state.connectedToInstance("b");
-
-        // Execute the command.
-        final RyaAdminCommands commands = new RyaAdminCommands(state, mock(InstallPrompt.class), mock(SparqlPrompt.class), mock(UninstallPrompt.class));
-        final String message = commands.listInstances();
-
-        // Verify a message is returned that lists the the instances.
-        final String expected =
-                "Rya instance names:\n" +
-                "   a\n" +
-                " * b\n" +
-                "   c\n" +
-                "   d\n";
-        assertEquals(expected, message);
-    }
-
-    @Test
-    public void addUser() throws Exception {
-        // Mock the object that performs the Add User command.
-        final AddUser mockAddUser = mock(AddUser.class);
-
-        final RyaClient mockClient = mock(RyaClient.class);
-        when(mockClient.getAddUser()).thenReturn( mockAddUser );
-
-        final SharedShellState state = new SharedShellState();
-        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockClient);
-        state.connectedToInstance("test_instance");
-
-        // Execute the command.
-        final RyaAdminCommands commands = new RyaAdminCommands(state, mock(InstallPrompt.class), mock(SparqlPrompt.class), mock(UninstallPrompt.class));
-        commands.addUser("alice");
-
-        // Verify the add request was forwarded to the client.
-        verify(mockAddUser).addUser(eq("test_instance"), eq("alice"));
-    }
-
-    @Test
-    public void removeUser() throws Exception {
-        // Mock the object that performs the Add User command.
-        final RemoveUser mockRemoveUser = mock(RemoveUser.class);
-
-        final RyaClient mockClient = mock(RyaClient.class);
-        when(mockClient.getRemoveUser()).thenReturn( mockRemoveUser );
-
-        final SharedShellState state = new SharedShellState();
-        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockClient);
-        state.connectedToInstance("test_instance");
-
-        // Execute the command.
-        final RyaAdminCommands commands = new RyaAdminCommands(state, mock(InstallPrompt.class), mock(SparqlPrompt.class), mock(UninstallPrompt.class));
-        commands.removeUser("alice");
-
-        // Verify the add request was forwarded to the client.
-        verify(mockRemoveUser).removeUser(eq("test_instance"), eq("alice"));
-    }
-
-    @Test
-    public void uninstall_yes() throws Exception {
-        // Mock the object that performs the Uninstall command.
-        final Uninstall mockUninstall = mock(Uninstall.class);
-
-        // Mock a prompt that says the user does want to uninstall it.
-        final UninstallPrompt uninstallPrompt = mock(UninstallPrompt.class);
-        when(uninstallPrompt.promptAreYouSure( eq("test_instance") )).thenReturn(true);
-
-        final RyaClient mockClient = mock(RyaClient.class);
-        when(mockClient.getUninstall()).thenReturn( mockUninstall );
-
-        final SharedShellState state = new SharedShellState();
-        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockClient);
-        state.connectedToInstance("test_instance");
-
-        // Execute the command.
-        final RyaAdminCommands commands = new RyaAdminCommands(state, mock(InstallPrompt.class), mock(SparqlPrompt.class), uninstallPrompt);
-        commands.uninstall();
-
-        // Verify the request was forwarded to the client.
-        verify(mockUninstall).uninstall(eq("test_instance"));
-    }
-
-    @Test
-    public void uninstall_no() throws Exception {
-        // Mock the object that performs the Uninstall command.
-        final Uninstall mockUninstall = mock(Uninstall.class);
-
-        // Mock a prompt that says the user does want to uninstall it.
-        final UninstallPrompt uninstallPrompt = mock(UninstallPrompt.class);
-        when(uninstallPrompt.promptAreYouSure( eq("test_instance") )).thenReturn(false);
-
-        final RyaClient mockClient = mock(RyaClient.class);
-        when(mockClient.getUninstall()).thenReturn( mockUninstall );
-
-        final SharedShellState state = new SharedShellState();
-        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockClient);
-        state.connectedToInstance("test_instance");
-
-        // Execute the command.
-        final RyaAdminCommands commands = new RyaAdminCommands(state, mock(InstallPrompt.class), mock(SparqlPrompt.class), uninstallPrompt);
-        commands.uninstall();
-
-        // Verify the request was forwarded to the client.
-        verify(mockUninstall, never()).uninstall(eq("test_instance"));
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/test/java/org/apache/rya/shell/RyaCommandsTest.java
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/test/java/org/apache/rya/shell/RyaCommandsTest.java b/extras/rya.console/src/test/java/org/apache/rya/shell/RyaCommandsTest.java
deleted file mode 100644
index a0a3979..0000000
--- a/extras/rya.console/src/test/java/org/apache/rya/shell/RyaCommandsTest.java
+++ /dev/null
@@ -1,278 +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.
- */
-package org.apache.rya.shell;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import java.io.File;
-import java.io.IOException;
-import java.nio.charset.StandardCharsets;
-import java.nio.file.Paths;
-
-import org.apache.commons.io.FileUtils;
-import org.apache.rya.api.client.ExecuteSparqlQuery;
-import org.apache.rya.api.client.InstanceDoesNotExistException;
-import org.apache.rya.api.client.LoadStatementsFile;
-import org.apache.rya.api.client.RyaClient;
-import org.apache.rya.api.client.RyaClientException;
-import org.apache.rya.api.client.accumulo.AccumuloConnectionDetails;
-import org.apache.rya.shell.util.ConsolePrinter;
-import org.apache.rya.shell.util.SparqlPrompt;
-import org.junit.Test;
-import org.openrdf.rio.RDFFormat;
-
-import com.google.common.base.Optional;
-
-/**
- * Unit tests the methods of {@link RyaAdminCommands}.
- */
-public class RyaCommandsTest {
-
-    @Test
-    public void testLoadData() throws InstanceDoesNotExistException, RyaClientException, IOException {
-        // Mock the object that performs the create operation.
-        final String instanceName = "unitTest";
-        final String statementsFile = "/path/to/statements.nt";
-        final String format = null;
-
-        final LoadStatementsFile mockLoadStatementsFile = mock(LoadStatementsFile.class);
-        final RyaClient mockCommands = mock(RyaClient.class);
-        when(mockCommands.getLoadStatementsFile()).thenReturn(mockLoadStatementsFile);
-
-        final SharedShellState state = new SharedShellState();
-        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
-        state.connectedToInstance(instanceName);
-
-        final SparqlPrompt mockSparqlPrompt = mock(SparqlPrompt.class);
-
-        final ConsolePrinter mockConsolePrinter = mock(ConsolePrinter.class);
-
-        // Execute the command.
-        final RyaCommands commands = new RyaCommands(state, mockSparqlPrompt, mockConsolePrinter);
-        final String message = commands.loadData(statementsFile, format);
-
-        // Verify the values that were provided to the command were passed through to LoadStatementsFile.
-        verify(mockLoadStatementsFile).loadStatements(instanceName, Paths.get(statementsFile), RDFFormat.NTRIPLES);
-
-        // Verify a message is returned that explains what was created.
-        assertTrue(message.startsWith("Loaded the file: '" + statementsFile +"' successfully in "));
-        assertTrue(message.endsWith(" seconds."));
-    }
-
-    @Test
-    public void testLoadData_specifyFormat() throws InstanceDoesNotExistException, RyaClientException, IOException {
-        // Mock the object that performs the create operation.
-        final String instanceName = "unitTest";
-        final String statementsFile = "/path/to/statements.nt";
-        final String format = "N-TRIPLES";
-
-        final LoadStatementsFile mockLoadStatementsFile = mock(LoadStatementsFile.class);
-        final RyaClient mockCommands = mock(RyaClient.class);
-        when(mockCommands.getLoadStatementsFile()).thenReturn(mockLoadStatementsFile);
-
-        final SharedShellState state = new SharedShellState();
-        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
-        state.connectedToInstance(instanceName);
-
-        final SparqlPrompt mockSparqlPrompt = mock(SparqlPrompt.class);
-
-        final ConsolePrinter mockConsolePrinter = mock(ConsolePrinter.class);
-
-        // Execute the command.
-        final RyaCommands commands = new RyaCommands(state, mockSparqlPrompt, mockConsolePrinter);
-        final String message = commands.loadData(statementsFile, format);
-
-        // Verify the values that were provided to the command were passed through to LoadStatementsFile.
-        verify(mockLoadStatementsFile).loadStatements(instanceName, Paths.get(statementsFile), RDFFormat.NTRIPLES);
-
-        // Verify a message is returned that explains what was created.
-        assertTrue(message.startsWith("Loaded the file: '" + statementsFile +"' successfully in "));
-        assertTrue(message.endsWith(" seconds."));
-    }
-
-    @Test(expected = RuntimeException.class)
-    public void testLoadData_specifyInvalidFormat() throws InstanceDoesNotExistException, RyaClientException, IOException {
-        // Mock the object that performs the create operation.
-        final String instanceName = "unitTest";
-        final String statementsFile = "/path/to/statements.nt";
-        final String format = "INVALID_FORMAT_NAME";
-
-        final LoadStatementsFile mockLoadStatementsFile = mock(LoadStatementsFile.class);
-        final RyaClient mockCommands = mock(RyaClient.class);
-        when(mockCommands.getLoadStatementsFile()).thenReturn(mockLoadStatementsFile);
-
-        final SharedShellState state = new SharedShellState();
-        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
-        state.connectedToInstance(instanceName);
-
-        final SparqlPrompt mockSparqlPrompt = mock(SparqlPrompt.class);
-
-        final ConsolePrinter mockConsolePrinter = mock(ConsolePrinter.class);
-
-        // Execute the command.
-        final RyaCommands commands = new RyaCommands(state, mockSparqlPrompt, mockConsolePrinter);
-
-        commands.loadData(statementsFile, format);
-    }
-
-    @Test(expected = RuntimeException.class)
-    public void testLoadData_specifyInvalidFilenameFormat() throws InstanceDoesNotExistException, RyaClientException, IOException {
-        // Mock the object that performs the create operation.
-        final String instanceName = "unitTest";
-        final String statementsFile = "/path/to/statements.invalidFormat";
-        final String format = null;
-
-        final LoadStatementsFile mockLoadStatementsFile = mock(LoadStatementsFile.class);
-        final RyaClient mockCommands = mock(RyaClient.class);
-        when(mockCommands.getLoadStatementsFile()).thenReturn(mockLoadStatementsFile);
-
-        final SharedShellState state = new SharedShellState();
-        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
-        state.connectedToInstance(instanceName);
-
-        final SparqlPrompt mockSparqlPrompt = mock(SparqlPrompt.class);
-
-        final ConsolePrinter mockConsolePrinter = mock(ConsolePrinter.class);
-
-        // Execute the command.
-        final RyaCommands commands = new RyaCommands(state, mockSparqlPrompt, mockConsolePrinter);
-
-        commands.loadData(statementsFile, format);
-    }
-
-    @Test
-    public void testSparqlQuery() throws InstanceDoesNotExistException, RyaClientException, IOException {
-        // Mock the object that performs the create operation.
-        final String instanceName = "unitTest";
-        final String queryFile = "src/test/resources/Query1.sparql";
-        final String queryContent = FileUtils.readFileToString(new File(queryFile), StandardCharsets.UTF_8);
-        final String expectedMessage = "MockAnswer";
-
-        final ExecuteSparqlQuery mockExecuteSparqlQuery = mock(ExecuteSparqlQuery.class);
-        when(mockExecuteSparqlQuery.executeSparqlQuery(instanceName, queryContent)).thenReturn(expectedMessage);
-
-        final RyaClient mockCommands = mock(RyaClient.class);
-        when(mockCommands.getExecuteSparqlQuery()).thenReturn(mockExecuteSparqlQuery);
-
-
-        final SharedShellState state = new SharedShellState();
-        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
-        state.connectedToInstance(instanceName);
-
-        final SparqlPrompt mockSparqlPrompt = mock(SparqlPrompt.class);
-
-        final ConsolePrinter mockConsolePrinter = mock(ConsolePrinter.class);
-
-        // Execute the command.
-        final RyaCommands commands = new RyaCommands(state, mockSparqlPrompt, mockConsolePrinter);
-        final String message = commands.sparqlQuery(queryFile);
-
-        // Verify the values that were provided to the command were passed through to LoadStatementsFile.
-        verify(mockExecuteSparqlQuery).executeSparqlQuery(instanceName, queryContent);
-
-        assertEquals(expectedMessage, message);
-        // Verify a message is returned that explains what was created.
-    }
-
-    @Test(expected = RuntimeException.class)
-    public void testSparqlQuery_nonexistentFile() throws InstanceDoesNotExistException, RyaClientException, IOException {
-        // Mock the object that performs the create operation.
-        final String instanceName = "unitTest";
-        final String queryFile = "src/test/resources/Nonexistent.sparql";
-
-        final RyaClient mockCommands = mock(RyaClient.class);
-
-        final SharedShellState state = new SharedShellState();
-        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
-        state.connectedToInstance(instanceName);
-
-        final SparqlPrompt mockSparqlPrompt = mock(SparqlPrompt.class);
-
-        final ConsolePrinter mockConsolePrinter = mock(ConsolePrinter.class);
-
-        // Execute the command.
-        final RyaCommands commands = new RyaCommands(state, mockSparqlPrompt, mockConsolePrinter);
-        commands.sparqlQuery(queryFile);
-    }
-
-    @Test
-    public void testSparqlQuery_fromPrompt() throws InstanceDoesNotExistException, RyaClientException, IOException {
-        // Mock the object that performs the create operation.
-        final String instanceName = "unitTest";
-        final String queryContent = "SELECT * WHERE { ?person <http://isA> ?noun }";
-        final String queryFile = null;
-        final String expectedMessage = "MockAnswer";
-
-        final ExecuteSparqlQuery mockExecuteSparqlQuery = mock(ExecuteSparqlQuery.class);
-        when(mockExecuteSparqlQuery.executeSparqlQuery(instanceName, queryContent)).thenReturn(expectedMessage);
-
-        final RyaClient mockCommands = mock(RyaClient.class);
-        when(mockCommands.getExecuteSparqlQuery()).thenReturn(mockExecuteSparqlQuery);
-
-
-        final SharedShellState state = new SharedShellState();
-        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
-        state.connectedToInstance(instanceName);
-
-        final SparqlPrompt mockSparqlPrompt = mock(SparqlPrompt.class);
-        when(mockSparqlPrompt.getSparql()).thenReturn(Optional.of(queryContent));
-
-        final ConsolePrinter mockConsolePrinter = mock(ConsolePrinter.class);
-
-        // Execute the command.
-        final RyaCommands commands = new RyaCommands(state, mockSparqlPrompt, mockConsolePrinter);
-        final String message = commands.sparqlQuery(queryFile);
-
-        // Verify the values that were provided to the command were passed through to LoadStatementsFile.
-        verify(mockExecuteSparqlQuery).executeSparqlQuery(instanceName, queryContent);
-
-        assertEquals(expectedMessage, message);
-        // Verify a message is returned that explains what was created.
-    }
-
-    @Test
-    public void testSparqlQuery_fromPrompt_cancelled() throws InstanceDoesNotExistException, RyaClientException, IOException {
-        // Mock the object that performs the create operation.
-        final String instanceName = "unitTest";
-        final String queryFile = null;
-        final String expectedMessage = "";
-
-        final RyaClient mockCommands = mock(RyaClient.class);
-
-        final SharedShellState state = new SharedShellState();
-        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
-        state.connectedToInstance(instanceName);
-
-        final SparqlPrompt mockSparqlPrompt = mock(SparqlPrompt.class);
-        when(mockSparqlPrompt.getSparql()).thenReturn(Optional.absent());
-
-        final ConsolePrinter mockConsolePrinter = mock(ConsolePrinter.class);
-
-        // Execute the command.
-        final RyaCommands commands = new RyaCommands(state, mockSparqlPrompt, mockConsolePrinter);
-        final String message = commands.sparqlQuery(queryFile);
-
-        assertEquals(expectedMessage, message);
-        // Verify a message is returned that explains what was created.
-    }
-
-}


[2/7] incubator-rya git commit: Removed duplicate dependency definition. Closes #195

Posted by mi...@apache.org.
Removed duplicate dependency definition. Closes #195


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

Branch: refs/heads/master
Commit: ec74291b41d3d64a639d10222c8ebf7c4edfcce4
Parents: 31a3f6c
Author: jdasch <jd...@localhost.localdomain>
Authored: Thu Aug 3 16:26:30 2017 -0400
Committer: Aaron Mihalik <aa...@gmail.com>
Committed: Thu Aug 3 22:13:58 2017 -0400

----------------------------------------------------------------------
 extras/rya.pcj.fluo/pcj.fluo.test.base/pom.xml | 5 -----
 1 file changed, 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/ec74291b/extras/rya.pcj.fluo/pcj.fluo.test.base/pom.xml
----------------------------------------------------------------------
diff --git a/extras/rya.pcj.fluo/pcj.fluo.test.base/pom.xml b/extras/rya.pcj.fluo/pcj.fluo.test.base/pom.xml
index 67bd0f0..2df81ff 100644
--- a/extras/rya.pcj.fluo/pcj.fluo.test.base/pom.xml
+++ b/extras/rya.pcj.fluo/pcj.fluo.test.base/pom.xml
@@ -64,11 +64,6 @@ under the License.
             <artifactId>junit</artifactId>
             <scope>compile</scope>
         </dependency>
-         <dependency>
-            <groupId>org.apache.fluo</groupId>
-            <artifactId>fluo-api</artifactId>
-        </dependency>
-
         <dependency>
           <groupId>org.apache.kafka</groupId>
           <artifactId>kafka-clients</artifactId>


[5/7] incubator-rya git commit: RYA-325 Renamed rya.console to rya.shell. Closes #194

Posted by mi...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/test/java/org/apache/rya/shell/RyaConnectionCommandsIT.java
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/test/java/org/apache/rya/shell/RyaConnectionCommandsIT.java b/extras/rya.console/src/test/java/org/apache/rya/shell/RyaConnectionCommandsIT.java
deleted file mode 100644
index f424c49..0000000
--- a/extras/rya.console/src/test/java/org/apache/rya/shell/RyaConnectionCommandsIT.java
+++ /dev/null
@@ -1,250 +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.
- */
-package org.apache.rya.shell;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Mockito.when;
-
-import java.io.IOException;
-
-import org.apache.accumulo.minicluster.MiniAccumuloCluster;
-import org.apache.rya.api.client.Install.InstallConfiguration;
-import org.apache.rya.shell.SharedShellState.ConnectionState;
-import org.apache.rya.shell.SharedShellState.ShellState;
-import org.apache.rya.shell.util.InstallPrompt;
-import org.apache.rya.shell.util.PasswordPrompt;
-import org.junit.Test;
-import org.springframework.context.ApplicationContext;
-import org.springframework.shell.Bootstrap;
-import org.springframework.shell.core.CommandResult;
-import org.springframework.shell.core.JLineShellComponent;
-
-/**
- * Integration tests the methods of {@link RyaConnectionCommands}.
- */
-public class RyaConnectionCommandsIT extends RyaShellITBase {
-
-    @Test
-    public void connectAccumulo() throws IOException {
-        final MiniAccumuloCluster cluster = getCluster();
-        final Bootstrap bootstrap = getTestBootstrap();
-        final JLineShellComponent shell = getTestShell();
-
-        // Mock the user entering the correct password.
-        final ApplicationContext context = bootstrap.getApplicationContext();
-        final PasswordPrompt mockPrompt = context.getBean( PasswordPrompt.class );
-        when(mockPrompt.getPassword()).thenReturn("password".toCharArray());
-
-        // Execute the connect command.
-        final String cmd =
-                RyaConnectionCommands.CONNECT_ACCUMULO_CMD + " " +
-                        "--username root " +
-                        "--instanceName " + cluster.getInstanceName() + " "+
-                        "--zookeepers " + cluster.getZooKeepers();
-
-        final CommandResult connectResult = shell.executeCommand(cmd);
-
-        // Ensure the connection was successful.
-        assertTrue( connectResult.isSuccess() );
-    }
-
-    @Test
-    public void connectAccumulo_noAuths() throws IOException {
-        final MiniAccumuloCluster cluster = getCluster();
-        final Bootstrap bootstrap = getTestBootstrap();
-        final JLineShellComponent shell = getTestShell();
-
-        // Mock the user entering the correct password.
-        final ApplicationContext context = bootstrap.getApplicationContext();
-        final PasswordPrompt mockPrompt = context.getBean( PasswordPrompt.class );
-        when(mockPrompt.getPassword()).thenReturn("password".toCharArray());
-
-        // Execute the command
-        final String cmd =
-                RyaConnectionCommands.CONNECT_ACCUMULO_CMD + " " +
-                        "--username root " +
-                        "--instanceName " + cluster.getInstanceName() + " "+
-                        "--zookeepers " + cluster.getZooKeepers();
-
-        final CommandResult connectResult = shell.executeCommand(cmd);
-
-        // Ensure the connection was successful.
-        assertTrue( connectResult.isSuccess() );
-    }
-
-    @Test
-    public void connectAccumulo_wrongCredentials() throws IOException {
-        final MiniAccumuloCluster cluster = getCluster();
-        final Bootstrap bootstrap = getTestBootstrap();
-        final JLineShellComponent shell = getTestShell();
-
-        // Mock the user entering the wrong password.
-        final ApplicationContext context = bootstrap.getApplicationContext();
-        final PasswordPrompt mockPrompt = context.getBean( PasswordPrompt.class );
-        when(mockPrompt.getPassword()).thenReturn("asjifo[ijwa".toCharArray());
-
-        // Execute the command
-        final String cmd =
-                RyaConnectionCommands.CONNECT_ACCUMULO_CMD + " " +
-                        "--username root " +
-                        "--instanceName " + cluster.getInstanceName() + " "+
-                        "--zookeepers " + cluster.getZooKeepers();
-
-        final CommandResult connectResult = shell.executeCommand(cmd);
-
-        // Ensure the command failed.
-        assertFalse( connectResult.isSuccess() );
-    }
-
-    @Test
-    public void printConnectionDetails_notConnected() {
-        final JLineShellComponent shell = getTestShell();
-
-        // Run the print connection details command.
-        final CommandResult printResult = shell.executeCommand( RyaConnectionCommands.PRINT_CONNECTION_DETAILS_CMD );
-        final String msg = (String) printResult.getResult();
-
-        final String expected = "The shell is not connected to anything.";
-        assertEquals(expected, msg);
-    }
-
-    @Test
-    public void printConnectionDetails_connectedToAccumulo() throws IOException {
-        final MiniAccumuloCluster cluster = getCluster();
-        final Bootstrap bootstrap = getTestBootstrap();
-        final JLineShellComponent shell = getTestShell();
-
-        // Mock the user entering the correct password.
-        final ApplicationContext context = bootstrap.getApplicationContext();
-        final PasswordPrompt mockPrompt = context.getBean( PasswordPrompt.class );
-        when(mockPrompt.getPassword()).thenReturn("password".toCharArray());
-
-        // Connect to the mini accumulo instance.
-        final String cmd =
-                RyaConnectionCommands.CONNECT_ACCUMULO_CMD + " " +
-                        "--username root " +
-                        "--instanceName " + cluster.getInstanceName() + " "+
-                        "--zookeepers " + cluster.getZooKeepers();
-        shell.executeCommand(cmd);
-
-        // Run the print connection details command.
-        final CommandResult printResult = shell.executeCommand( RyaConnectionCommands.PRINT_CONNECTION_DETAILS_CMD );
-        final String msg = (String) printResult.getResult();
-
-        final String expected =
-                "The shell is connected to an instance of Accumulo using the following parameters:\n" +
-                "    Username: root\n" +
-                "    Instance Name: " + cluster.getInstanceName() + "\n" +
-                "    Zookeepers: " + cluster.getZooKeepers();
-        assertEquals(expected, msg);
-    }
-
-    @Test
-    public void connectToInstance() throws IOException {
-        final MiniAccumuloCluster cluster = getCluster();
-        final Bootstrap bootstrap = getTestBootstrap();
-        final JLineShellComponent shell = getTestShell();
-
-        // Mock the user entering the correct password.
-        final ApplicationContext context = bootstrap.getApplicationContext();
-        final PasswordPrompt mockPrompt = context.getBean( PasswordPrompt.class );
-        when(mockPrompt.getPassword()).thenReturn("password".toCharArray());
-
-        // Connect to the mini accumulo instance.
-        String cmd =
-                RyaConnectionCommands.CONNECT_ACCUMULO_CMD + " " +
-                        "--username root " +
-                        "--instanceName " + cluster.getInstanceName() + " "+
-                        "--zookeepers " + cluster.getZooKeepers();
-        CommandResult result = shell.executeCommand(cmd);
-
-        // Install an instance of rya.
-        final String instanceName = "testInstance";
-        final InstallConfiguration installConf = InstallConfiguration.builder().build();
-
-        final InstallPrompt installPrompt = context.getBean( InstallPrompt.class );
-        when(installPrompt.promptInstanceName()).thenReturn("testInstance");
-        when(installPrompt.promptInstallConfiguration("testInstance")).thenReturn( installConf );
-        when(installPrompt.promptVerified(instanceName, installConf)).thenReturn(true);
-
-        result = shell.executeCommand( RyaAdminCommands.INSTALL_CMD );
-        assertTrue( result.isSuccess() );
-
-        // Connect to the instance that was just installed.
-        cmd = RyaConnectionCommands.CONNECT_INSTANCE_CMD + " --instance " + instanceName;
-        result = shell.executeCommand(cmd);
-        assertTrue( result.isSuccess() );
-
-        // Verify the shell state indicates it is connected to an instance.
-        final SharedShellState sharedState = context.getBean( SharedShellState.class );
-        final ShellState state = sharedState.getShellState();
-        assertEquals(ConnectionState.CONNECTED_TO_INSTANCE, state.getConnectionState());
-    }
-
-    @Test
-    public void connectToInstance_instanceDoesNotExist() throws IOException {
-        final MiniAccumuloCluster cluster = getCluster();
-        final Bootstrap bootstrap = getTestBootstrap();
-        final JLineShellComponent shell = getTestShell();
-
-        // Mock the user entering the correct password.
-        final ApplicationContext context = bootstrap.getApplicationContext();
-        final PasswordPrompt mockPrompt = context.getBean( PasswordPrompt.class );
-        when(mockPrompt.getPassword()).thenReturn("password".toCharArray());
-
-        // Connect to the mini accumulo instance.
-        String cmd =
-                RyaConnectionCommands.CONNECT_ACCUMULO_CMD + " " +
-                        "--username root " +
-                        "--instanceName " + cluster.getInstanceName() + " "+
-                        "--zookeepers " + cluster.getZooKeepers();
-        shell.executeCommand(cmd);
-
-        // Try to connect to a non-existing instance.
-        cmd = RyaConnectionCommands.CONNECT_INSTANCE_CMD + " --instance doesNotExist";
-        final CommandResult result = shell.executeCommand(cmd);
-        assertFalse( result.isSuccess() );
-    }
-
-    @Test
-    public void disconnect() throws IOException {
-        final MiniAccumuloCluster cluster = getCluster();
-        final Bootstrap bootstrap = getTestBootstrap();
-        final JLineShellComponent shell = getTestShell();
-
-        // Mock the user entering the correct password.
-        final ApplicationContext context = bootstrap.getApplicationContext();
-        final PasswordPrompt mockPrompt = context.getBean( PasswordPrompt.class );
-        when(mockPrompt.getPassword()).thenReturn("password".toCharArray());
-
-        // Connect to the mini accumulo instance.
-        final String cmd =
-                RyaConnectionCommands.CONNECT_ACCUMULO_CMD + " " +
-                        "--username root " +
-                        "--instanceName " + cluster.getInstanceName() + " "+
-                        "--zookeepers " + cluster.getZooKeepers();
-        shell.executeCommand(cmd);
-
-        // Disconnect from it.
-        final CommandResult disconnectResult = shell.executeCommand( RyaConnectionCommands.DISCONNECT_COMMAND_NAME_CMD );
-        assertTrue( disconnectResult.isSuccess() );
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/test/java/org/apache/rya/shell/RyaPromptProviderTest.java
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/test/java/org/apache/rya/shell/RyaPromptProviderTest.java b/extras/rya.console/src/test/java/org/apache/rya/shell/RyaPromptProviderTest.java
deleted file mode 100644
index d3eaa4e..0000000
--- a/extras/rya.console/src/test/java/org/apache/rya/shell/RyaPromptProviderTest.java
+++ /dev/null
@@ -1,80 +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.
- */
-package org.apache.rya.shell;
-
-import static org.junit.Assert.assertEquals;
-import static org.mockito.Mockito.mock;
-
-import org.junit.Test;
-
-import org.apache.rya.api.client.RyaClient;
-import org.apache.rya.api.client.accumulo.AccumuloConnectionDetails;
-
-/**
- * Tests the methods of {@link RyaPromptProvider}.
- */
-public class RyaPromptProviderTest {
-
-    @Test
-    public void notConnected() {
-        // Create a shared state that is disconnected.
-        final SharedShellState sharedState = new SharedShellState();
-        sharedState.disconnected();
-
-        // Create the prompt.
-        final String prompt = new RyaPromptProvider(sharedState).getPrompt();
-
-        // Verify the prompt is formatted correctly.
-        final String expected = "rya> ";
-        assertEquals(expected, prompt);
-    }
-
-    @Test
-    public void isConnected_noInstanceName() {
-        // Create a shared state that is connected to a storage, but not a rya instance.
-        final SharedShellState sharedState = new SharedShellState();
-
-        final AccumuloConnectionDetails connectionDetails = new AccumuloConnectionDetails("", new char[]{}, "testInstance", "");
-        sharedState.connectedToAccumulo(connectionDetails, mock(RyaClient.class));
-
-        // Create a prompt.
-        final String prompt = new RyaPromptProvider(sharedState).getPrompt();
-
-        // Verify the prompt is formatted correctly.
-        final String expected = "rya/testInstance> ";
-        assertEquals(expected, prompt);
-    }
-
-    @Test
-    public void isConnected_hasInstanceName() {
-        // Create a shared state that is connected to a specific instance.
-        final SharedShellState sharedState = new SharedShellState();
-
-        final AccumuloConnectionDetails connectionDetails = new AccumuloConnectionDetails("", new char[]{}, "testInstance", "");
-        sharedState.connectedToAccumulo(connectionDetails, mock(RyaClient.class));
-        sharedState.connectedToInstance("testRya");
-
-        // Create a prompt.
-        final String prompt = new RyaPromptProvider(sharedState).getPrompt();
-
-        // Verify the prompt is formatted correctly.
-        final String expected = "rya/testInstance:testRya> ";
-        assertEquals(expected, prompt);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/test/java/org/apache/rya/shell/RyaShellITBase.java
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/test/java/org/apache/rya/shell/RyaShellITBase.java b/extras/rya.console/src/test/java/org/apache/rya/shell/RyaShellITBase.java
deleted file mode 100644
index bcbaa5b..0000000
--- a/extras/rya.console/src/test/java/org/apache/rya/shell/RyaShellITBase.java
+++ /dev/null
@@ -1,102 +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.
- */
-package org.apache.rya.shell;
-
-import java.io.IOException;
-
-import org.apache.accumulo.core.client.AccumuloException;
-import org.apache.accumulo.core.client.AccumuloSecurityException;
-import org.apache.accumulo.minicluster.MiniAccumuloCluster;
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
-import org.apache.rya.accumulo.MiniAccumuloSingleton;
-import org.apache.rya.accumulo.RyaTestInstanceRule;
-import org.apache.zookeeper.ClientCnxn;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Rule;
-import org.springframework.shell.Bootstrap;
-import org.springframework.shell.core.JLineShellComponent;
-
-import org.apache.rya.accumulo.MiniAccumuloClusterInstance;
-
-/**
- * All Rya Shell integration tests should extend this one. It provides startup
- * and shutdown hooks for a Mini Accumulo Cluster when you start and stop testing.
- * It also creates a new shell to test with between each test.
- */
-public class RyaShellITBase {
-
-    /**
-     * The bootstrap that was used to initialize the Shell that will be tested.
-     */
-    private Bootstrap bootstrap;
-
-    /**
-     * The shell that will be tested.
-     */
-    private JLineShellComponent shell;
-
-    @Rule
-    public RyaTestInstanceRule testInstance = new RyaTestInstanceRule(false);
-
-    @BeforeClass
-    public static void killLoudLogs() {
-        Logger.getLogger(ClientCnxn.class).setLevel(Level.ERROR);
-    }
-
-    @Before
-    public void startShell() throws IOException, InterruptedException, AccumuloException, AccumuloSecurityException {
-        // Bootstrap the shell with the test bean configuration.
-        bootstrap = new Bootstrap(new String[]{}, new String[]{"file:src/test/resources/RyaShellTest-context.xml"});
-        shell = bootstrap.getJLineShellComponent();
-    }
-
-    @After
-    public void stopShell() throws IOException, InterruptedException {
-        shell.stop();
-    }
-
-    /**
-     * @return The bootstrap that was used to initialize the Shell that will be tested.
-     */
-    public Bootstrap getTestBootstrap() {
-        return bootstrap;
-    }
-
-    /**
-     * @return The shell that will be tested.
-     */
-    public JLineShellComponent getTestShell() {
-        return shell;
-    }
-
-    /**
-     * @return The cluster that is hosting the test.
-     */
-    public MiniAccumuloCluster getCluster() {
-        return MiniAccumuloSingleton.getInstance().getCluster();
-    }
-
-    public String getInstanceName() {
-        return testInstance.getRyaInstanceName();
-    }
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/test/java/org/apache/rya/shell/SharedShellStateTest.java
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/test/java/org/apache/rya/shell/SharedShellStateTest.java b/extras/rya.console/src/test/java/org/apache/rya/shell/SharedShellStateTest.java
deleted file mode 100644
index e79d186..0000000
--- a/extras/rya.console/src/test/java/org/apache/rya/shell/SharedShellStateTest.java
+++ /dev/null
@@ -1,167 +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.
- */
-package org.apache.rya.shell;
-
-import static org.junit.Assert.assertEquals;
-import static org.mockito.Mockito.mock;
-
-import org.junit.Test;
-
-import org.apache.rya.api.client.RyaClient;
-import org.apache.rya.api.client.accumulo.AccumuloConnectionDetails;
-import org.apache.rya.shell.SharedShellState.ConnectionState;
-import org.apache.rya.shell.SharedShellState.ShellState;
-
-/**
- * Tests the methods of {@link SharedShellState}.
- */
-public class SharedShellStateTest {
-
-    @Test
-    public void initialStateIsDisconnected() {
-        final SharedShellState state = new SharedShellState();
-
-        // Verify disconnected and no values are set.
-        final ShellState expected = ShellState.builder()
-                .setConnectionState(ConnectionState.DISCONNECTED)
-                .build();
-
-        assertEquals(expected, state.getShellState());
-    }
-
-    @Test
-    public void disconnectedToConnectedToStorage() {
-        final SharedShellState state = new SharedShellState();
-
-        // Connect to Accumulo.
-        final AccumuloConnectionDetails connectionDetails = mock(AccumuloConnectionDetails.class);
-        final RyaClient connectedCommands = mock(RyaClient.class);
-        state.connectedToAccumulo(connectionDetails, connectedCommands);
-
-        // Verify the state.
-        final ShellState expected = ShellState.builder()
-                .setConnectionState(ConnectionState.CONNECTED_TO_STORAGE)
-                .setAccumuloConnectionDetails(connectionDetails)
-                .setConnectedCommands(connectedCommands)
-                .build();
-
-        assertEquals(expected, state.getShellState());
-    }
-
-    @Test(expected = IllegalStateException.class)
-    public void connectToStorageAgain() {
-        final SharedShellState state = new SharedShellState();
-
-        // Connect to Accumulo.
-        final AccumuloConnectionDetails connectionDetails = mock(AccumuloConnectionDetails.class);
-        final RyaClient connectedCommands = mock(RyaClient.class);
-        state.connectedToAccumulo(connectionDetails, connectedCommands);
-
-        // Try to set the information again.
-        state.connectedToAccumulo(connectionDetails, connectedCommands);
-    }
-
-    @Test
-    public void connectedToInstance() {
-        final SharedShellState state = new SharedShellState();
-
-        // Connect to Accumulo.
-        final AccumuloConnectionDetails connectionDetails = mock(AccumuloConnectionDetails.class);
-        final RyaClient connectedCommands = mock(RyaClient.class);
-        state.connectedToAccumulo(connectionDetails, connectedCommands);
-
-        // Connect to an Instance.
-        state.connectedToInstance("instance");
-
-        // Verify the state.
-        final ShellState expected = ShellState.builder()
-                .setConnectionState(ConnectionState.CONNECTED_TO_INSTANCE)
-                .setAccumuloConnectionDetails(connectionDetails)
-                .setConnectedCommands(connectedCommands)
-                .setRyaInstanceName("instance")
-                .build();
-
-        assertEquals(expected, state.getShellState());
-    }
-
-    @Test
-    public void ConnectedToInstanceAgain() {
-        final SharedShellState state = new SharedShellState();
-
-        // Connect to Accumulo.
-        final AccumuloConnectionDetails connectionDetails = mock(AccumuloConnectionDetails.class);
-        final RyaClient connectedCommands = mock(RyaClient.class);
-        state.connectedToAccumulo(connectionDetails, connectedCommands);
-
-        // Connect to an Instance.
-        state.connectedToInstance("instance");
-
-        // Connect to another instance.
-        state.connectedToInstance("secondInstance");
-
-        // Verify the state.
-        final ShellState expected = ShellState.builder()
-                .setConnectionState(ConnectionState.CONNECTED_TO_INSTANCE)
-                .setAccumuloConnectionDetails(connectionDetails)
-                .setConnectedCommands(connectedCommands)
-                .setRyaInstanceName("secondInstance")
-                .build();
-        assertEquals(expected, state.getShellState());
-    }
-
-    @Test(expected = IllegalStateException.class)
-    public void connectedToInstanceWhileDisconnectedFromStorage() {
-        final SharedShellState state = new SharedShellState();
-
-        state.connectedToInstance("instance");
-    }
-
-    @Test
-    public void disconnected() {
-        final SharedShellState state = new SharedShellState();
-
-        // Connect to Accumulo and an instance.
-        final AccumuloConnectionDetails connectionDetails = mock(AccumuloConnectionDetails.class);
-        final RyaClient connectedCommands = mock(RyaClient.class);
-        state.connectedToAccumulo(connectionDetails, connectedCommands);
-        state.connectedToInstance("instance");
-
-        // Disconnect.
-        state.disconnected();
-
-        // Verify the state.
-        final ShellState expected = ShellState.builder()
-                .setConnectionState(ConnectionState.DISCONNECTED)
-                .build();
-        assertEquals(expected, state.getShellState());
-    }
-
-    @Test
-    public void disconnectedAgain() {
-        // Indicate we have diconnected while already in the disconnected state.
-        final SharedShellState state = new SharedShellState();
-        state.disconnected();
-
-        // Verify the state.
-        final ShellState expected = ShellState.builder()
-                .setConnectionState(ConnectionState.DISCONNECTED)
-                .build();
-        assertEquals(expected, state.getShellState());
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/test/java/org/apache/rya/shell/util/ConnectorFactoryIT.java
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/test/java/org/apache/rya/shell/util/ConnectorFactoryIT.java b/extras/rya.console/src/test/java/org/apache/rya/shell/util/ConnectorFactoryIT.java
deleted file mode 100644
index c3a5e74..0000000
--- a/extras/rya.console/src/test/java/org/apache/rya/shell/util/ConnectorFactoryIT.java
+++ /dev/null
@@ -1,57 +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.
- */
-package org.apache.rya.shell.util;
-
-import java.nio.CharBuffer;
-
-import org.apache.accumulo.core.client.AccumuloException;
-import org.apache.accumulo.core.client.AccumuloSecurityException;
-import org.junit.Test;
-
-import org.apache.rya.accumulo.AccumuloITBase;
-
-/**
- * Tests the methods of {@link ConnectorFactory}.
- */
-public class ConnectorFactoryIT extends AccumuloITBase {
-
-    @Test
-    public void connect_successful() throws AccumuloException, AccumuloSecurityException {
-        // Setup the values that will be tested with.
-        final CharSequence password = CharBuffer.wrap( getPassword() );
-
-        final ConnectorFactory ac = new ConnectorFactory();
-        ac.connect(getUsername(),
-                password,
-                getInstanceName(),
-                getZookeepers());
-    }
-
-    @Test(expected = AccumuloSecurityException.class)
-    public void connect_wrongCredentials() throws AccumuloException, AccumuloSecurityException {
-        // Setup the values that will be tested with.
-        final CharSequence password = CharBuffer.wrap( new char[] {'w','r','o','n','g','p','a','s','s'} );
-
-        final ConnectorFactory ac = new ConnectorFactory();
-        ac.connect(getUsername(),
-                password,
-                getInstanceName(),
-                getZookeepers());
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/test/java/org/apache/rya/shell/util/InstanceNamesFormatterTest.java
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/test/java/org/apache/rya/shell/util/InstanceNamesFormatterTest.java b/extras/rya.console/src/test/java/org/apache/rya/shell/util/InstanceNamesFormatterTest.java
deleted file mode 100644
index d6e23df..0000000
--- a/extras/rya.console/src/test/java/org/apache/rya/shell/util/InstanceNamesFormatterTest.java
+++ /dev/null
@@ -1,81 +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.
- */
-package org.apache.rya.shell.util;
-
-import static org.junit.Assert.assertEquals;
-
-import java.util.List;
-
-import org.junit.Test;
-
-import com.beust.jcommander.internal.Lists;
-
-/**
- * Tests an instance of {@link InstanceNamesFormatter}.
- */
-public class InstanceNamesFormatterTest {
-
-    @Test
-    public void format_withConnectedName() {
-        final List<String> instanceNames = Lists.newArrayList("a", "b", "c", "d");
-
-        final String formatted = new InstanceNamesFormatter().format(instanceNames, "c");
-
-        final String expected =
-                "Rya instance names:\n" +
-                "   a\n" +
-                "   b\n" +
-                " * c\n" +
-                "   d\n";
-
-        assertEquals(expected, formatted);
-    }
-
-    @Test
-    public void format_connectedNameNotInList() {
-        final List<String> instanceNames = Lists.newArrayList("a", "b", "c", "d");
-
-        final String formatted = new InstanceNamesFormatter().format(instanceNames, "not_in_list");
-
-        final String expected =
-                "Rya instance names:\n" +
-                "   a\n" +
-                "   b\n" +
-                "   c\n" +
-                "   d\n";
-
-        assertEquals(expected, formatted);
-    }
-
-    @Test
-    public void format() {
-        final List<String> instanceNames = Lists.newArrayList("a", "b", "c", "d");
-
-        final String formatted = new InstanceNamesFormatter().format(instanceNames);
-
-        final String expected =
-                "Rya instance names:\n" +
-                "   a\n" +
-                "   b\n" +
-                "   c\n" +
-                "   d\n";
-
-        assertEquals(expected, formatted);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/test/java/org/apache/rya/shell/util/RyaDetailsFormatterTest.java
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/test/java/org/apache/rya/shell/util/RyaDetailsFormatterTest.java b/extras/rya.console/src/test/java/org/apache/rya/shell/util/RyaDetailsFormatterTest.java
deleted file mode 100644
index 9e45a4f..0000000
--- a/extras/rya.console/src/test/java/org/apache/rya/shell/util/RyaDetailsFormatterTest.java
+++ /dev/null
@@ -1,111 +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.
- */
-package org.apache.rya.shell.util;
-
-import static org.junit.Assert.assertEquals;
-
-import java.util.Date;
-import java.util.TimeZone;
-
-import org.apache.rya.api.instance.RyaDetails;
-import org.apache.rya.api.instance.RyaDetails.EntityCentricIndexDetails;
-import org.apache.rya.api.instance.RyaDetails.FreeTextIndexDetails;
-import org.apache.rya.api.instance.RyaDetails.JoinSelectivityDetails;
-import org.apache.rya.api.instance.RyaDetails.PCJIndexDetails;
-import org.apache.rya.api.instance.RyaDetails.PCJIndexDetails.FluoDetails;
-import org.apache.rya.api.instance.RyaDetails.PCJIndexDetails.PCJDetails;
-import org.apache.rya.api.instance.RyaDetails.PCJIndexDetails.PCJDetails.PCJUpdateStrategy;
-import org.apache.rya.api.instance.RyaDetails.ProspectorDetails;
-import org.apache.rya.api.instance.RyaDetails.TemporalIndexDetails;
-import org.junit.Test;
-
-import com.google.common.base.Optional;
-
-/**
- * Tests the methods of {@link RyaDetailsFormatter}.
- */
-public class RyaDetailsFormatterTest {
-
-    @Test
-    public void format() {
-        // This test failed if the default timezone was not EST, so now it's fixed at EST.
-        TimeZone.setDefault(TimeZone.getTimeZone("America/New_York"));
-        // Create the object that will be formatted.
-        final RyaDetails details = RyaDetails.builder().setRyaInstanceName("test_instance")
-            .setRyaVersion("1.2.3.4")
-            .addUser("alice")
-            .addUser("bob")
-            .addUser("charlie")
-            .setEntityCentricIndexDetails( new EntityCentricIndexDetails(true) )
-          //RYA-215            .setGeoIndexDetails( new GeoIndexDetails(true) )
-            .setTemporalIndexDetails( new TemporalIndexDetails(true) )
-            .setFreeTextDetails( new FreeTextIndexDetails(true) )
-            .setPCJIndexDetails(
-                    PCJIndexDetails.builder()
-                        .setEnabled(true)
-                        .setFluoDetails( new FluoDetails("test_instance_rya_pcj_updater") )
-                        .addPCJDetails(
-                                PCJDetails.builder()
-                                    .setId("pcj 1")
-                                    .setUpdateStrategy(PCJUpdateStrategy.BATCH)
-                                    .setLastUpdateTime( new Date(1252521351L) ))
-                        .addPCJDetails(
-                                PCJDetails.builder()
-                                    .setId("pcj 2")
-                                    .setUpdateStrategy(PCJUpdateStrategy.INCREMENTAL)))
-            .setProspectorDetails( new ProspectorDetails(Optional.of(new Date(12525211L))) )
-            .setJoinSelectivityDetails( new JoinSelectivityDetails(Optional.of(new Date(125221351L))) )
-            .build();
-
-        final String formatted = new RyaDetailsFormatter().format(details);
-
-        // Verify the created object matches the expected result.
-        final String expected =
-                "General Metadata:\n" +
-                "  Instance Name: test_instance\n" +
-                "  RYA Version: 1.2.3.4\n" +
-                "  Users: alice, bob, charlie\n" +
-                "Secondary Indicies:\n" +
-                "  Entity Centric Index:\n" +
-                "    Enabled: true\n" +
-              //RYA-215                "  Geospatial Index:\n" +
-            //RYA-215                "    Enabled: true\n" +
-                "  Free Text Index:\n" +
-                "    Enabled: true\n" +
-                "  Temporal Index:\n" +
-                "    Enabled: true\n" +
-                "  PCJ Index:\n" +
-                "    Enabled: true\n" +
-                "    Fluo App Name: test_instance_rya_pcj_updater\n" +
-                "    PCJs:\n" +
-                "      ID: pcj 1\n" +
-                "        Update Strategy: BATCH\n" +
-                "        Last Update Time: Thu Jan 15 06:55:21 EST 1970\n" +
-                "      ID: pcj 2\n" +
-                "        Update Strategy: INCREMENTAL\n" +
-                "        Last Update Time: unavailable\n" +
-                "Statistics:\n" +
-                "  Prospector:\n" +
-                "    Last Update Time: Wed Dec 31 22:28:45 EST 1969\n" +
-                "  Join Selectivity:\n" +
-                "    Last Updated Time: Fri Jan 02 05:47:01 EST 1970\n";
-
-        assertEquals(expected, formatted);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/test/resources/Query1.sparql
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/test/resources/Query1.sparql b/extras/rya.console/src/test/resources/Query1.sparql
deleted file mode 100644
index 555607e..0000000
--- a/extras/rya.console/src/test/resources/Query1.sparql
+++ /dev/null
@@ -1,20 +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.
-#
-
-SELECT * WHERE { ?person <http://isA> ?noun }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/test/resources/RyaShellTest-context.xml
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/test/resources/RyaShellTest-context.xml b/extras/rya.console/src/test/resources/RyaShellTest-context.xml
deleted file mode 100644
index f7ffe0f..0000000
--- a/extras/rya.console/src/test/resources/RyaShellTest-context.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<?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.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xmlns:context="http://www.springframework.org/schema/context"
-	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
-		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">
-
-    <!-- Tell Spring where it can find all of the Command components. -->
-    <context:component-scan base-package="org.apache.rya.shell"/>
-
-    <!-- Define the shell state bean that will be shared across all of the commands. -->
-    <bean id="sharedShellState" class="org.apache.rya.shell.SharedShellState" />
-
-    <!-- We use a mock Password Prompt here to simulate a user entering a password. -->
-    <bean id="passwordPrompt" class="org.mockito.Mockito" factory-method="mock">
-        <constructor-arg value="org.apache.rya.shell.util.PasswordPrompt" />
-    </bean>
-    
-    <!-- We use a mock Install Prompt here to simulate a user entering the installation configuration. -->
-    <bean id="installPrompt" class="org.mockito.Mockito" factory-method="mock">
-        <constructor-arg value="org.apache.rya.shell.util.InstallPrompt"/>
-    </bean>
-
-    <!-- We use a mock SPARQL Prompt here to simulate a user entering the installation configuration. -->
-    <bean id="sparqlPrompt" class="org.mockito.Mockito" factory-method="mock">
-        <constructor-arg value="org.apache.rya.shell.util.SparqlPrompt"/>
-    </bean>
-    
-    <!-- We use a mock ConsolePrintert here to simulate console output to the user. -->
-    <bean id="consolePrinter" class="org.mockito.Mockito" factory-method="mock">
-        <constructor-arg value="org.apache.rya.shell.util.ConsolePrinter"/>
-    </bean>
-    
-    <!-- We use a mock Uninstall Prompt here to simulate a user entering the installation configuration. -->
-    <bean id="uninstallPrompt" class="org.mockito.Mockito" factory-method="mock">
-        <constructor-arg value="org.apache.rya.shell.util.UninstallPrompt"/>
-    </bean>
-
-    <!-- Define each of the beans that hold onto commands used by the shell. -->
-    <bean id="ryaConnectionCommands" class="org.apache.rya.shell.RyaConnectionCommands" />
-    <bean id="ryaCommands" class="org.apache.rya.shell.RyaCommands" />
-    <bean id="ryaAdminCommands" class="org.apache.rya.shell.RyaAdminCommands" />
-</beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/shell/.gitignore
----------------------------------------------------------------------
diff --git a/extras/shell/.gitignore b/extras/shell/.gitignore
new file mode 100644
index 0000000..5d1172a
--- /dev/null
+++ b/extras/shell/.gitignore
@@ -0,0 +1,8 @@
+/.classpath
+/.project
+.settings/
+target/
+/log.roo
+*.log
+
+/bin/

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/shell/pom.xml
----------------------------------------------------------------------
diff --git a/extras/shell/pom.xml b/extras/shell/pom.xml
new file mode 100644
index 0000000..37a5503
--- /dev/null
+++ b/extras/shell/pom.xml
@@ -0,0 +1,223 @@
+<?xml version='1.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.
+
+-->
+<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.rya</groupId>
+        <artifactId>rya.extras</artifactId>
+        <version>3.2.11-incubating-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>rya.shell</artifactId>
+    <name>Apache Rya Shell</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.rya</groupId>
+            <artifactId>rya.api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.rya</groupId>
+            <artifactId>accumulo.rya</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>jline</groupId>
+                    <artifactId>jline</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.rya</groupId>
+            <artifactId>rya.indexing</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.rya</groupId>
+            <artifactId>rya.pcj.fluo.api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.fluo</groupId>
+            <artifactId>fluo-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.shell</groupId>
+            <artifactId>spring-shell</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.security</groupId>
+            <artifactId>spring-security-web</artifactId>
+            <version>4.1.0.RELEASE</version>
+        </dependency>
+        
+        <!--  testing dependencies -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-all</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.accumulo</groupId>
+            <artifactId>accumulo-minicluster</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.fluo</groupId>
+            <artifactId>fluo-mini</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.rya</groupId>
+            <artifactId>accumulo.rya</artifactId>
+            <version>${project.version}</version>
+            <type>test-jar</type>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>org.apache.rat</groupId>
+                    <artifactId>apache-rat-plugin</artifactId>
+                    <configuration>
+                        <excludes>
+                            <exclude>spring-shell.log</exclude>
+                        </excludes>
+                    </configuration>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+        <plugins>
+            <!-- Automatically place Apache 2 license headers at the top of all of the project's Java files.
+                 Rat runs during the 'validate' lifecycle step, so it will fail the build before this one 
+                 executes if any of the headers are missing. Run the build with rat turned off to add
+                 missing headers to the Java files. -->
+            <plugin>
+                <groupId>com.mycila</groupId>
+                <artifactId>license-maven-plugin</artifactId>
+                <version>2.6</version>
+                <configuration>
+                    <!-- We use a custome Apache 2.0 license because we do not include a copywrite section. -->                
+                    <header>src/main/resources/LICENSE.txt</header>
+                </configuration>
+                <executions>
+                    <execution>
+                        <phase>process-sources</phase>
+                        <goals>
+                            <goal>format</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            
+            <!-- Create an executable jar file for the shell. -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+                                    <resource>META-INF/spring.handlers</resource>
+                                </transformer>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+                                    <resource>META-INF/spring.schemas</resource>
+                                </transformer>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    <mainClass>org.springframework.shell.Bootstrap</mainClass>
+                                </transformer>
+                            </transformers>
+                            <filters>
+                                <filter>
+                                    <!--
+                                        Shading signed JARs will fail without this.
+                                        http://stackoverflow.com/questions/999489/invalid-signature-file-when-attempting-to-run-a-jar
+                                    -->
+                                    <artifact>*:*</artifact>
+                                    <excludes>
+                                        <exclude>META-INF/*.SF</exclude>
+                                        <exclude>META-INF/*.DSA</exclude>
+                                        <exclude>META-INF/*.RSA</exclude>
+                                    </excludes>
+                                </filter>
+                            </filters>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            
+            <plugin>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>create-binary-distribution</id>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                        <phase>package</phase>
+                        <configuration>
+                            <descriptors>
+                                <descriptor>src/main/assembly/binary-release.xml</descriptor>
+                            </descriptors>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            
+            <!-- Generate Code Coverage report. -->
+            <plugin>
+                <groupId>org.jacoco</groupId>
+                <artifactId>jacoco-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>default-prepare-agent</id>
+                        <goals>
+                            <goal>prepare-agent</goal>
+                        </goals>
+                    </execution>
+                    <execution>
+                        <id>default-report</id>
+                        <phase>prepare-package</phase>
+                        <goals>
+                            <goal>report</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/shell/src/main/assembly/binary-release.xml
----------------------------------------------------------------------
diff --git a/extras/shell/src/main/assembly/binary-release.xml b/extras/shell/src/main/assembly/binary-release.xml
new file mode 100644
index 0000000..374213f
--- /dev/null
+++ b/extras/shell/src/main/assembly/binary-release.xml
@@ -0,0 +1,33 @@
+<!--
+
+    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.
+
+-->
+<assembly
+    xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd">
+    <id>bin</id>
+    <formats>
+        <format>tar.gz</format>
+    </formats>
+    <includeBaseDirectory>true</includeBaseDirectory>
+    <componentDescriptors>
+        <componentDescriptor>src/main/assembly/component-release.xml</componentDescriptor>
+    </componentDescriptors>
+</assembly>

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/shell/src/main/assembly/component-release.xml
----------------------------------------------------------------------
diff --git a/extras/shell/src/main/assembly/component-release.xml b/extras/shell/src/main/assembly/component-release.xml
new file mode 100644
index 0000000..72c74d1
--- /dev/null
+++ b/extras/shell/src/main/assembly/component-release.xml
@@ -0,0 +1,90 @@
+<!--
+
+    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.
+
+-->
+<component
+    xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.3"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.3 http://maven.apache.org/xsd/component-1.1.3.xsd">
+    <fileSets>
+        <fileSet>
+            <directory>src/main/config</directory>
+            <outputDirectory>conf</outputDirectory>
+            <directoryMode>0755</directoryMode>
+            <fileMode>0644</fileMode>
+            <lineEnding>unix</lineEnding>
+            <filtered>false</filtered>
+            <includes>
+                <include>*.properties</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            <directory>src/main/scripts</directory>
+            <outputDirectory>bin</outputDirectory>
+            <directoryMode>0755</directoryMode>
+            <fileMode>0755</fileMode>
+            <includes>
+                <include>rya</include>
+            </includes>
+            <lineEnding>unix</lineEnding>
+            <filtered>true</filtered>
+        </fileSet>
+        <fileSet>
+            <directory>src/main/scripts</directory>
+            <outputDirectory>bin</outputDirectory>
+            <directoryMode>0755</directoryMode>
+            <fileMode>0644</fileMode>
+            <includes>
+                <include>*.bat</include>
+            </includes>
+            <lineEnding>dos</lineEnding>
+            <filtered>true</filtered>
+        </fileSet>
+        <fileSet>
+            <directory>src/main/examples</directory>
+            <outputDirectory>examples</outputDirectory>
+            <directoryMode>0755</directoryMode>
+            <fileMode>0644</fileMode>
+            <!-- <includes> <include>*.script</include> </includes> -->
+            <lineEnding>unix</lineEnding>
+            <filtered>false</filtered>
+        </fileSet>
+
+        <!-- create an empty directory for log files -->
+        <fileSet>
+            <directory>src/main/assembly</directory>
+            <outputDirectory>logs</outputDirectory>
+            <directoryMode>755</directoryMode>
+            <excludes>
+                <exclude>*</exclude>
+            </excludes>
+        </fileSet>
+
+
+        <fileSet>
+            <directory>${project.build.directory}</directory>
+            <outputDirectory>lib</outputDirectory>
+            <directoryMode>755</directoryMode>
+            <fileMode>0644</fileMode>
+            <includes>
+                <include>${project.artifactId}-${project.version}-shaded.jar</include>
+            </includes>
+        </fileSet>
+    </fileSets>
+</component>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/shell/src/main/config/log4j.properties
----------------------------------------------------------------------
diff --git a/extras/shell/src/main/config/log4j.properties b/extras/shell/src/main/config/log4j.properties
new file mode 100644
index 0000000..49d6822
--- /dev/null
+++ b/extras/shell/src/main/config/log4j.properties
@@ -0,0 +1,35 @@
+#
+# 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.
+#
+
+# Valid levels:
+# TRACE, DEBUG, INFO, WARN, ERROR and FATAL
+log4j.rootCategory=INFO, LOGFILE
+
+# LOGFILE is set to be a File appender using a PatternLayout.
+log4j.appender.LOGFILE=org.apache.log4j.FileAppender
+log4j.appender.LOGFILE.File=${rya.shell.home}logs/rya-shell.log
+#log4j.appender.LOGFILE.Threshold=DEBUG
+log4j.appender.LOGFILE.Append=true
+
+log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
+log4j.appender.LOGFILE.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
+
+#log4j.appender.LOGFILE.layout=org.apache.log4j.EnhancedPatternLayout
+#log4j.appender.LOGFILE.layout.ConversionPattern=%d [%t] %-5p %c{1.} - %m%n
+

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/shell/src/main/examples/Query1.sparql
----------------------------------------------------------------------
diff --git a/extras/shell/src/main/examples/Query1.sparql b/extras/shell/src/main/examples/Query1.sparql
new file mode 100644
index 0000000..33619fb
--- /dev/null
+++ b/extras/shell/src/main/examples/Query1.sparql
@@ -0,0 +1,24 @@
+#
+# 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.
+#
+
+PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+SELECT ?thing ?name WHERE {
+  ?thing <http://predicates#name> ?name .
+  ?thing rdf:type <http://types#Monkey> .
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/shell/src/main/examples/example.script
----------------------------------------------------------------------
diff --git a/extras/shell/src/main/examples/example.script b/extras/shell/src/main/examples/example.script
new file mode 100644
index 0000000..529ea61
--- /dev/null
+++ b/extras/shell/src/main/examples/example.script
@@ -0,0 +1,26 @@
+#
+# 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.
+#
+
+connect-accumulo --username accumulo_user --instanceName accumulo_instance --zookeepers zoo1,zoo2,zoo3,zoo4,zoo5
+install-with-parameters --instanceName rya_example_
+connect-rya --instance rya_example_
+#load-data --file examples/ontology.owl
+load-data --file examples/triples.nt
+sparql-query --file examples/Query1.sparql
+# uninstall
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/shell/src/main/examples/triples.nt
----------------------------------------------------------------------
diff --git a/extras/shell/src/main/examples/triples.nt b/extras/shell/src/main/examples/triples.nt
new file mode 100644
index 0000000..38b6c6f
--- /dev/null
+++ b/extras/shell/src/main/examples/triples.nt
@@ -0,0 +1,25 @@
+#
+# 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.
+#
+
+<http://Thing1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://types#Monkey> .
+<http://Thing1> <http://predicates#name> "Thing 1".
+<http://Thing2> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://types#Gorilla> .
+<http://Thing2> <http://predicates#name> "Thing 2".
+<http://Thing3> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://types#Monkey> .
+<http://Thing3> <http://predicates#name> "Thing 3".

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/shell/src/main/java/org/apache/rya/shell/RyaAdminCommands.java
----------------------------------------------------------------------
diff --git a/extras/shell/src/main/java/org/apache/rya/shell/RyaAdminCommands.java b/extras/shell/src/main/java/org/apache/rya/shell/RyaAdminCommands.java
new file mode 100644
index 0000000..9239dc7
--- /dev/null
+++ b/extras/shell/src/main/java/org/apache/rya/shell/RyaAdminCommands.java
@@ -0,0 +1,388 @@
+/**
+ * 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.rya.shell;
+
+import static java.util.Objects.requireNonNull;
+
+import java.io.IOException;
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.rya.api.client.GetInstanceDetails;
+import org.apache.rya.api.client.Install.DuplicateInstanceNameException;
+import org.apache.rya.api.client.Install.InstallConfiguration;
+import org.apache.rya.api.client.InstanceDoesNotExistException;
+import org.apache.rya.api.client.RyaClient;
+import org.apache.rya.api.client.RyaClientException;
+import org.apache.rya.api.instance.RyaDetails;
+import org.apache.rya.shell.SharedShellState.ConnectionState;
+import org.apache.rya.shell.SharedShellState.ShellState;
+import org.apache.rya.shell.util.InstallPrompt;
+import org.apache.rya.shell.util.InstanceNamesFormatter;
+import org.apache.rya.shell.util.RyaDetailsFormatter;
+import org.apache.rya.shell.util.SparqlPrompt;
+import org.apache.rya.shell.util.UninstallPrompt;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.shell.core.CommandMarker;
+import org.springframework.shell.core.annotation.CliAvailabilityIndicator;
+import org.springframework.shell.core.annotation.CliCommand;
+import org.springframework.shell.core.annotation.CliOption;
+import org.springframework.stereotype.Component;
+
+import com.google.common.base.Optional;
+
+/**
+ * Rya Shell commands that have to do with administrative tasks.
+ */
+@Component
+public class RyaAdminCommands implements CommandMarker {
+
+    public static final String CREATE_PCJ_CMD = "create-pcj";
+    public static final String DELETE_PCJ_CMD = "delete-pcj";
+    public static final String PRINT_INSTANCE_DETAILS_CMD = "print-instance-details";
+    public static final String INSTALL_CMD = "install";
+    public static final String INSTALL_PARAMETERS_CMD = "install-with-parameters";
+    public static final String LIST_INSTANCES_CMD = "list-instances";
+    public static final String UNINSTALL_CMD = "uninstall";
+    public static final String ADD_USER_CMD = "add-user";
+    public static final String REMOVE_USER_CMD = "remove-user";
+
+    private final SharedShellState state;
+    private final InstallPrompt installPrompt;
+    private final SparqlPrompt sparqlPrompt;
+    private final UninstallPrompt uninstallPrompt;
+
+    /**
+     * Constructs an instance of {@link RyaAdminCommands}.
+     *
+     * @param state - Holds shared state between all of the command classes. (not null)
+     * @param installPrompt - Prompts a user for installation details. (not null)
+     * @param sparqlPrompt - Prompts a user for a SPARQL query. (not null)
+     * @param uninstallPrompt - Prompts a user when uninstalling. (not null)
+     */
+    @Autowired
+    public RyaAdminCommands(
+            final SharedShellState state,
+            final InstallPrompt installPrompt,
+            final SparqlPrompt sparqlPrompt,
+            final UninstallPrompt uninstallPrompt) {
+        this.state = requireNonNull( state );
+        this.installPrompt = requireNonNull(installPrompt);
+        this.sparqlPrompt = requireNonNull(sparqlPrompt);
+        this.uninstallPrompt = requireNonNull(uninstallPrompt);
+    }
+
+    /**
+     * Enables commands that only become available once the Shell has been connected to a Rya Storage.
+     */
+    @CliAvailabilityIndicator({
+        LIST_INSTANCES_CMD,
+        INSTALL_CMD })
+    public boolean areStorageCommandsAvailable() {
+        switch(state.getShellState().getConnectionState()) {
+            case CONNECTED_TO_STORAGE:
+            case CONNECTED_TO_INSTANCE:
+                return true;
+            default:
+                return false;
+        }
+    }
+
+    /**
+     * Enables commands that are always available once the Shell is connected to a Rya Instance.
+     */
+    @CliAvailabilityIndicator({
+        PRINT_INSTANCE_DETAILS_CMD,
+        UNINSTALL_CMD,
+        ADD_USER_CMD,
+        REMOVE_USER_CMD})
+    public boolean areInstanceCommandsAvailable() {
+        switch(state.getShellState().getConnectionState()) {
+            case CONNECTED_TO_INSTANCE:
+                return true;
+            default:
+                return false;
+        }
+    }
+
+    /**
+     * Enables commands that are available when the Shell is connected to a Rya Instance that supports PCJ Indexing.
+     */
+    @CliAvailabilityIndicator({
+        CREATE_PCJ_CMD,
+        DELETE_PCJ_CMD })
+    public boolean arePCJCommandsAvailable() {
+        // The PCJ commands are only available if the Shell is connected to an instance of Rya
+        // that is new enough to use the RyaDetailsRepository and is configured to maintain PCJs.
+        final ShellState shellState = state.getShellState();
+        if(shellState.getConnectionState() == ConnectionState.CONNECTED_TO_INSTANCE) {
+            final GetInstanceDetails getInstanceDetails = shellState.getConnectedCommands().get().getGetInstanceDetails();
+            final String ryaInstanceName = state.getShellState().getRyaInstanceName().get();
+            try {
+                final Optional<RyaDetails> instanceDetails = getInstanceDetails.getDetails( ryaInstanceName );
+                if(instanceDetails.isPresent()) {
+                    return instanceDetails.get().getPCJIndexDetails().isEnabled();
+                }
+            } catch (final RyaClientException e) {
+                return false;
+            }
+        }
+        return false;
+    }
+
+    @CliCommand(value = LIST_INSTANCES_CMD, help = "List the names of the installed Rya instances.")
+    public String listInstances() {
+        // Fetch the command that is connected to the store.
+        final ShellState shellState = state.getShellState();
+        final RyaClient commands = shellState.getConnectedCommands().get();
+        final Optional<String> ryaInstance = shellState.getRyaInstanceName();
+
+        try {
+            // Sort the names alphabetically.
+            final List<String> instanceNames = commands.getListInstances().listInstances();
+            Collections.sort( instanceNames );
+
+            final String report;
+            final InstanceNamesFormatter formatter = new InstanceNamesFormatter();
+            if(ryaInstance.isPresent()) {
+                report = formatter.format(instanceNames, ryaInstance.get());
+            } else {
+                report = formatter.format(instanceNames);
+            }
+            return report;
+
+        } catch (final RyaClientException e) {
+            throw new RuntimeException("Can not list the Rya instances. Reason: " + e.getMessage(), e);
+        }
+    }
+
+    @CliCommand(value = INSTALL_CMD, help = "Create a new instance of Rya interactively.")
+    public String install() {
+        // Fetch the commands that are connected to the store.
+        final RyaClient commands = state.getShellState().getConnectedCommands().get();
+
+        String instanceName = null;
+        InstallConfiguration installConfig = null;
+        try {
+            boolean verified = false;
+            while(!verified) {
+                // Use the install prompt to fetch the user's installation options.
+                instanceName = installPrompt.promptInstanceName();
+                installConfig = installPrompt.promptInstallConfiguration(instanceName);
+
+                // Verify the configuration is what the user actually wants to do.
+                verified = installPrompt.promptVerified(instanceName, installConfig);
+            }
+
+            // Execute the command.
+            commands.getInstall().install(instanceName, installConfig);
+            return String.format("The Rya instance named '%s' has been installed.", instanceName);
+
+        } catch(final DuplicateInstanceNameException e) {
+            throw new RuntimeException(String.format("A Rya instance named '%s' already exists. Try again with a different name.", instanceName), e);
+        } catch (final IOException | RyaClientException e) {
+            throw new RuntimeException("Could not install a new instance of Rya. Reason: " + e.getMessage(), e);
+        }
+    }
+
+    @CliCommand(value = INSTALL_PARAMETERS_CMD, help = "Create a new instance of Rya with command line parameters.")
+    public String installWithParameters(
+            @CliOption(key = {"instanceName"}, mandatory = true, help = "The name of the Rya instance to create.")
+            final String instanceName,
+
+            @CliOption(key = {"enableTableHashPrefix"}, mandatory = false, help = "Use Shard Balancing (improves streamed input write speeds).", unspecifiedDefaultValue = "false", specifiedDefaultValue = "true")
+            final boolean enableTableHashPrefix,
+
+            @CliOption(key = {"enableEntityCentricIndex"}, mandatory = false, help = "Use Entity Centric Indexing.", unspecifiedDefaultValue = "false", specifiedDefaultValue = "true")
+            final boolean enableEntityCentricIndex,
+
+            @CliOption(key = {"enableFreeTextIndex"}, mandatory = false, help = "Use Free Text Indexing.", unspecifiedDefaultValue = "false", specifiedDefaultValue = "true")
+            final boolean enableFreeTextIndex,
+
+            @CliOption(key = {"enableGeospatialIndex"}, mandatory = false, help = "Use Geospatial Indexing.", unspecifiedDefaultValue = "false", specifiedDefaultValue = "true")
+            final boolean enableGeospatialIndex,
+
+            @CliOption(key = {"enableTemporalIndex"}, mandatory = false, help = "Use Temporal Indexing.", unspecifiedDefaultValue = "false", specifiedDefaultValue = "true")
+            final boolean enableTemporalIndex,
+
+            @CliOption(key = {"enablePcjIndex"}, mandatory = false, help = "Use Precomputed Join (PCJ) Indexing.", unspecifiedDefaultValue = "false", specifiedDefaultValue = "true")
+            final boolean enablePcjIndex,
+
+            @CliOption(key = {"fluoPcjAppName"}, mandatory = false, help = "Fluo Application Name for PCJ Index Updater (fluo app must be initialized and enablePcjIndex=true).")
+            final String fluoPcjAppName
+            ) {
+
+        // Fetch the commands that are connected to the store.
+        final RyaClient commands = state.getShellState().getConnectedCommands().get();
+
+        try {
+            final InstallConfiguration installConfig = InstallConfiguration.builder()
+                    .setEnableTableHashPrefix(enableTableHashPrefix)
+                    .setEnableEntityCentricIndex(enableEntityCentricIndex)
+                    .setEnableFreeTextIndex(enableFreeTextIndex)
+                    .setEnableGeoIndex(enableGeospatialIndex)
+                    .setEnableTemporalIndex(enableTemporalIndex)
+                    .setEnablePcjIndex(enablePcjIndex)
+                    .setFluoPcjAppName(fluoPcjAppName)
+                    .build();
+
+            // Verify the configuration is what the user actually wants to do.
+            if (!installPrompt.promptVerified(instanceName, installConfig)) {
+                return "Skipping Installation.";
+            }
+
+            // Execute the command.
+            commands.getInstall().install(instanceName, installConfig);
+            return String.format("The Rya instance named '%s' has been installed.", instanceName);
+
+        } catch(final DuplicateInstanceNameException e) {
+            throw new RuntimeException(String.format("A Rya instance named '%s' already exists. Try again with a different name.", instanceName), e);
+        } catch (final IOException | RyaClientException e) {
+            throw new RuntimeException("Could not install a new instance of Rya. Reason: " + e.getMessage(), e);
+        }
+    }
+
+    @CliCommand(value = PRINT_INSTANCE_DETAILS_CMD, help = "Print information about how the Rya instance is configured.")
+    public String printInstanceDetails() {
+        // Fetch the command that is connected to the store.
+        final ShellState shellState = state.getShellState();
+        final RyaClient commands = shellState.getConnectedCommands().get();
+        final String ryaInstance = shellState.getRyaInstanceName().get();
+
+        try {
+            final Optional<RyaDetails> details = commands.getGetInstanceDetails().getDetails(ryaInstance);
+            if(details.isPresent()) {
+                return new RyaDetailsFormatter().format(details.get());
+            } else {
+                return "This instance of Rya does not have a Rya Details table. Consider migrating to a newer version of Rya.";
+            }
+        } catch(final InstanceDoesNotExistException e) {
+            throw new RuntimeException(String.format("A Rya instance named '%s' does not exist.", ryaInstance), e);
+        } catch (final RyaClientException e) {
+            throw new RuntimeException("Could not get the instance details. Reason: " + e.getMessage(), e);
+        }
+    }
+
+    @CliCommand(value = CREATE_PCJ_CMD, help = "Creates and starts the maintenance of a new PCJ using a Fluo application.")
+    public String createPcj() {
+        // Fetch the command that is connected to the store.
+        final ShellState shellState = state.getShellState();
+        final RyaClient commands = shellState.getConnectedCommands().get();
+        final String ryaInstance = shellState.getRyaInstanceName().get();
+
+        try {
+            // Prompt the user for the SPARQL.
+            final Optional<String> sparql = sparqlPrompt.getSparql();
+            if (sparql.isPresent()) {
+                // Execute the command.
+                final String pcjId = commands.getCreatePCJ().createPCJ(ryaInstance, sparql.get());
+                // Return a message that indicates the ID of the newly created ID.
+                return String.format("The PCJ has been created. Its ID is '%s'.", pcjId);
+            } else {
+                return ""; // user aborted the SPARQL prompt.
+            }
+        } catch (final InstanceDoesNotExistException e) {
+            throw new RuntimeException(String.format("A Rya instance named '%s' does not exist.", ryaInstance), e);
+        } catch (final IOException | RyaClientException e) {
+            throw new RuntimeException("Could not create the PCJ. Provided reasons: " + e.getMessage(), e);
+        }
+    }
+
+    @CliCommand(value = DELETE_PCJ_CMD, help = "Deletes and halts maintenance of a PCJ.")
+    public String deletePcj(
+            @CliOption(key = {"pcjId"}, mandatory = true, help = "The ID of the PCJ that will be deleted.")
+            final String pcjId) {
+        // Fetch the command that is connected to the store.
+        final ShellState shellState = state.getShellState();
+        final RyaClient commands = shellState.getConnectedCommands().get();
+        final String ryaInstance = shellState.getRyaInstanceName().get();
+
+        try {
+            // Execute the command.
+            commands.getDeletePCJ().deletePCJ(ryaInstance, pcjId);
+            return "The PCJ has been deleted.";
+
+        } catch (final InstanceDoesNotExistException e) {
+            throw new RuntimeException(String.format("A Rya instance named '%s' does not exist.", ryaInstance), e);
+        } catch (final RyaClientException e) {
+            throw new RuntimeException("The PCJ could not be deleted. Provided reason: " + e.getMessage(), e);
+        }
+    }
+
+    @CliCommand(value = ADD_USER_CMD, help = "Adds an authorized user to the Rya instance.")
+    public void addUser(
+            @CliOption(key = {"username"}, mandatory = true, help = "The username of the user that will be granted access.")
+            final String username) {
+        // Fetch the Rya client that is connected to the store.
+        final ShellState shellState = state.getShellState();
+        final RyaClient ryaClient = shellState.getConnectedCommands().get();
+        final String ryaInstance = shellState.getRyaInstanceName().get();
+
+        try {
+            ryaClient.getAddUser().addUser(ryaInstance, username);
+        } catch (final InstanceDoesNotExistException e) {
+            throw new RuntimeException(String.format("A Rya instance named '%s' does not exist.", ryaInstance), e);
+        } catch (final RyaClientException e) {
+            throw new RuntimeException("The user's access could not be granted. Provided reason: " + e.getMessage(), e);
+        }
+    }
+
+    @CliCommand(value = REMOVE_USER_CMD, help = "Removes an authorized user from the Rya instance.")
+    public void removeUser(
+            @CliOption(key = {"username"}, mandatory = true, help = "The username of the user whose access will be revoked.")
+            final String username) {
+        // Fetch the Rya client that is connected to the store.
+        final ShellState shellState = state.getShellState();
+        final RyaClient ryaClient = shellState.getConnectedCommands().get();
+        final String ryaInstance = shellState.getRyaInstanceName().get();
+
+        try {
+            ryaClient.getRemoveUser().removeUser(ryaInstance, username);
+        } catch (final InstanceDoesNotExistException e) {
+            throw new RuntimeException(String.format("A Rya instance named '%s' does not exist.", ryaInstance), e);
+        } catch (final RyaClientException e) {
+            throw new RuntimeException("The user's access could not be revoked. Provided reason: " + e.getMessage(), e);
+        }
+    }
+
+    @CliCommand(value = UNINSTALL_CMD, help = "Uninstall an instance of Rya.")
+    public String uninstall() {
+        // Fetch the command that is connected to the store.
+        final ShellState shellState = state.getShellState();
+        final RyaClient commands = shellState.getConnectedCommands().get();
+        final String ryaInstanceName = shellState.getRyaInstanceName().get();
+
+        try {
+            // Make sure the user meant to uninstall the Rya instance.
+            if(!uninstallPrompt.promptAreYouSure(ryaInstanceName)) {
+                return "Cancelled.";
+            }
+
+            // Perform the uninstall.
+            commands.getUninstall().uninstall(ryaInstanceName);
+
+        } catch (final InstanceDoesNotExistException e) {
+            throw new RuntimeException(String.format("A Rya instance named '%s' does not exist.", ryaInstanceName), e);
+        } catch (final IOException | RyaClientException e) {
+            throw new RuntimeException("The Rya instance could not be uninstalled. Provided reason: " + e.getMessage(), e);
+        }
+
+        return "The Rya instance named '" + ryaInstanceName +"' has been uninstalled.";
+    }
+}
\ No newline at end of file


[4/7] incubator-rya git commit: RYA-325 Renamed rya.console to rya.shell. Closes #194

Posted by mi...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/shell/src/main/java/org/apache/rya/shell/RyaBannerProvider.java
----------------------------------------------------------------------
diff --git a/extras/shell/src/main/java/org/apache/rya/shell/RyaBannerProvider.java b/extras/shell/src/main/java/org/apache/rya/shell/RyaBannerProvider.java
new file mode 100644
index 0000000..42581ed
--- /dev/null
+++ b/extras/shell/src/main/java/org/apache/rya/shell/RyaBannerProvider.java
@@ -0,0 +1,97 @@
+/**
+ * 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.rya.shell;
+
+import java.io.IOException;
+import java.net.JarURLConnection;
+import java.net.URL;
+import java.util.jar.Attributes;
+import java.util.jar.Manifest;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.core.Ordered;
+import org.springframework.core.annotation.Order;
+import org.springframework.shell.core.CommandMarker;
+import org.springframework.shell.plugin.support.DefaultBannerProvider;
+import org.springframework.stereotype.Component;
+
+/**
+ * Customizes the Rya Shell's banner.
+ */
+@Component
+@Order(Ordered.HIGHEST_PRECEDENCE)
+public class RyaBannerProvider extends DefaultBannerProvider implements CommandMarker {
+    private final Logger log = LoggerFactory.getLogger(RyaBannerProvider.class);
+
+    private static final String BANNER =
+    " _____                _____ _          _ _ \n" +
+    "|  __ \\              / ____| |        | | |\n" +
+    "| |__) |   _  __ _  | (___ | |__   ___| | |\n" +
+    "|  _  / | | |/ _` |  \\___ \\| '_ \\ / _ \\ | |\n" +
+    "| | \\ \\ |_| | (_| |  ____) | | | |  __/ | |\n" +
+    "|_|  \\_\\__, |\\__,_| |_____/|_| |_|\\___|_|_|\n" +
+    "        __/ |                              \n" +
+    "       |___/                               ";
+
+    private String version = null;
+
+    @Override
+    public String getBanner() {
+        return BANNER + "\n" + getVersion() + "\n";
+    }
+
+    @Override
+    public String getWelcomeMessage() {
+        return "Welcome to the Rya Shell.\n" +
+                "\n" +
+                "Execute one of the connect commands to start interacting with an instance of Rya.\n" +
+                "You may press tab at any time to see which of the commands are available.";
+    }
+
+    @Override
+    public String getVersion() {
+        if(version == null) {
+            version = loadVersion();
+        }
+        return version;
+    }
+
+    /**
+     * Loads the version number from the Rya Shell's MANIFEST.MF file.
+     *
+     * @return The version number of the Rya Shell.
+     */
+    private String loadVersion() {
+        final String className = getClass().getSimpleName() + ".class";
+        final String classPath = getClass().getResource( className ).toString();
+
+        try {
+            final URL classUrl = new URL(classPath);
+            final JarURLConnection jarConnection = (JarURLConnection) classUrl.openConnection();
+            final Manifest manifest = jarConnection.getManifest();
+            final Attributes attributes = manifest.getMainAttributes();
+            return attributes.getValue("Implementation-Version");
+        } catch (final IOException e) {
+            log.error("Could not load the application's version from it's manifest.", e);
+        }
+
+        return "UNKNOWN";
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/shell/src/main/java/org/apache/rya/shell/RyaCommands.java
----------------------------------------------------------------------
diff --git a/extras/shell/src/main/java/org/apache/rya/shell/RyaCommands.java b/extras/shell/src/main/java/org/apache/rya/shell/RyaCommands.java
new file mode 100644
index 0000000..09ee410
--- /dev/null
+++ b/extras/shell/src/main/java/org/apache/rya/shell/RyaCommands.java
@@ -0,0 +1,166 @@
+/**
+ * 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.rya.shell;
+
+import static java.util.Objects.requireNonNull;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.text.DecimalFormat;
+import java.util.Objects;
+
+import org.apache.rya.api.client.RyaClient;
+import org.apache.rya.api.client.RyaClientException;
+import org.apache.rya.shell.SharedShellState.ShellState;
+import org.apache.rya.shell.util.ConsolePrinter;
+import org.apache.rya.shell.util.SparqlPrompt;
+import org.openrdf.rio.RDFFormat;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.shell.core.CommandMarker;
+import org.springframework.shell.core.annotation.CliAvailabilityIndicator;
+import org.springframework.shell.core.annotation.CliCommand;
+import org.springframework.shell.core.annotation.CliOption;
+import org.springframework.stereotype.Component;
+
+import com.google.common.base.Optional;
+
+/**
+ * Rya Shell commands that have to do with common tasks (loading and querying data)
+ */
+@Component
+public class RyaCommands implements CommandMarker {
+
+    private static final Logger log = LoggerFactory.getLogger(RyaCommands.class);
+
+    public static final String LOAD_DATA_CMD = "load-data";
+    public static final String SPARQL_QUERY_CMD = "sparql-query";
+
+    private final SharedShellState state;
+    private final SparqlPrompt sparqlPrompt;
+    private final ConsolePrinter consolePrinter;
+
+    /**
+     * Constructs an instance of {@link RyaCommands}.
+     *
+     * @param state - Holds shared state between all of the command classes. (not null)
+     * @param sparqlPrompt - Prompts a user for a SPARQL query. (not null)
+     * @param consolePrinter - Allows the command to print feedback to the user. (not null)
+     */
+    @Autowired
+    public RyaCommands(final SharedShellState state, final SparqlPrompt sparqlPrompt,
+            final ConsolePrinter consolePrinter) {
+        this.state = Objects.requireNonNull(state);
+        this.sparqlPrompt = requireNonNull(sparqlPrompt);
+        this.consolePrinter = Objects.requireNonNull(consolePrinter);
+    }
+
+    /**
+     * Enables commands that are always available once the Shell is connected to a Rya Instance.
+     */
+    @CliAvailabilityIndicator({ LOAD_DATA_CMD, SPARQL_QUERY_CMD })
+    public boolean areInstanceCommandsAvailable() {
+        switch (state.getShellState().getConnectionState()) {
+        case CONNECTED_TO_INSTANCE:
+            return true;
+        default:
+            return false;
+        }
+    }
+
+    @CliCommand(value = LOAD_DATA_CMD, help = "Loads RDF Statement data from a local file to the connected Rya instance.")
+    public String loadData(
+            @CliOption(key = { "file" }, mandatory = true, help = "A local file containing RDF Statements that is to be loaded.")
+            final String file,
+            @CliOption(key = { "format" }, mandatory = false, help = "The format of the supplied RDF Statements file. [RDF/XML, N-Triples, Turtle, N3, TriX, TriG, BinaryRDF, N-Quads, JSON-LD, RDF/JSON, RDFa]")
+            final String format
+            ) {
+        // Fetch the command that is connected to the store.
+        final ShellState shellState = state.getShellState();
+        final RyaClient commands = shellState.getConnectedCommands().get();
+        final Optional<String> ryaInstanceName = shellState.getRyaInstanceName();
+        try {
+            final long start = System.currentTimeMillis();
+            final File rdfInputFile = new File(file);
+
+            RDFFormat rdfFormat = null;
+            if (format != null) {
+                rdfFormat = RDFFormat.valueOf(format);
+                if (rdfFormat == null) {
+                    throw new RuntimeException("Unsupported RDF Statement data input format: " + format);
+                }
+            }
+            if (rdfFormat == null) {
+                rdfFormat = RDFFormat.forFileName(rdfInputFile.getName());
+                if (rdfFormat == null) {
+                    throw new RuntimeException("Unable to detect RDF Statement data input format for file: " + rdfInputFile);
+                } else {
+                    consolePrinter.println("Detected RDF Format: " + rdfFormat);
+                    consolePrinter.flush();
+                }
+            }
+            commands.getLoadStatementsFile().loadStatements(ryaInstanceName.get(), rdfInputFile.toPath(), rdfFormat);
+
+            final String seconds = new DecimalFormat("0.0##").format((System.currentTimeMillis() - start) / 1000.0);
+            return "Loaded the file: '" + file + "' successfully in " + seconds + " seconds.";
+
+        } catch (final RyaClientException | IOException e) {
+            log.error("Error", e);
+            throw new RuntimeException("Can not load the RDF Statement data. Reason: " + e.getMessage(), e);
+        }
+    }
+
+    @CliCommand(value = SPARQL_QUERY_CMD, help = "Executes the provided SPARQL Query on the connected Rya instance.")
+    public String sparqlQuery(
+            @CliOption(key = { "file" }, mandatory = false, help = "A local file containing the SPARQL Query that is to be read and executed.")
+            final String file) {
+        // Fetch the command that is connected to the store.
+        final ShellState shellState = state.getShellState();
+        final RyaClient commands = shellState.getConnectedCommands().get();
+        final Optional<String> ryaInstanceName = shellState.getRyaInstanceName();
+
+        try {
+            // file option specified
+            String sparqlQuery;
+            if (file != null) {
+                sparqlQuery = new String(Files.readAllBytes(new File(file).toPath()), StandardCharsets.UTF_8);
+                consolePrinter.println("Loaded Query:");
+                consolePrinter.println(sparqlQuery);
+            } else {
+                // No Options specified. Show the user the SPARQL Prompt
+                final Optional<String> sparqlQueryOpt = sparqlPrompt.getSparql();
+                if (sparqlQueryOpt.isPresent()) {
+                    sparqlQuery = sparqlQueryOpt.get();
+                } else {
+                    return ""; // user aborted the SPARQL prompt.
+                }
+            }
+
+            consolePrinter.println("Executing Query...");
+            consolePrinter.flush();
+            return commands.getExecuteSparqlQuery().executeSparqlQuery(ryaInstanceName.get(), sparqlQuery);
+        } catch (final RyaClientException | IOException e) {
+            log.error("Error", e);
+            throw new RuntimeException("Can not execute the SPARQL Query. Reason: " + e.getMessage(), e);
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/shell/src/main/java/org/apache/rya/shell/RyaConnectionCommands.java
----------------------------------------------------------------------
diff --git a/extras/shell/src/main/java/org/apache/rya/shell/RyaConnectionCommands.java b/extras/shell/src/main/java/org/apache/rya/shell/RyaConnectionCommands.java
new file mode 100644
index 0000000..f5ba451
--- /dev/null
+++ b/extras/shell/src/main/java/org/apache/rya/shell/RyaConnectionCommands.java
@@ -0,0 +1,166 @@
+/**
+ * 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.rya.shell;
+
+import static java.util.Objects.requireNonNull;
+
+import java.io.IOException;
+import java.nio.CharBuffer;
+
+import org.apache.accumulo.core.client.AccumuloException;
+import org.apache.accumulo.core.client.AccumuloSecurityException;
+import org.apache.accumulo.core.client.Connector;
+import org.apache.rya.api.client.InstanceExists;
+import org.apache.rya.api.client.RyaClient;
+import org.apache.rya.api.client.RyaClientException;
+import org.apache.rya.api.client.accumulo.AccumuloConnectionDetails;
+import org.apache.rya.api.client.accumulo.AccumuloRyaClientFactory;
+import org.apache.rya.shell.SharedShellState.ConnectionState;
+import org.apache.rya.shell.util.ConnectorFactory;
+import org.apache.rya.shell.util.PasswordPrompt;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.shell.core.CommandMarker;
+import org.springframework.shell.core.annotation.CliAvailabilityIndicator;
+import org.springframework.shell.core.annotation.CliCommand;
+import org.springframework.shell.core.annotation.CliOption;
+import org.springframework.stereotype.Component;
+
+import com.google.common.base.Optional;
+
+/**
+ * Spring Shell commands that manage the connection that is used by the shell.
+ */
+@Component
+public class RyaConnectionCommands implements CommandMarker {
+
+    // Command line commands.
+    public static final String PRINT_CONNECTION_DETAILS_CMD = "print-connection-details";
+    public static final String CONNECT_ACCUMULO_CMD = "connect-accumulo";
+    public static final String CONNECT_INSTANCE_CMD = "connect-rya";
+    public static final String DISCONNECT_COMMAND_NAME_CMD = "disconnect";
+
+    private final SharedShellState sharedState;
+    private final PasswordPrompt passwordPrompt;
+
+    /**
+     * Constructs an instance of {@link RyaConnectionCommands}.
+     *
+     * @param state - Holds shared state between all of the command classes. (not null)
+     * @param passwordPrompt - Prompts the user for their password when connecting to a Rya store. (not null)
+     */
+    @Autowired
+    public RyaConnectionCommands(final SharedShellState state, final PasswordPrompt passwordPrompt) {
+        this.sharedState = requireNonNull( state );
+        this.passwordPrompt = requireNonNull(passwordPrompt);
+    }
+
+    @CliAvailabilityIndicator({PRINT_CONNECTION_DETAILS_CMD})
+    public boolean isPrintConnectionDetailsAvailable() {
+        return true;
+    }
+
+    @CliAvailabilityIndicator({CONNECT_ACCUMULO_CMD})
+    public boolean areConnectCommandsAvailable() {
+        return sharedState.getShellState().getConnectionState() == ConnectionState.DISCONNECTED;
+    }
+
+    @CliAvailabilityIndicator({CONNECT_INSTANCE_CMD})
+    public boolean isConnectToInstanceAvailable() {
+        switch(sharedState.getShellState().getConnectionState()) {
+            case CONNECTED_TO_STORAGE:
+            case CONNECTED_TO_INSTANCE:
+                return true;
+            default:
+                return false;
+        }
+    }
+
+    @CliAvailabilityIndicator({DISCONNECT_COMMAND_NAME_CMD})
+    public boolean isDisconnectAvailable() {
+        return sharedState.getShellState().getConnectionState() != ConnectionState.DISCONNECTED;
+    }
+
+    @CliCommand(value = PRINT_CONNECTION_DETAILS_CMD, help = "Print information about the Shell's Rya storage connection.")
+    public String printConnectionDetails() {
+        final Optional<AccumuloConnectionDetails> detailsHolder = sharedState.getShellState().getConnectionDetails();
+
+        if(detailsHolder.isPresent()) {
+            final AccumuloConnectionDetails details = detailsHolder.get();
+            return "The shell is connected to an instance of Accumulo using the following parameters:\n" +
+                    "    Username: " + details.getUsername() + "\n" +
+                    "    Instance Name: " + details.getInstanceName() + "\n" +
+                    "    Zookeepers: " + details.getZookeepers();
+        } else {
+            return "The shell is not connected to anything.";
+        }
+    }
+
+    @CliCommand(value = CONNECT_ACCUMULO_CMD, help = "Connect the shell to an instance of Accumulo.")
+    public String connectToAccumulo(
+            @CliOption(key = {"username"}, mandatory = true, help = "The username that will be used to connect to Accummulo.")
+            final String username,
+            @CliOption(key = {"instanceName"}, mandatory = true, help = "The name of the Accumulo instance that will be connected to.")
+            final String instanceName,
+            @CliOption(key = {"zookeepers"}, mandatory = true, help = "A comma delimited list of zookeeper server hostnames.")
+            final String zookeepers
+            ) {
+
+        try {
+            // Prompt the user for their password.
+            final char[] password = passwordPrompt.getPassword();
+            final Connector connector= new ConnectorFactory().connect(username, CharBuffer.wrap(password), instanceName, zookeepers);
+
+            // Initialize the connected to Accumulo shared state.
+            final AccumuloConnectionDetails accumuloDetails = new AccumuloConnectionDetails(username, password, instanceName, zookeepers);
+            final RyaClient commands = AccumuloRyaClientFactory.build(accumuloDetails, connector);
+            sharedState.connectedToAccumulo(accumuloDetails, commands);
+
+        } catch(IOException | AccumuloException | AccumuloSecurityException e) {
+            throw new RuntimeException("Could not connect to Accumulo. Reason: " + e.getMessage(), e);
+        }
+
+        return "Connected. You must select a Rya instance to interact with next.";
+    }
+
+    @CliCommand(value = CONNECT_INSTANCE_CMD, help = "Connect to a specific Rya instance")
+    public void connectToInstance(
+            @CliOption(key = {"instance"}, mandatory = true, help = "The name of the Rya instance the shell will interact with.")
+            final String instance) {
+        try {
+            final InstanceExists instanceExists = sharedState.getShellState().getConnectedCommands().get().getInstanceExists();
+
+            // TODO gracefully fail if that version doen't support it. maybe the list command should go ahead
+
+            // Make sure the requested instance exists.
+            if(!instanceExists.exists(instance)) {
+                throw new RuntimeException(String.format("'%s' does not match an existing Rya instance.", instance));
+            }
+        } catch(final RyaClientException e) {
+            throw new RuntimeException("Could not connect to Rya instance. Reason: " + e.getMessage(), e);
+        }
+
+        // Store the instance name in the shared state.
+        sharedState.connectedToInstance(instance);
+    }
+
+    @CliCommand(value = DISCONNECT_COMMAND_NAME_CMD, help = "Disconnect the shell's Rya storage connection (Accumulo).")
+    public void disconnect() {
+        sharedState.disconnected();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/shell/src/main/java/org/apache/rya/shell/RyaPromptProvider.java
----------------------------------------------------------------------
diff --git a/extras/shell/src/main/java/org/apache/rya/shell/RyaPromptProvider.java b/extras/shell/src/main/java/org/apache/rya/shell/RyaPromptProvider.java
new file mode 100644
index 0000000..ed5f261
--- /dev/null
+++ b/extras/shell/src/main/java/org/apache/rya/shell/RyaPromptProvider.java
@@ -0,0 +1,62 @@
+/**
+ * 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.rya.shell;
+
+import static java.util.Objects.requireNonNull;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.Ordered;
+import org.springframework.core.annotation.Order;
+import org.springframework.shell.plugin.support.DefaultPromptProvider;
+import org.springframework.stereotype.Component;
+
+import org.apache.rya.shell.SharedShellState.ShellState;
+
+/**
+ * Customizes the Rya Shell's prompt.
+ */
+@Component
+@Order(Ordered.HIGHEST_PRECEDENCE)
+public class RyaPromptProvider extends DefaultPromptProvider {
+
+    private final SharedShellState sharedState;
+
+    @Autowired
+    public RyaPromptProvider(final SharedShellState sharedState) {
+        this.sharedState = requireNonNull(sharedState);
+    }
+
+    @Override
+    public String getPrompt() {
+        final ShellState state = sharedState.getShellState();
+
+        switch(state.getConnectionState()) {
+            case DISCONNECTED:
+                return "rya> ";
+            case CONNECTED_TO_STORAGE:
+                return String.format("rya/%s> ", state.getConnectionDetails().get().getInstanceName());
+            case CONNECTED_TO_INSTANCE:
+                return String.format("rya/%s:%s> ",
+                        state.getConnectionDetails().get().getInstanceName(),
+                        state.getRyaInstanceName().get());
+            default:
+                return "rya> ";
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/shell/src/main/java/org/apache/rya/shell/RyaShellHistoryProvider.java
----------------------------------------------------------------------
diff --git a/extras/shell/src/main/java/org/apache/rya/shell/RyaShellHistoryProvider.java b/extras/shell/src/main/java/org/apache/rya/shell/RyaShellHistoryProvider.java
new file mode 100644
index 0000000..b4ade8f
--- /dev/null
+++ b/extras/shell/src/main/java/org/apache/rya/shell/RyaShellHistoryProvider.java
@@ -0,0 +1,51 @@
+/**
+ * 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.rya.shell;
+
+import java.io.File;
+
+import org.springframework.core.Ordered;
+import org.springframework.core.annotation.Order;
+import org.springframework.shell.plugin.HistoryFileNameProvider;
+import org.springframework.stereotype.Component;
+
+/**
+ * Customizes the Rya Shell's history file.
+ */
+@Component
+@Order(Ordered.HIGHEST_PRECEDENCE)
+public class RyaShellHistoryProvider implements HistoryFileNameProvider {
+
+    public static final String RYA_SHELL_HISTORY_FILENAME = ".rya_shell_history";
+
+    @Override
+    public String getHistoryFileName() {
+        final String userHome = System.getProperty("user.home");
+        if(userHome == null) {
+            return RYA_SHELL_HISTORY_FILENAME;
+        } else {
+            return new File(userHome, RYA_SHELL_HISTORY_FILENAME).getAbsolutePath();
+        }
+    }
+
+    @Override
+    public String getProviderName() {
+        return this.getClass().getSimpleName();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/shell/src/main/java/org/apache/rya/shell/SharedShellState.java
----------------------------------------------------------------------
diff --git a/extras/shell/src/main/java/org/apache/rya/shell/SharedShellState.java b/extras/shell/src/main/java/org/apache/rya/shell/SharedShellState.java
new file mode 100644
index 0000000..526b031
--- /dev/null
+++ b/extras/shell/src/main/java/org/apache/rya/shell/SharedShellState.java
@@ -0,0 +1,339 @@
+/**
+ * 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.rya.shell;
+
+import static java.util.Objects.requireNonNull;
+
+import java.util.Objects;
+import java.util.concurrent.locks.ReentrantLock;
+
+import edu.umd.cs.findbugs.annotations.Nullable;
+import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
+import edu.umd.cs.findbugs.annotations.NonNull;
+import net.jcip.annotations.Immutable;
+import net.jcip.annotations.ThreadSafe;
+
+import com.google.common.base.Optional;
+
+import org.apache.rya.api.client.RyaClient;
+import org.apache.rya.api.client.accumulo.AccumuloConnectionDetails;
+
+/**
+ * Holds values that are shared between the various Rya command classes.
+ */
+@ThreadSafe
+@DefaultAnnotation(NonNull.class)
+public class SharedShellState {
+    // The shared nature of this object means we shouldn't assume only a single thread is accessing it.
+    private final ReentrantLock lock = new ReentrantLock();
+
+    // The current state.
+    private ShellState shellState = ShellState.builder()
+            .setConnectionState( ConnectionState.DISCONNECTED )
+            .build();
+
+    /**
+     * @return The values that define the state of the Rya Shell.
+     */
+    public ShellState getShellState() {
+        lock.lock();
+        try {
+            return shellState;
+        } finally {
+            lock.unlock();
+        }
+    }
+
+    /**
+     * This method indicates a shift into the {@link ConnectionState#CONNECTED_TO_STORAGE} state.
+     * <p/>
+     * Store the values used by an Accumulo Rya Storage connection. This may
+     * only be called when the shell is disconnected.
+     *
+     * @param connectionDetails - Metadata about the Accumulo connection. (not null)
+     * @param connectedCommands - Rya Commands that will execute against the Accumulo instance. (not null)
+     * @throws IllegalStateException Thrown if the shell is already connected to a Rya storage.
+     */
+    public void connectedToAccumulo(
+            final AccumuloConnectionDetails connectionDetails,
+            final RyaClient connectedCommands) throws IllegalStateException {
+        requireNonNull(connectionDetails);
+        requireNonNull(connectedCommands);
+
+        lock.lock();
+        try {
+            // Ensure the Rya Shell is disconnected.
+            if(shellState.getConnectionState() != ConnectionState.DISCONNECTED) {
+                throw new IllegalStateException("You must clear the old connection state before you may set a new connection state.");
+            }
+
+            // Store the connection details.
+            shellState = ShellState.builder()
+                .setConnectionState( ConnectionState.CONNECTED_TO_STORAGE )
+                .setAccumuloConnectionDetails( connectionDetails )
+                .setConnectedCommands( connectedCommands )
+                .build();
+        } finally {
+            lock.unlock();
+        }
+    }
+
+    /**
+     * This method indicates a shift into the {@link ConnectionState#CONNECTED_TO_INSTANCE} state.
+     * <p/>
+     * Store the name of the Rya instance all commands will be executed against.
+     *
+     * @param instanceName - The name of the Rya instance. (not null)
+     * @throws IllegalStateException Thrown if the shell is disconnected.
+     */
+    public void connectedToInstance(final String instanceName) throws IllegalStateException {
+        requireNonNull(instanceName);
+
+        lock.lock();
+        try {
+            // Verify the Rya Shell is connected to a storage.
+            if(shellState.getConnectionState() == ConnectionState.DISCONNECTED) {
+                throw new IllegalStateException("You can not set a Rya Instance Name before connecting to a Rya Storage.");
+            }
+
+            // Set the instance name.
+            shellState = ShellState.builder( shellState )
+                    .setConnectionState(ConnectionState.CONNECTED_TO_INSTANCE)
+                    .setRyaInstanceName( instanceName )
+                    .build();
+        } finally {
+            lock.unlock();
+        }
+    }
+
+    /**
+     * This method indicates a shift into the {@link DISCONNECTED} state.
+     * <p/>
+     * Clears all of the values associated with a Rya Storage/Instance connection.
+     * If the shell is already disconnected, then this method does not do anything.
+     */
+    public void disconnected() {
+        lock.lock();
+        try {
+            shellState = ShellState.builder()
+                .setConnectionState(ConnectionState.DISCONNECTED)
+                .build();
+        } finally {
+            lock.unlock();
+        }
+    }
+
+    /**
+     * Enumerates the various states a Rya Shell may be in.
+     */
+    public static enum ConnectionState {
+        /**
+         * The shell is not connected to a Rya Storage.
+         */
+        DISCONNECTED,
+
+        /**
+         * The shell is connected to a Rya Storage, but a specific instance hasn't been set.
+         */
+        CONNECTED_TO_STORAGE,
+
+        /**
+         * The shell is connected to Rya Storage and a specific Rya Instance.
+         */
+        CONNECTED_TO_INSTANCE;
+    }
+
+    /**
+     * Values that define the state of a Rya Shell.
+     */
+    @Immutable
+    @DefaultAnnotation(NonNull.class)
+    public static final class ShellState {
+        // Indicates the state of the shell.
+        private final ConnectionState connectionState;
+
+        // Connection specific values.
+        private final Optional<AccumuloConnectionDetails> connectionDetails;
+        private final Optional<RyaClient> connectedCommands;
+
+        // Instance specific values.
+        private final Optional<String> instanceName;
+
+        private ShellState(
+                final ConnectionState connectionState,
+                final Optional<AccumuloConnectionDetails> connectionDetails,
+                final Optional<RyaClient> connectedCommands,
+                final Optional<String> instanceName) {
+            this.connectionState = requireNonNull(connectionState);
+            this.connectionDetails = requireNonNull(connectionDetails);
+            this.connectedCommands = requireNonNull(connectedCommands);
+            this.instanceName = requireNonNull(instanceName);
+        }
+
+        /**
+         * @return The {@link ConnectionState} of the Rya Shell.
+         */
+        public ConnectionState getConnectionState() {
+            return connectionState;
+        }
+
+        /**
+         * @return Metadata about the Accumulo connection. The value will not be present
+         *   if the Rya Shell is not connected to a storage.
+         */
+        public Optional<AccumuloConnectionDetails> getConnectionDetails() {
+            return connectionDetails;
+        }
+
+        /**
+         * @return The {@link RyaClient} to use when a command on the shell is issued.
+         *   The value will not be present if the Rya Shell is not connected to a storage.
+         */
+        public Optional<RyaClient> getConnectedCommands() {
+            return connectedCommands;
+        }
+
+        /**
+         * @return The name of the Rya Instance the Rya Shell is issuing commands to.
+         *   The value will not be present if the Rya Shell is not connected to a
+         *   storage or if a target instance has not been set yet.
+         */
+        public Optional<String> getRyaInstanceName() {
+            return instanceName;
+        }
+
+        @Override
+        public int hashCode() {
+            return Objects.hash(connectionState, connectionDetails, connectedCommands, instanceName);
+        }
+
+        @Override
+        public boolean equals(final Object obj) {
+            if(this == obj) {
+                return true;
+            }
+            if(obj instanceof ShellState) {
+                final ShellState state = (ShellState)obj;
+                return Objects.equals(connectionState, state.connectionState) &&
+                        Objects.equals(connectionDetails, state.connectionDetails) &&
+                        Objects.equals(connectedCommands, state.connectedCommands) &&
+                        Objects.equals(instanceName, state.instanceName);
+            }
+            return false;
+        }
+
+        /**
+         * @return An empty instance of {@link Builder}.
+         */
+        public static Builder builder() {
+            return new Builder();
+        }
+
+        /**
+         * Create an instance of {@link Builder} populated with the values of {code shellState}.
+         *
+         * @param shellState - The initial state of the Builder.
+         * @return An instance of {@link Builder} populated with the values
+         *   of {code shellState}.
+         */
+        public static Builder builder(final ShellState shellState) {
+            return new Builder(shellState);
+        }
+
+        /**
+         * Builds instances of {@link ShellState}.
+         */
+        @DefaultAnnotation(NonNull.class)
+        public static class Builder {
+            private ConnectionState connectionState;
+
+            // Connection specific values.
+            private AccumuloConnectionDetails connectionDetails;
+            private RyaClient connectedCommands;
+
+            // Instance specific values.
+            private String instanceName;
+
+            /**
+             * Constructs an empty instance of {@link Builder}.
+             */
+            public Builder() { }
+
+            /**
+             * Constructs an instance of {@builder} initialized with the values
+             * of a {@link ShellState}.
+             *
+             * @param shellState - The initial state of the builder. (not null)
+             */
+            public Builder(final ShellState shellState) {
+                this.connectionState = shellState.getConnectionState();
+                this.connectionDetails = shellState.getConnectionDetails().orNull();
+                this.connectedCommands = shellState.getConnectedCommands().orNull();
+                this.instanceName = shellState.getRyaInstanceName().orNull();
+            }
+
+            /**
+             * @param connectionState - The {@link ConnectionState} of the Rya Shell.
+             * @return This {@link Builder} so that method invocations may be chained.
+             */
+            public Builder setConnectionState(@Nullable final ConnectionState connectionState) {
+                this.connectionState = connectionState;
+                return this;
+            }
+
+            /**
+             * @param connectionDetails - Metadata about the Accumulo connection.
+             * @return This {@link Builder} so that method invocations may be chained.
+             */
+            public Builder setAccumuloConnectionDetails(@Nullable final AccumuloConnectionDetails connectionDetails) {
+                this.connectionDetails = connectionDetails;
+                return this;
+            }
+
+            /**
+             * @param connectedCommands - The {@link RyaClient} to use when a command on the shell is issued.
+             * @return This {@link Builder} so that method invocations may be chained.
+             */
+            public Builder setConnectedCommands(@Nullable final RyaClient connectedCommands) {
+                this.connectedCommands = connectedCommands;
+                return this;
+            }
+
+            /**
+             * @param instanceName - The name of the Rya Instance the Rya Shell is issuing commands to.
+             * @return This {@link Builder} so that method invocations may be chained.
+             */
+            public Builder setRyaInstanceName(@Nullable final String instanceName) {
+                this.instanceName = instanceName;
+                return this;
+            }
+
+            /**
+             * @return An instance of {@link ShellState} built using this builder's values.
+             */
+            public ShellState build() {
+                return new ShellState(
+                        connectionState,
+                        Optional.fromNullable(connectionDetails),
+                        Optional.fromNullable(connectedCommands),
+                        Optional.fromNullable(instanceName));
+            }
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/shell/src/main/java/org/apache/rya/shell/util/ConnectorFactory.java
----------------------------------------------------------------------
diff --git a/extras/shell/src/main/java/org/apache/rya/shell/util/ConnectorFactory.java b/extras/shell/src/main/java/org/apache/rya/shell/util/ConnectorFactory.java
new file mode 100644
index 0000000..d18c5c8
--- /dev/null
+++ b/extras/shell/src/main/java/org/apache/rya/shell/util/ConnectorFactory.java
@@ -0,0 +1,67 @@
+/**
+ * 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.rya.shell.util;
+
+import static java.util.Objects.requireNonNull;
+
+import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
+import edu.umd.cs.findbugs.annotations.NonNull;
+
+import org.apache.accumulo.core.client.AccumuloException;
+import org.apache.accumulo.core.client.AccumuloSecurityException;
+import org.apache.accumulo.core.client.Connector;
+import org.apache.accumulo.core.client.Instance;
+import org.apache.accumulo.core.client.ZooKeeperInstance;
+import org.apache.accumulo.core.client.security.tokens.PasswordToken;
+
+/**
+ * Creates {@link Connector}s that are linked to an instance of Accumulo.
+ */
+@DefaultAnnotation(NonNull.class)
+public class ConnectorFactory {
+
+    /**
+     * Create a {@link Connector} that uses the provided connection details.
+     *
+     * @param username - The username the connection will use. (not null)
+     * @param password - The password the connection will use. (not null)
+     * @param instanceName - The name of the Accumulo instance. (not null)
+     * @param zookeeperHostnames - A comma delimited list of the Zookeeper server hostnames. (not null)
+     * @return A {@link Connector} that may be used to access the instance of Accumulo.
+     * @throws AccumuloSecurityException Could not connect for security reasons.
+     * @throws AccumuloException Could not connect for other reasons.
+     */
+    public Connector connect(
+            final String username,
+            final CharSequence password,
+            final String instanceName,
+            final String zookeeperHostnames) throws AccumuloException, AccumuloSecurityException {
+        requireNonNull(username);
+        requireNonNull(password);
+        requireNonNull(instanceName);
+        requireNonNull(zookeeperHostnames);
+
+        // Setup the password token that will be used.
+        final PasswordToken token = new PasswordToken( password );
+
+        // Connect to the instance of Accumulo.
+        final Instance instance = new ZooKeeperInstance(instanceName, zookeeperHostnames);
+        return instance.getConnector(username, token);
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/shell/src/main/java/org/apache/rya/shell/util/ConsolePrinter.java
----------------------------------------------------------------------
diff --git a/extras/shell/src/main/java/org/apache/rya/shell/util/ConsolePrinter.java b/extras/shell/src/main/java/org/apache/rya/shell/util/ConsolePrinter.java
new file mode 100644
index 0000000..4492a87
--- /dev/null
+++ b/extras/shell/src/main/java/org/apache/rya/shell/util/ConsolePrinter.java
@@ -0,0 +1,85 @@
+/**
+ * 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.rya.shell.util;
+
+import java.io.IOException;
+
+import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
+import edu.umd.cs.findbugs.annotations.NonNull;
+import jline.console.ConsoleReader;
+
+/**
+ * A mechanism for printing content to the console.
+ */
+@DefaultAnnotation(NonNull.class)
+public interface ConsolePrinter {
+
+    /**
+     * Prints the provided content to the console.
+     * @param cs - Output the specified String to the console.
+     * @throws IOException There was a problem reading the user's input.
+     */
+    public void print(CharSequence cs) throws IOException;
+
+    /**
+     * Prints the provided content to the console with a newline.
+     * @param cs - Output the specified String to the console.
+     * @throws IOException There was a problem reading the user's input.
+     */
+    public void println(CharSequence cs) throws IOException;
+
+    /**
+     * Prints a newline.
+     * @throws IOException There was a problem reading the user's input.
+     */
+    public void println() throws IOException;
+
+    /**
+     * Flush any pending console updates to the console output stream.
+     * @throws IOException
+     */
+    public void flush() throws IOException;
+
+    /**
+     * Prints to the console using a JLine {@link ConsoleReader}.
+     */
+    @DefaultAnnotation(NonNull.class)
+    public static class JLineConsolePrinter extends JLinePrompt implements ConsolePrinter {
+
+        @Override
+        public void print(final CharSequence cs) throws IOException {
+            getReader().print(cs);
+        }
+
+        @Override
+        public void println(final CharSequence cs) throws IOException {
+            getReader().println(cs);
+        }
+
+        @Override
+        public void println() throws IOException {
+            getReader().println();
+        }
+
+        @Override
+        public void flush() throws IOException {
+            getReader().flush();
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/shell/src/main/java/org/apache/rya/shell/util/InstallPrompt.java
----------------------------------------------------------------------
diff --git a/extras/shell/src/main/java/org/apache/rya/shell/util/InstallPrompt.java b/extras/shell/src/main/java/org/apache/rya/shell/util/InstallPrompt.java
new file mode 100644
index 0000000..5d9d48b
--- /dev/null
+++ b/extras/shell/src/main/java/org/apache/rya/shell/util/InstallPrompt.java
@@ -0,0 +1,139 @@
+/**
+ * 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.rya.shell.util;
+
+import java.io.IOException;
+
+import org.apache.rya.api.client.Install.InstallConfiguration;
+
+import com.google.common.base.Optional;
+
+import jline.console.ConsoleReader;
+
+/**
+ * A mechanism for prompting a user of the application for a the parameters
+ * that will be used when installing an instance of Rya.
+ */
+public interface InstallPrompt {
+
+    /**
+     * Prompt the user for the name of the Rya instance that will be created.
+     *
+     * @return The value they entered.
+     * @throws IOException There was a problem reading the value.
+     */
+    public String promptInstanceName() throws IOException;
+
+    /**
+     * Prompt the user for which features of Rya they want enabled.
+     *
+     * @param instanceName - The Rya instance name.
+     * @return The value they entered.
+     * @throws IOException There was a problem reading the values.
+     */
+    public InstallConfiguration promptInstallConfiguration(String instanceName) throws IOException;
+
+    /**
+     * Prompt the user asking them if they are sure they would like to do the
+     * install.
+     *
+     * @return The value they entered.
+     * @throws IOException There was a problem reading the value.
+     */
+    public boolean promptVerified(String instanceName, InstallConfiguration installConfig) throws IOException;
+
+    /**
+     * Prompts a user for install information using a JLine {@link ConsoleReader}.
+     */
+    public static class JLineAccumuloInstallPrompt extends JLinePrompt implements InstallPrompt {
+
+        @Override
+        public String promptInstanceName() throws IOException {
+            final String prompt = makeFieldPrompt("Rya Instance Name", "rya_");
+            final String instanceName = promptString(prompt, Optional.of("rya_"));
+            return instanceName;
+        }
+
+        @Override
+        public InstallConfiguration promptInstallConfiguration(final String instanceName) throws IOException {
+            final InstallConfiguration.Builder builder = InstallConfiguration.builder();
+
+            String prompt = makeFieldPrompt("Use Shard Balancing (improves streamed input write speeds)", false);
+            final boolean enableTableHashPrefix = promptBoolean(prompt, Optional.of(false));
+            builder.setEnableTableHashPrefix( enableTableHashPrefix );
+
+            prompt = makeFieldPrompt("Use Entity Centric Indexing", true);
+            final boolean enableEntityCentricIndexing = promptBoolean(prompt, Optional.of(true));
+            builder.setEnableEntityCentricIndex( enableEntityCentricIndexing );
+
+            prompt = makeFieldPrompt("Use Free Text Indexing", true);
+            final boolean enableFreeTextIndexing = promptBoolean(prompt, Optional.of(true));
+            builder.setEnableFreeTextIndex( enableFreeTextIndexing );
+
+            prompt = makeFieldPrompt("Use Geospatial Indexing", true);
+            final boolean enableGeoIndexing = promptBoolean(prompt, Optional.of(true));
+            builder.setEnableGeoIndex( enableGeoIndexing );
+
+            prompt = makeFieldPrompt("Use Temporal Indexing", true);
+            final boolean useTemporalIndexing = promptBoolean(prompt, Optional.of(true));
+            builder.setEnableTemporalIndex( useTemporalIndexing );
+
+            prompt = makeFieldPrompt("Use Precomputed Join Indexing", true);
+            final boolean enablePCJIndexing = promptBoolean(prompt, Optional.of(true));
+            builder.setEnablePcjIndex( enablePCJIndexing );
+
+            if(enablePCJIndexing) {
+                final boolean useFluoApp = promptBoolean("Use a Fluo application to update the PCJ Index? (y/n) ", Optional.absent());
+
+                if(useFluoApp) {
+                    prompt = makeFieldPrompt("PCJ Updater Fluo Application Name (must be initialized)", instanceName + "pcj_updater");
+                    final String fluoAppName = promptString(prompt, Optional.of(instanceName + "pcj_updater"));
+                    builder.setFluoPcjAppName(fluoAppName);
+                }
+            }
+
+            return builder.build();
+        }
+
+        @Override
+        public boolean promptVerified(final String instanceName, final InstallConfiguration installConfig) throws IOException {
+            final ConsoleReader reader = getReader();
+            reader.println();
+            reader.println("A Rya instance will be installed using the following values:");
+            reader.println("   Instance Name: " + instanceName);
+            reader.println("   Use Shard Balancing: " + installConfig.isTableHashPrefixEnabled());
+            reader.println("   Use Entity Centric Indexing: " + installConfig.isEntityCentrixIndexEnabled());
+            reader.println("   Use Free Text Indexing: " + installConfig.isFreeTextIndexEnabled());
+            reader.println("   Use Geospatial Indexing: " + installConfig.isGeoIndexEnabled());
+            reader.println("   Use Temporal Indexing: " + installConfig.isTemporalIndexEnabled());
+            reader.println("   Use Precomputed Join Indexing: " + installConfig.isPcjIndexEnabled());
+            if(installConfig.isPcjIndexEnabled()) {
+                if(installConfig.getFluoPcjAppName().isPresent()) {
+                    reader.println("   PCJ Updater Fluo Application Name: " + installConfig.getFluoPcjAppName().get());
+                } else {
+                    reader.println("   Not using a PCJ Updater Fluo Application");
+                }
+            }
+
+            reader.println("");
+
+            return promptBoolean("Continue with the install? (y/n) ", Optional.absent());
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/shell/src/main/java/org/apache/rya/shell/util/InstanceNamesFormatter.java
----------------------------------------------------------------------
diff --git a/extras/shell/src/main/java/org/apache/rya/shell/util/InstanceNamesFormatter.java b/extras/shell/src/main/java/org/apache/rya/shell/util/InstanceNamesFormatter.java
new file mode 100644
index 0000000..f50164b
--- /dev/null
+++ b/extras/shell/src/main/java/org/apache/rya/shell/util/InstanceNamesFormatter.java
@@ -0,0 +1,78 @@
+/**
+ * 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.rya.shell.util;
+
+import static java.util.Objects.requireNonNull;
+
+import java.util.List;
+
+import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
+import edu.umd.cs.findbugs.annotations.NonNull;
+
+/**
+ * Pretty formats a list of Rya instance names.
+ */
+@DefaultAnnotation(NonNull.class)
+public class InstanceNamesFormatter {
+
+    /**
+     * Formats the list of Rya instance names with a '*' next to whichever entry
+     * matches the connected name.
+     *
+     * @param names - The Rya instance names. (not null)
+     * @param connectedName - The instance name that will have a '*' next to it. (not null)
+     * @return A string holding the pretty formatted list.
+     */
+    public String format(final List<String> names, final String connectedName) {
+        requireNonNull(names);
+        requireNonNull(connectedName);
+
+        // Will be -1 if the connected name isn't in the list of names, so none will be starred.
+        final int connectedIndex = names.indexOf( connectedName );
+
+        final StringBuilder formatted = new StringBuilder("Rya instance names:\n");
+        for(int i = 0; i < names.size(); i++) {
+            if(i == connectedIndex) {
+                formatted.append(" * ");
+            } else {
+                formatted.append("   ");
+            }
+            formatted.append( names.get(i) ).append("\n");
+        }
+
+        return formatted.toString();
+    }
+
+    /**
+     * Formats the list of Rya instance names.
+     *
+     * @param names - The Rya instance names. (not null)
+     * @return A string holding the pretty formatted list.
+     */
+    public String format(final List<String> names) {
+        requireNonNull(names);
+
+        final StringBuilder formatted = new StringBuilder("Rya instance names:\n");
+        for(int i = 0; i < names.size(); i++) {
+            formatted.append("   ").append( names.get(i) ).append("\n");
+        }
+
+        return formatted.toString();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/shell/src/main/java/org/apache/rya/shell/util/JLinePrompt.java
----------------------------------------------------------------------
diff --git a/extras/shell/src/main/java/org/apache/rya/shell/util/JLinePrompt.java b/extras/shell/src/main/java/org/apache/rya/shell/util/JLinePrompt.java
new file mode 100644
index 0000000..a259593
--- /dev/null
+++ b/extras/shell/src/main/java/org/apache/rya/shell/util/JLinePrompt.java
@@ -0,0 +1,211 @@
+/**
+ * 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.rya.shell.util;
+
+import static java.util.Objects.requireNonNull;
+
+import java.io.IOException;
+import java.util.Set;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.util.FieldUtils;
+import org.springframework.shell.core.Shell;
+
+import com.google.common.base.Optional;
+import com.google.common.collect.Sets;
+
+import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
+import edu.umd.cs.findbugs.annotations.NonNull;
+import jline.console.ConsoleReader;
+
+/**
+ * Provides access to the host {@link Shell}'s {@link ConsoleReader} and some
+ * utility functions for using it.
+ */
+@DefaultAnnotation(NonNull.class)
+public abstract class JLinePrompt {
+
+    /**
+     * Defines things that may be typed in response to a boolean prompt that evaluate to true.
+     */
+    private static final Set<String> affirmativeStrings = Sets.newHashSet("true", "t", "yes", "y");
+
+    /**
+     * Defines things that may be typed in response to a boolean prompt that evaluate to false.
+     */
+    private static final Set<String> negativeStrings = Sets.newHashSet("false", "f", "no", "n");
+
+    @Autowired
+    private Shell shell;
+
+    /**
+     * @return The shell's {@link ConsoleReader}.
+     */
+    public ConsoleReader getReader() {
+        // XXX Spring Shell doesn't expose the reader that we need to use to
+        //     read values from a terminal, so use reflection to pull it out.
+        return (ConsoleReader) FieldUtils.getProtectedFieldValue("reader", shell);
+    }
+
+    /**
+     * Formats a prompt that shows a default value.
+     *
+     * @param fieldName - The text portion that appears before the default. (not null)
+     * @param defaultValue - The default value that will be shown in the prompt.
+     * @return A prompt that shows the default value for a field.
+     */
+    public String makeFieldPrompt(final String fieldName, final boolean defaultValue) {
+    	return makeFieldPrompt(fieldName, Boolean.toString(defaultValue));
+    }
+
+    /**
+     * Formats a prompt that shows a default value.
+     *
+     * @param fieldName - The text portion that appears before the default. (not null)
+     * @param defaultValue - The default value that will be shown in the prompt.
+     * @return A prompt that shows the default value for a field.
+     */
+    public String makeFieldPrompt(final String fieldName, final String defaultValue) {
+        return String.format("%s [default: %s]: ", fieldName, defaultValue);
+    }
+
+    /**
+     * Checks if a user's input matches one of the affirmative strings.
+     *
+     * @param input - The user's input. (not null)
+     * @return {@code true} if the input is one of the affirmative values; otherwise {@code false}.
+     */
+    private boolean isAffirmative(final String input) {
+        requireNonNull(input);
+        for(final String affirmativeString : affirmativeStrings) {
+            if( input.equalsIgnoreCase(affirmativeString) ) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Checks if a user's input matches one of the negative strings.
+     *
+     * @param input - The user's input. (not null)
+     * @return {@code true} if the input is one of the negative values; otherwise {@code false}.
+     */
+    private boolean isNegative(final String input) {
+        requireNonNull(input);
+        for(final String negativeString : negativeStrings) {
+            if( input.equalsIgnoreCase(negativeString) ) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Prompts a user for a boolean value. The prompt will be repeated until
+     * a value true/false string has been submitted. If a default value is
+     * provided, then it will be used if the user doens't enter anything.
+     *
+     * @param prompt - The prompt for the input. (not null)
+     * @param defaultValue - The default value for the input if one is provided. (not null)
+     * @return The value the user entered.
+     * @throws IOException There was a problem reading values from the user.
+     */
+    protected boolean promptBoolean(final String prompt, final Optional<Boolean> defaultValue) throws IOException {
+        requireNonNull(prompt);
+        requireNonNull(defaultValue);
+
+        final ConsoleReader reader = getReader();
+        reader.setPrompt(prompt);
+
+        Boolean value = null;
+        boolean prompting = true;
+
+        while(prompting) {
+            // An empty input means to use the default value.
+            final String input = reader.readLine();
+            if(input.isEmpty() && defaultValue.isPresent()) {
+                value = defaultValue.get();
+                prompting = false;
+            }
+
+            // Check if it is one of the affirmative answers.
+            if(isAffirmative(input)) {
+                value = true;
+                prompting = false;
+            }
+
+            // Check if it is one of the negative answers.
+            if(isNegative(input)) {
+                value = false;
+                prompting = false;
+            }
+
+            // If we are still prompting, the input was invalid.
+            if(prompting) {
+                reader.println("Invalid response (true/false)");
+            }
+        }
+
+        return value;
+    }
+
+    /**
+     * Prompts a user for a String value. The prompt will be repeated until a
+     * value has been submitted. If a default value is provided, then it will be
+     * used if the user doesn't enter anything.
+     *
+     * @param prompt - The prompt for the input. (not null)
+     * @param defaultValue - The default value for the input if one is provided. (not null)
+     * @return The value the user entered.
+     * @throws IOException There was a problem reading values from the user.
+     */
+    protected String promptString(final String prompt, final Optional<String> defaultValue) throws IOException {
+        requireNonNull(prompt);
+        requireNonNull(defaultValue);
+
+        final ConsoleReader reader = getReader();
+        reader.setPrompt(prompt);
+
+        String value = null;
+        boolean prompting = true;
+
+        while(prompting) {
+            // Read a line of input.
+            final String input = reader.readLine();
+
+            if(!input.isEmpty()) {
+                // If a value was provided, return it.
+                value = input;
+                prompting = false;
+            } else {
+                // Otherwise, if a default value was provided, return it;
+                if(defaultValue.isPresent()) {
+                    value = defaultValue.get();
+                    prompting = false;
+                } else {
+                    // Otherwise, the user must provide a value.
+                    reader.println("Invalid response. Must provide a value.");
+                }
+            }
+        }
+
+        return value;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/shell/src/main/java/org/apache/rya/shell/util/PasswordPrompt.java
----------------------------------------------------------------------
diff --git a/extras/shell/src/main/java/org/apache/rya/shell/util/PasswordPrompt.java b/extras/shell/src/main/java/org/apache/rya/shell/util/PasswordPrompt.java
new file mode 100644
index 0000000..b61faf9
--- /dev/null
+++ b/extras/shell/src/main/java/org/apache/rya/shell/util/PasswordPrompt.java
@@ -0,0 +1,72 @@
+/**
+ * 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.rya.shell.util;
+
+import java.io.IOException;
+
+import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
+import edu.umd.cs.findbugs.annotations.NonNull;
+
+import jline.console.ConsoleReader;
+
+/**
+ * A mechanism for prompting a user of the application for a password.
+ */
+@DefaultAnnotation(NonNull.class)
+public interface PasswordPrompt {
+
+    /**
+     * Prompt the user for a password, wait for their input, and then get the
+     * value they entered.
+     *
+     * @return A character array holding the entered password.
+     * @throws IOEXception There was a problem reading the password.
+     */
+    public char[] getPassword() throws IOException;
+
+    /**
+     * Prompts a user for their password using a JLine {@link ConsoleReader}.
+     * <p>
+     * This prompt has a known security issue. ConsoleReader only reads passwords
+     * into Strings, so they can't easily be cleared out. We many an attempt to
+     * garbage collect the String after converting it to a character array, but
+     * this could be improved.
+     */
+    public static class JLinePasswordPrompt extends JLinePrompt implements PasswordPrompt {
+
+        @Override
+        public char[] getPassword() throws IOException {
+            char[] password = new char[0];
+
+            final ConsoleReader reader = getReader();
+            reader.setPrompt("Password: ");
+            String passwordStr = reader.readLine('*');
+            password = passwordStr.toCharArray();
+
+            // Reading the password into memory as a String is less safe than a char[]
+            // because the String is immutable. We can't clear it out. At best, we can
+            // remove all references to it and suggest the GC clean it up. There are no
+            // guarantees though.
+            passwordStr = null;
+            System.gc();
+
+            return password;
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/shell/src/main/java/org/apache/rya/shell/util/RyaDetailsFormatter.java
----------------------------------------------------------------------
diff --git a/extras/shell/src/main/java/org/apache/rya/shell/util/RyaDetailsFormatter.java b/extras/shell/src/main/java/org/apache/rya/shell/util/RyaDetailsFormatter.java
new file mode 100644
index 0000000..dace754
--- /dev/null
+++ b/extras/shell/src/main/java/org/apache/rya/shell/util/RyaDetailsFormatter.java
@@ -0,0 +1,120 @@
+/**
+ * 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.rya.shell.util;
+
+import static java.util.Objects.requireNonNull;
+
+import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
+import edu.umd.cs.findbugs.annotations.NonNull;
+
+import org.apache.rya.api.instance.RyaDetails;
+import org.apache.rya.api.instance.RyaDetails.PCJIndexDetails;
+import org.apache.rya.api.instance.RyaDetails.PCJIndexDetails.PCJDetails;
+
+import com.google.common.base.Joiner;
+import com.google.common.base.Optional;
+import com.google.common.collect.ImmutableMap;
+
+/**
+ * Formats an instance of {@link RyaDetails}.
+ */
+@DefaultAnnotation(NonNull.class)
+public class RyaDetailsFormatter {
+
+    /**
+     * Pretty formats an instance of {@link RyaDetails}.
+     *
+     * @param details - The object to format. (not null)
+     * @return A pretty render of the object.
+     */
+    public String format(final RyaDetails details) {
+        requireNonNull(details);
+
+        final StringBuilder report = new StringBuilder();
+
+        report.append("General Metadata:\n");
+        report.append("  Instance Name: ").append(details.getRyaInstanceName()).append("\n");
+        report.append("  RYA Version: ").append( details.getRyaVersion() ).append("\n");
+        report.append("  Users: ").append( Joiner.on(", ").join(details.getUsers()) ).append("\n");
+
+        report.append("Secondary Indicies:\n");
+        report.append("  Entity Centric Index:\n");
+        report.append("    Enabled: ").append( details.getEntityCentricIndexDetails().isEnabled() ).append("\n");
+      //RYA-215        report.append("  Geospatial Index:\n");
+      //RYA-215        report.append("    Enabled: ").append( details.getGeoIndexDetails().isEnabled() ).append("\n");
+        report.append("  Free Text Index:\n");
+        report.append("    Enabled: ").append( details.getFreeTextIndexDetails().isEnabled() ).append("\n");
+        report.append("  Temporal Index:\n");
+        report.append("    Enabled: ").append( details.getTemporalIndexDetails().isEnabled() ).append("\n");
+
+        report.append("  PCJ Index:\n");
+        final PCJIndexDetails pcjDetails = details.getPCJIndexDetails();
+        report.append("    Enabled: ").append( pcjDetails.isEnabled() ).append("\n");
+        if(pcjDetails.isEnabled()) {
+            if(pcjDetails.getFluoDetails().isPresent()) {
+                final String fluoAppName = pcjDetails.getFluoDetails().get().getUpdateAppName();
+                report.append("    Fluo App Name: ").append(fluoAppName).append("\n");
+            }
+
+            final ImmutableMap<String, PCJDetails> pcjs = pcjDetails.getPCJDetails();
+            report.append("    PCJs:\n");
+            if(pcjs.isEmpty()) {
+                report.append("      No PCJs have been added yet.\n");
+            } else {
+                for(final PCJDetails pcj : pcjs.values()) {
+                    report.append("      ID: ").append(pcj.getId()).append("\n");
+
+                    final String updateStrategy = format( pcj.getUpdateStrategy(), "None" );
+                    report.append("        Update Strategy: ").append(updateStrategy).append("\n");
+
+                    final String lastUpdateTime = format( pcj.getLastUpdateTime(), "unavailable");
+                    report.append("        Last Update Time: ").append(lastUpdateTime).append("\n");
+                }
+            }
+        }
+
+        report.append("Statistics:\n");
+        report.append("  Prospector:\n");
+        final String prospectorLastUpdateTime = format(details.getProspectorDetails().getLastUpdated(), "unavailable");
+        report.append("    Last Update Time: ").append( prospectorLastUpdateTime).append("\n");
+
+        report.append("  Join Selectivity:\n");
+        final String jsLastUpdateTime = format(details.getJoinSelectivityDetails().getLastUpdated(), "unavailable");
+        report.append("    Last Updated Time: ").append( jsLastUpdateTime ).append("\n");
+
+        return report.toString();
+    }
+
+    /**
+     * Formats an optional value using the value's toString() value.
+     *
+     * @param value - The optional value that will be formatted. (not null)
+     * @param absentValue - The String that will be returned if the optional is absent. (not null)
+     * @return The String representation of the optional value.
+     */
+    private <T> String format(final Optional<T> value, final String absentValue) {
+        requireNonNull(value);
+
+        String formatted = "unavailable";
+        if(value.isPresent()) {
+            formatted = value.get().toString();
+        }
+        return formatted;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/shell/src/main/java/org/apache/rya/shell/util/SparqlPrompt.java
----------------------------------------------------------------------
diff --git a/extras/shell/src/main/java/org/apache/rya/shell/util/SparqlPrompt.java b/extras/shell/src/main/java/org/apache/rya/shell/util/SparqlPrompt.java
new file mode 100644
index 0000000..2574eea
--- /dev/null
+++ b/extras/shell/src/main/java/org/apache/rya/shell/util/SparqlPrompt.java
@@ -0,0 +1,82 @@
+/**
+ * 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.rya.shell.util;
+
+import java.io.IOException;
+
+import com.google.common.base.Optional;
+
+import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
+import edu.umd.cs.findbugs.annotations.NonNull;
+import jline.console.ConsoleReader;
+
+/**
+ * A mechanism for prompting a user of the application for a SPARQL string.
+ */
+@DefaultAnnotation(NonNull.class)
+public interface SparqlPrompt {
+
+    /**
+     * Prompt the user for a SPARQL query, wait for their input, and then get the value they entered.
+     *
+     * @return The user entered SPARQL query, or an empty string if the user aborts.
+     * @throws IOException There was a problem reading the user's input.
+     */
+    public Optional<String> getSparql() throws IOException;
+
+    /**
+     * Prompts a user for a SPARQL query using a JLine {@link ConsoleReader}.
+     */
+    @DefaultAnnotation(NonNull.class)
+    public static class JLineSparqlPrompt extends JLinePrompt implements SparqlPrompt {
+
+        private final String EXECUTE_COMMAND = "\\e";
+        private final String CLEAR_COMMAND = "\\c";
+
+        @Override
+        public Optional<String> getSparql() throws IOException {
+            final ConsoleReader reader = getReader();
+            reader.setCopyPasteDetection(true); // disable tab completion from activating
+            reader.setHistoryEnabled(false);    // don't store SPARQL fragments in the command history
+            try {
+                reader.println("Enter a SPARQL Query.");
+                reader.println("Type '" + EXECUTE_COMMAND + "' to execute the current query.");
+                reader.println("Type '" + CLEAR_COMMAND + "' to clear the current query.");
+                reader.flush();
+
+                final StringBuilder sb = new StringBuilder();
+                String line = reader.readLine("SPARQL> ");
+                while (!line.endsWith(CLEAR_COMMAND) && !line.endsWith(EXECUTE_COMMAND)) {
+                    sb.append(line).append("\n");
+                    line = reader.readLine("     -> ");
+                }
+
+                if (line.endsWith(EXECUTE_COMMAND)) {
+                    sb.append(line.substring(0, line.length() - EXECUTE_COMMAND.length()));
+                    return Optional.of(sb.toString());
+                }
+                return Optional.absent();
+            } finally {
+                reader.setHistoryEnabled(true);      // restore the ConsoleReader's settings
+                reader.setCopyPasteDetection(false); // restore tab completion
+            }
+        }
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/shell/src/main/java/org/apache/rya/shell/util/UninstallPrompt.java
----------------------------------------------------------------------
diff --git a/extras/shell/src/main/java/org/apache/rya/shell/util/UninstallPrompt.java b/extras/shell/src/main/java/org/apache/rya/shell/util/UninstallPrompt.java
new file mode 100644
index 0000000..628727c
--- /dev/null
+++ b/extras/shell/src/main/java/org/apache/rya/shell/util/UninstallPrompt.java
@@ -0,0 +1,58 @@
+/**
+ * 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.rya.shell.util;
+
+import static java.util.Objects.requireNonNull;
+
+import java.io.IOException;
+
+import com.google.common.base.Optional;
+
+import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
+import edu.umd.cs.findbugs.annotations.NonNull;
+import jline.console.ConsoleReader;
+
+/**
+ * A mechanism for prompting a user of the application to ensure they want to
+ * uninstall an instance of Rya.
+ */
+@DefaultAnnotation(NonNull.class)
+public interface UninstallPrompt {
+
+    /**
+     * Prompt the user to make sure they want to uninstall the instance of Rya.
+     *
+     * @param ryaInstanceName - The name of the Rya instance being prompted for. (not null)
+     * @return The value they entered.
+     * @throws IOException There was a problem reading the values.
+     */
+    public boolean promptAreYouSure(final String ryaInstanceName) throws IOException;
+
+    /**
+     * Prompts a user for uninstall information using a JLine {@link ConsoleReader}.
+     */
+    public static class JLineUninstallPrompt extends JLinePrompt implements UninstallPrompt {
+        @Override
+        public boolean promptAreYouSure(final String ryaInstanceName) throws IOException {
+            requireNonNull(ryaInstanceName);
+            return promptBoolean("Are you sure you want to uninstall this instance of Rya named '" +
+                    ryaInstanceName + "'? ", Optional.<Boolean>absent());
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/shell/src/main/resources/LICENSE.txt
----------------------------------------------------------------------
diff --git a/extras/shell/src/main/resources/LICENSE.txt b/extras/shell/src/main/resources/LICENSE.txt
new file mode 100644
index 0000000..4a9fe83
--- /dev/null
+++ b/extras/shell/src/main/resources/LICENSE.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.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/shell/src/main/resources/META-INF/spring/spring-shell-plugin.xml
----------------------------------------------------------------------
diff --git a/extras/shell/src/main/resources/META-INF/spring/spring-shell-plugin.xml b/extras/shell/src/main/resources/META-INF/spring/spring-shell-plugin.xml
new file mode 100644
index 0000000..48c4846
--- /dev/null
+++ b/extras/shell/src/main/resources/META-INF/spring/spring-shell-plugin.xml
@@ -0,0 +1,50 @@
+<?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.
+
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns:context="http://www.springframework.org/schema/context"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">
+
+    <!-- Tell Spring where it can find all of the Command components. -->
+    <context:component-scan base-package="org.apache.rya.shell"/>
+
+    <!-- Define the shell state bean that will be shared across all of the commands. -->
+    <bean id="sharedShellState" class="org.apache.rya.shell.SharedShellState" />
+    <bean id="passwordPrompt" class="org.apache.rya.shell.util.PasswordPrompt.JLinePasswordPrompt" />
+    <bean id="installPrompt" class="org.apache.rya.shell.util.InstallPrompt.JLineAccumuloInstallPrompt" />
+    <bean id="uninstallPrompt" class="org.apache.rya.shell.util.UninstallPrompt.JLineUninstallPrompt" />
+    <bean id="sparqlPrompt" class="org.apache.rya.shell.util.SparqlPrompt.JLineSparqlPrompt" />
+    <bean id="consolePrinter" class="org.apache.rya.shell.util.ConsolePrinter.JLineConsolePrinter" />
+    
+    <!-- Define each of the beans that hold onto commands used by the shell. -->
+    <bean id="ryaConnectionCommands" class="org.apache.rya.shell.RyaConnectionCommands" />
+    <bean id="ryaAdminCommands" class="org.apache.rya.shell.RyaAdminCommands" />
+    <bean id="ryaCommands" class="org.apache.rya.shell.RyaCommands" />
+    
+    <!--  
+    <bean id="springHelpCommands" class="org.springframework.shell.commands.HelpCommands" />
+    <bean id="springScriptCommands" class="org.springframework.shell.commands.ScriptCommands" />
+    <bean id="springExitCommands" class="org.springframework.shell.commands.ExitCommands" />
+    -->
+    
+</beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/shell/src/main/scripts/rya
----------------------------------------------------------------------
diff --git a/extras/shell/src/main/scripts/rya b/extras/shell/src/main/scripts/rya
new file mode 100644
index 0000000..5280286
--- /dev/null
+++ b/extras/shell/src/main/scripts/rya
@@ -0,0 +1,33 @@
+#!/bin/bash
+#
+# 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_HOME=$(dirname $(cd $(dirname $0) && pwd))
+#cd $PROJECT_HOME
+
+java -cp $PROJECT_HOME/lib/${project.artifactId}-${project.version}-shaded.jar \
+  -Drya.shell.home="${PROJECT_HOME}/" \
+  -Dlog4j.configuration="file://$PROJECT_HOME/conf/log4j.properties" \
+  org.springframework.shell.Bootstrap "$@"
+  
+# --profiles - Specifies values for the system property spring.profiles.active so that Spring 3.1 and greater profile support is enabled.
+# --cmdfile - Specifies a file to read that contains shell commands
+# --histsize - Specifies the maximum number of lines to store in the command history file. Default value is 3000.
+# --disableInternalCommands - Flag that disables all commands that would be pre-registered with the shell. There is no argument to this option. You can selectively add back any internal commands by referencing them in your shell plugin file. Look at the Spring Shell javadocs for specific commands located in the org.springframework.shell.commands package as well as the section in this documentation of Built in commands.



[3/7] incubator-rya git commit: RYA-325 Renamed rya.console to rya.shell. Closes #194

Posted by mi...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/shell/src/test/java/org/apache/rya/shell/RyaAdminCommandsTest.java
----------------------------------------------------------------------
diff --git a/extras/shell/src/test/java/org/apache/rya/shell/RyaAdminCommandsTest.java b/extras/shell/src/test/java/org/apache/rya/shell/RyaAdminCommandsTest.java
new file mode 100644
index 0000000..e3e8d98
--- /dev/null
+++ b/extras/shell/src/test/java/org/apache/rya/shell/RyaAdminCommandsTest.java
@@ -0,0 +1,474 @@
+/**
+ * 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.rya.shell;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import java.io.IOException;
+import java.util.Date;
+import java.util.List;
+import java.util.TimeZone;
+
+import org.apache.rya.api.client.AddUser;
+import org.apache.rya.api.client.CreatePCJ;
+import org.apache.rya.api.client.DeletePCJ;
+import org.apache.rya.api.client.GetInstanceDetails;
+import org.apache.rya.api.client.Install;
+import org.apache.rya.api.client.Install.DuplicateInstanceNameException;
+import org.apache.rya.api.client.Install.InstallConfiguration;
+import org.apache.rya.api.client.InstanceDoesNotExistException;
+import org.apache.rya.api.client.ListInstances;
+import org.apache.rya.api.client.RemoveUser;
+import org.apache.rya.api.client.RyaClient;
+import org.apache.rya.api.client.RyaClientException;
+import org.apache.rya.api.client.Uninstall;
+import org.apache.rya.api.client.accumulo.AccumuloConnectionDetails;
+import org.apache.rya.api.instance.RyaDetails;
+import org.apache.rya.api.instance.RyaDetails.EntityCentricIndexDetails;
+import org.apache.rya.api.instance.RyaDetails.FreeTextIndexDetails;
+import org.apache.rya.api.instance.RyaDetails.JoinSelectivityDetails;
+import org.apache.rya.api.instance.RyaDetails.PCJIndexDetails;
+import org.apache.rya.api.instance.RyaDetails.PCJIndexDetails.FluoDetails;
+import org.apache.rya.api.instance.RyaDetails.PCJIndexDetails.PCJDetails;
+import org.apache.rya.api.instance.RyaDetails.PCJIndexDetails.PCJDetails.PCJUpdateStrategy;
+import org.apache.rya.api.instance.RyaDetails.ProspectorDetails;
+import org.apache.rya.api.instance.RyaDetails.TemporalIndexDetails;
+import org.apache.rya.shell.util.InstallPrompt;
+import org.apache.rya.shell.util.SparqlPrompt;
+import org.apache.rya.shell.util.UninstallPrompt;
+import org.junit.Test;
+
+import com.google.common.base.Optional;
+import com.google.common.collect.Lists;
+
+/**
+ * Unit tests the methods of {@link RyaAdminCommands}.
+ */
+public class RyaAdminCommandsTest {
+
+    @Test
+    public void createPCJ() throws InstanceDoesNotExistException, RyaClientException, IOException {
+        // Mock the object that performs the create operation.
+        final String instanceName = "unitTest";
+        final String sparql = "SELECT * WHERE { ?person <http://isA> ?noun }";
+        final String pcjId = "123412342";
+        final CreatePCJ mockCreatePCJ = mock(CreatePCJ.class);
+        when(mockCreatePCJ.createPCJ( eq(instanceName), eq(sparql) ) ).thenReturn( pcjId );
+
+        final RyaClient mockCommands = mock(RyaClient.class);
+        when(mockCommands.getCreatePCJ()).thenReturn( mockCreatePCJ );
+
+        final SharedShellState state = new SharedShellState();
+        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
+        state.connectedToInstance(instanceName);
+
+        final SparqlPrompt mockSparqlPrompt = mock(SparqlPrompt.class);
+        when(mockSparqlPrompt.getSparql()).thenReturn(Optional.of(sparql));
+
+        // Execute the command.
+        final RyaAdminCommands commands = new RyaAdminCommands(state, mock(InstallPrompt.class), mockSparqlPrompt, mock(UninstallPrompt.class));
+        final String message = commands.createPcj();
+
+        // Verify the values that were provided to the command were passed through to CreatePCJ.
+        verify(mockCreatePCJ).createPCJ(eq(instanceName), eq(sparql));
+
+        // Verify a message is returned that explains what was created.
+        final String expected = "The PCJ has been created. Its ID is '123412342'.";
+        assertEquals(expected, message);
+    }
+
+    @Test
+    public void createPCJ_cancelledPrompt() throws InstanceDoesNotExistException, RyaClientException, IOException {
+        // Mock the object that performs the create operation.
+        final String instanceName = "unitTest";
+
+        final RyaClient mockCommands = mock(RyaClient.class);
+
+        final SharedShellState state = new SharedShellState();
+        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
+        state.connectedToInstance(instanceName);
+
+        final SparqlPrompt mockSparqlPrompt = mock(SparqlPrompt.class);
+        when(mockSparqlPrompt.getSparql()).thenReturn(Optional.absent());
+
+        // Execute the command.
+        final RyaAdminCommands commands = new RyaAdminCommands(state, mock(InstallPrompt.class), mockSparqlPrompt, mock(UninstallPrompt.class));
+        final String message = commands.createPcj();
+
+        // Verify a message is returned that explains what was created.
+        final String expected = "";
+        assertEquals(expected, message);
+    }
+
+    @Test
+    public void deletePCJ() throws InstanceDoesNotExistException, RyaClientException {
+        // Mock the object that performs the delete operation.
+        final DeletePCJ mockDeletePCJ = mock(DeletePCJ.class);
+
+        final RyaClient mockCommands = mock(RyaClient.class);
+        when(mockCommands.getDeletePCJ()).thenReturn( mockDeletePCJ );
+
+        final SharedShellState state = new SharedShellState();
+        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
+        final String instanceName = "unitTests";
+        state.connectedToInstance(instanceName);
+
+        // Execute the command.
+        final String pcjId = "123412342";
+
+        final RyaAdminCommands commands = new RyaAdminCommands(state, mock(InstallPrompt.class), mock(SparqlPrompt.class), mock(UninstallPrompt.class));
+        final String message = commands.deletePcj(pcjId);
+
+        // Verify the values that were provided to the command were passed through to the DeletePCJ.
+        verify(mockDeletePCJ).deletePCJ(eq(instanceName), eq(pcjId));
+
+        // Verify a message is returned that explains what was deleted.
+        final String expected = "The PCJ has been deleted.";
+        assertEquals(expected, message);
+    }
+
+    @Test
+    public void getInstanceDetails() throws InstanceDoesNotExistException, RyaClientException {
+        // This test is failed if the default timezone was not EST, so now it's fixed at EST.
+        // If you get assert mismatch of EST!=EDT, try the deprecated getTimeZone("EST") instead.
+        TimeZone.setDefault(TimeZone.getTimeZone("America/New_York"));
+        // Mock the object that performs the get operation.
+        final GetInstanceDetails mockGetInstanceDetails = mock(GetInstanceDetails.class);
+        final String instanceName = "test_instance";
+        final RyaDetails details = RyaDetails.builder().setRyaInstanceName(instanceName)
+                .setRyaVersion("1.2.3.4")
+                .addUser("alice")
+                .addUser("bob")
+                .addUser("charlie")
+                .setEntityCentricIndexDetails( new EntityCentricIndexDetails(true) )
+              //RYA-215.setGeoIndexDetails( new GeoIndexDetails(true) )
+                .setTemporalIndexDetails( new TemporalIndexDetails(true) )
+                .setFreeTextDetails( new FreeTextIndexDetails(true) )
+                .setPCJIndexDetails(
+                        PCJIndexDetails.builder()
+                            .setEnabled(true)
+                            .setFluoDetails( new FluoDetails("test_instance_rya_pcj_updater") )
+                            .addPCJDetails(
+                                    PCJDetails.builder()
+                                        .setId("pcj 1")
+                                        .setUpdateStrategy(PCJUpdateStrategy.BATCH)
+                                        .setLastUpdateTime( new Date(1252521351L) ))
+                            .addPCJDetails(
+                                    PCJDetails.builder()
+                                        .setId("pcj 2")
+                                        .setUpdateStrategy(PCJUpdateStrategy.INCREMENTAL)))
+                .setProspectorDetails( new ProspectorDetails(Optional.of(new Date(12525211L))) )
+                .setJoinSelectivityDetails( new JoinSelectivityDetails(Optional.of(new Date(125221351L))) )
+                .build();
+
+        when(mockGetInstanceDetails.getDetails(eq(instanceName))).thenReturn( Optional.of(details) );
+
+        final RyaClient mockCommands = mock(RyaClient.class);
+        when(mockCommands.getGetInstanceDetails()).thenReturn( mockGetInstanceDetails );
+
+        final SharedShellState state = new SharedShellState();
+        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
+        state.connectedToInstance(instanceName);
+
+        // Execute the command.
+        final RyaAdminCommands commands = new RyaAdminCommands(state, mock(InstallPrompt.class), mock(SparqlPrompt.class), mock(UninstallPrompt.class));
+        final String message = commands.printInstanceDetails();
+
+        // Verify the values that were provided to the command were passed through to the GetInstanceDetails.
+        verify(mockGetInstanceDetails).getDetails(eq(instanceName));
+
+        // Verify a message is returned that includes the details.
+        final String expected =
+                "General Metadata:\n" +
+                "  Instance Name: test_instance\n" +
+                "  RYA Version: 1.2.3.4\n" +
+                "  Users: alice, bob, charlie\n" +
+                "Secondary Indicies:\n" +
+                "  Entity Centric Index:\n" +
+                "    Enabled: true\n" +
+              //RYA-215"  Geospatial Index:\n" +
+            //RYA-215"    Enabled: true\n" +
+                "  Free Text Index:\n" +
+                "    Enabled: true\n" +
+                "  Temporal Index:\n" +
+                "    Enabled: true\n" +
+                "  PCJ Index:\n" +
+                "    Enabled: true\n" +
+                "    Fluo App Name: test_instance_rya_pcj_updater\n" +
+                "    PCJs:\n" +
+                "      ID: pcj 1\n" +
+                "        Update Strategy: BATCH\n" +
+                "        Last Update Time: Thu Jan 15 06:55:21 EST 1970\n" +
+                "      ID: pcj 2\n" +
+                "        Update Strategy: INCREMENTAL\n" +
+                "        Last Update Time: unavailable\n" +
+                "Statistics:\n" +
+                "  Prospector:\n" +
+                "    Last Update Time: Wed Dec 31 22:28:45 EST 1969\n" +
+                "  Join Selectivity:\n" +
+                "    Last Updated Time: Fri Jan 02 05:47:01 EST 1970\n";
+        assertEquals(expected, message);
+    }
+
+    @Test
+    public void install() throws DuplicateInstanceNameException, RyaClientException, IOException {
+        // Mock the object that performs the install operation.
+        final Install mockInstall = mock(Install.class);
+
+        final RyaClient mockCommands = mock(RyaClient.class);
+        when(mockCommands.getInstall()).thenReturn( mockInstall );
+
+        final SharedShellState state = new SharedShellState();
+        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
+
+        // Execute the command.
+        final String instanceName = "unitTests";
+        final InstallConfiguration installConfig = InstallConfiguration.builder()
+                .setEnableGeoIndex(true)
+                .setEnablePcjIndex(true)
+                .build();
+
+        final InstallPrompt mockInstallPrompt = mock(InstallPrompt.class);
+        when(mockInstallPrompt.promptInstanceName()).thenReturn( instanceName );
+        when(mockInstallPrompt.promptInstallConfiguration(instanceName)).thenReturn( installConfig );
+        when(mockInstallPrompt.promptVerified(eq(instanceName), eq(installConfig))).thenReturn(true);
+
+        final RyaAdminCommands commands = new RyaAdminCommands(state, mockInstallPrompt, mock(SparqlPrompt.class), mock(UninstallPrompt.class));
+        final String message = commands.install();
+
+        // Verify the values that were provided to the command were passed through to the Install.
+        verify(mockInstall).install(eq(instanceName), eq(installConfig));
+
+        // Verify a message is returned that indicates the success of the operation.
+        final String expected = "The Rya instance named 'unitTests' has been installed.";
+        assertEquals(expected, message);
+    }
+
+    @Test
+    public void installWithParameters() throws DuplicateInstanceNameException, RyaClientException, IOException {
+        // Mock the object that performs the install operation.
+        final Install mockInstall = mock(Install.class);
+
+        final RyaClient mockCommands = mock(RyaClient.class);
+        when(mockCommands.getInstall()).thenReturn( mockInstall );
+
+        final SharedShellState state = new SharedShellState();
+        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
+
+        final String instanceName = "unitTests";
+        final boolean enableTableHashPrefix = false;
+        final boolean enableEntityCentricIndex = true;
+        final boolean enableFreeTextIndex = false;
+        final boolean enableGeospatialIndex = true;
+        final boolean enableTemporalIndex = false;
+        final boolean enablePcjIndex = true;
+        final String fluoPcjAppName = instanceName + "pcj_updater";
+
+        // Execute the command.
+        final InstallConfiguration installConfig = InstallConfiguration.builder()
+                .setEnableTableHashPrefix(enableTableHashPrefix)
+                .setEnableEntityCentricIndex(enableEntityCentricIndex)
+                .setEnableFreeTextIndex(enableFreeTextIndex)
+                .setEnableGeoIndex(enableGeospatialIndex)
+                .setEnableTemporalIndex(enableTemporalIndex)
+                .setEnablePcjIndex(enablePcjIndex)
+                .setFluoPcjAppName(fluoPcjAppName)
+                .build();
+
+        final InstallPrompt mockInstallPrompt = mock(InstallPrompt.class);
+        when(mockInstallPrompt.promptInstanceName()).thenReturn( instanceName );
+        when(mockInstallPrompt.promptInstallConfiguration(instanceName)).thenReturn( installConfig );
+        when(mockInstallPrompt.promptVerified(eq(instanceName), eq(installConfig))).thenReturn(true);
+
+        final RyaAdminCommands commands = new RyaAdminCommands(state, mockInstallPrompt, mock(SparqlPrompt.class), mock(UninstallPrompt.class));
+        final String message = commands.installWithParameters(instanceName, enableTableHashPrefix, enableEntityCentricIndex, enableFreeTextIndex, enableGeospatialIndex, enableTemporalIndex, enablePcjIndex, fluoPcjAppName);
+
+        // Verify the values that were provided to the command were passed through to the Install.
+        verify(mockInstall).install(eq(instanceName), eq(installConfig));
+
+        // Verify a message is returned that indicates the success of the operation.
+        final String expected = "The Rya instance named 'unitTests' has been installed.";
+        assertEquals(expected, message);
+    }
+
+    @Test
+    public void installWithParameters_userAbort() throws DuplicateInstanceNameException, RyaClientException, IOException {
+        // Mock the object that performs the install operation.
+        final Install mockInstall = mock(Install.class);
+
+        final RyaClient mockCommands = mock(RyaClient.class);
+        when(mockCommands.getInstall()).thenReturn( mockInstall );
+
+        final SharedShellState state = new SharedShellState();
+        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
+
+        final String instanceName = "unitTests";
+        final boolean enableTableHashPrefix = false;
+        final boolean enableEntityCentricIndex = true;
+        final boolean enableFreeTextIndex = false;
+        final boolean enableGeospatialIndex = true;
+        final boolean enableTemporalIndex = false;
+        final boolean enablePcjIndex = true;
+        final String fluoPcjAppName = instanceName + "pcj_updater";
+
+        // Execute the command.
+        final InstallConfiguration installConfig = InstallConfiguration.builder()
+                .setEnableTableHashPrefix(enableTableHashPrefix)
+                .setEnableEntityCentricIndex(enableEntityCentricIndex)
+                .setEnableFreeTextIndex(enableFreeTextIndex)
+                .setEnableGeoIndex(enableGeospatialIndex)
+                .setEnableTemporalIndex(enableTemporalIndex)
+                .setEnablePcjIndex(enablePcjIndex)
+                .setFluoPcjAppName(fluoPcjAppName)
+                .build();
+
+        final InstallPrompt mockInstallPrompt = mock(InstallPrompt.class);
+        when(mockInstallPrompt.promptInstanceName()).thenReturn( instanceName );
+        when(mockInstallPrompt.promptInstallConfiguration(instanceName)).thenReturn( installConfig );
+        when(mockInstallPrompt.promptVerified(eq(instanceName), eq(installConfig))).thenReturn(false);
+
+        final RyaAdminCommands commands = new RyaAdminCommands(state, mockInstallPrompt, mock(SparqlPrompt.class), mock(UninstallPrompt.class));
+        final String message = commands.installWithParameters(instanceName, enableTableHashPrefix, enableEntityCentricIndex, enableFreeTextIndex, enableGeospatialIndex, enableTemporalIndex, enablePcjIndex, fluoPcjAppName);
+
+        // Verify a message is returned that indicates the success of the operation.
+        final String expected = "Skipping Installation.";
+        assertEquals(expected, message);
+    }
+
+    @Test
+    public void listInstances() throws RyaClientException, IOException {
+        // Mock the object that performs the list operation.
+        final ListInstances mockListInstances = mock(ListInstances.class);
+        final List<String> instanceNames = Lists.newArrayList("a", "b", "c", "d");
+        when(mockListInstances.listInstances()).thenReturn(instanceNames);
+
+        final RyaClient mockCommands = mock(RyaClient.class);
+        when(mockCommands.getListInstances()).thenReturn( mockListInstances );
+
+        final SharedShellState state = new SharedShellState();
+        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
+        state.connectedToInstance("b");
+
+        // Execute the command.
+        final RyaAdminCommands commands = new RyaAdminCommands(state, mock(InstallPrompt.class), mock(SparqlPrompt.class), mock(UninstallPrompt.class));
+        final String message = commands.listInstances();
+
+        // Verify a message is returned that lists the the instances.
+        final String expected =
+                "Rya instance names:\n" +
+                "   a\n" +
+                " * b\n" +
+                "   c\n" +
+                "   d\n";
+        assertEquals(expected, message);
+    }
+
+    @Test
+    public void addUser() throws Exception {
+        // Mock the object that performs the Add User command.
+        final AddUser mockAddUser = mock(AddUser.class);
+
+        final RyaClient mockClient = mock(RyaClient.class);
+        when(mockClient.getAddUser()).thenReturn( mockAddUser );
+
+        final SharedShellState state = new SharedShellState();
+        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockClient);
+        state.connectedToInstance("test_instance");
+
+        // Execute the command.
+        final RyaAdminCommands commands = new RyaAdminCommands(state, mock(InstallPrompt.class), mock(SparqlPrompt.class), mock(UninstallPrompt.class));
+        commands.addUser("alice");
+
+        // Verify the add request was forwarded to the client.
+        verify(mockAddUser).addUser(eq("test_instance"), eq("alice"));
+    }
+
+    @Test
+    public void removeUser() throws Exception {
+        // Mock the object that performs the Add User command.
+        final RemoveUser mockRemoveUser = mock(RemoveUser.class);
+
+        final RyaClient mockClient = mock(RyaClient.class);
+        when(mockClient.getRemoveUser()).thenReturn( mockRemoveUser );
+
+        final SharedShellState state = new SharedShellState();
+        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockClient);
+        state.connectedToInstance("test_instance");
+
+        // Execute the command.
+        final RyaAdminCommands commands = new RyaAdminCommands(state, mock(InstallPrompt.class), mock(SparqlPrompt.class), mock(UninstallPrompt.class));
+        commands.removeUser("alice");
+
+        // Verify the add request was forwarded to the client.
+        verify(mockRemoveUser).removeUser(eq("test_instance"), eq("alice"));
+    }
+
+    @Test
+    public void uninstall_yes() throws Exception {
+        // Mock the object that performs the Uninstall command.
+        final Uninstall mockUninstall = mock(Uninstall.class);
+
+        // Mock a prompt that says the user does want to uninstall it.
+        final UninstallPrompt uninstallPrompt = mock(UninstallPrompt.class);
+        when(uninstallPrompt.promptAreYouSure( eq("test_instance") )).thenReturn(true);
+
+        final RyaClient mockClient = mock(RyaClient.class);
+        when(mockClient.getUninstall()).thenReturn( mockUninstall );
+
+        final SharedShellState state = new SharedShellState();
+        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockClient);
+        state.connectedToInstance("test_instance");
+
+        // Execute the command.
+        final RyaAdminCommands commands = new RyaAdminCommands(state, mock(InstallPrompt.class), mock(SparqlPrompt.class), uninstallPrompt);
+        commands.uninstall();
+
+        // Verify the request was forwarded to the client.
+        verify(mockUninstall).uninstall(eq("test_instance"));
+    }
+
+    @Test
+    public void uninstall_no() throws Exception {
+        // Mock the object that performs the Uninstall command.
+        final Uninstall mockUninstall = mock(Uninstall.class);
+
+        // Mock a prompt that says the user does want to uninstall it.
+        final UninstallPrompt uninstallPrompt = mock(UninstallPrompt.class);
+        when(uninstallPrompt.promptAreYouSure( eq("test_instance") )).thenReturn(false);
+
+        final RyaClient mockClient = mock(RyaClient.class);
+        when(mockClient.getUninstall()).thenReturn( mockUninstall );
+
+        final SharedShellState state = new SharedShellState();
+        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockClient);
+        state.connectedToInstance("test_instance");
+
+        // Execute the command.
+        final RyaAdminCommands commands = new RyaAdminCommands(state, mock(InstallPrompt.class), mock(SparqlPrompt.class), uninstallPrompt);
+        commands.uninstall();
+
+        // Verify the request was forwarded to the client.
+        verify(mockUninstall, never()).uninstall(eq("test_instance"));
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/shell/src/test/java/org/apache/rya/shell/RyaCommandsTest.java
----------------------------------------------------------------------
diff --git a/extras/shell/src/test/java/org/apache/rya/shell/RyaCommandsTest.java b/extras/shell/src/test/java/org/apache/rya/shell/RyaCommandsTest.java
new file mode 100644
index 0000000..a0a3979
--- /dev/null
+++ b/extras/shell/src/test/java/org/apache/rya/shell/RyaCommandsTest.java
@@ -0,0 +1,278 @@
+/**
+ * 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.rya.shell;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Paths;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.rya.api.client.ExecuteSparqlQuery;
+import org.apache.rya.api.client.InstanceDoesNotExistException;
+import org.apache.rya.api.client.LoadStatementsFile;
+import org.apache.rya.api.client.RyaClient;
+import org.apache.rya.api.client.RyaClientException;
+import org.apache.rya.api.client.accumulo.AccumuloConnectionDetails;
+import org.apache.rya.shell.util.ConsolePrinter;
+import org.apache.rya.shell.util.SparqlPrompt;
+import org.junit.Test;
+import org.openrdf.rio.RDFFormat;
+
+import com.google.common.base.Optional;
+
+/**
+ * Unit tests the methods of {@link RyaAdminCommands}.
+ */
+public class RyaCommandsTest {
+
+    @Test
+    public void testLoadData() throws InstanceDoesNotExistException, RyaClientException, IOException {
+        // Mock the object that performs the create operation.
+        final String instanceName = "unitTest";
+        final String statementsFile = "/path/to/statements.nt";
+        final String format = null;
+
+        final LoadStatementsFile mockLoadStatementsFile = mock(LoadStatementsFile.class);
+        final RyaClient mockCommands = mock(RyaClient.class);
+        when(mockCommands.getLoadStatementsFile()).thenReturn(mockLoadStatementsFile);
+
+        final SharedShellState state = new SharedShellState();
+        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
+        state.connectedToInstance(instanceName);
+
+        final SparqlPrompt mockSparqlPrompt = mock(SparqlPrompt.class);
+
+        final ConsolePrinter mockConsolePrinter = mock(ConsolePrinter.class);
+
+        // Execute the command.
+        final RyaCommands commands = new RyaCommands(state, mockSparqlPrompt, mockConsolePrinter);
+        final String message = commands.loadData(statementsFile, format);
+
+        // Verify the values that were provided to the command were passed through to LoadStatementsFile.
+        verify(mockLoadStatementsFile).loadStatements(instanceName, Paths.get(statementsFile), RDFFormat.NTRIPLES);
+
+        // Verify a message is returned that explains what was created.
+        assertTrue(message.startsWith("Loaded the file: '" + statementsFile +"' successfully in "));
+        assertTrue(message.endsWith(" seconds."));
+    }
+
+    @Test
+    public void testLoadData_specifyFormat() throws InstanceDoesNotExistException, RyaClientException, IOException {
+        // Mock the object that performs the create operation.
+        final String instanceName = "unitTest";
+        final String statementsFile = "/path/to/statements.nt";
+        final String format = "N-TRIPLES";
+
+        final LoadStatementsFile mockLoadStatementsFile = mock(LoadStatementsFile.class);
+        final RyaClient mockCommands = mock(RyaClient.class);
+        when(mockCommands.getLoadStatementsFile()).thenReturn(mockLoadStatementsFile);
+
+        final SharedShellState state = new SharedShellState();
+        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
+        state.connectedToInstance(instanceName);
+
+        final SparqlPrompt mockSparqlPrompt = mock(SparqlPrompt.class);
+
+        final ConsolePrinter mockConsolePrinter = mock(ConsolePrinter.class);
+
+        // Execute the command.
+        final RyaCommands commands = new RyaCommands(state, mockSparqlPrompt, mockConsolePrinter);
+        final String message = commands.loadData(statementsFile, format);
+
+        // Verify the values that were provided to the command were passed through to LoadStatementsFile.
+        verify(mockLoadStatementsFile).loadStatements(instanceName, Paths.get(statementsFile), RDFFormat.NTRIPLES);
+
+        // Verify a message is returned that explains what was created.
+        assertTrue(message.startsWith("Loaded the file: '" + statementsFile +"' successfully in "));
+        assertTrue(message.endsWith(" seconds."));
+    }
+
+    @Test(expected = RuntimeException.class)
+    public void testLoadData_specifyInvalidFormat() throws InstanceDoesNotExistException, RyaClientException, IOException {
+        // Mock the object that performs the create operation.
+        final String instanceName = "unitTest";
+        final String statementsFile = "/path/to/statements.nt";
+        final String format = "INVALID_FORMAT_NAME";
+
+        final LoadStatementsFile mockLoadStatementsFile = mock(LoadStatementsFile.class);
+        final RyaClient mockCommands = mock(RyaClient.class);
+        when(mockCommands.getLoadStatementsFile()).thenReturn(mockLoadStatementsFile);
+
+        final SharedShellState state = new SharedShellState();
+        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
+        state.connectedToInstance(instanceName);
+
+        final SparqlPrompt mockSparqlPrompt = mock(SparqlPrompt.class);
+
+        final ConsolePrinter mockConsolePrinter = mock(ConsolePrinter.class);
+
+        // Execute the command.
+        final RyaCommands commands = new RyaCommands(state, mockSparqlPrompt, mockConsolePrinter);
+
+        commands.loadData(statementsFile, format);
+    }
+
+    @Test(expected = RuntimeException.class)
+    public void testLoadData_specifyInvalidFilenameFormat() throws InstanceDoesNotExistException, RyaClientException, IOException {
+        // Mock the object that performs the create operation.
+        final String instanceName = "unitTest";
+        final String statementsFile = "/path/to/statements.invalidFormat";
+        final String format = null;
+
+        final LoadStatementsFile mockLoadStatementsFile = mock(LoadStatementsFile.class);
+        final RyaClient mockCommands = mock(RyaClient.class);
+        when(mockCommands.getLoadStatementsFile()).thenReturn(mockLoadStatementsFile);
+
+        final SharedShellState state = new SharedShellState();
+        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
+        state.connectedToInstance(instanceName);
+
+        final SparqlPrompt mockSparqlPrompt = mock(SparqlPrompt.class);
+
+        final ConsolePrinter mockConsolePrinter = mock(ConsolePrinter.class);
+
+        // Execute the command.
+        final RyaCommands commands = new RyaCommands(state, mockSparqlPrompt, mockConsolePrinter);
+
+        commands.loadData(statementsFile, format);
+    }
+
+    @Test
+    public void testSparqlQuery() throws InstanceDoesNotExistException, RyaClientException, IOException {
+        // Mock the object that performs the create operation.
+        final String instanceName = "unitTest";
+        final String queryFile = "src/test/resources/Query1.sparql";
+        final String queryContent = FileUtils.readFileToString(new File(queryFile), StandardCharsets.UTF_8);
+        final String expectedMessage = "MockAnswer";
+
+        final ExecuteSparqlQuery mockExecuteSparqlQuery = mock(ExecuteSparqlQuery.class);
+        when(mockExecuteSparqlQuery.executeSparqlQuery(instanceName, queryContent)).thenReturn(expectedMessage);
+
+        final RyaClient mockCommands = mock(RyaClient.class);
+        when(mockCommands.getExecuteSparqlQuery()).thenReturn(mockExecuteSparqlQuery);
+
+
+        final SharedShellState state = new SharedShellState();
+        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
+        state.connectedToInstance(instanceName);
+
+        final SparqlPrompt mockSparqlPrompt = mock(SparqlPrompt.class);
+
+        final ConsolePrinter mockConsolePrinter = mock(ConsolePrinter.class);
+
+        // Execute the command.
+        final RyaCommands commands = new RyaCommands(state, mockSparqlPrompt, mockConsolePrinter);
+        final String message = commands.sparqlQuery(queryFile);
+
+        // Verify the values that were provided to the command were passed through to LoadStatementsFile.
+        verify(mockExecuteSparqlQuery).executeSparqlQuery(instanceName, queryContent);
+
+        assertEquals(expectedMessage, message);
+        // Verify a message is returned that explains what was created.
+    }
+
+    @Test(expected = RuntimeException.class)
+    public void testSparqlQuery_nonexistentFile() throws InstanceDoesNotExistException, RyaClientException, IOException {
+        // Mock the object that performs the create operation.
+        final String instanceName = "unitTest";
+        final String queryFile = "src/test/resources/Nonexistent.sparql";
+
+        final RyaClient mockCommands = mock(RyaClient.class);
+
+        final SharedShellState state = new SharedShellState();
+        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
+        state.connectedToInstance(instanceName);
+
+        final SparqlPrompt mockSparqlPrompt = mock(SparqlPrompt.class);
+
+        final ConsolePrinter mockConsolePrinter = mock(ConsolePrinter.class);
+
+        // Execute the command.
+        final RyaCommands commands = new RyaCommands(state, mockSparqlPrompt, mockConsolePrinter);
+        commands.sparqlQuery(queryFile);
+    }
+
+    @Test
+    public void testSparqlQuery_fromPrompt() throws InstanceDoesNotExistException, RyaClientException, IOException {
+        // Mock the object that performs the create operation.
+        final String instanceName = "unitTest";
+        final String queryContent = "SELECT * WHERE { ?person <http://isA> ?noun }";
+        final String queryFile = null;
+        final String expectedMessage = "MockAnswer";
+
+        final ExecuteSparqlQuery mockExecuteSparqlQuery = mock(ExecuteSparqlQuery.class);
+        when(mockExecuteSparqlQuery.executeSparqlQuery(instanceName, queryContent)).thenReturn(expectedMessage);
+
+        final RyaClient mockCommands = mock(RyaClient.class);
+        when(mockCommands.getExecuteSparqlQuery()).thenReturn(mockExecuteSparqlQuery);
+
+
+        final SharedShellState state = new SharedShellState();
+        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
+        state.connectedToInstance(instanceName);
+
+        final SparqlPrompt mockSparqlPrompt = mock(SparqlPrompt.class);
+        when(mockSparqlPrompt.getSparql()).thenReturn(Optional.of(queryContent));
+
+        final ConsolePrinter mockConsolePrinter = mock(ConsolePrinter.class);
+
+        // Execute the command.
+        final RyaCommands commands = new RyaCommands(state, mockSparqlPrompt, mockConsolePrinter);
+        final String message = commands.sparqlQuery(queryFile);
+
+        // Verify the values that were provided to the command were passed through to LoadStatementsFile.
+        verify(mockExecuteSparqlQuery).executeSparqlQuery(instanceName, queryContent);
+
+        assertEquals(expectedMessage, message);
+        // Verify a message is returned that explains what was created.
+    }
+
+    @Test
+    public void testSparqlQuery_fromPrompt_cancelled() throws InstanceDoesNotExistException, RyaClientException, IOException {
+        // Mock the object that performs the create operation.
+        final String instanceName = "unitTest";
+        final String queryFile = null;
+        final String expectedMessage = "";
+
+        final RyaClient mockCommands = mock(RyaClient.class);
+
+        final SharedShellState state = new SharedShellState();
+        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
+        state.connectedToInstance(instanceName);
+
+        final SparqlPrompt mockSparqlPrompt = mock(SparqlPrompt.class);
+        when(mockSparqlPrompt.getSparql()).thenReturn(Optional.absent());
+
+        final ConsolePrinter mockConsolePrinter = mock(ConsolePrinter.class);
+
+        // Execute the command.
+        final RyaCommands commands = new RyaCommands(state, mockSparqlPrompt, mockConsolePrinter);
+        final String message = commands.sparqlQuery(queryFile);
+
+        assertEquals(expectedMessage, message);
+        // Verify a message is returned that explains what was created.
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/shell/src/test/java/org/apache/rya/shell/RyaConnectionCommandsIT.java
----------------------------------------------------------------------
diff --git a/extras/shell/src/test/java/org/apache/rya/shell/RyaConnectionCommandsIT.java b/extras/shell/src/test/java/org/apache/rya/shell/RyaConnectionCommandsIT.java
new file mode 100644
index 0000000..f424c49
--- /dev/null
+++ b/extras/shell/src/test/java/org/apache/rya/shell/RyaConnectionCommandsIT.java
@@ -0,0 +1,250 @@
+/**
+ * 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.rya.shell;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.when;
+
+import java.io.IOException;
+
+import org.apache.accumulo.minicluster.MiniAccumuloCluster;
+import org.apache.rya.api.client.Install.InstallConfiguration;
+import org.apache.rya.shell.SharedShellState.ConnectionState;
+import org.apache.rya.shell.SharedShellState.ShellState;
+import org.apache.rya.shell.util.InstallPrompt;
+import org.apache.rya.shell.util.PasswordPrompt;
+import org.junit.Test;
+import org.springframework.context.ApplicationContext;
+import org.springframework.shell.Bootstrap;
+import org.springframework.shell.core.CommandResult;
+import org.springframework.shell.core.JLineShellComponent;
+
+/**
+ * Integration tests the methods of {@link RyaConnectionCommands}.
+ */
+public class RyaConnectionCommandsIT extends RyaShellITBase {
+
+    @Test
+    public void connectAccumulo() throws IOException {
+        final MiniAccumuloCluster cluster = getCluster();
+        final Bootstrap bootstrap = getTestBootstrap();
+        final JLineShellComponent shell = getTestShell();
+
+        // Mock the user entering the correct password.
+        final ApplicationContext context = bootstrap.getApplicationContext();
+        final PasswordPrompt mockPrompt = context.getBean( PasswordPrompt.class );
+        when(mockPrompt.getPassword()).thenReturn("password".toCharArray());
+
+        // Execute the connect command.
+        final String cmd =
+                RyaConnectionCommands.CONNECT_ACCUMULO_CMD + " " +
+                        "--username root " +
+                        "--instanceName " + cluster.getInstanceName() + " "+
+                        "--zookeepers " + cluster.getZooKeepers();
+
+        final CommandResult connectResult = shell.executeCommand(cmd);
+
+        // Ensure the connection was successful.
+        assertTrue( connectResult.isSuccess() );
+    }
+
+    @Test
+    public void connectAccumulo_noAuths() throws IOException {
+        final MiniAccumuloCluster cluster = getCluster();
+        final Bootstrap bootstrap = getTestBootstrap();
+        final JLineShellComponent shell = getTestShell();
+
+        // Mock the user entering the correct password.
+        final ApplicationContext context = bootstrap.getApplicationContext();
+        final PasswordPrompt mockPrompt = context.getBean( PasswordPrompt.class );
+        when(mockPrompt.getPassword()).thenReturn("password".toCharArray());
+
+        // Execute the command
+        final String cmd =
+                RyaConnectionCommands.CONNECT_ACCUMULO_CMD + " " +
+                        "--username root " +
+                        "--instanceName " + cluster.getInstanceName() + " "+
+                        "--zookeepers " + cluster.getZooKeepers();
+
+        final CommandResult connectResult = shell.executeCommand(cmd);
+
+        // Ensure the connection was successful.
+        assertTrue( connectResult.isSuccess() );
+    }
+
+    @Test
+    public void connectAccumulo_wrongCredentials() throws IOException {
+        final MiniAccumuloCluster cluster = getCluster();
+        final Bootstrap bootstrap = getTestBootstrap();
+        final JLineShellComponent shell = getTestShell();
+
+        // Mock the user entering the wrong password.
+        final ApplicationContext context = bootstrap.getApplicationContext();
+        final PasswordPrompt mockPrompt = context.getBean( PasswordPrompt.class );
+        when(mockPrompt.getPassword()).thenReturn("asjifo[ijwa".toCharArray());
+
+        // Execute the command
+        final String cmd =
+                RyaConnectionCommands.CONNECT_ACCUMULO_CMD + " " +
+                        "--username root " +
+                        "--instanceName " + cluster.getInstanceName() + " "+
+                        "--zookeepers " + cluster.getZooKeepers();
+
+        final CommandResult connectResult = shell.executeCommand(cmd);
+
+        // Ensure the command failed.
+        assertFalse( connectResult.isSuccess() );
+    }
+
+    @Test
+    public void printConnectionDetails_notConnected() {
+        final JLineShellComponent shell = getTestShell();
+
+        // Run the print connection details command.
+        final CommandResult printResult = shell.executeCommand( RyaConnectionCommands.PRINT_CONNECTION_DETAILS_CMD );
+        final String msg = (String) printResult.getResult();
+
+        final String expected = "The shell is not connected to anything.";
+        assertEquals(expected, msg);
+    }
+
+    @Test
+    public void printConnectionDetails_connectedToAccumulo() throws IOException {
+        final MiniAccumuloCluster cluster = getCluster();
+        final Bootstrap bootstrap = getTestBootstrap();
+        final JLineShellComponent shell = getTestShell();
+
+        // Mock the user entering the correct password.
+        final ApplicationContext context = bootstrap.getApplicationContext();
+        final PasswordPrompt mockPrompt = context.getBean( PasswordPrompt.class );
+        when(mockPrompt.getPassword()).thenReturn("password".toCharArray());
+
+        // Connect to the mini accumulo instance.
+        final String cmd =
+                RyaConnectionCommands.CONNECT_ACCUMULO_CMD + " " +
+                        "--username root " +
+                        "--instanceName " + cluster.getInstanceName() + " "+
+                        "--zookeepers " + cluster.getZooKeepers();
+        shell.executeCommand(cmd);
+
+        // Run the print connection details command.
+        final CommandResult printResult = shell.executeCommand( RyaConnectionCommands.PRINT_CONNECTION_DETAILS_CMD );
+        final String msg = (String) printResult.getResult();
+
+        final String expected =
+                "The shell is connected to an instance of Accumulo using the following parameters:\n" +
+                "    Username: root\n" +
+                "    Instance Name: " + cluster.getInstanceName() + "\n" +
+                "    Zookeepers: " + cluster.getZooKeepers();
+        assertEquals(expected, msg);
+    }
+
+    @Test
+    public void connectToInstance() throws IOException {
+        final MiniAccumuloCluster cluster = getCluster();
+        final Bootstrap bootstrap = getTestBootstrap();
+        final JLineShellComponent shell = getTestShell();
+
+        // Mock the user entering the correct password.
+        final ApplicationContext context = bootstrap.getApplicationContext();
+        final PasswordPrompt mockPrompt = context.getBean( PasswordPrompt.class );
+        when(mockPrompt.getPassword()).thenReturn("password".toCharArray());
+
+        // Connect to the mini accumulo instance.
+        String cmd =
+                RyaConnectionCommands.CONNECT_ACCUMULO_CMD + " " +
+                        "--username root " +
+                        "--instanceName " + cluster.getInstanceName() + " "+
+                        "--zookeepers " + cluster.getZooKeepers();
+        CommandResult result = shell.executeCommand(cmd);
+
+        // Install an instance of rya.
+        final String instanceName = "testInstance";
+        final InstallConfiguration installConf = InstallConfiguration.builder().build();
+
+        final InstallPrompt installPrompt = context.getBean( InstallPrompt.class );
+        when(installPrompt.promptInstanceName()).thenReturn("testInstance");
+        when(installPrompt.promptInstallConfiguration("testInstance")).thenReturn( installConf );
+        when(installPrompt.promptVerified(instanceName, installConf)).thenReturn(true);
+
+        result = shell.executeCommand( RyaAdminCommands.INSTALL_CMD );
+        assertTrue( result.isSuccess() );
+
+        // Connect to the instance that was just installed.
+        cmd = RyaConnectionCommands.CONNECT_INSTANCE_CMD + " --instance " + instanceName;
+        result = shell.executeCommand(cmd);
+        assertTrue( result.isSuccess() );
+
+        // Verify the shell state indicates it is connected to an instance.
+        final SharedShellState sharedState = context.getBean( SharedShellState.class );
+        final ShellState state = sharedState.getShellState();
+        assertEquals(ConnectionState.CONNECTED_TO_INSTANCE, state.getConnectionState());
+    }
+
+    @Test
+    public void connectToInstance_instanceDoesNotExist() throws IOException {
+        final MiniAccumuloCluster cluster = getCluster();
+        final Bootstrap bootstrap = getTestBootstrap();
+        final JLineShellComponent shell = getTestShell();
+
+        // Mock the user entering the correct password.
+        final ApplicationContext context = bootstrap.getApplicationContext();
+        final PasswordPrompt mockPrompt = context.getBean( PasswordPrompt.class );
+        when(mockPrompt.getPassword()).thenReturn("password".toCharArray());
+
+        // Connect to the mini accumulo instance.
+        String cmd =
+                RyaConnectionCommands.CONNECT_ACCUMULO_CMD + " " +
+                        "--username root " +
+                        "--instanceName " + cluster.getInstanceName() + " "+
+                        "--zookeepers " + cluster.getZooKeepers();
+        shell.executeCommand(cmd);
+
+        // Try to connect to a non-existing instance.
+        cmd = RyaConnectionCommands.CONNECT_INSTANCE_CMD + " --instance doesNotExist";
+        final CommandResult result = shell.executeCommand(cmd);
+        assertFalse( result.isSuccess() );
+    }
+
+    @Test
+    public void disconnect() throws IOException {
+        final MiniAccumuloCluster cluster = getCluster();
+        final Bootstrap bootstrap = getTestBootstrap();
+        final JLineShellComponent shell = getTestShell();
+
+        // Mock the user entering the correct password.
+        final ApplicationContext context = bootstrap.getApplicationContext();
+        final PasswordPrompt mockPrompt = context.getBean( PasswordPrompt.class );
+        when(mockPrompt.getPassword()).thenReturn("password".toCharArray());
+
+        // Connect to the mini accumulo instance.
+        final String cmd =
+                RyaConnectionCommands.CONNECT_ACCUMULO_CMD + " " +
+                        "--username root " +
+                        "--instanceName " + cluster.getInstanceName() + " "+
+                        "--zookeepers " + cluster.getZooKeepers();
+        shell.executeCommand(cmd);
+
+        // Disconnect from it.
+        final CommandResult disconnectResult = shell.executeCommand( RyaConnectionCommands.DISCONNECT_COMMAND_NAME_CMD );
+        assertTrue( disconnectResult.isSuccess() );
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/shell/src/test/java/org/apache/rya/shell/RyaPromptProviderTest.java
----------------------------------------------------------------------
diff --git a/extras/shell/src/test/java/org/apache/rya/shell/RyaPromptProviderTest.java b/extras/shell/src/test/java/org/apache/rya/shell/RyaPromptProviderTest.java
new file mode 100644
index 0000000..d3eaa4e
--- /dev/null
+++ b/extras/shell/src/test/java/org/apache/rya/shell/RyaPromptProviderTest.java
@@ -0,0 +1,80 @@
+/**
+ * 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.rya.shell;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.mock;
+
+import org.junit.Test;
+
+import org.apache.rya.api.client.RyaClient;
+import org.apache.rya.api.client.accumulo.AccumuloConnectionDetails;
+
+/**
+ * Tests the methods of {@link RyaPromptProvider}.
+ */
+public class RyaPromptProviderTest {
+
+    @Test
+    public void notConnected() {
+        // Create a shared state that is disconnected.
+        final SharedShellState sharedState = new SharedShellState();
+        sharedState.disconnected();
+
+        // Create the prompt.
+        final String prompt = new RyaPromptProvider(sharedState).getPrompt();
+
+        // Verify the prompt is formatted correctly.
+        final String expected = "rya> ";
+        assertEquals(expected, prompt);
+    }
+
+    @Test
+    public void isConnected_noInstanceName() {
+        // Create a shared state that is connected to a storage, but not a rya instance.
+        final SharedShellState sharedState = new SharedShellState();
+
+        final AccumuloConnectionDetails connectionDetails = new AccumuloConnectionDetails("", new char[]{}, "testInstance", "");
+        sharedState.connectedToAccumulo(connectionDetails, mock(RyaClient.class));
+
+        // Create a prompt.
+        final String prompt = new RyaPromptProvider(sharedState).getPrompt();
+
+        // Verify the prompt is formatted correctly.
+        final String expected = "rya/testInstance> ";
+        assertEquals(expected, prompt);
+    }
+
+    @Test
+    public void isConnected_hasInstanceName() {
+        // Create a shared state that is connected to a specific instance.
+        final SharedShellState sharedState = new SharedShellState();
+
+        final AccumuloConnectionDetails connectionDetails = new AccumuloConnectionDetails("", new char[]{}, "testInstance", "");
+        sharedState.connectedToAccumulo(connectionDetails, mock(RyaClient.class));
+        sharedState.connectedToInstance("testRya");
+
+        // Create a prompt.
+        final String prompt = new RyaPromptProvider(sharedState).getPrompt();
+
+        // Verify the prompt is formatted correctly.
+        final String expected = "rya/testInstance:testRya> ";
+        assertEquals(expected, prompt);
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/shell/src/test/java/org/apache/rya/shell/RyaShellITBase.java
----------------------------------------------------------------------
diff --git a/extras/shell/src/test/java/org/apache/rya/shell/RyaShellITBase.java b/extras/shell/src/test/java/org/apache/rya/shell/RyaShellITBase.java
new file mode 100644
index 0000000..bcbaa5b
--- /dev/null
+++ b/extras/shell/src/test/java/org/apache/rya/shell/RyaShellITBase.java
@@ -0,0 +1,102 @@
+/**
+ * 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.rya.shell;
+
+import java.io.IOException;
+
+import org.apache.accumulo.core.client.AccumuloException;
+import org.apache.accumulo.core.client.AccumuloSecurityException;
+import org.apache.accumulo.minicluster.MiniAccumuloCluster;
+import org.apache.log4j.Level;
+import org.apache.log4j.Logger;
+import org.apache.rya.accumulo.MiniAccumuloSingleton;
+import org.apache.rya.accumulo.RyaTestInstanceRule;
+import org.apache.zookeeper.ClientCnxn;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Rule;
+import org.springframework.shell.Bootstrap;
+import org.springframework.shell.core.JLineShellComponent;
+
+import org.apache.rya.accumulo.MiniAccumuloClusterInstance;
+
+/**
+ * All Rya Shell integration tests should extend this one. It provides startup
+ * and shutdown hooks for a Mini Accumulo Cluster when you start and stop testing.
+ * It also creates a new shell to test with between each test.
+ */
+public class RyaShellITBase {
+
+    /**
+     * The bootstrap that was used to initialize the Shell that will be tested.
+     */
+    private Bootstrap bootstrap;
+
+    /**
+     * The shell that will be tested.
+     */
+    private JLineShellComponent shell;
+
+    @Rule
+    public RyaTestInstanceRule testInstance = new RyaTestInstanceRule(false);
+
+    @BeforeClass
+    public static void killLoudLogs() {
+        Logger.getLogger(ClientCnxn.class).setLevel(Level.ERROR);
+    }
+
+    @Before
+    public void startShell() throws IOException, InterruptedException, AccumuloException, AccumuloSecurityException {
+        // Bootstrap the shell with the test bean configuration.
+        bootstrap = new Bootstrap(new String[]{}, new String[]{"file:src/test/resources/RyaShellTest-context.xml"});
+        shell = bootstrap.getJLineShellComponent();
+    }
+
+    @After
+    public void stopShell() throws IOException, InterruptedException {
+        shell.stop();
+    }
+
+    /**
+     * @return The bootstrap that was used to initialize the Shell that will be tested.
+     */
+    public Bootstrap getTestBootstrap() {
+        return bootstrap;
+    }
+
+    /**
+     * @return The shell that will be tested.
+     */
+    public JLineShellComponent getTestShell() {
+        return shell;
+    }
+
+    /**
+     * @return The cluster that is hosting the test.
+     */
+    public MiniAccumuloCluster getCluster() {
+        return MiniAccumuloSingleton.getInstance().getCluster();
+    }
+
+    public String getInstanceName() {
+        return testInstance.getRyaInstanceName();
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/shell/src/test/java/org/apache/rya/shell/SharedShellStateTest.java
----------------------------------------------------------------------
diff --git a/extras/shell/src/test/java/org/apache/rya/shell/SharedShellStateTest.java b/extras/shell/src/test/java/org/apache/rya/shell/SharedShellStateTest.java
new file mode 100644
index 0000000..e79d186
--- /dev/null
+++ b/extras/shell/src/test/java/org/apache/rya/shell/SharedShellStateTest.java
@@ -0,0 +1,167 @@
+/**
+ * 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.rya.shell;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.mock;
+
+import org.junit.Test;
+
+import org.apache.rya.api.client.RyaClient;
+import org.apache.rya.api.client.accumulo.AccumuloConnectionDetails;
+import org.apache.rya.shell.SharedShellState.ConnectionState;
+import org.apache.rya.shell.SharedShellState.ShellState;
+
+/**
+ * Tests the methods of {@link SharedShellState}.
+ */
+public class SharedShellStateTest {
+
+    @Test
+    public void initialStateIsDisconnected() {
+        final SharedShellState state = new SharedShellState();
+
+        // Verify disconnected and no values are set.
+        final ShellState expected = ShellState.builder()
+                .setConnectionState(ConnectionState.DISCONNECTED)
+                .build();
+
+        assertEquals(expected, state.getShellState());
+    }
+
+    @Test
+    public void disconnectedToConnectedToStorage() {
+        final SharedShellState state = new SharedShellState();
+
+        // Connect to Accumulo.
+        final AccumuloConnectionDetails connectionDetails = mock(AccumuloConnectionDetails.class);
+        final RyaClient connectedCommands = mock(RyaClient.class);
+        state.connectedToAccumulo(connectionDetails, connectedCommands);
+
+        // Verify the state.
+        final ShellState expected = ShellState.builder()
+                .setConnectionState(ConnectionState.CONNECTED_TO_STORAGE)
+                .setAccumuloConnectionDetails(connectionDetails)
+                .setConnectedCommands(connectedCommands)
+                .build();
+
+        assertEquals(expected, state.getShellState());
+    }
+
+    @Test(expected = IllegalStateException.class)
+    public void connectToStorageAgain() {
+        final SharedShellState state = new SharedShellState();
+
+        // Connect to Accumulo.
+        final AccumuloConnectionDetails connectionDetails = mock(AccumuloConnectionDetails.class);
+        final RyaClient connectedCommands = mock(RyaClient.class);
+        state.connectedToAccumulo(connectionDetails, connectedCommands);
+
+        // Try to set the information again.
+        state.connectedToAccumulo(connectionDetails, connectedCommands);
+    }
+
+    @Test
+    public void connectedToInstance() {
+        final SharedShellState state = new SharedShellState();
+
+        // Connect to Accumulo.
+        final AccumuloConnectionDetails connectionDetails = mock(AccumuloConnectionDetails.class);
+        final RyaClient connectedCommands = mock(RyaClient.class);
+        state.connectedToAccumulo(connectionDetails, connectedCommands);
+
+        // Connect to an Instance.
+        state.connectedToInstance("instance");
+
+        // Verify the state.
+        final ShellState expected = ShellState.builder()
+                .setConnectionState(ConnectionState.CONNECTED_TO_INSTANCE)
+                .setAccumuloConnectionDetails(connectionDetails)
+                .setConnectedCommands(connectedCommands)
+                .setRyaInstanceName("instance")
+                .build();
+
+        assertEquals(expected, state.getShellState());
+    }
+
+    @Test
+    public void ConnectedToInstanceAgain() {
+        final SharedShellState state = new SharedShellState();
+
+        // Connect to Accumulo.
+        final AccumuloConnectionDetails connectionDetails = mock(AccumuloConnectionDetails.class);
+        final RyaClient connectedCommands = mock(RyaClient.class);
+        state.connectedToAccumulo(connectionDetails, connectedCommands);
+
+        // Connect to an Instance.
+        state.connectedToInstance("instance");
+
+        // Connect to another instance.
+        state.connectedToInstance("secondInstance");
+
+        // Verify the state.
+        final ShellState expected = ShellState.builder()
+                .setConnectionState(ConnectionState.CONNECTED_TO_INSTANCE)
+                .setAccumuloConnectionDetails(connectionDetails)
+                .setConnectedCommands(connectedCommands)
+                .setRyaInstanceName("secondInstance")
+                .build();
+        assertEquals(expected, state.getShellState());
+    }
+
+    @Test(expected = IllegalStateException.class)
+    public void connectedToInstanceWhileDisconnectedFromStorage() {
+        final SharedShellState state = new SharedShellState();
+
+        state.connectedToInstance("instance");
+    }
+
+    @Test
+    public void disconnected() {
+        final SharedShellState state = new SharedShellState();
+
+        // Connect to Accumulo and an instance.
+        final AccumuloConnectionDetails connectionDetails = mock(AccumuloConnectionDetails.class);
+        final RyaClient connectedCommands = mock(RyaClient.class);
+        state.connectedToAccumulo(connectionDetails, connectedCommands);
+        state.connectedToInstance("instance");
+
+        // Disconnect.
+        state.disconnected();
+
+        // Verify the state.
+        final ShellState expected = ShellState.builder()
+                .setConnectionState(ConnectionState.DISCONNECTED)
+                .build();
+        assertEquals(expected, state.getShellState());
+    }
+
+    @Test
+    public void disconnectedAgain() {
+        // Indicate we have diconnected while already in the disconnected state.
+        final SharedShellState state = new SharedShellState();
+        state.disconnected();
+
+        // Verify the state.
+        final ShellState expected = ShellState.builder()
+                .setConnectionState(ConnectionState.DISCONNECTED)
+                .build();
+        assertEquals(expected, state.getShellState());
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/shell/src/test/java/org/apache/rya/shell/util/ConnectorFactoryIT.java
----------------------------------------------------------------------
diff --git a/extras/shell/src/test/java/org/apache/rya/shell/util/ConnectorFactoryIT.java b/extras/shell/src/test/java/org/apache/rya/shell/util/ConnectorFactoryIT.java
new file mode 100644
index 0000000..c3a5e74
--- /dev/null
+++ b/extras/shell/src/test/java/org/apache/rya/shell/util/ConnectorFactoryIT.java
@@ -0,0 +1,57 @@
+/**
+ * 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.rya.shell.util;
+
+import java.nio.CharBuffer;
+
+import org.apache.accumulo.core.client.AccumuloException;
+import org.apache.accumulo.core.client.AccumuloSecurityException;
+import org.junit.Test;
+
+import org.apache.rya.accumulo.AccumuloITBase;
+
+/**
+ * Tests the methods of {@link ConnectorFactory}.
+ */
+public class ConnectorFactoryIT extends AccumuloITBase {
+
+    @Test
+    public void connect_successful() throws AccumuloException, AccumuloSecurityException {
+        // Setup the values that will be tested with.
+        final CharSequence password = CharBuffer.wrap( getPassword() );
+
+        final ConnectorFactory ac = new ConnectorFactory();
+        ac.connect(getUsername(),
+                password,
+                getInstanceName(),
+                getZookeepers());
+    }
+
+    @Test(expected = AccumuloSecurityException.class)
+    public void connect_wrongCredentials() throws AccumuloException, AccumuloSecurityException {
+        // Setup the values that will be tested with.
+        final CharSequence password = CharBuffer.wrap( new char[] {'w','r','o','n','g','p','a','s','s'} );
+
+        final ConnectorFactory ac = new ConnectorFactory();
+        ac.connect(getUsername(),
+                password,
+                getInstanceName(),
+                getZookeepers());
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/shell/src/test/java/org/apache/rya/shell/util/InstanceNamesFormatterTest.java
----------------------------------------------------------------------
diff --git a/extras/shell/src/test/java/org/apache/rya/shell/util/InstanceNamesFormatterTest.java b/extras/shell/src/test/java/org/apache/rya/shell/util/InstanceNamesFormatterTest.java
new file mode 100644
index 0000000..d6e23df
--- /dev/null
+++ b/extras/shell/src/test/java/org/apache/rya/shell/util/InstanceNamesFormatterTest.java
@@ -0,0 +1,81 @@
+/**
+ * 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.rya.shell.util;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.List;
+
+import org.junit.Test;
+
+import com.beust.jcommander.internal.Lists;
+
+/**
+ * Tests an instance of {@link InstanceNamesFormatter}.
+ */
+public class InstanceNamesFormatterTest {
+
+    @Test
+    public void format_withConnectedName() {
+        final List<String> instanceNames = Lists.newArrayList("a", "b", "c", "d");
+
+        final String formatted = new InstanceNamesFormatter().format(instanceNames, "c");
+
+        final String expected =
+                "Rya instance names:\n" +
+                "   a\n" +
+                "   b\n" +
+                " * c\n" +
+                "   d\n";
+
+        assertEquals(expected, formatted);
+    }
+
+    @Test
+    public void format_connectedNameNotInList() {
+        final List<String> instanceNames = Lists.newArrayList("a", "b", "c", "d");
+
+        final String formatted = new InstanceNamesFormatter().format(instanceNames, "not_in_list");
+
+        final String expected =
+                "Rya instance names:\n" +
+                "   a\n" +
+                "   b\n" +
+                "   c\n" +
+                "   d\n";
+
+        assertEquals(expected, formatted);
+    }
+
+    @Test
+    public void format() {
+        final List<String> instanceNames = Lists.newArrayList("a", "b", "c", "d");
+
+        final String formatted = new InstanceNamesFormatter().format(instanceNames);
+
+        final String expected =
+                "Rya instance names:\n" +
+                "   a\n" +
+                "   b\n" +
+                "   c\n" +
+                "   d\n";
+
+        assertEquals(expected, formatted);
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/shell/src/test/java/org/apache/rya/shell/util/RyaDetailsFormatterTest.java
----------------------------------------------------------------------
diff --git a/extras/shell/src/test/java/org/apache/rya/shell/util/RyaDetailsFormatterTest.java b/extras/shell/src/test/java/org/apache/rya/shell/util/RyaDetailsFormatterTest.java
new file mode 100644
index 0000000..9e45a4f
--- /dev/null
+++ b/extras/shell/src/test/java/org/apache/rya/shell/util/RyaDetailsFormatterTest.java
@@ -0,0 +1,111 @@
+/**
+ * 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.rya.shell.util;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.Date;
+import java.util.TimeZone;
+
+import org.apache.rya.api.instance.RyaDetails;
+import org.apache.rya.api.instance.RyaDetails.EntityCentricIndexDetails;
+import org.apache.rya.api.instance.RyaDetails.FreeTextIndexDetails;
+import org.apache.rya.api.instance.RyaDetails.JoinSelectivityDetails;
+import org.apache.rya.api.instance.RyaDetails.PCJIndexDetails;
+import org.apache.rya.api.instance.RyaDetails.PCJIndexDetails.FluoDetails;
+import org.apache.rya.api.instance.RyaDetails.PCJIndexDetails.PCJDetails;
+import org.apache.rya.api.instance.RyaDetails.PCJIndexDetails.PCJDetails.PCJUpdateStrategy;
+import org.apache.rya.api.instance.RyaDetails.ProspectorDetails;
+import org.apache.rya.api.instance.RyaDetails.TemporalIndexDetails;
+import org.junit.Test;
+
+import com.google.common.base.Optional;
+
+/**
+ * Tests the methods of {@link RyaDetailsFormatter}.
+ */
+public class RyaDetailsFormatterTest {
+
+    @Test
+    public void format() {
+        // This test failed if the default timezone was not EST, so now it's fixed at EST.
+        TimeZone.setDefault(TimeZone.getTimeZone("America/New_York"));
+        // Create the object that will be formatted.
+        final RyaDetails details = RyaDetails.builder().setRyaInstanceName("test_instance")
+            .setRyaVersion("1.2.3.4")
+            .addUser("alice")
+            .addUser("bob")
+            .addUser("charlie")
+            .setEntityCentricIndexDetails( new EntityCentricIndexDetails(true) )
+          //RYA-215            .setGeoIndexDetails( new GeoIndexDetails(true) )
+            .setTemporalIndexDetails( new TemporalIndexDetails(true) )
+            .setFreeTextDetails( new FreeTextIndexDetails(true) )
+            .setPCJIndexDetails(
+                    PCJIndexDetails.builder()
+                        .setEnabled(true)
+                        .setFluoDetails( new FluoDetails("test_instance_rya_pcj_updater") )
+                        .addPCJDetails(
+                                PCJDetails.builder()
+                                    .setId("pcj 1")
+                                    .setUpdateStrategy(PCJUpdateStrategy.BATCH)
+                                    .setLastUpdateTime( new Date(1252521351L) ))
+                        .addPCJDetails(
+                                PCJDetails.builder()
+                                    .setId("pcj 2")
+                                    .setUpdateStrategy(PCJUpdateStrategy.INCREMENTAL)))
+            .setProspectorDetails( new ProspectorDetails(Optional.of(new Date(12525211L))) )
+            .setJoinSelectivityDetails( new JoinSelectivityDetails(Optional.of(new Date(125221351L))) )
+            .build();
+
+        final String formatted = new RyaDetailsFormatter().format(details);
+
+        // Verify the created object matches the expected result.
+        final String expected =
+                "General Metadata:\n" +
+                "  Instance Name: test_instance\n" +
+                "  RYA Version: 1.2.3.4\n" +
+                "  Users: alice, bob, charlie\n" +
+                "Secondary Indicies:\n" +
+                "  Entity Centric Index:\n" +
+                "    Enabled: true\n" +
+              //RYA-215                "  Geospatial Index:\n" +
+            //RYA-215                "    Enabled: true\n" +
+                "  Free Text Index:\n" +
+                "    Enabled: true\n" +
+                "  Temporal Index:\n" +
+                "    Enabled: true\n" +
+                "  PCJ Index:\n" +
+                "    Enabled: true\n" +
+                "    Fluo App Name: test_instance_rya_pcj_updater\n" +
+                "    PCJs:\n" +
+                "      ID: pcj 1\n" +
+                "        Update Strategy: BATCH\n" +
+                "        Last Update Time: Thu Jan 15 06:55:21 EST 1970\n" +
+                "      ID: pcj 2\n" +
+                "        Update Strategy: INCREMENTAL\n" +
+                "        Last Update Time: unavailable\n" +
+                "Statistics:\n" +
+                "  Prospector:\n" +
+                "    Last Update Time: Wed Dec 31 22:28:45 EST 1969\n" +
+                "  Join Selectivity:\n" +
+                "    Last Updated Time: Fri Jan 02 05:47:01 EST 1970\n";
+
+        assertEquals(expected, formatted);
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/shell/src/test/resources/Query1.sparql
----------------------------------------------------------------------
diff --git a/extras/shell/src/test/resources/Query1.sparql b/extras/shell/src/test/resources/Query1.sparql
new file mode 100644
index 0000000..555607e
--- /dev/null
+++ b/extras/shell/src/test/resources/Query1.sparql
@@ -0,0 +1,20 @@
+#
+# 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.
+#
+
+SELECT * WHERE { ?person <http://isA> ?noun }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/shell/src/test/resources/RyaShellTest-context.xml
----------------------------------------------------------------------
diff --git a/extras/shell/src/test/resources/RyaShellTest-context.xml b/extras/shell/src/test/resources/RyaShellTest-context.xml
new file mode 100644
index 0000000..f7ffe0f
--- /dev/null
+++ b/extras/shell/src/test/resources/RyaShellTest-context.xml
@@ -0,0 +1,63 @@
+<?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.
+
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns:context="http://www.springframework.org/schema/context"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">
+
+    <!-- Tell Spring where it can find all of the Command components. -->
+    <context:component-scan base-package="org.apache.rya.shell"/>
+
+    <!-- Define the shell state bean that will be shared across all of the commands. -->
+    <bean id="sharedShellState" class="org.apache.rya.shell.SharedShellState" />
+
+    <!-- We use a mock Password Prompt here to simulate a user entering a password. -->
+    <bean id="passwordPrompt" class="org.mockito.Mockito" factory-method="mock">
+        <constructor-arg value="org.apache.rya.shell.util.PasswordPrompt" />
+    </bean>
+    
+    <!-- We use a mock Install Prompt here to simulate a user entering the installation configuration. -->
+    <bean id="installPrompt" class="org.mockito.Mockito" factory-method="mock">
+        <constructor-arg value="org.apache.rya.shell.util.InstallPrompt"/>
+    </bean>
+
+    <!-- We use a mock SPARQL Prompt here to simulate a user entering the installation configuration. -->
+    <bean id="sparqlPrompt" class="org.mockito.Mockito" factory-method="mock">
+        <constructor-arg value="org.apache.rya.shell.util.SparqlPrompt"/>
+    </bean>
+    
+    <!-- We use a mock ConsolePrintert here to simulate console output to the user. -->
+    <bean id="consolePrinter" class="org.mockito.Mockito" factory-method="mock">
+        <constructor-arg value="org.apache.rya.shell.util.ConsolePrinter"/>
+    </bean>
+    
+    <!-- We use a mock Uninstall Prompt here to simulate a user entering the installation configuration. -->
+    <bean id="uninstallPrompt" class="org.mockito.Mockito" factory-method="mock">
+        <constructor-arg value="org.apache.rya.shell.util.UninstallPrompt"/>
+    </bean>
+
+    <!-- Define each of the beans that hold onto commands used by the shell. -->
+    <bean id="ryaConnectionCommands" class="org.apache.rya.shell.RyaConnectionCommands" />
+    <bean id="ryaCommands" class="org.apache.rya.shell.RyaCommands" />
+    <bean id="ryaAdminCommands" class="org.apache.rya.shell.RyaAdminCommands" />
+</beans>
\ No newline at end of file