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

[jira] Created: (HBASE-1762) Remove concept of ZooKeeper from HConnection interface

Remove concept of ZooKeeper from HConnection interface
------------------------------------------------------

                 Key: HBASE-1762
                 URL: https://issues.apache.org/jira/browse/HBASE-1762
             Project: Hadoop HBase
          Issue Type: Improvement
          Components: client
    Affects Versions: 0.20.0
            Reporter: Ken Weiner


The concept of ZooKeeper is really an implementation detail and should not be exposed in the {{HConnection}} interface.   Therefore, I suggest removing the {{HConnection.getZooKeeperWrapper()}} method from the interface. 

I couldn't find any uses of this method within the HBase code base except for in one of the unit tests: {{org.apache.hadoop.hbase.TestZooKeeper}}.  This unit test should be changed to instantiate the implementation of {{HConnection}} directly, allowing it to use the {{getZooKeeperWrapper()}} method.  This requires making {{org.apache.hadoop.hbase.client.HConnectionManager.TableServers}} public.  (I actually think TableServers should be moved out into an outer class, but in the spirit of small patches, I'll refrain from suggesting that in this issue).

I'll attach a patch for:

# The removal of {{HConnection.getZooKeeperWrapper()}}
# Change of {{TableServers}} class from private to public
# Direct instantiation of {{TableServers}} within {{TestZooKeeper}}.

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


[jira] Commented: (HBASE-1762) Remove concept of ZooKeeper from HConnection interface

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

stack commented on HBASE-1762:
------------------------------

Any progress on this one?

> Remove concept of ZooKeeper from HConnection interface
> ------------------------------------------------------
>
>                 Key: HBASE-1762
>                 URL: https://issues.apache.org/jira/browse/HBASE-1762
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: client
>    Affects Versions: 0.20.0
>            Reporter: Ken Weiner
>             Fix For: 0.21.0
>
>         Attachments: HBASE-1762.patch
>
>
> The concept of ZooKeeper is really an implementation detail and should not be exposed in the {{HConnection}} interface.   Therefore, I suggest removing the {{HConnection.getZooKeeperWrapper()}} method from the interface. 
> I couldn't find any uses of this method within the HBase code base except for in one of the unit tests: {{org.apache.hadoop.hbase.TestZooKeeper}}.  This unit test should be changed to instantiate the implementation of {{HConnection}} directly, allowing it to use the {{getZooKeeperWrapper()}} method.  This requires making {{org.apache.hadoop.hbase.client.HConnectionManager.TableServers}} public.  (I actually think TableServers should be moved out into an outer class, but in the spirit of small patches, I'll refrain from suggesting that in this issue).
> I'll attach a patch for:
> # The removal of {{HConnection.getZooKeeperWrapper()}}
> # Change of {{TableServers}} class from private to public
> # Direct instantiation of {{TableServers}} within {{TestZooKeeper}}.

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


[jira] Updated: (HBASE-1762) Remove concept of ZooKeeper from HConnection interface

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

Ken Weiner updated HBASE-1762:
------------------------------

    Attachment: HBASE-1762.patch

> Remove concept of ZooKeeper from HConnection interface
> ------------------------------------------------------
>
>                 Key: HBASE-1762
>                 URL: https://issues.apache.org/jira/browse/HBASE-1762
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: client
>    Affects Versions: 0.20.0
>            Reporter: Ken Weiner
>         Attachments: HBASE-1762.patch
>
>
> The concept of ZooKeeper is really an implementation detail and should not be exposed in the {{HConnection}} interface.   Therefore, I suggest removing the {{HConnection.getZooKeeperWrapper()}} method from the interface. 
> I couldn't find any uses of this method within the HBase code base except for in one of the unit tests: {{org.apache.hadoop.hbase.TestZooKeeper}}.  This unit test should be changed to instantiate the implementation of {{HConnection}} directly, allowing it to use the {{getZooKeeperWrapper()}} method.  This requires making {{org.apache.hadoop.hbase.client.HConnectionManager.TableServers}} public.  (I actually think TableServers should be moved out into an outer class, but in the spirit of small patches, I'll refrain from suggesting that in this issue).
> I'll attach a patch for:
> # The removal of {{HConnection.getZooKeeperWrapper()}}
> # Change of {{TableServers}} class from private to public
> # Direct instantiation of {{TableServers}} within {{TestZooKeeper}}.

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


[jira] Commented: (HBASE-1762) Remove concept of ZooKeeper from HConnection interface

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

Ken Weiner commented on HBASE-1762:
-----------------------------------

No progress from me.  Stack, I recall that you were going to try to help me deal with inner classes within HBase.rb in order to use the connection impl directly.  There was also some discussion about whether or not it even makes sense to expose ZK in the shell.

