org.apache.hadoop.hbase
Class ZKNamespaceManager

java.lang.Object
  extended by org.apache.hadoop.hbase.zookeeper.ZooKeeperListener
      extended by org.apache.hadoop.hbase.ZKNamespaceManager

@InterfaceAudience.Private
public class ZKNamespaceManager
extends ZooKeeperListener

Class servers two purposes: 1. Broadcast NamespaceDescriptor information via ZK (Done by the Master) 2. Consume broadcasted NamespaceDescriptor changes (Done by the RegionServers)


Field Summary
 
Fields inherited from class org.apache.hadoop.hbase.zookeeper.ZooKeeperListener
watcher
 
Constructor Summary
ZKNamespaceManager(ZooKeeperWatcher zkw)
           
 
Method Summary
 NamespaceDescriptor get(String name)
           
 NavigableSet<NamespaceDescriptor> list()
           
 void nodeChildrenChanged(String path)
          Called when an existing node has a child node added or removed.
 void nodeCreated(String path)
          Called when a new node has been created.
 void nodeDataChanged(String path)
          Called when an existing node has changed data.
 void nodeDeleted(String path)
          Called when a node has been deleted
 void remove(String name)
           
 void start()
           
 void update(NamespaceDescriptor ns)
           
 
Methods inherited from class org.apache.hadoop.hbase.zookeeper.ZooKeeperListener
getWatcher
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZKNamespaceManager

public ZKNamespaceManager(ZooKeeperWatcher zkw)
                   throws IOException
Throws:
IOException
Method Detail

start

public void start()
           throws IOException
Throws:
IOException

get

public NamespaceDescriptor get(String name)

update

public void update(NamespaceDescriptor ns)
            throws IOException
Throws:
IOException

remove

public void remove(String name)
            throws IOException
Throws:
IOException

list

public NavigableSet<NamespaceDescriptor> list()
                                       throws IOException
Throws:
IOException

nodeCreated

public void nodeCreated(String path)
Description copied from class: ZooKeeperListener
Called when a new node has been created.

Overrides:
nodeCreated in class ZooKeeperListener
Parameters:
path - full path of the new node

nodeDeleted

public void nodeDeleted(String path)
Description copied from class: ZooKeeperListener
Called when a node has been deleted

Overrides:
nodeDeleted in class ZooKeeperListener
Parameters:
path - full path of the deleted node

nodeDataChanged

public void nodeDataChanged(String path)
Description copied from class: ZooKeeperListener
Called when an existing node has changed data.

Overrides:
nodeDataChanged in class ZooKeeperListener
Parameters:
path - full path of the updated node

nodeChildrenChanged

public void nodeChildrenChanged(String path)
Description copied from class: ZooKeeperListener
Called when an existing node has a child node added or removed.

Overrides:
nodeChildrenChanged in class ZooKeeperListener
Parameters:
path - full path of the node whose children have changed


Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.