[
https://issues.apache.org/jira/browse/HBASE-9359?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jonathan Hsieh updated HBASE-9359:
----------------------------------
Release Note:
The signature for several methods on Put, Result, ColumnInterpreter, and
BaseRegionObserver have been modified to use the Cell interface instead of
KeyValues. Applications need to convert KeyValue and List<KeyValue> to Cell
and List<Cell>. The changes are summarized here:
Put:
- public List<KeyValue> get(byte[] family, byte[] qualifier)
+ public List<Cell> get(byte[] family, byte[] qualifier)
Result:
- public KeyValue[] raw() {
+ public Cell[] raw() {
- public List<KeyValue> list() {
+ public List<Cell> list() {
- public List<KeyValue> getColumn(byte [] family, byte [] qualifier) {
+ public List<Cell> getColumn(byte [] family, byte [] qualifier) {
- public KeyValue getColumnLatest(byte [] family, byte [] qualifier) {
+ public Cell getColumnLatest(byte [] family, byte [] qualifier) {
- public KeyValue getColumnLatest(byte [] family, int foffset, int flength,
+ public Cell getColumnLatest(byte [] family, int foffset, int flength,
byte [] qualifier, int qoffset, int qlength) {
For extension interfaces BaseRegionObserver and ColumnInterpreter, we have kept
both the old and new signature, including a shim that has the abstract
implementation helper have the new call the old implementation. For the shim to
handle the List<KeyValue> -> List<Cell> conversion, we use an expensive naive
array copy. It is strongly recommended that the new coprocessors are updated
to override the new undeprecated API.
ColumnInterpreter: (abstract class)
- public abstract T getValue(byte[] colFamily, byte[] colQualifier, KeyValue
kv)
+ public abstract T getValue(byte[] colFamily, byte[] colQualifier, Cell kv)
BaseRegionObserver: (abstract class)
RegionObserver: (inteface)
void preGet(final ObserverContext<RegionCoprocessorEnvironment> c, final Get
get,
- final List<KeyValue> result)
+ final List<Cell> result)
throws IOException;
void postGet(final ObserverContext<RegionCoprocessorEnvironment> c, final
Get get,
- final List<KeyValue> result)
+ final List<Cell> result)
throws IOException;
was:
The signature for several methods on Put, Result, ColumnInterpreter, and
BaseRegionObserver have been modified to use the Cell interface instead of
KeyValues. The changes are summarized here:
Put:
- public List<KeyValue> get(byte[] family, byte[] qualifier)
+ public List<Cell> get(byte[] family, byte[] qualifier)
Result:
- public KeyValue[] raw() {
+ public Cell[] raw() {
- public List<KeyValue> list() {
+ public List<Cell> list() {
- public List<KeyValue> getColumn(byte [] family, byte [] qualifier) {
+ public List<Cell> getColumn(byte [] family, byte [] qualifier) {
- public KeyValue getColumnLatest(byte [] family, byte [] qualifier) {
+ public Cell getColumnLatest(byte [] family, byte [] qualifier) {
- public KeyValue getColumnLatest(byte [] family, int foffset, int flength,
+ public Cell getColumnLatest(byte [] family, int foffset, int flength,
byte [] qualifier, int qoffset, int qlength) {
For extension interfaces BaseRegionObserver and ColumnInterpreter, we have kept
both the old and new signature, including a shim that has the abstract
implementation helper have the new call the old implementation. For the shim to
handle the List<KeyValue> -> List<Cell> conversion, we use an expensive naive
array copy. It is strongly recommended that the new coprocessors are updated
to override the new undeprecated API.
ColumnInterpreter: (abstract class)
- public abstract T getValue(byte[] colFamily, byte[] colQualifier, KeyValue
kv)
+ public abstract T getValue(byte[] colFamily, byte[] colQualifier, Cell kv)
BaseRegionObserver: (abstract class)
RegionObserver: (inteface)
void preGet(final ObserverContext<RegionCoprocessorEnvironment> c, final Get
get,
- final List<KeyValue> result)
+ final List<Cell> result)
throws IOException;
void postGet(final ObserverContext<RegionCoprocessorEnvironment> c, final
Get get,
- final List<KeyValue> result)
+ final List<Cell> result)
throws IOException;
> Convert KeyValue to Cell in hbase-client module - Result/Put/Delete,
> ColumnInterpreter
> --------------------------------------------------------------------------------------
>
> Key: HBASE-9359
> URL: https://issues.apache.org/jira/browse/HBASE-9359
> Project: HBase
> Issue Type: Sub-task
> Components: Client
> Affects Versions: 0.95.2
> Reporter: Jonathan Hsieh
> Assignee: Jonathan Hsieh
> Fix For: 0.98.0, 0.96.0
>
> Attachments: hbase-9334-9359.v4.patch, hbase-9359-9334.v5.patch,
> hbase-9359-9334.v6.patch, hbase-9359.patch, hbase-9359.v2.patch,
> hbase-9359.v3.patch, hbase-9359.v5.patch, hbase-9359.v6.patch
>
>
> This path is the second half of eliminating KeyValue from the client
> interfaces. This percolated through quite a bit.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira