You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Vaibhav Puranik (JIRA)" <ji...@apache.org> on 2009/08/11 16:20:15 UTC

[jira] Created: (HBASE-1758) Extract interface out of HTable

Extract interface out of HTable
-------------------------------

                 Key: HBASE-1758
                 URL: https://issues.apache.org/jira/browse/HBASE-1758
             Project: Hadoop HBase
          Issue Type: Improvement
          Components: client
            Reporter: Vaibhav Puranik
             Fix For: 0.21.0



As per discussions in Hackathon, we have extracted interface out of HTable and named it as HTableInterface. This will make unit testing client code easier and simplify client API. 

It opens other possibilities such as creating a HTable that does not do any RPC calls, MockHTable etc.

HTablePool still returns HTable instances. But we have added a setter method for HTableInterfaceFactory on it. Thus developers can write their own HTableInterfaceFactory impl to return their own HTableInterface implementation. 

I have assigned this issue to 0.21 but you may consider it to move it to 0.20 if possible.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-1758) Extract interface out of HTable

Posted by "Vaibhav Puranik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-1758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12743524#action_12743524 ] 

Vaibhav Puranik commented on HBASE-1758:
----------------------------------------

Great. I will delete the class.

> Extract interface out of HTable
> -------------------------------
>
>                 Key: HBASE-1758
>                 URL: https://issues.apache.org/jira/browse/HBASE-1758
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: client
>            Reporter: Vaibhav Puranik
>             Fix For: 0.21.0
>
>         Attachments: HTableInterface.patch
>
>
> As per discussions in Hackathon, we have extracted interface out of HTable and named it as HTableInterface. This will make unit testing client code easier and simplify client API. 
> It opens other possibilities such as creating a HTable that does not do any RPC calls, MockHTable etc.
> HTablePool still returns HTable instances. But we have added a setter method for HTableInterfaceFactory on it. Thus developers can write their own HTableInterfaceFactory impl to return their own HTableInterface implementation. 
> I have assigned this issue to 0.21 but you may consider it to move it to 0.20 if possible.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-1758) Extract interface out of HTable

Posted by "Vaibhav Puranik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-1758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12790198#action_12790198 ] 

Vaibhav Puranik commented on HBASE-1758:
----------------------------------------

@Lars - Good catch. I had to send time to discover it. I had this in mind too. Thanks. If you are changing it, can you also change the doc in HTable? I don't know whether it's setup to inherit the doc.

> Extract interface out of HTable
> -------------------------------
>
>                 Key: HBASE-1758
>                 URL: https://issues.apache.org/jira/browse/HBASE-1758
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: client
>            Reporter: Vaibhav Puranik
>             Fix For: 0.21.0
>
>         Attachments: HTableinterface-deletes.patch, HTableinterface.patch, HTableInterface.patch, HTableInterface.patch
>
>
> As per discussions in Hackathon, we have extracted interface out of HTable and named it as HTableInterface. This will make unit testing client code easier and simplify client API. 
> It opens other possibilities such as creating a HTable that does not do any RPC calls, MockHTable etc.
> HTablePool still returns HTable instances. But we have added a setter method for HTableInterfaceFactory on it. Thus developers can write their own HTableInterfaceFactory impl to return their own HTableInterface implementation. 
> I have assigned this issue to 0.21 but you may consider it to move it to 0.20 if possible.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-1758) Extract interface out of HTable

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-1758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12742516#action_12742516 ] 

stack commented on HBASE-1758:
------------------------------

.bq Hope that's ok.

Yes.

> Extract interface out of HTable
> -------------------------------
>
>                 Key: HBASE-1758
>                 URL: https://issues.apache.org/jira/browse/HBASE-1758
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: client
>            Reporter: Vaibhav Puranik
>             Fix For: 0.21.0
>
>         Attachments: HTableInterface.patch
>
>
> As per discussions in Hackathon, we have extracted interface out of HTable and named it as HTableInterface. This will make unit testing client code easier and simplify client API. 
> It opens other possibilities such as creating a HTable that does not do any RPC calls, MockHTable etc.
> HTablePool still returns HTable instances. But we have added a setter method for HTableInterfaceFactory on it. Thus developers can write their own HTableInterfaceFactory impl to return their own HTableInterface implementation. 
> I have assigned this issue to 0.21 but you may consider it to move it to 0.20 if possible.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-1758) Extract interface out of HTable

Posted by "Vaibhav Puranik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-1758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12742899#action_12742899 ] 

Vaibhav Puranik commented on HBASE-1758:
----------------------------------------


We have removed region awareness (methods such as getTableRegions etc) from the HTableInterface to simplify it. (As most of the clients won't really need it).

There is one class in Stargate - RegionResource.  This class has a method - getTableRegions. We think that the method is just exposing HTable.getTableRegions through the REST interface.

Now that we have removed getTableRegions from the HTableInterface, I think that this class RegionResource should be deleted.

Andy, can you please comment? Is RegionResource  really needed?

> Extract interface out of HTable
> -------------------------------
>
>                 Key: HBASE-1758
>                 URL: https://issues.apache.org/jira/browse/HBASE-1758
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: client
>            Reporter: Vaibhav Puranik
>             Fix For: 0.21.0
>
>         Attachments: HTableInterface.patch
>
>
> As per discussions in Hackathon, we have extracted interface out of HTable and named it as HTableInterface. This will make unit testing client code easier and simplify client API. 
> It opens other possibilities such as creating a HTable that does not do any RPC calls, MockHTable etc.
> HTablePool still returns HTable instances. But we have added a setter method for HTableInterfaceFactory on it. Thus developers can write their own HTableInterfaceFactory impl to return their own HTableInterface implementation. 
> I have assigned this issue to 0.21 but you may consider it to move it to 0.20 if possible.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HBASE-1758) Extract interface out of HTable

Posted by "Vaibhav Puranik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-1758?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vaibhav Puranik updated HBASE-1758:
-----------------------------------

    Attachment: HTableInterface.patch

> Extract interface out of HTable
> -------------------------------
>
>                 Key: HBASE-1758
>                 URL: https://issues.apache.org/jira/browse/HBASE-1758
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: client
>            Reporter: Vaibhav Puranik
>             Fix For: 0.21.0
>
>         Attachments: HTableInterface.patch
>
>
> As per discussions in Hackathon, we have extracted interface out of HTable and named it as HTableInterface. This will make unit testing client code easier and simplify client API. 
> It opens other possibilities such as creating a HTable that does not do any RPC calls, MockHTable etc.
> HTablePool still returns HTable instances. But we have added a setter method for HTableInterfaceFactory on it. Thus developers can write their own HTableInterfaceFactory impl to return their own HTableInterface implementation. 
> I have assigned this issue to 0.21 but you may consider it to move it to 0.20 if possible.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HBASE-1758) Extract interface out of HTable

Posted by "stack (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-1758?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

stack updated HBASE-1758:
-------------------------

    Status: Patch Available  (was: Reopened)

> Extract interface out of HTable
> -------------------------------
>
>                 Key: HBASE-1758
>                 URL: https://issues.apache.org/jira/browse/HBASE-1758
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: client
>            Reporter: Vaibhav Puranik
>             Fix For: 0.21.0
>
>         Attachments: HTableinterface-deletes.patch, HTableInterface.patch, HTableInterface.patch
>
>
> As per discussions in Hackathon, we have extracted interface out of HTable and named it as HTableInterface. This will make unit testing client code easier and simplify client API. 
> It opens other possibilities such as creating a HTable that does not do any RPC calls, MockHTable etc.
> HTablePool still returns HTable instances. But we have added a setter method for HTableInterfaceFactory on it. Thus developers can write their own HTableInterfaceFactory impl to return their own HTableInterface implementation. 
> I have assigned this issue to 0.21 but you may consider it to move it to 0.20 if possible.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (HBASE-1758) Extract interface out of HTable

Posted by "stack (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-1758?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

stack reopened HBASE-1758:
--------------------------


Reopening to getd Lars findings in

> Extract interface out of HTable
> -------------------------------
>
>                 Key: HBASE-1758
>                 URL: https://issues.apache.org/jira/browse/HBASE-1758
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: client
>            Reporter: Vaibhav Puranik
>             Fix For: 0.21.0
>
>         Attachments: HTableinterface-deletes.patch, HTableInterface.patch, HTableInterface.patch
>
>
> As per discussions in Hackathon, we have extracted interface out of HTable and named it as HTableInterface. This will make unit testing client code easier and simplify client API. 
> It opens other possibilities such as creating a HTable that does not do any RPC calls, MockHTable etc.
> HTablePool still returns HTable instances. But we have added a setter method for HTableInterfaceFactory on it. Thus developers can write their own HTableInterfaceFactory impl to return their own HTableInterface implementation. 
> I have assigned this issue to 0.21 but you may consider it to move it to 0.20 if possible.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HBASE-1758) Extract interface out of HTable

Posted by "Lars Francke (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-1758?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lars Francke updated HBASE-1758:
--------------------------------

    Attachment: HTableinterface-deletes.patch

Stumbled across these two things: 

* delete(List<Delete>) is missing from the interface (but present in HTable)
* I think get(Get) should mention what happens when the row could not be found so I edited the JavaDoc for this one

I hope this is the right place for this. Didn't know if I should open a new ticket for it.

> Extract interface out of HTable
> -------------------------------
>
>                 Key: HBASE-1758
>                 URL: https://issues.apache.org/jira/browse/HBASE-1758
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: client
>            Reporter: Vaibhav Puranik
>             Fix For: 0.21.0
>
>         Attachments: HTableinterface-deletes.patch, HTableInterface.patch, HTableInterface.patch
>
>
> As per discussions in Hackathon, we have extracted interface out of HTable and named it as HTableInterface. This will make unit testing client code easier and simplify client API. 
> It opens other possibilities such as creating a HTable that does not do any RPC calls, MockHTable etc.
> HTablePool still returns HTable instances. But we have added a setter method for HTableInterfaceFactory on it. Thus developers can write their own HTableInterfaceFactory impl to return their own HTableInterface implementation. 
> I have assigned this issue to 0.21 but you may consider it to move it to 0.20 if possible.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HBASE-1758) Extract interface out of HTable

Posted by "Lars Francke (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-1758?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lars Francke updated HBASE-1758:
--------------------------------

    Attachment: HTableinterface.patch

Thanks stack. Next time I'll open a new ticket!

Two more things I found (attached a new patch, the old one is obsolete):

* Added documentation about what happens when incrementColumnValue is called and the specified column doesn't exist. I've looked through the source code and I believe this to be correct but I'd appreciate it if anyone could check. And please feel free to reword the text as I'm not a native speaker
* Added the incrementColumnValue method that allows disabling the WAL for this call

There are a lot of methods in HTable that are not exposed in HTableInterface (getStartKeys, isTableEnabled, getRegionsInfo etc.) but I suppose that is by design so I chose not to include them.

> Extract interface out of HTable
> -------------------------------
>
>                 Key: HBASE-1758
>                 URL: https://issues.apache.org/jira/browse/HBASE-1758
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: client
>            Reporter: Vaibhav Puranik
>             Fix For: 0.21.0
>
>         Attachments: HTableinterface-deletes.patch, HTableinterface.patch, HTableInterface.patch, HTableInterface.patch
>
>
> As per discussions in Hackathon, we have extracted interface out of HTable and named it as HTableInterface. This will make unit testing client code easier and simplify client API. 
> It opens other possibilities such as creating a HTable that does not do any RPC calls, MockHTable etc.
> HTablePool still returns HTable instances. But we have added a setter method for HTableInterfaceFactory on it. Thus developers can write their own HTableInterfaceFactory impl to return their own HTableInterface implementation. 
> I have assigned this issue to 0.21 but you may consider it to move it to 0.20 if possible.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HBASE-1758) Extract interface out of HTable

