Use HTableInterface instead of the concrete HTable.

To allow injecting other implementations of HTable (eg. for testing).
SCHEMA-28. Removed KijiDataWrapper and its subclasses.

Signed-off-by: Christophe Taton <taton@wibidata.com>
SCHEMA-31. Refactor locks for testability purposes.

Adds a local in-process lock implementation.

Signed-off-by: Lee Sheng <lsheng@wibidata.com>
SCHEMA-23. 'kiji version' fails with a stacktrace if the instance is missing.

Print a more user-friendly error message if the Kiji instance is missing.

Signed-off-by: Kiyan Ahmadizadeh <kiyan@wibidata.com>
SCHEMA-34. Handle general exceptions more gracefully in Kiji tools.

By default, print just the error message from the terminating exception.
If the user specifies the '--debug' flag, rethrow the exception.

Signed-off-by: Kiyan Ahmadizadeh <kiyan@wibidata.com>
SCHEMA-36. kiji-schema jar is incorrectly added to the classpath.

Adds the kiji-schema-(version).jar file to the head of the classpath.

Signed-off-by: Kiyan Ahmadizadeh <kiyan@wibidata.com>
Revert "SCHEMA-28. Removed KijiDataWrapper and its subclasses."

This reverts commit 556528c091f37295e97b1a1c8836df5a02917bc4.
SCHEMA-43. bin-script cannot be directly symlinked.

Resolve symlinks in "$0" argument recursively to establish
the canonical absolute path to the 'bin/kiji' script.

Signed-off-by: Chad Metcalf <chad@wibidata.com>
SCHEMA-5. Move integration test framework into Kiji

This commit ports an integration test framework from Wibi to Kiji.
Kiji-related integration tests are also ported from Wibi to Kiji.

Two changes are made to the ported integration test framework along
the way.  First, the instance creation and deletion threads are modified
to ensure all created instances are cleaned up when tests are finished.
Second, the ability to run tests on any cluster, not just the hbase-maven-plugin
cluster, is also added.

Signed-off-by: Kiyan Ahmadizadeh <kiyan@wibidata.com>
SCHEMA-5. Include instructions for running against a cluster in pom.
SCHEMA-5. Add integration tests.

This adds a selection of relevant integration tests for KijiSchema.

Signed-off-by: Milo <milo@wibidata.com>
SCHEMA-49. IntegrationTestStripValueRowFilter needs to close row scanner.

This commit modified IntegrationTestStripValueRowFilter to close a KijiRowScanner
it opens by virtue of calling KijiTableReader#getScanner.  This prevents the
regionserver of the hbase test cluster from later closing the scanner when the
associated table has already been deleted.  This prevents a nasty looking exception
from making it to the console while integration tests are running.

This change has been tested by running mvn clean install 10 times.  The exception
log message is now absent.
SCHEMA-48. Allows integration tests to embed a mini HBase and M/R cluster in-process.

This allows running a single test in a debugger without external setup.

Signed-off-by: Lee Sheng <lsheng@wibidata.com>
SCHEMA-51. Use Kiji artifacts instead of odiago/wibi artifacts.

Signed-off-by: Lee Sheng <lsheng@wibidata.com>
SCHEMA-40. Add audience annotations to classes.

Adds audience annotations to all classes.
  see github.com/kijiproject/annotations
Marks as many classes as 'final' as possible.
Moved ZooKeeperLock and ZooKeeperLockFactory into HBaseSchemaTable.
Removed ColumnNameTranslator subclass used in a single test that
  would be hard to maintain with final APIs.
Move TestHBaseSchemaTable into the proper package.

Signed-off-by: Milo <milo@wibidata.com>
SCHEMA-55. Move kiji-schema into a submodule.

Prepare for SCHEMA-52 (multiple Hadoop distro support) by
setting up KijiSchema as a multi-module build.

* Adds a kiji-schema-root top-level pom file.
* Moves all existing kiji-schema code to the kiji-schema/ module.
* Updates /bin/kiji to refer to new location for the KijiSchema
  package.
* Updates kiji-schema/pom.xml to refer to multi-module parent.
* Updates kiji-schema assembly release.xml to use top-level NOTICE,
  LICENSE, and README files.
* Adds clones of src/main/checkstyle so 'mvn verify' works at the
  top level.
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.

Signed-off-by: Christophe Taton <taton@wibidata.com>
SCHEMA-28. Removed KijiDataWrapper and its subclasses.

Also:
  - Refactored KijiCellEncoders & KijiCellDecoders.
  - Refactored KijiTableWriter & KijiRowData APIs.
  - Promote use of KijiURIs.
  - Introduce Fake HBase.

Signed-off-by: Aaron Kimball <aaron@wibidata.com>
SCHEMA-7. Add metadata tool to CLI. Implements backup and restore functionality.

Signed-off-by: Lee Sheng <lsheng@wibidata.com>
SCHEMA-71. Close leaking scanners in tests.

IntegrationTestKijiTableOutputFormat opens scanner resources that are not
closed.

Related to this, our log4j.properties file on the test classpath was not
using the DEBUG level for classes that print c'tor stacktraces in leaking
finalizers.

Turning on the DEBUG level for all of org.kiji.schema is too noisy on stderr,
because of the KijiCreation/DeletionThreads. But we can selectively create
separate loggers used by the finalizer cleanup check code; these loggers
are now enabled in debug mode during tests.