[
https://issues.apache.org/jira/browse/HADOOP-2084?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
stack updated HADOOP-2084:
--------------------------
Attachment: localhbasecluster.patch
Here's a patch w/ commit message below.
{code}
HADOOP-2084 Add a LocalHBaseCluster
Add new LocalHBaseCluster class, a derivative of the test class
MiniHBaseCluster. It runs a master and region server in same process.
Make this mini-cluster the default to mimic standalone mode in hadoop and nutch.
M src/contrib/hbase/conf/hbase-default.xml
Make default be 'local' rather than '0.0.0.0:60000'.
M src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestInfoServers.java
M src/contrib/hbase/src/test/org/apache/hadoop/hbase/HBaseClusterTestCase.java
M src/contrib/hbase/src/test/org/apache/hadoop/hbase/MultiRegionTable.java
M src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestLogRolling.java
MiniHBaseCluster API changed.
M src/contrib/hbase/src/test/org/apache/hadoop/hbase/OOMEHMaster.java
HMaster doMain throws an exception now.
M src/contrib/hbase/src/test/org/apache/hadoop/hbase/MiniHBaseCluster.java
Delegate hbase cluster management to new LocalHBaseCluster.
Moved good bit of this classes' code up into new LHBC so available
beyond testing. Some cleanup while moving the code (no need of the
old MasterThread for instance).
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HRegionServer.java
Moved setup of RPC server into reportForDuty method from Constructor so
could
construct a RegionServer without need of a master being up and running.
Also made a significant change in the way we go down. Master was just
waiting on the lease for all region servers to time out even if region
servers had actual gone down earlier. I (I believe it was I) had reasoned
that region server shouldn't send the EXIT message to the master if the
master had ordained the shutdown because master might not be there to
receive the shutdown... but master is waiting on all region server
leases to expire. If a region server does send the EXIT message,
the master will clean up its references and in general cluster shutdown
runs faster. Putting this facility back for now.
(doMain): Do not run a region server if hbase.master is 'local'.
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HConstants.java
DEFAULT_MASTER_PORT: Added.
A src/contrib/hbase/src/java/org/apache/hadoop/hbase/LocalHBaseCluster.java
Added.
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMaster.java
(doMain): Run LocalHBaseCluster if hbase.master is 'local'.
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HConnectionManager.java
Handle 'local' mode.
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HBaseConnection.java
Expose cloning.
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/package.html
Update doc. to accomodate 'local' mode.
{code}
> [hbase] Add a LocalHBaseCluster
> -------------------------------
>
> Key: HADOOP-2084
> URL: https://issues.apache.org/jira/browse/HADOOP-2084
> Project: Hadoop
> Issue Type: New Feature
> Components: contrib/hbase
> Reporter: stack
> Assignee: stack
> Priority: Minor
> Fix For: 0.16.0
>
> Attachments: localhbasecluster.patch
>
>
> Make a MiniHBaseCluster-like class named LocalHBaseCluster. Key difference
> would be purge of MiniDFSCluster and FileSystem references/management and
> removal of utility that only makes sense in a unit testing context (Perhaps
> have MHBC inherit from LHBC). Make a new class rather than move MHBC from
> src/test to src/java to allow for later having master and regionserver do
> direct method invocation rather than invocation via RPC. LHRC would be used
> when hbase.master is set to the value 'local'.
> LHRC would have a shutdown method to shutdown the cluster. MHBC brings up
> the cluster on construction. Perhaps LHRC should do different and not start
> the cluster until invocation of startup method.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.