Posted by "Vaibhav Puranik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-1758?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vaibhav Puranik updated HBASE-1758:
-----------------------------------

    Attachment: HTableInterface.patch

This new patch includes:
1) Stack suggested changes
2) Stargate code changes for HTableInterface

> Extract interface out of HTable
> -------------------------------
>
>                 Key: HBASE-1758
>                 URL: https://issues.apache.org/jira/browse/HBASE-1758
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: client
>            Reporter: Vaibhav Puranik
>             Fix For: 0.21.0
>
>         Attachments: HTableInterface.patch, HTableInterface.patch
>
>
> As per discussions in Hackathon, we have extracted interface out of HTable and named it as HTableInterface. This will make unit testing client code easier and simplify client API. 
> It opens other possibilities such as creating a HTable that does not do any RPC calls, MockHTable etc.
> HTablePool still returns HTable instances. But we have added a setter method for HTableInterfaceFactory on it. Thus developers can write their own HTableInterfaceFactory impl to return their own HTableInterface implementation. 
> I have assigned this issue to 0.21 but you may consider it to move it to 0.20 if possible.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-1758) Extract interface out of HTable

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-1758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12788398#action_12788398 ] 

stack commented on HBASE-1758:
------------------------------

Although on second thoughts, lets just not apply to branch.  Its needed in trunk only I believe.

> Extract interface out of HTable
> -------------------------------
>
>                 Key: HBASE-1758
>                 URL: https://issues.apache.org/jira/browse/HBASE-1758
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: client
>            Reporter: Vaibhav Puranik
>             Fix For: 0.21.0
>
>         Attachments: HTableinterface-deletes.patch, HTableinterface.patch, HTableInterface.patch, HTableInterface.patch
>
>
> As per discussions in Hackathon, we have extracted interface out of HTable and named it as HTableInterface. This will make unit testing client code easier and simplify client API. 
> It opens other possibilities such as creating a HTable that does not do any RPC calls, MockHTable etc.
> HTablePool still returns HTable instances. But we have added a setter method for HTableInterfaceFactory on it. Thus developers can write their own HTableInterfaceFactory impl to return their own HTableInterface implementation. 
> I have assigned this issue to 0.21 but you may consider it to move it to 0.20 if possible.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HBASE-1758) Extract interface out of HTable

Posted by "Andrew Purtell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-1758?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Purtell updated HBASE-1758:
----------------------------------

      Resolution: Fixed
    Hadoop Flags: [Reviewed]
          Status: Resolved  (was: Patch Available)

Committed to trunk. Passes all local tests except Stargate's TestTableResource but I fixed that up on commit.

> Extract interface out of HTable
> -------------------------------
>
>                 Key: HBASE-1758
>                 URL: https://issues.apache.org/jira/browse/HBASE-1758
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: client
>            Reporter: Vaibhav Puranik
>             Fix For: 0.21.0
>
>         Attachments: HTableInterface.patch, HTableInterface.patch
>
>
> As per discussions in Hackathon, we have extracted interface out of HTable and named it as HTableInterface. This will make unit testing client code easier and simplify client API. 
> It opens other possibilities such as creating a HTable that does not do any RPC calls, MockHTable etc.
> HTablePool still returns HTable instances. But we have added a setter method for HTableInterfaceFactory on it. Thus developers can write their own HTableInterfaceFactory impl to return their own HTableInterface implementation. 
> I have assigned this issue to 0.21 but you may consider it to move it to 0.20 if possible.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HBASE-1758) Extract interface out of HTable

Posted by "Vaibhav Puranik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-1758?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vaibhav Puranik updated HBASE-1758:
-----------------------------------

    Status: Patch Available  (was: Open)

Attaching patch for HTableInterface

