kijiproject/kiji-mapreduce — pull request #22 by kimballa (2013-01-30 00:18:21+00:00)
Title: KIJIMR-18. Refactor KeyValueStore APIs.

Reworks the entire KeyValueStore API to be more useable.

* Remove concept of KeyValueArrayStores and entangled implementations.
* Reorganized packages: all key-value-store-related code moved to
o.k.mapreduce.kvstore.
** APIs in the "kvstore" package
** Client-facing implementations in kvstore.lib.
** Implementation details in kvstore.impl.
* Convert KeyValueStore and KeyValueStoreReader to interfaces.
* Move static methods from KeyValueStore into purpose-built
classes like KeyValueStoreConfigSerializer, KeyValueStoreConfigValidator.
* Made XmlKeyValueStoreParser work in a standalone lifecycle, removing
its static class nature.
* Remove NamespaceConfiguration; KeyValueStoreConfiguration directly includes
this logic.
* Converted all Options classes to Builders.
* Added a Builder and a .builder() method to all KeyValueStores,
so you can construct them all alike.
* Factored out FileKeyValueStore into FileStoreHelper.
File-backed stores use this through composition.
* Removed unnecessary getters/setters.
* Added further bounds checking to builders.
* Added a "finalized" state to all non-trivial stores. After you
open() a store, you can no longer modify it with initFromConf().
* Added singleton instance getters to Empty/UnconfiguredKeyValueStore.
* Updated tests to match new API.
* Make classes final and add annotations.
* Improved constructors and factory methods for API stability.
* KeyValueStoreReaderFactory API contracts made more clear through
better naming; updated uses of KeyValueStoreReaderFactory.
* InternalKijiContext now closes all KeyValueStoreReaders opened through it
in its close() method.
* Improved clarity of Javadoc messages throughout.