org.apache.hadoop.hbase.executor
Class HBaseExecutorService

java.lang.Object
  extended by org.apache.hadoop.hbase.executor.HBaseExecutorService

public class HBaseExecutorService
extends Object

This is a generic HBase executor service. This component abstract a threadpool, a queue to which jobs can be submitted and a Runnable that handles the object that is added to the queue. In order to create a new HBExecutorService, you need to do: HBExecutorService.startExecutorService("myService"); In order to use the service created above, you need to override the HBEventHandler class and create an event type that submits to this service.


Nested Class Summary
static class HBaseExecutorService.HBaseExecutorServiceType
          The following is a list of names for the various executor services in both the master and the region server.
 
Constructor Summary
protected HBaseExecutorService(String name)
           
 
Method Summary
static HBaseExecutorService getExecutorService(String name)
          This method is an accessor for all the HBExecutorServices running so far addressable by name.
static boolean isExecutorServiceRunning(String name)
           
static void shutdown()
           
static void startExecutorService(String name)
          Start an executor service with a given name.
 void submit(Runnable event)
          Submit the event to the queue for handling.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HBaseExecutorService

protected HBaseExecutorService(String name)
Method Detail

startExecutorService

public static void startExecutorService(String name)
Start an executor service with a given name. If there was a service already started with the same name, this throws a RuntimeException.

Parameters:
name - Name of the service to start.

isExecutorServiceRunning

public static boolean isExecutorServiceRunning(String name)

getExecutorService

public static HBaseExecutorService getExecutorService(String name)
This method is an accessor for all the HBExecutorServices running so far addressable by name. If there is no such service, then it returns null.


shutdown

public static void shutdown()

submit

public void submit(Runnable event)
Submit the event to the queue for handling.

Parameters:
event -


Copyright © 2010 Apache Software Foundation. All Rights Reserved.