> Extract interface out of HTable
> -------------------------------
>
>                 Key: HBASE-1758
>                 URL: https://issues.apache.org/jira/browse/HBASE-1758
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: client
>            Reporter: Vaibhav Puranik
>             Fix For: 0.21.0
>
>         Attachments: HTableInterface.patch
>
>
> As per discussions in Hackathon, we have extracted interface out of HTable and named it as HTableInterface. This will make unit testing client code easier and simplify client API. 
> It opens other possibilities such as creating a HTable that does not do any RPC calls, MockHTable etc.
> HTablePool still returns HTable instances. But we have added a setter method for HTableInterfaceFactory on it. Thus developers can write their own HTableInterfaceFactory impl to return their own HTableInterface implementation. 
> I have assigned this issue to 0.21 but you may consider it to move it to 0.20 if possible.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-1758) Extract interface out of HTable

Posted by "Andrew Purtell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-1758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12743513#action_12743513 ] 

Andrew Purtell commented on HBASE-1758:
---------------------------------------

RegionResource is not really needed IMO. Stargate has this because the other REST interface for HBase had a similar feature.

> Extract interface out of HTable
> -------------------------------
>
>                 Key: HBASE-1758
>                 URL: https://issues.apache.org/jira/browse/HBASE-1758
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: client
>            Reporter: Vaibhav Puranik
>             Fix For: 0.21.0
>
>         Attachments: HTableInterface.patch
>
>
> As per discussions in Hackathon, we have extracted interface out of HTable and named it as HTableInterface. This will make unit testing client code easier and simplify client API. 
> It opens other possibilities such as creating a HTable that does not do any RPC calls, MockHTable etc.
> HTablePool still returns HTable instances. But we have added a setter method for HTableInterfaceFactory on it. Thus developers can write their own HTableInterfaceFactory impl to return their own HTableInterface implementation. 
> I have assigned this issue to 0.21 but you may consider it to move it to 0.20 if possible.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-1758) Extract interface out of HTable

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-1758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12785181#action_12785181 ] 

stack commented on HBASE-1758:
------------------------------

In future, its best if you make a new issue once something has been closed.  Let me reopen.

> Extract interface out of HTable
> -------------------------------
>
>                 Key: HBASE-1758
>                 URL: https://issues.apache.org/jira/browse/HBASE-1758
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: client
>            Reporter: Vaibhav Puranik
>             Fix For: 0.21.0
>
>         Attachments: HTableinterface-deletes.patch, HTableInterface.patch, HTableInterface.patch
>
>
> As per discussions in Hackathon, we have extracted interface out of HTable and named it as HTableInterface. This will make unit testing client code easier and simplify client API. 
> It opens other possibilities such as creating a HTable that does not do any RPC calls, MockHTable etc.
> HTablePool still returns HTable instances. But we have added a setter method for HTableInterfaceFactory on it. Thus developers can write their own HTableInterfaceFactory impl to return their own HTableInterface implementation. 
> I have assigned this issue to 0.21 but you may consider it to move it to 0.20 if possible.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-1758) Extract interface out of HTable

Posted by "Vaibhav Puranik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-1758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12788395#action_12788395 ] 

Vaibhav Puranik commented on HBASE-1758:
----------------------------------------

Lars, changes look good. You are right. We purposely omitted 'region awareness methods' (getStartKeys, isTableEnabled, getRegionsInfo etc).

@Stack,
I am little confused because of reopening of the same issue? We have to file a new issue if I understand the process rightly. we cannot make change to the released product, right?
In that case which branch were you talking about applying this patch to?

> Extract interface out of HTable
> -------------------------------
>
>                 Key: HBASE-1758
>                 URL: https://issues.apache.org/jira/browse/HBASE-1758
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: client
>            Reporter: Vaibhav Puranik
>             Fix For: 0.21.0
>
>         Attachments: HTableinterface-deletes.patch, HTableinterface.patch, HTableInterface.patch, HTableInterface.patch
>
>
> As per discussions in Hackathon, we have extracted interface out of HTable and named it as HTableInterface. This will make unit testing client code easier and simplify client API. 
> It opens other possibilities such as creating a HTable that does not do any RPC calls, MockHTable etc.
> HTablePool still returns HTable instances. But we have added a setter method for HTableInterfaceFactory on it. Thus developers can write their own HTableInterfaceFactory impl to return their own HTableInterface implementation. 
> I have assigned this issue to 0.21 but you may consider it to move it to 0.20 if possible.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-1758) Extract interface out of HTable

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-1758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12742194#action_12742194 ] 

