You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Jim Kellerman (JIRA)" <ji...@apache.org> on 2007/05/23 01:28:16 UTC
[jira] Created: (HADOOP-1421) When a region server dies, it's log
must be distributed to all the new servers that have been assigned its
regions
When a region server dies, it's log must be distributed to all the new servers that have been assigned its regions
------------------------------------------------------------------------------------------------------------------
Key: HADOOP-1421
URL: https://issues.apache.org/jira/browse/HADOOP-1421
Project: Hadoop
Issue Type: New Feature
Components: contrib/hbase
Reporter: Jim Kellerman
When a region server dies, the master reallocates all the regions it was serving to other region servers. In order for the regions to be recovered properly, the log from the old region server must be split up into chunks that contain only the commits for a single region.
Ideally, if a region server is assigned more than one of the old servers regions, the log for that server would contain all the commits for all the regions it has been assigned.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HADOOP-1421) When a region server dies, its log
must be distributed to all the new servers that have been assigned its
regions
Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-1421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12503455 ]
Hadoop QA commented on HADOOP-1421:
-----------------------------------
+1
http://issues.apache.org/jira/secure/attachment/12359356/patch.txt applied and successfully tested against trunk revision r545648.
Test results: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/260/testReport/
Console output: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/260/console
> When a region server dies, its log must be distributed to all the new servers that have been assigned its regions
> -----------------------------------------------------------------------------------------------------------------
>
> Key: HADOOP-1421
> URL: https://issues.apache.org/jira/browse/HADOOP-1421
> Project: Hadoop
> Issue Type: New Feature
> Components: contrib/hbase
> Affects Versions: 0.14.0
> Reporter: Jim Kellerman
> Assignee: Jim Kellerman
> Fix For: 0.14.0
>
> Attachments: patch.txt
>
>
> When a region server dies, the master reallocates all the regions it was serving to other region servers. In order for the regions to be recovered properly, the log from the old region server must be split up into chunks that contain only the commits for a single region.
> Ideally, if a region server is assigned more than one of the old servers regions, the log for that server would contain all the commits for all the regions it has been assigned.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HADOOP-1421) When a region server dies, its log
must be distributed to all the new servers that have been assigned its
regions
Posted by "Jim Kellerman (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-1421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12503122 ]
Jim Kellerman commented on HADOOP-1421:
---------------------------------------
Modifications for this issue:
Configuration files:
conf/hbase-default.xml
- change hbase.regiondir to hbase.rootdir
Code base:
HAbstractScanner
- Change ColumnMatcher.matches so that when matching a family, it only
compares the family name instead of using startsWith
HClient
- used KeyedData instead of LabelledData
- getRow now returns SortedMap<Text, byte[]> instead of array of LabelledData
- added public API for renewLease
HConstants
- change parameter name hbase.regiondir to hbase.rootdir
- change HREGION_DIR to HBASE_DIR
- change DEFAULT_HREGION_DIR to DEFAULT_HBASE_DIR
HLog
- add method splitLog
- remove method consolidateOldLog
- add method closeAndDelete
HMaster
- change HREGION_DIR to HBASE_DIR
- change DEFAULT_HREGION_DIR to DEFAULT_HBASE_DIR
- change processing when region server reports that it is shutting down
- new method to capture common code: cancelLease
- PendingServerShutdown now splits dead region server's log
- move some methods around so that they are in the section pertaining
to a particular interface
- use KeyedData instead of LabelledData
- added pendingRegions for regions that have been assigned, but for
which the region server has not finished processing yet.
- root and meta scanners retry instead of exiting on first error
- added time outs for indefinate waits
- change waitForMetaScan to waitForMetaScanOrClose
- bootstrap code calls HLog.closeAndDelete so that the log directory
is not present when a region server loads the region
- separate master shutdown from region server reports shutdown
- instead of using find to determine if a region belongs to a table,
compare the table name to the name of the table in the
HTableDescriptor in the HRegionInfo
- remove waitForRootRegion in favor of waitForRootRegionOrClose
- LeaseListener is now an interface instead of an abstract class
- when a lease expires or when a region server reports that it is
shutting down and it was serving the root region, change
rootRegionLocation to null so that threads who need to talk to the
root region will wait until it becomes available again.
- if a meta region server goes down, set allMetaRegionsScanned to
false so that threads that need to scan the meta regions will wait
until the region comes back on line
HMerge
- change HREGION_DIR to HBASE_DIR
- change DEFAULT_HREGION_DIR to DEFAULT_HBASE_DIR
- use HLog closeAndDelete
- new signature for HRegion constructor
- remove useless else
HMsg
- remove MSG_REGION_MERGE, MSG_REGION_SPLIT
- add toString
HRegion
- use new HRegion constructor signature
HRegiondirReader
- use new HRegion constructor signature
HRegionInterface
- getRow and next return array of KeyedData instead of LabelledData
- drop unused parameter from next
HRegionServer
- change HREGION_DIR to HBASE_DIR
- change DEFAULT_HREGION_DIR to DEFAULT_HBASE_DIR
- throw new RegionServerRunningException if log directory exists
- clean up shutdown, report to master what regions were being served
- use HLog closeAndDelete
- remove processing for MSG_REGION_MERGE
- remove redundant MSG_CALL_SERVER_STARTUP and MSG_REGIONSERVER_STOP processing
- use new HRegion constructor signature
- LeaseListener is now an interface
- Drop unused parameter from next
- add new method abort for testing
- onlineRegions is now synchronized
- instead of using find to determine if a region belongs to a table,
compare the table name to the name of the table in the
HTableDescriptor in the HRegionInfo
- start threads and set their names in run instead of constructor
- tell master what regions were being served on a clean shutdown
- worker thread retries if an operation fails
- add timeout to previously indefinate waits
- don't try to serve a region if it is already being served (should
the master request that we open it twice)
- getRow and next return array of KeyedData instead of LabelledData
HStore
- fix logic error in determinining if an edit in an HLog applies to
this HStore
- remove useless else
HStoreKey
- add new constructor which copies another key
- add new set method which copies all the fields from another key
KeyedData
- new class, replaces LabelledData. Instead of a column name, value
pair, KeyedData is an HStoreKey, value pair
LabelledData
- class removed
LeaseListener
- change from abstract class to interface
- remove leaseRenewed and leaseCancelled APIs as they were never used
Leases
- createLease now throws AssertionError instead of IOException for
"this can't possibly happen" error
RegionServerRunningException
- added. Thrown when the log directory for a region server exists
Test cases:
AbstractMergeTestBase
- move createNewHRegion from HRegion to here
- use HRegion.addRegionToMETA instead of HRegion.addRegionToMeta
- use HLog.closeAndDelete
HBaseClusterTestCase
- add constructor that lets you specify the number of region servers
MiniHBaseCluster
- change HREGION_DIR to HBASE_DIR
- change DEFAULT_HREGION_DIR to DEFAULT_HBASE_DIR
- stopRegionServer and abortRegionServer APIs
TestCleanRegionServerExit
- new test: test failover when a region server is shut down cleanly
TestGet
- use new signature for HRegion constructor
- use HLog closeAndDelete
TestHLog
- fix order of arguments to assert
TestMemcache
- use HLog closeAndDelete
TestHRegion
- HRegion now handles old log file transparently
- use new signature for HRegion constructor
- remove extraneous throws clause
TestRegionServerAbort
- new test. Tests failover when a region server does not shut down cleanly
TestScanner
- use new signature for HRegion constructor
- use HLog closeAndDelete
TestScanner2
- add copyright statement
- use new signature for HRegion constructor
- fix order of arguments to assert
- use KeyedData instead of LabelledData
> When a region server dies, its log must be distributed to all the new servers that have been assigned its regions
> -----------------------------------------------------------------------------------------------------------------
>
> Key: HADOOP-1421
> URL: https://issues.apache.org/jira/browse/HADOOP-1421
> Project: Hadoop
> Issue Type: New Feature
> Components: contrib/hbase
> Affects Versions: 0.14.0
> Reporter: Jim Kellerman
> Assignee: Jim Kellerman
> Fix For: 0.14.0
>
> Attachments: patch.txt
>
>
> When a region server dies, the master reallocates all the regions it was serving to other region servers. In order for the regions to be recovered properly, the log from the old region server must be split up into chunks that contain only the commits for a single region.
> Ideally, if a region server is assigned more than one of the old servers regions, the log for that server would contain all the commits for all the regions it has been assigned.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HADOOP-1421) When a region server dies, its log
must be distributed to all the new servers that have been assigned its
regions
Posted by "Jim Kellerman (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-1421?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jim Kellerman updated HADOOP-1421:
----------------------------------
Fix Version/s: 0.14.0
Affects Version/s: 0.14.0
Status: Patch Available (was: In Progress)
Tested in my environment. Ensure Hudson likes it before committing it.
> When a region server dies, its log must be distributed to all the new servers that have been assigned its regions
> -----------------------------------------------------------------------------------------------------------------
>
> Key: HADOOP-1421
> URL: https://issues.apache.org/jira/browse/HADOOP-1421
> Project: Hadoop
> Issue Type: New Feature
> Components: contrib/hbase
> Affects Versions: 0.14.0
> Reporter: Jim Kellerman
> Assignee: Jim Kellerman
> Fix For: 0.14.0
>
> Attachments: patch.txt
>
>
> When a region server dies, the master reallocates all the regions it was serving to other region servers. In order for the regions to be recovered properly, the log from the old region server must be split up into chunks that contain only the commits for a single region.
> Ideally, if a region server is assigned more than one of the old servers regions, the log for that server would contain all the commits for all the regions it has been assigned.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HADOOP-1421) When a region server dies, its log
must be distributed to all the new servers that have been assigned its
regions
Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-1421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12503921 ]
Hadoop QA commented on HADOOP-1421:
-----------------------------------
Integrated in Hadoop-Nightly #119 (See [http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Nightly/119/])
> When a region server dies, its log must be distributed to all the new servers that have been assigned its regions
> -----------------------------------------------------------------------------------------------------------------
>
> Key: HADOOP-1421
> URL: https://issues.apache.org/jira/browse/HADOOP-1421
> Project: Hadoop
> Issue Type: New Feature
> Components: contrib/hbase
> Affects Versions: 0.14.0
> Reporter: Jim Kellerman
> Assignee: Jim Kellerman
> Fix For: 0.14.0
>
> Attachments: patch.txt
>
>
> When a region server dies, the master reallocates all the regions it was serving to other region servers. In order for the regions to be recovered properly, the log from the old region server must be split up into chunks that contain only the commits for a single region.
> Ideally, if a region server is assigned more than one of the old servers regions, the log for that server would contain all the commits for all the regions it has been assigned.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HADOOP-1421) When a region server dies, its log
must be distributed to all the new servers that have been assigned its
regions
Posted by "Jim Kellerman (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-1421?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jim Kellerman updated HADOOP-1421:
----------------------------------
Resolution: Fixed
Status: Resolved (was: Patch Available)
Committed patch after getting +1 from Hudson
> When a region server dies, its log must be distributed to all the new servers that have been assigned its regions
> -----------------------------------------------------------------------------------------------------------------
>
> Key: HADOOP-1421
> URL: https://issues.apache.org/jira/browse/HADOOP-1421
> Project: Hadoop
> Issue Type: New Feature
> Components: contrib/hbase
> Affects Versions: 0.14.0
> Reporter: Jim Kellerman
> Assignee: Jim Kellerman
> Fix For: 0.14.0
>
> Attachments: patch.txt
>
>
> When a region server dies, the master reallocates all the regions it was serving to other region servers. In order for the regions to be recovered properly, the log from the old region server must be split up into chunks that contain only the commits for a single region.
> Ideally, if a region server is assigned more than one of the old servers regions, the log for that server would contain all the commits for all the regions it has been assigned.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HADOOP-1421) When a region server dies, its log
must be distributed to all the new servers that have been assigned its
regions
Posted by "Jim Kellerman (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-1421?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jim Kellerman updated HADOOP-1421:
----------------------------------
Summary: When a region server dies, its log must be distributed to all the new servers that have been assigned its regions (was: When a region server dies, it's log must be distributed to all the new servers that have been assigned its regions)
> When a region server dies, its log must be distributed to all the new servers that have been assigned its regions
> -----------------------------------------------------------------------------------------------------------------
>
> Key: HADOOP-1421
> URL: https://issues.apache.org/jira/browse/HADOOP-1421
> Project: Hadoop
> Issue Type: New Feature
> Components: contrib/hbase
> Reporter: Jim Kellerman
>
> When a region server dies, the master reallocates all the regions it was serving to other region servers. In order for the regions to be recovered properly, the log from the old region server must be split up into chunks that contain only the commits for a single region.
> Ideally, if a region server is assigned more than one of the old servers regions, the log for that server would contain all the commits for all the regions it has been assigned.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HADOOP-1421) When a region server dies, its log
must be distributed to all the new servers that have been assigned its
regions
Posted by "Jim Kellerman (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-1421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12501399 ]
Jim Kellerman commented on HADOOP-1421:
---------------------------------------
On a clean shutdown, each region is closed by the HRegionServer.
The steps of closing a region are:
1. flush memcache to HLog
2. flush the HStores. This has the effect of creating a new HStoreFile from the memcache flush and consequently, the HLog should be empty if the shutdown completes cleanly.
Consequently, the only case in which we need to read and split the HLog occurs when a HRegionServer dies. Since this is only known to the master, the master can do the HLog splitting while it is looking for the regions that the downed region server was serving.
> When a region server dies, its log must be distributed to all the new servers that have been assigned its regions
> -----------------------------------------------------------------------------------------------------------------
>
> Key: HADOOP-1421
> URL: https://issues.apache.org/jira/browse/HADOOP-1421
> Project: Hadoop
> Issue Type: New Feature
> Components: contrib/hbase
> Reporter: Jim Kellerman
> Assignee: Jim Kellerman
>
> When a region server dies, the master reallocates all the regions it was serving to other region servers. In order for the regions to be recovered properly, the log from the old region server must be split up into chunks that contain only the commits for a single region.
> Ideally, if a region server is assigned more than one of the old servers regions, the log for that server would contain all the commits for all the regions it has been assigned.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (HADOOP-1421) When a region server dies, its log
must be distributed to all the new servers that have been assigned its
regions
Posted by "Jim Kellerman (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-1421?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jim Kellerman reassigned HADOOP-1421:
-------------------------------------
Assignee: Jim Kellerman
> When a region server dies, its log must be distributed to all the new servers that have been assigned its regions
> -----------------------------------------------------------------------------------------------------------------
>
> Key: HADOOP-1421
> URL: https://issues.apache.org/jira/browse/HADOOP-1421
> Project: Hadoop
> Issue Type: New Feature
> Components: contrib/hbase
> Reporter: Jim Kellerman
> Assignee: Jim Kellerman
>
> When a region server dies, the master reallocates all the regions it was serving to other region servers. In order for the regions to be recovered properly, the log from the old region server must be split up into chunks that contain only the commits for a single region.
> Ideally, if a region server is assigned more than one of the old servers regions, the log for that server would contain all the commits for all the regions it has been assigned.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Work started: (HADOOP-1421) When a region server dies, its
log must be distributed to all the new servers that have been assigned its
regions
Posted by "Jim Kellerman (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-1421?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Work on HADOOP-1421 started by Jim Kellerman.
> When a region server dies, its log must be distributed to all the new servers that have been assigned its regions
> -----------------------------------------------------------------------------------------------------------------
>
> Key: HADOOP-1421
> URL: https://issues.apache.org/jira/browse/HADOOP-1421
> Project: Hadoop
> Issue Type: New Feature
> Components: contrib/hbase
> Reporter: Jim Kellerman
> Assignee: Jim Kellerman
>
> When a region server dies, the master reallocates all the regions it was serving to other region servers. In order for the regions to be recovered properly, the log from the old region server must be split up into chunks that contain only the commits for a single region.
> Ideally, if a region server is assigned more than one of the old servers regions, the log for that server would contain all the commits for all the regions it has been assigned.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HADOOP-1421) When a region server dies, its log
must be distributed to all the new servers that have been assigned its
regions
Posted by "Jim Kellerman (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-1421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12501381 ]
Jim Kellerman commented on HADOOP-1421:
---------------------------------------
It does not make sense to consolidate old log files when a
HRegionServer starts as it has not been assigned any regions yet.
If a HRegionServer is going down in a controlled fashion, then after
closing all the HRegions it is serving, it should close the HLog and
then split it on a per region basis and store the log file in the
region directory.
It should then report to the master that it is shutting down and
provide the master with a list of regions it was serving so the master
can quickly reassign them.
When a HRegionServer is assigned a region, it should look in the
region directory for the old log file, and apply it if it exists (this
is already a part of starting a HRegion, but we currently do not have
the HLog in the right place).
If a HRegionServer crashes, the master is notified by the lease
timeout. Since the HRegionServer crashed, the master needs to scan all
the regions to find what the region server was serving, and split the
log files.
> When a region server dies, its log must be distributed to all the new servers that have been assigned its regions
> -----------------------------------------------------------------------------------------------------------------
>
> Key: HADOOP-1421
> URL: https://issues.apache.org/jira/browse/HADOOP-1421
> Project: Hadoop
> Issue Type: New Feature
> Components: contrib/hbase
> Reporter: Jim Kellerman
> Assignee: Jim Kellerman
>
> When a region server dies, the master reallocates all the regions it was serving to other region servers. In order for the regions to be recovered properly, the log from the old region server must be split up into chunks that contain only the commits for a single region.
> Ideally, if a region server is assigned more than one of the old servers regions, the log for that server would contain all the commits for all the regions it has been assigned.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HADOOP-1421) When a region server dies, its log
must be distributed to all the new servers that have been assigned its
regions
Posted by "Jim Kellerman (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-1421?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jim Kellerman updated HADOOP-1421:
----------------------------------
Attachment: patch.txt
Patch for handling failover. Also, files modified for this patch were cleaned up for HADOOP-1466
> When a region server dies, its log must be distributed to all the new servers that have been assigned its regions
> -----------------------------------------------------------------------------------------------------------------
>
> Key: HADOOP-1421
> URL: https://issues.apache.org/jira/browse/HADOOP-1421
> Project: Hadoop
> Issue Type: New Feature
> Components: contrib/hbase
> Affects Versions: 0.14.0
> Reporter: Jim Kellerman
> Assignee: Jim Kellerman
> Fix For: 0.14.0
>
> Attachments: patch.txt
>
>
> When a region server dies, the master reallocates all the regions it was serving to other region servers. In order for the regions to be recovered properly, the log from the old region server must be split up into chunks that contain only the commits for a single region.
> Ideally, if a region server is assigned more than one of the old servers regions, the log for that server would contain all the commits for all the regions it has been assigned.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.