You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@omid.apache.org by "James Taylor (JIRA)" <ji...@apache.org> on 2018/08/26 17:14:00 UTC

[jira] [Comment Edited] (OMID-107) Replace pre 1.0 deprecated HBase APIs

    [ https://issues.apache.org/jira/browse/OMID-107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16592818#comment-16592818 ] 

James Taylor edited comment on OMID-107 at 8/26/18 5:13 PM:
------------------------------------------------------------

Thanks for the debugging, [~yonigo]. All the tests pass with v2 now. I've updated the pom to HBase 1.3.1 and confirmed that all tests pass with both HBase 1.2, HBase 1.3 and HBase 1.4 (currently supported HBase 1.x versions of Phoenix). I also tried with HBase 2.0 (used by current master of Phoenix) and there are only a few things that need to be added to the shim layer:
 * Instantiation of CellComparator. In HBase 2.0, CellComparator was changed to an interface. Perhaps we can write our own CellComparator that's simpler?
{code:java}
public static SortedMap<Cell, Optional<Cell>> mapCellsToShadowCells(List<Cell> cells) {

// Move CellComparator to HBaseSims for 2.0 support
// Need to access through CellComparatorImpl.COMPARATOR
SortedMap<Cell, Optional<Cell>> cellToShadowCellMap
= new TreeMap<Cell, Optional<Cell>>(new CellComparator());{code}

 * Code that creates tables through Admin. Instead of HTableDescriptor, TableDescriptor and TableDescriptorBuilder need to be used.

I've filed OMID-110 for creating an hbase2 profile.

FYI, [~ohads]. Please review.

 


was (Author: jamestaylor):
Thanks for the info, [~yonigo]. All the tests pass with v2. There are still a few things left to do:
 * Change pom to use HBase 1.3.0
 * Ensure it works against HBase 1.4.0. I was seeing a compilation failure when I tried it.

I also tried with HBase 2.0 and there are only a few things that need to be added to the shim layer:
 * Instantiation of CellComparator. In HBase 2.0, CellComparator was changed to an interface. Perhaps we can write our own CellComparator that's simpler?
{code:java}
public static SortedMap<Cell, Optional<Cell>> mapCellsToShadowCells(List<Cell> cells) {

// Move CellComparator to HBaseSims for 2.0 support
// Need to access through CellComparatorImpl.COMPARATOR
SortedMap<Cell, Optional<Cell>> cellToShadowCellMap
= new TreeMap<Cell, Optional<Cell>>(new CellComparator());{code}

 * Code that creates tables through Admin. Instead of HTableDescriptor, TableDescriptor and TableDescriptorBuilder need to be used.

FYI, [~ohads].

 

> Replace pre 1.0 deprecated HBase APIs
> -------------------------------------
>
>                 Key: OMID-107
>                 URL: https://issues.apache.org/jira/browse/OMID-107
>             Project: Apache Omid
>          Issue Type: Sub-task
>            Reporter: James Taylor
>            Priority: Major
>         Attachments: OMID-107.patch, OMID-107_v2.patch
>
>
> In HBase 2.0, the HTableInterface has been replaced with the Table interface. Thus, in Omid, this same replacement should take place. This will mostly be isolated to having TTable implement Table instead of HTableInterface. This will be required to check-in Omid support in Phoenix, since Phoenix 5.x is based on HBase 2.0.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)