stack commented on HBASE-1758:
------------------------------

I like the @since 0.21.0

newHTableInterface should be createHTableInterface?  (Just a suggestion -- whats usual factory semantics?  If you change it here, would need to change in HTablePool too where you do newHTable)

New classes need the apache license on top.  Steal from another class and just make sure year is 2009.

In the interface, should the methods be public?  Maybe it doesn't matter in an interface?

I'd remove the setTableFactory in HTablePool method.  Add a constructor that optionally takes a factory I'd say that allows inserting other than HTableFactory.... but not as a method.

HTableFactory should just be an inner-class of HTablePool?

All of above are just suggestions.  Do as you will with them.  Only change required is addition of the apache license.

Patch looks great.

> Extract interface out of HTable
> -------------------------------
>
>                 Key: HBASE-1758
>                 URL: https://issues.apache.org/jira/browse/HBASE-1758
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: client
>            Reporter: Vaibhav Puranik
>             Fix For: 0.21.0
>
>         Attachments: HTableInterface.patch
>
>
> As per discussions in Hackathon, we have extracted interface out of HTable and named it as HTableInterface. This will make unit testing client code easier and simplify client API. 
> It opens other possibilities such as creating a HTable that does not do any RPC calls, MockHTable etc.
> HTablePool still returns HTable instances. But we have added a setter method for HTableInterfaceFactory on it. Thus developers can write their own HTableInterfaceFactory impl to return their own HTableInterface implementation. 
> I have assigned this issue to 0.21 but you may consider it to move it to 0.20 if possible.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-1758) Extract interface out of HTable

Posted by "Vaibhav Puranik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-1758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12742504#action_12742504 ] 

Vaibhav Puranik commented on HBASE-1758:
----------------------------------------

Stack, agreed with most of the comments.

In a java interface all the methods are public by default, that is why I haven't mentioned the word public explicitly. 

In my opinion it is better to have the HTableFactory as a outer class. If somebody writes a new HTablePool impl that returns HTable, this outer class will be beneficial.

I will submit the patch with all of the changes except the inner class one and explicitly mentioning public in the interface.. Hope that's ok.

> Extract interface out of HTable
> -------------------------------
>
>                 Key: HBASE-1758
>                 URL: https://issues.apache.org/jira/browse/HBASE-1758
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: client
>            Reporter: Vaibhav Puranik
>             Fix For: 0.21.0
>
>         Attachments: HTableInterface.patch
>
>
> As per discussions in Hackathon, we have extracted interface out of HTable and named it as HTableInterface. This will make unit testing client code easier and simplify client API. 
> It opens other possibilities such as creating a HTable that does not do any RPC calls, MockHTable etc.
> HTablePool still returns HTable instances. But we have added a setter method for HTableInterfaceFactory on it. Thus developers can write their own HTableInterfaceFactory impl to return their own HTableInterface implementation. 
> I have assigned this issue to 0.21 but you may consider it to move it to 0.20 if possible.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-1758) Extract interface out of HTable

Posted by "Andrew Purtell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-1758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12742182#action_12742182 ] 

Andrew Purtell commented on HBASE-1758:
---------------------------------------

+1, patch looks good.

> Extract interface out of HTable
> -------------------------------
>
>                 Key: HBASE-1758
>                 URL: https://issues.apache.org/jira/browse/HBASE-1758
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: client
>            Reporter: Vaibhav Puranik
>             Fix For: 0.21.0
>
>         Attachments: HTableInterface.patch
>
>
> As per discussions in Hackathon, we have extracted interface out of HTable and named it as HTableInterface. This will make unit testing client code easier and simplify client API. 
> It opens other possibilities such as creating a HTable that does not do any RPC calls, MockHTable etc.
> HTablePool still returns HTable instances. But we have added a setter method for HTableInterfaceFactory on it. Thus developers can write their own HTableInterfaceFactory impl to return their own HTableInterface implementation. 
> I have assigned this issue to 0.21 but you may consider it to move it to 0.20 if possible.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-1758) Extract interface out of HTable