> Remove concept of ZooKeeper from HConnection interface
> ------------------------------------------------------
>
>                 Key: HBASE-1762
>                 URL: https://issues.apache.org/jira/browse/HBASE-1762
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: client
>    Affects Versions: 0.20.0
>            Reporter: Ken Weiner
>             Fix For: 0.21.0
>
>         Attachments: HBASE-1762.patch
>
>
> The concept of ZooKeeper is really an implementation detail and should not be exposed in the {{HConnection}} interface.   Therefore, I suggest removing the {{HConnection.getZooKeeperWrapper()}} method from the interface. 
> I couldn't find any uses of this method within the HBase code base except for in one of the unit tests: {{org.apache.hadoop.hbase.TestZooKeeper}}.  This unit test should be changed to instantiate the implementation of {{HConnection}} directly, allowing it to use the {{getZooKeeperWrapper()}} method.  This requires making {{org.apache.hadoop.hbase.client.HConnectionManager.TableServers}} public.  (I actually think TableServers should be moved out into an outer class, but in the spirit of small patches, I'll refrain from suggesting that in this issue).
> I'll attach a patch for:
> # The removal of {{HConnection.getZooKeeperWrapper()}}
> # Change of {{TableServers}} class from private to public
> # Direct instantiation of {{TableServers}} within {{TestZooKeeper}}.

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


[jira] Commented: (HBASE-1762) Remove concept of ZooKeeper from HConnection interface

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

stack commented on HBASE-1762:
------------------------------

Thanks for the reminder.  Let me assign this tomyself.  

> Remove concept of ZooKeeper from HConnection interface
> ------------------------------------------------------
>
>                 Key: HBASE-1762
>                 URL: https://issues.apache.org/jira/browse/HBASE-1762
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: client
>    Affects Versions: 0.20.0
>            Reporter: Ken Weiner
>             Fix For: 0.21.0
>
>         Attachments: HBASE-1762.patch
>
>
> The concept of ZooKeeper is really an implementation detail and should not be exposed in the {{HConnection}} interface.   Therefore, I suggest removing the {{HConnection.getZooKeeperWrapper()}} method from the interface. 
> I couldn't find any uses of this method within the HBase code base except for in one of the unit tests: {{org.apache.hadoop.hbase.TestZooKeeper}}.  This unit test should be changed to instantiate the implementation of {{HConnection}} directly, allowing it to use the {{getZooKeeperWrapper()}} method.  This requires making {{org.apache.hadoop.hbase.client.HConnectionManager.TableServers}} public.  (I actually think TableServers should be moved out into an outer class, but in the spirit of small patches, I'll refrain from suggesting that in this issue).
> I'll attach a patch for:
> # The removal of {{HConnection.getZooKeeperWrapper()}}
> # Change of {{TableServers}} class from private to public
> # Direct instantiation of {{TableServers}} within {{TestZooKeeper}}.

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


[jira] Updated: (HBASE-1762) Remove concept of ZooKeeper from HConnection interface

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

Andrew Purtell updated HBASE-1762:
----------------------------------

    Status: Open  (was: Patch Available)

Cancelling patch. Notes in issue indicate it's not ready.

> Remove concept of ZooKeeper from HConnection interface
> ------------------------------------------------------
>
>                 Key: HBASE-1762
>                 URL: https://issues.apache.org/jira/browse/HBASE-1762
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: client
>    Affects Versions: 0.20.0
>            Reporter: Ken Weiner
>            Assignee: stack
>             Fix For: 0.21.0
>
>         Attachments: HBASE-1762.patch
>
>
> The concept of ZooKeeper is really an implementation detail and should not be exposed in the {{HConnection}} interface.   Therefore, I suggest removing the {{HConnection.getZooKeeperWrapper()}} method from the interface. 
> I couldn't find any uses of this method within the HBase code base except for in one of the unit tests: {{org.apache.hadoop.hbase.TestZooKeeper}}.  This unit test should be changed to instantiate the implementation of {{HConnection}} directly, allowing it to use the {{getZooKeeperWrapper()}} method.  This requires making {{org.apache.hadoop.hbase.client.HConnectionManager.TableServers}} public.  (I actually think TableServers should be moved out into an outer class, but in the spirit of small patches, I'll refrain from suggesting that in this issue).
> I'll attach a patch for:
> # The removal of {{HConnection.getZooKeeperWrapper()}}
> # Change of {{TableServers}} class from private to public
> # Direct instantiation of {{TableServers}} within {{TestZooKeeper}}.

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


[jira] Assigned: (HBASE-1762) Remove concept of ZooKeeper from HConnection interface

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

stack reassigned HBASE-1762:
----------------------------

    Assignee: stack

