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

Rick Kellogg edited comment on HBASE-19207 at 11/16/17 2:58 PM:
----------------------------------------------------------------

Another option would be to publish a reduced version of the Table interface.  
Only the following methods are implemented in the RemoteHTable:

{code:java}
TableName getName();
TableDescriptor getDescriptor() throws IOException;
boolean exists(Get paramGet) throws IOException;
boolean[] exists(List<Get> paramList) throws IOException;
Result get(Get paramGet) throws IOException;
Result[] get(List<Get> paramList) throws IOException;
ResultScanner getScanner(Scan paramScan) throws IOException;
ResultScanner getScanner(byte[] paramArrayOfByte) throws IOException;
ResultScanner getScanner(byte[] paramArrayOfByte1, byte[] paramArrayOfByte2) 
throws IOException;
void put(Put paramPut) throws IOException;
void put(List<Put> paramList) throws IOException;
boolean checkAndPut(byte[] paramArrayOfByte1, byte[] paramArrayOfByte2, byte[] 
paramArrayOfByte3, byte[] paramArrayOfByte4, Put paramPut) throws IOException;
boolean checkAndPut(byte[] paramArrayOfByte1, byte[] paramArrayOfByte2, byte[] 
paramArrayOfByte3, CompareOperator paramCompareOperator, byte[] 
paramArrayOfByte4, Put paramPut) throws IOException;
void delete(Delete paramDelete) throws IOException;
void delete(List<Delete> paramList) throws IOException;
boolean checkAndDelete(byte[] paramArrayOfByte1, byte[] paramArrayOfByte2, 
byte[] paramArrayOfByte3,    byte[] paramArrayOfByte4, Delete paramDelete) 
throws IOException;
boolean checkAndDelete(byte[] paramArrayOfByte1,        byte[] 
paramArrayOfByte2, byte[] paramArrayOfByte3,     CompareOperator 
paramCompareOperator, byte[] paramArrayOfByte4, Delete paramDelete) throws 
IOException;
void close() throws IOException;
{code}

I took a quick stab at cutting down the current implementation of RemoteHTable. 
  It looks very simple to refactor this class.  By doing this we could reduce a 
number of the third party dependencies in the API.


was (Author: rkellogg):
Another option would be to publish a reduced version of the Table interface.  
Only the following methods are implemented in the RemoteHTable:

{code:java}
        TableName getName();
        TableDescriptor getDescriptor() throws IOException;
        boolean exists(Get paramGet) throws IOException;
        boolean[] exists(List<Get> paramList) throws IOException;
        Result get(Get paramGet) throws IOException;
        Result[] get(List<Get> paramList) throws IOException;
        ResultScanner getScanner(Scan paramScan) throws IOException;
        ResultScanner getScanner(byte[] paramArrayOfByte) throws IOException;
        ResultScanner getScanner(byte[] paramArrayOfByte1, byte[] 
paramArrayOfByte2) throws IOException;
        void put(Put paramPut) throws IOException;
        void put(List<Put> paramList) throws IOException;
        boolean checkAndPut(byte[] paramArrayOfByte1, byte[] paramArrayOfByte2, 
byte[] paramArrayOfByte3, byte[] paramArrayOfByte4, Put paramPut) throws 
IOException;
        boolean checkAndPut(byte[] paramArrayOfByte1, byte[] paramArrayOfByte2, 
byte[] paramArrayOfByte3, CompareOperator paramCompareOperator, byte[] 
paramArrayOfByte4, Put paramPut) throws IOException;
        void delete(Delete paramDelete) throws IOException;
        void delete(List<Delete> paramList) throws IOException;
        boolean checkAndDelete(byte[] paramArrayOfByte1, byte[] 
paramArrayOfByte2, byte[] paramArrayOfByte3,    byte[] paramArrayOfByte4, 
Delete paramDelete) throws IOException;
        boolean checkAndDelete(byte[] paramArrayOfByte1,        byte[] 
paramArrayOfByte2, byte[] paramArrayOfByte3,     CompareOperator 
paramCompareOperator, byte[] paramArrayOfByte4, Delete paramDelete) throws 
IOException;
        void close() throws IOException;
{code}

I took a quick stab at cutting down the current implementation of RemoteHTable. 
  It looks very simple to refactor this class.  By doing this we could reduce a 
number of the third party dependencies in the API.

> Create Minimal HBase REST Client
> --------------------------------
>
>                 Key: HBASE-19207
>                 URL: https://issues.apache.org/jira/browse/HBASE-19207
>             Project: HBase
>          Issue Type: New Feature
>          Components: Client, REST
>            Reporter: Rick Kellogg
>
> Create a minimal REST client with only contents of 
> org.apache.hadoop.hbase.rest.client and 
> org.apache.hadoop.hbase.rest.client.models packages in the hbase-rest 
> project.  
> Attempt to reduce the number of third party dependencies and allow user to 
> bring their own Apache HttpClient/Core.  The HttpClient is frequently updated 
> and therefore should not be shaded to allow for upgrades.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to