Posted by "Andrew Purtell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-1758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12744328#action_12744328 ] 

Andrew Purtell commented on HBASE-1758:
---------------------------------------

+1. The patch has a lot of whitespace changes but the actual code changes are fine. I'll commit this if all local HBase and Stargate tests pass. 

> Extract interface out of HTable
> -------------------------------
>
>                 Key: HBASE-1758
>                 URL: https://issues.apache.org/jira/browse/HBASE-1758
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: client
>            Reporter: Vaibhav Puranik
>             Fix For: 0.21.0
>
>         Attachments: HTableInterface.patch, HTableInterface.patch
>
>
> As per discussions in Hackathon, we have extracted interface out of HTable and named it as HTableInterface. This will make unit testing client code easier and simplify client API. 
> It opens other possibilities such as creating a HTable that does not do any RPC calls, MockHTable etc.
> HTablePool still returns HTable instances. But we have added a setter method for HTableInterfaceFactory on it. Thus developers can write their own HTableInterfaceFactory impl to return their own HTableInterface implementation. 
> I have assigned this issue to 0.21 but you may consider it to move it to 0.20 if possible.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-1758) Extract interface out of HTable

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-1758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12788397#action_12788397 ] 

stack commented on HBASE-1758:
------------------------------

@Vaibhav: I'll open new issue for applying on branch (I was letting process slip here to be easy on the new fella Lars -- he can do it 'proper' way next time).

> Extract interface out of HTable
> -------------------------------
>
>                 Key: HBASE-1758
>                 URL: https://issues.apache.org/jira/browse/HBASE-1758
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: client
>            Reporter: Vaibhav Puranik
>             Fix For: 0.21.0
>
>         Attachments: HTableinterface-deletes.patch, HTableinterface.patch, HTableInterface.patch, HTableInterface.patch
>
>
> As per discussions in Hackathon, we have extracted interface out of HTable and named it as HTableInterface. This will make unit testing client code easier and simplify client API. 
> It opens other possibilities such as creating a HTable that does not do any RPC calls, MockHTable etc.
> HTablePool still returns HTable instances. But we have added a setter method for HTableInterfaceFactory on it. Thus developers can write their own HTableInterfaceFactory impl to return their own HTableInterface implementation. 
> I have assigned this issue to 0.21 but you may consider it to move it to 0.20 if possible.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-1758) Extract interface out of HTable

Posted by "Lars Francke (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-1758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12790140#action_12790140 ] 

Lars Francke commented on HBASE-1758:
-------------------------------------

@stack: Thanks for applying this and sorry for not following the correct process. I'll do better next time (this includes the correct base location of my patches).

After a bit more reading of the code I think it might be a good idea to change the javadoc of incrementColumnValue once more to also include a note that a new row is inserted even if the row didn't exist before (the current version only mentions missing qualifiers). But I'll open a ticket for this and other doc fixes later.

> Extract interface out of HTable
> -------------------------------
>
>                 Key: HBASE-1758
>                 URL: https://issues.apache.org/jira/browse/HBASE-1758
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: client
>            Reporter: Vaibhav Puranik
>             Fix For: 0.21.0
>
>         Attachments: HTableinterface-deletes.patch, HTableinterface.patch, HTableInterface.patch, HTableInterface.patch
>
>
> As per discussions in Hackathon, we have extracted interface out of HTable and named it as HTableInterface. This will make unit testing client code easier and simplify client API. 
> It opens other possibilities such as creating a HTable that does not do any RPC calls, MockHTable etc.
> HTablePool still returns HTable instances. But we have added a setter method for HTableInterfaceFactory on it. Thus developers can write their own HTableInterfaceFactory impl to return their own HTableInterface implementation. 
> I have assigned this issue to 0.21 but you may consider it to move it to 0.20 if possible.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-1758) Extract interface out of HTable

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-1758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12786501#action_12786501 ] 