> Remove concept of ZooKeeper from HConnection interface
> ------------------------------------------------------
>
>                 Key: HBASE-1762
>                 URL: https://issues.apache.org/jira/browse/HBASE-1762
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: client
>    Affects Versions: 0.20.0
>            Reporter: Ken Weiner
>            Assignee: stack
>             Fix For: 0.21.0
>
>         Attachments: HBASE-1762.patch
>
>
> The concept of ZooKeeper is really an implementation detail and should not be exposed in the {{HConnection}} interface.   Therefore, I suggest removing the {{HConnection.getZooKeeperWrapper()}} method from the interface. 
> I couldn't find any uses of this method within the HBase code base except for in one of the unit tests: {{org.apache.hadoop.hbase.TestZooKeeper}}.  This unit test should be changed to instantiate the implementation of {{HConnection}} directly, allowing it to use the {{getZooKeeperWrapper()}} method.  This requires making {{org.apache.hadoop.hbase.client.HConnectionManager.TableServers}} public.  (I actually think TableServers should be moved out into an outer class, but in the spirit of small patches, I'll refrain from suggesting that in this issue).
> I'll attach a patch for:
> # The removal of {{HConnection.getZooKeeperWrapper()}}
> # Change of {{TableServers}} class from private to public
> # Direct instantiation of {{TableServers}} within {{TestZooKeeper}}.

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


[jira] Updated: (HBASE-1762) Remove concept of ZooKeeper from HConnection interface

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

Ken Weiner updated HBASE-1762:
------------------------------

    Status: Patch Available  (was: Open)

If there is support for this patch, it would be nice to get it in before the 0.20.0 release since it is pretty harmless and represents a change to a client interface.

> Remove concept of ZooKeeper from HConnection interface
> ------------------------------------------------------
>
>                 Key: HBASE-1762
>                 URL: https://issues.apache.org/jira/browse/HBASE-1762
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: client
>    Affects Versions: 0.20.0
>            Reporter: Ken Weiner
>         Attachments: HBASE-1762.patch
>
>
> The concept of ZooKeeper is really an implementation detail and should not be exposed in the {{HConnection}} interface.   Therefore, I suggest removing the {{HConnection.getZooKeeperWrapper()}} method from the interface. 
> I couldn't find any uses of this method within the HBase code base except for in one of the unit tests: {{org.apache.hadoop.hbase.TestZooKeeper}}.  This unit test should be changed to instantiate the implementation of {{HConnection}} directly, allowing it to use the {{getZooKeeperWrapper()}} method.  This requires making {{org.apache.hadoop.hbase.client.HConnectionManager.TableServers}} public.  (I actually think TableServers should be moved out into an outer class, but in the spirit of small patches, I'll refrain from suggesting that in this issue).
> I'll attach a patch for:
> # The removal of {{HConnection.getZooKeeperWrapper()}}
> # Change of {{TableServers}} class from private to public
> # Direct instantiation of {{TableServers}} within {{TestZooKeeper}}.

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


[jira] Commented: (HBASE-1762) Remove concept of ZooKeeper from HConnection interface

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

Nitay Joffe commented on HBASE-1762:
------------------------------------

-1 on this particular patch. Ken, I think this is a great idea, and agree with your approach.

However, this code is used in other places, namely the shell. Take a look at HBase.rb:

{noformat}
 48   class Admin
 49     def initialize(configuration, formatter)
 50       @admin = HBaseAdmin.new(configuration)
 51       connection = @admin.getConnection()
 52       @zkWrapper = connection.getZooKeeperWrapper()
 53       zk = @zkWrapper.getZooKeeper()
 54       @zkMain = ZooKeeperMain.new(zk)
 55       @formatter = formatter
 56     end
{noformat}

If you can clean that part up too, I'd gladly accept your patch. Otherwise I think your current patch would break our shell.

Keep up the great work.

> Remove concept of ZooKeeper from HConnection interface
> ------------------------------------------------------
>
>                 Key: HBASE-1762
>                 URL: https://issues.apache.org/jira/browse/HBASE-1762
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: client
>    Affects Versions: 0.20.0
>            Reporter: Ken Weiner
>         Attachments: HBASE-1762.patch
>
>
> The concept of ZooKeeper is really an implementation detail and should not be exposed in the {{HConnection}} interface.   Therefore, I suggest removing the {{HConnection.getZooKeeperWrapper()}} method from the interface. 
> I couldn't find any uses of this method within the HBase code base except for in one of the unit tests: {{org.apache.hadoop.hbase.TestZooKeeper}}.  This unit test should be changed to instantiate the implementation of {{HConnection}} directly, allowing it to use the {{getZooKeeperWrapper()}} method.  This requires making {{org.apache.hadoop.hbase.client.HConnectionManager.TableServers}} public.  (I actually think TableServers should be moved out into an outer class, but in the spirit of small patches, I'll refrain from suggesting that in this issue).
> I'll attach a patch for:
> # The removal of {{HConnection.getZooKeeperWrapper()}}
> # Change of {{TableServers}} class from private to public
> # Direct instantiation of {{TableServers}} within {{TestZooKeeper}}.

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