over on the remote side.
M src/test/org/apache/hadoop/hbase/TestSerialization.java
Add test that HMsg with region and message serializes.
M src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
HMsg types have been enumified. Also use some of the new
static messages. On split and close because of error,
add message to the HMsg we pass back to the master.
M src/java/org/apache/hadoop/hbase/HServerInfo.java
(compareTo): Added.
M src/java/org/apache/hadoop/hbase/HRegionInfo.java
Allow null in compareTo.
M src/java/org/apache/hadoop/hbase/master/ServerManager.java
Use the new HMsg.isType figuring message type.
Redo message logging. Use convenience HMsg statics.
M src/java/org/apache/hadoop/hbase/master/RegionManager.java
Pass back overloaded message if region shutdown because of balancing.
M src/java/org/apache/hadoop/hbase/HServerAddress.java
Make it so that two addresses equate even if one has hostname
and the other IP.
M src/java/org/apache/hadoop/hbase/ipc/HMasterRegionInterface.java
Up the protocol version for regionserver reporting master messages.
M src/java/org/apache/hadoop/hbase/HMsg.java
Enumify the messge types.
Define a few static HMsgs for convenience.
Allow optional message. Improved toString.
(isType, equals, hashCode): Added.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@658465 13f79535-47bb-0310-9956-ffa450edef68
M src/java/org/apache/hadoop/hbase/HServerLoad.java
(toString): Overload that takes interval.
M src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
(getConfiguration): Added
M src/java/org/apache/hadoop/hbase/master/HMaster.java
(getAverageLoad): Added
M src/java/org/apache/hadoop/hbase/HServerAddress.java
(getHostname): Added.
M src/java/org/apache/hadoop/hbase/client/HTable.java
(getRegionsInfo): Added.
M src/webapps/regionserver/regionserver.jsp
M src/webapps/master/master.jsp
Output requests as requests per second.
Fixed up the help comments. Changed all to use new getHostname
rather than IPs. Added encoded name column.
M src/webapps/master/table.jsp
Added.
M src/webapps/master/WEB-INF/web.xml
Add new tables servlet.
M bin/hbase
Put hbase in front of hadoop again. FIxes not being able to find
stylesheets -- might break logging again though doesnt seem to in
tests.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@656366 13f79535-47bb-0310-9956-ffa450edef68
M HMaster
- Moved HMaster.quiescedMetaServers to ServerManager.quiescedServers and changed name since only servers serving user regions get quiesced.
- Removed HMaster.tableInCreation - not used
M ServerManager
- Don't check if quiescedServers.get() >= serversToServerInfo.size() unless master.shutdownRequested is true.
M HRegionServer
- Change order of checks in main loop of HRegionServer.run, so that booleans are checked before we check the number of messages to process
- Don't break out of main loop if restart or stop requested - stop is checked at top of loop and we need to continue rather than break out of main loop if restart was requested
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@655962 13f79535-47bb-0310-9956-ffa450edef68
M MultiRegionTable
Make deterministic by creating the regions directly and not rely on
the asychronous nature of cache flushes, compactions and splits. The
regions are small, but the point of this class is to generate a
table with multiple regions so we can test map / reduce, region
onlining / offlining, etc.
Removed PUNCTUATION from row keys. Not sure why it was there in the
first place, other than perhaps to verify that a row key can have
punctuation in it provided it is not the first character. This will
become moot when row keys change from Text to byte[] anyways.
Incorporate repeated code
{code}
region.close();
region.getLog().closeAndDelete();
{code}
into private method closeRegionAndDeleteLog
M TestSplit
extends HBaseClusterTestCase instead of MultiRegionTable. It didn't
use the output of MultiRegionTable, so all that work was just wasted
by this test.
M TestTableIndex, TestTableMapReduce
The only two tests that currently use MultiRegionTable. Minor
modifications needed because MultiRegionTable now handles starting
and stopping of the mini-DFS cluster. With the new MultiRegionTable
class, if these tests fail now it will be because something they are
testing has regressed and not because MultiRegionTable failed.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@652587 13f79535-47bb-0310-9956-ffa450edef68
Add a ChangedReadersObserver interface. HStore notifies registered
observers when list of HStoreFile Readers changes -- at flush time
and at compaction time. Scanners are only current observers.
Also fix a deadlock flushing by changing lock types and moving flush
request out from under lock.
M src/test/org/apache/hadoop/hbase/MultiRegionTable.java
(getCacheFlushListern): Renamed as getFlushRequester
M src/java/org/apache/hadoop/hbase/regionserver/HStore.java
Added synchronizations on this.storefiles.
(activeScanners, newScannerLock): Removed. We no longer try to
block out scanners when compacting (Turns out same functionality
for blocking scanners is up in HRegion used around closing/split).
(changedReadersObservers): Added.
(updateReaders): New method that manages the insertion of new
reader on flush. Also calls new notifyChangedReadersObservers.
(notifyChagnedReadersObservers, addChangedReadersObserver,
deleteChangedReadersObservers): Added.
(completeCompaction): Previous deleting old store files, we'd
remove from this.storefiles and delete all in one step; now we
do the remove first, notify all observers of readers, and then
do the delete so observers have a chance to clean up any old
references to files about to be deleted. Removed all the lockout
of new scanner creation and wait on old scanners to come int.
(updateActiveScanners): Removed.
(getStorefiles): Accessor. Added.
M src/java/org/apache/hadoop/hbase/regionserver/StoreFileScanner.java
Added implementation of new ChangedReadersObserver interface.
Added a lock that we hold when 'nexting' and when changing the
set of readers out from under the scanner.
Changed the constructor moving bulk into new openReaders method
that we reuse when list of Readers changes.
(next): Moved head of this method into new getNextViableRow (used
to be called chosenRow and chosenTimestamp). New method returns
simple datastructure of row and timestamp (ViableRow).
(close): On close, remove ourselves as ChangedReadersObserver (we
added ourselves in the constructor).
(updateReaders): Changed the set of Readers out from under the
Scanner.
A src/java/org/apache/hadoop/hbase/regionserver/ChangedReadersObserver.java
Added.
M src/java/org/apache/hadoop/hbase/regionserver/Flusher.java
Changed name of the interface we implement from CacheFlushListener to
FlushRequester.
D src/java/org/apache/hadoop/hbase/regionserver/CacheFlushListener.java
Renamed as FlushRequester.
M src/java/org/apache/hadoop/hbase/regionserver/HStoreScanner.java
Remove update of activeScanners.
A src/java/org/apache/hadoop/hbase/regionserver/FlushRequester.java
Added. Rename of CacheFlushListener.
M src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
Renamed method getCacheFlushListener as getFlushRequester.
M src/java/org/apache/hadoop/hbase/regionserver/HAbstractScanner.java
Formatting.
M src/java/org/apache/hadoop/hbase/regionserver/HRegion.java
CacheFlushListener was renamed as FlushListener.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@651017 13f79535-47bb-0310-9956-ffa450edef68