stack commented on HBASE-1758:
------------------------------

Applied to TRUNK.  @Vaibhav Should we apply this patch to the branch?

Thanks for the nice patch Lars.  FYI, make patches at $HBASE_HOME rather than in the classes's directory; i.e. this patch was made at $HBASE_HOME/src/java/org/apache/hadoop/client.... but not worrries... next time.  Thanks for fix.

> Extract interface out of HTable
> -------------------------------
>
>                 Key: HBASE-1758
>                 URL: https://issues.apache.org/jira/browse/HBASE-1758
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: client
>            Reporter: Vaibhav Puranik
>             Fix For: 0.21.0
>
>         Attachments: HTableinterface-deletes.patch, HTableinterface.patch, HTableInterface.patch, HTableInterface.patch
>
>
> As per discussions in Hackathon, we have extracted interface out of HTable and named it as HTableInterface. This will make unit testing client code easier and simplify client API. 
> It opens other possibilities such as creating a HTable that does not do any RPC calls, MockHTable etc.
> HTablePool still returns HTable instances. But we have added a setter method for HTableInterfaceFactory on it. Thus developers can write their own HTableInterfaceFactory impl to return their own HTableInterface implementation. 
> I have assigned this issue to 0.21 but you may consider it to move it to 0.20 if possible.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-1758) Extract interface out of HTable

Posted by "Vaibhav Puranik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-1758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12744703#action_12744703 ] 

Vaibhav Puranik commented on HBASE-1758:
----------------------------------------

Thanks Andy!

> Extract interface out of HTable
> -------------------------------
>
>                 Key: HBASE-1758
>                 URL: https://issues.apache.org/jira/browse/HBASE-1758
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: client
>            Reporter: Vaibhav Puranik
>             Fix For: 0.21.0
>
>         Attachments: HTableInterface.patch, HTableInterface.patch
>
>
> As per discussions in Hackathon, we have extracted interface out of HTable and named it as HTableInterface. This will make unit testing client code easier and simplify client API. 
> It opens other possibilities such as creating a HTable that does not do any RPC calls, MockHTable etc.
> HTablePool still returns HTable instances. But we have added a setter method for HTableInterfaceFactory on it. Thus developers can write their own HTableInterfaceFactory impl to return their own HTableInterface implementation. 
> I have assigned this issue to 0.21 but you may consider it to move it to 0.20 if possible.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-1758) Extract interface out of HTable

Posted by "Ken Weiner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-1758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12743023#action_12743023 ] 

Ken Weiner commented on HBASE-1758:
-----------------------------------

Vaibhav, rather than just to "simplify" things, I think the value in removing the concept of regions from the HTableInterface is more about defining the concept of a Table contract without imposing the notion that the table is split into regions.  Obviously everything within HBase needs to understand how table storage is implemented with regions, but client applications really don't need that knowledge.  They should be able to put, get, delete, etc. without thinking about the implementation.  A regionless-HTableInterface also allows for implementations that ignore the concept of regions such as for testing.

> Extract interface out of HTable
> -------------------------------
>
>                 Key: HBASE-1758
>                 URL: https://issues.apache.org/jira/browse/HBASE-1758
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: client
>            Reporter: Vaibhav Puranik
>             Fix For: 0.21.0
>
>         Attachments: HTableInterface.patch
>
>
> As per discussions in Hackathon, we have extracted interface out of HTable and named it as HTableInterface. This will make unit testing client code easier and simplify client API. 
> It opens other possibilities such as creating a HTable that does not do any RPC calls, MockHTable etc.
> HTablePool still returns HTable instances. But we have added a setter method for HTableInterfaceFactory on it. Thus developers can write their own HTableInterfaceFactory impl to return their own HTableInterface implementation. 
> I have assigned this issue to 0.21 but you may consider it to move it to 0.20 if possible.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.