- Support setting one timestamp for all columns (#41)
- Distinguish float and double
Cell#float
/Cell#double
Row#float
/Row#double
Row#floats
/Row#doubles
Util.to_bytes 3.14
(double by default)Util.to_bytes :float => 3.14
Util.to_bytes :double => 3.14
Util.from_bytes :float, bytes'
- Removed automatic disable/enable to support online alter
- Fixed
HBase::Table#alter_family[!]
not to drop previous non-default settings - Performance improvement with column key interpretation cache
- Dependency resolution is now deprecated
- HBase 1.0 client compatibility
HBase::Table
instance can be set up to cache the interpretations of the
column keys using thread-locals which can lead to 3-times faster Put
generation in tight loops.
table = hbase[:my_table, cache: true]
# ...
table.close
However, the option is off by default because of the following issues:
- You should not use it with the tables with unlimited number of columns.
- Caching does not keep track of the updates of the schema. If you change the
schema of an
HBase
object after you created anHBase::Table
object with the cache turned on from it, the object may hold stale information on the types of the columns.HBase::Table#close
method will clean up the cache.
- Refactoring
- Changed
HBase::Row#to_h
call to return a Hash extended withHBase::Row::HashExtension
module which makes it possible to extend the returned Hash by monkey-patching the module HBase::Row::HashExtension
overrides#[]
method to allow looking up data with both Array and String notation of column keys:[CF, CQ]
orCF:CQ
- Changed
- Hash for describing column and table options can now contain XML entries
using additional
:config
key.
hbase[:my_table].create! :d,
# HTableDescriptor#setValue
'MAX_FILESIZE' => 1 << 33,
:config => {
# HTableDescriptor#setConfiguration
'hbase.hstore.compaction.max.size' => 1 << 30
}
- Removed automatic cleanup of thread-local HTable instances
- Fixes issue #35
- Close of individual HTable instance turned out to be unnecessary
flushCommits
not required ashbase-jruby
runs in auto-flush mode- No need to close shared connection or its thread pool
- Fixed error on JRuby 1.7.13 (#34)
0.6.0 includes a few backward-incompatible changes.
- Default number of versions for a scan or get is now changed to 1 to match Java API
- Make sure to set versions to
:all
if you're callingto_H
or plural datatype methodsscoped.versions(:all).to_H
scoped.versions(:all).strings('d:title')
- Make sure to set versions to
- Removed
HBase::Table::BatchAction#mutate
method- RowMutation is not allowed in
HBase::Table#batch
- RowMutation is not allowed in
- Added CDH5.1 dependency profile
- Fixed
Table#aggregate
for HBase 0.98 or above
- Added CDH5.0 (HBase 0.96.1.1) and CDH4.6 dependency profiles
- If you share HBase instance between threads, you may need to set
hbase.hconnection.threads.core
due to a bug in CDH5.5.0.
- If you share HBase instance between threads, you may need to set
- Use HConnection instead of deprecated HTablePool when possible
- Fixed HBase 0.96 compatibily issues and tested on HBase 0.96 and 0.98
- Added
:split_policy
table property Table#properties
andTable#families
now include previously unknown properties as String-String pairs- Added
Row#byte_array
which returns an instance ofHBase::ByteArray
- Equivalent to
HBase::ByteArray[row.raw(col)]
- Equivalent to
- Fixed
HBase::Table#raw_families/raw_properties
on HBase shell
- Fixed
HBase::Table#add_coprocessor[!]
andHBase::Table#remove_coprocessor[!]
- Fixed bug when using schema with non-String/Symbol qualifier
- Updated dependency profiles
- Added CDH4.5, CDH4.4 (same as CDH4.3)
- 0.95, 0.96 (experimental, currently not working)
- Improved compatibility with HBase shell which is based on JRuby 1.6.5
- Fixed .META. scanning with range prefix (#26)
- Added
ByteArray#as
as a synonym forByteArray#decode
- Added support for append operation:
HBase::Table#append
- Added support for atomic mutations on a single row:
HBase::Table#mutate
- Added support for batch operations:
HBase::Table#batch
- This method does not take an argument and requires a block
- Don't be confused with the shortcut method to
HBase::Scoped#batch(batch_size)
- Changed
HBase::Table#increment
to return the updated values as a Hash - Fixed HBase.resolve_dependency!(:local) on CDH distribution
- Empty-qualifier must be given as 'cf:', and not 'cf'
- Added
HBase::Row#empty?
method - Added
HBase::ByteArray#to_s
method
- Improved
Scoped#count
method- KeyOnlyFilter turned out to be compatible with SingleColumnValueFilter
- Now takes an optional Hash:
scoped.count(cache_blocks: false, caching: 100)
- Changed not to disable server-side block caching by default
- Supports
Scoped#limit
even whenScan.setMaxResultSize
is not implementedScoped#limit(nil)
will remove the previously set value
- Cleanup all thread-local (fiber-local) HTable references when connection is closed
- Added
HBase#reset_table_pool
method for recreating HTable pool
0.3.3 changes the way null values are handled, and introduces interface for CAS operations. It is strongly advised that you upgrade to 0.3.3 since it contains important fixes.
- PUT will not store null values
filter(column: nil)
will match rows without the columnfilter(column: value)
will NOT match rows without the column- However,
filter(column: { ne: value })
WILL match rows without the column
- However,
- Added
HBase::Table#check
method for check-and-put and check-and-delete operationsbool = table.check(1, in_print: false).delete(:price)
bool = table.check(1, in_print: true).put(price: 100)
- Fix: invalid count when filter is used
- Added CDH4.3 dependency profile
- Fixed a bug in
'cf:cq' => :type
shortcut schema definition - Added schema data type validation
- Fixed reference to ambiguous column names
- Easier data access with table schema
HBase::Table#schema=
method to provide the schema of the table- You can omit column family names on predefined columns
- Automatic type conversion for known columns
- 0.3.0 brings many backward-incompatible changes
Row#to_hash
andRow#to_hash_with_versions
are now deprecated. Useto_h
andto_H
instead without arguments.- Default parameters for
HBase::Row#rowkey
andHBase::Cell#rowkey
are now:raw
instead of:string
. HBase::ColumnKey
is removed. Use plain 2-element Arrays instead.- Enumerable classes (Table, Scoped, Row, ByteArray) now return Enumerator on each method when block not given
Cell#value
can now return the correct data type if defined in the schema. For Java byte array, useCell#raw
.Row#[type|types]
methods no more take Array of columns as arguments
- Added
HBase::Table#scoped
method to returnHBase::Scoped
object for the table - Added
HBase::Cell#{eql?,hash}
method for equaility check
- Fixed
HBase::Scoped#filter
method to take short integer (byte, short, int) values - Fixed
HBase::Scoped#range
method to take short integer (byte, short, int) values
- Added
HBase::Table#snapshots
method - Added
HBase::Table#snapshot!
method - Added
HBase#snapshots
method - Added
HBase::Cell#{raw,int,short,byte}
methods - Updated dependency profiles: cdh4.2.1, cdh4.1.4
- Fixed NameError when HBase::ByteArray is used without first creating an HBase instance
- Updated dependency profiles: 0.95.0, 0.94.6.1, 0.92.2, cdh3u6
- Fix: Thread.current[:htable] must be local to each connection
- Fix:
HBase.log4j=
to support XML based configuration - Automatically set versions to 1 when counting records
- New dependency profile:
cdh4.2
- Added
HBase::Table#delete_row
method - Dependency profiles as prefixes
- Supported prefixes:
cdh4.1
,cdh3
,0.94
,0.92
- e.g.
HBase.resolve_dependency! 'cdh4.1.3'
- Supported prefixes:
- Advanced data access with
Scoped#with_java_scan
andScoped#with_java_get
- Fix: NameError even when appropriate CLASSPATH is set
- Deprecated
HBase::Table#close
. You don't need to close Table instances. - Added
HBase::Table#split
andHBase::Table#split!
method - Added
:splits
option toHTable#create!
method to pre-split the table - Added table inspection methods:
properties
,families
, andregions
- Added raw inspection methods:
raw_properties
andraw_families
- Added
HBase.log4j=
method - Added
HBase::Scoped#at
,HBase::Scoped#time_range
method - Changed parameters to
HBase.resolve_dependency!
method - Ruby Time object can be used as timestamp in put and delete methods
- Using closed HBase connection is disallowed
- Ruby 1.8 compatibility mode (Oops!)
- Maven dependencies for 0.94 and 0.92
- Progress reporting for synchronous table administration
- Added asynchronous versions of table administration methods
- Added support for shorter integers
- Extended
HBase::ByteArray
for easy manipulation of Java byte arrays
- Fix: Start/stop row not correctly set when byte array rowkey range specified
- More efficient count with FirstKeyOnlyFilter
- Added
HBase::ByteArray
method as a shorthand notation forHBase::ByteArray.new
- Added
HBase::ByteArray#+
method for concatenating two byte arrays - Added
HBase::Util::java_bytes?
method - Documentation
- Supports Ruby 1.8 compatibility mode
- Fix: Correct return value from
HBase::resolve_dependency!
- Fix: Appropriately close result scanners
- Dropped Bignum support. Automatic conversion from Fixnum to Bignum (or vice versa) will produce columns whose values are of heterogeneous types, that are impossible to be read in a consistent way. You can use BigDecimal type instead for large numbers.
- Added
HBase::Scoped#while
which allows early termination of scan with WhileMatchFilter - Filtering with regular expressions
- Implemented comparator for
HBase::Result
- Added coprocessor administration methods
- Basic aggregation with Coprocessor
HBase::Scoped#count
with block- Allows PUT operation with timestamps