kijiproject/kiji-schema — pull request #23 by kimballa (2012-12-18 20:48:09+00:00)
Title: SCHEMA-63. Implement service registry backend for tools.

Incorporates SCHEMA-64 (Migrate KijiSchema tools to service registry backend).

* Tools are no longer statically configured in the bin/kiji script. They
are discovered using the kiji-delegation "Lookup" service.
* All tools must implement KijiTool and list themselves as providers in
META-INF/services/org.kiji.schema.tools.KijiTool.

Implementation changes:
* Added dependency on kiji-delegation from KijiSchema.
* Added public API KijiToolLauncher to provide a universal main method for
launching tools.
* KijiTool is now a simple public interface for all tools.
* The previous "KijiTool" abstract class is renamed "OpenedKijiTool."
This and BaseTool remain as Framework-level APIs that extend KijiTool.
* KijiTools do not get run through ToolRunner. All tool main() methods are
still provided for convenience, but they use KijiToolLauncher now.
* IntegrationHelper now uses KijiToolLauncher, not Hadoop's ToolRunner.
* Added a unit test for KijiToolLauncher.
* Added a 'help' tool (HelpTool) that dynamically locates tools and prints
their names and descriptions.
* Cleaned up o.k.s.util.Resources to be thread safe and to provide an API
to locate text-based resources.
* Verbose help text from src/main/scripts/kiji has been put in
src/main/resources/.../HelpTool.envHelp.txt, for use by HelpTool.

This has been tested with:
* Running mvn clean verify
* Running bin/kiji help (test the new help tool)
* Running bin/kiji help ls (help for subtool test)
* Running bin/kiji layout (tool test)
* Running bin/kiji layout --table=phonebook (argument test)
* Running bin/kiji missingtool (missing tool test)
* Doing all of the above from the top-level bin/kiji in the project as well as in the target dir.