Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
0.98.24
-
None
-
Reviewed
-
Description
The way we splitting log now is like the following figure:
The problem is the OutputSink will write the recovered edits during splitting log, which means it will create one WriterAndPath for each region and retain it until the end. If the cluster is small and the number of regions per rs is large, it will create too many HDFS streams at the same time. Then it is prone to failure since each datanode need to handle too many streams.
Thus I come up with a new way to split log.
We try to cache all the recovered edits, but if it exceeds the MaxHeapUsage, we will pick the largest EntryBuffer and write it to a file (close the writer after finish). Then after we read all entries into memory, we will start a writeAndCloseThreadPool, it starts a certain number of threads to write all buffers to files. Thus it will not create HDFS streams more than hbase.regionserver.hlog.splitlog.writer.threads we set.
The biggest benefit is we can control the number of streams we create during splitting log,
it will not exceeds hbase.regionserver.wal.max.splitters * hbase.regionserver.hlog.splitlog.writer.threads, but before it is hbase.regionserver.wal.max.splitters * the number of region the hlog contains.
Attachments
Attachments
Issue Links
- duplicates
-
HBASE-21651 when splitting hlog,occurred exception
- Resolved
-
HBASE-18971 Limit the concurrent opened wal writers when splitting
- Resolved
1.
|
Enable hbase.split.writer.creation.bounded by default | Resolved | Unassigned |