Releases: flipkart-incubator/hbase-orm
Releases · flipkart-incubator/hbase-orm
v1.11
v1.10
- [Enhancement] Columns from inherited fields
- [Enhancement]
AbstractHBDAO
: New constructor that takes customHBObjectMapper
- [Improvement] Java 8 build compatibility (but build is still on Java 7)
- [Change] Renamed project to hbase-orm (artifact id and namespace remain same, to provide backward compatibility)
- [Change] Changed signature of
get(List<Get>)
togetOnGets
to improve clarity - [Change] Moved
DeserializationException
andSerializationException
moved to packagecom.flipkart.hbaseobjectmapper.codec.exceptions
- [Change] Renamed
getHBFields
togetHBColumnFields
- [Improvement] Removed check of "all HBRowKey fields must non-null" to increase flexibility. You need to handle
null
yourself in yourcomposeRowKey
implementation. - [Improvement] Configurable timeout for test cases that use in-memory HBase cluster
v1.9
- [Enhancement] Added
Get AbstractHBDAO::getGet(rowKey)
andAbstractHBDAO::get(Get)
methods to enable advanced/customized read access patterns on HBase. (e.g. "get all versions in the last 5 days", "get all versions between last-sunday and yesterday" etc.) - [Improvement] Documentation & test-cases improvement
v1.8
- [Enhancement] Ability to customise codec for random access of HBase rows (earlier versions allowed customisation in object mapper only). Use the additional constructor
AbstractHBDAO(Configuration, Codec)
. - [Enhancement] Ability to customise serialization/deserialization behavior of HBase row key.
- [Fix] Fixed mixed use of SERIALISE and SERIALIZE in identifiers and constants (now only SERIALIZE exists).
- [Change] Renamed method
HBObjectMapper.rowKeyToIbw
toHBObjectMapper.toIbw
(This method wasn't doing anything specific to row key. To compose row key of your bean-like class, useHBObjectMapper.getRowKey
). - [Improvement] Improved Javadoc and test cases.
v1.7
- [Enhancement] Migrated to Hadoop 2.7 and HBase 1.1 (corresponding to Hortonworks Data Platform v2.4).
- Removed obsoleted method
getColumnFamilies()
method fromHBObjectMapper
andAbstractDAO
classes (Use the alternativegetColumnFamiliesAndVersions()
method instead).
v1.6
- [Enhancement]
AbstractHBDAO
class now implementsCloseable
interface. You can now use your DAO classes in try-with-resources statement (and not worry about closing the underlying connection). - [Enhancement]
@HBTable
annotation now takes column families and max number of versions. As an implication:- Introduced
AbstractHBDAO::getColumnFamiliesAndVersions
method. DeprecatedAbstractHBDAO::getColumnFamilies
method. - Column family names used in
@HBColumn
annotation now must be pre-declared in@HBTable
- Introduced
- [Fix] In earlier versions, some methods of DAO class used to take rowkey input as a
String
, even when rowkey was declared as some other type (e.g.Long
or custom class) in your bean-like entity class. This has now been fixed. - [Improvement] Encapsulated serialization and deserialization exceptions thrown by methods of
Codec
(be it the default codec or your own) into aCodecException
- [Improvement] The default codec class (
BestSuitCodec
) has been supporting a flag"serializeAsString"
(since v1.5). ThisString
flag has now been made into a constantBestSuitCodec.SERIALISE_AS_STRING
(to avoid spelling errors) - [Improvement] Upgraded underlying libraries
- Jackson from 2.4 to 2.8
- Lombok from 1.14 to 1.16, junit from 4.11 to 4.12 (These affect test cases only)
- etc.
- [Improvement] Improved test cases (Coverage = 85%). Improved Javadoc.
v1.5.1
- Fixed issue that prevented serialization of a
HBRecord
class containing member variables that are collection of custom classes (e.g.List<SomeClass>
,Map<String, SomeOtherClass>
). Added detailed test cases to prevent regression of this issue in upcoming versions. - Fixed issue that suppressed stack trace upon serialization failure
- Fixed Javadoc warnings in
HBColumn
andHBColumnMultiVersion
annotations
v1.5
- [Enhancement] Ability to pass custom 'flags' for your codec which allow you class-field level control of serialization/deserialization behavior. (e.g. You may write your codec to serialize field
Integer id
inCitizen
class differently from fieldInteger id
inEmployee
class)- Introduced parameter
codecFlags
in@HBColumn
and@HBColumnMultiVersion
annotations.
- Introduced parameter
- [Change] In earlier versions, irrespective of the codec, following data types were serialized using HBase's native methods:
Boolean
,Short
,Integer
,Long
,Float
,Double
,String
andBigDecimal
. From this version on, you may customize serialization of any data type, including these. This allows you much higher level of control. - [Change] Removed parameter
serializeAsString
from@HBColumn
and@HBColumnMultiVersion
annotations.- The same behavior can however be achieved by passing
serializeAsString=true
as acodecFlag
for the class field. The default codec (BestSuitCodec
class) handles this flag. If you are using your own codec, you'll have to handle it explicitly. - By this change in design, we now have complete separation of concerns - all the serialization/deserialization logic is in implementation of
Codec
interface.
- The same behavior can however be achieved by passing
- Further improved test cases
- Further improved Javadoc.
v1.4.1
- [Fix] Methods
valueToByteArray
androwKeyToIbw
now accept input row key asSerializable & Comparable
, instead of justSerializable
(in line with signatures of rest of the methods). Internally,writeValueAsResult
andwriteValueAsPut
methods now handle objects representing row key asSerializable & Comparable
, instead of justSerializable
. - [Doc Fix] Fixed examples and code snippets in README file to reflect methods introduced in v1.4
v1.4
- [Enhancement] Row-key can now be mapped to any data type that is
Comparable
with itself andSerializable
. In earlier versions of this library, row key could only be mapped as aString
.HBRecord
interface is now a generic.AbstractHBDAO
class now takes two parameters (row key type and entity type), instead of one. - [Improvement]
JacksonJsonCodec
can now take your own instance ofObjectMapper
- [Improvement] Extended documentation (Javadoc) for a large number of methods. Improved detail in exception messages.
- [Improvement] Refactored test-cases and included more use-cases and scenarios. Test case utilities in this library can be used (copied out) as a clean wrapper around MRUnit library. They provide good snippets for writing high-quality test cases for source codes accessing HBase (Coverage: 89% method, 86% line)
- [Change] Migrated from Java 6 to Java 7 (in line with the minimum requirements of underlying Hadoop distribution).
- [Change] Method to delete HBase rows by objects is changed from
delete(HBRecord[])
todelete(List<? extends HBRecord<R>> objects)
to avoid conflict with other generic method with same type erasure (conflict arose only in this version since row key is now a generic) - [Change] Integrated methods in
Util
methods to convertString
toImmutableBytesWritable
and vice-versa intoHBObjectMapper
class (to keep serialization logic in sync with your codec) - [Change] Removed container
writeValueAsRowKeyResultPair
methods. Alternatively, use existing methodsgetRowKey
andwriteValueAsResult
. - [Fix] Avoided double-validation of input bean-like classes. (no change in behaviour)