HBASE-2358 Store doReconstructionLog will fail if oldlogfile.log is empty and won't load region
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@926353 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ee70585289
commit
0d1bbc6c51
|
@ -250,6 +250,8 @@ Release 0.21.0 - Unreleased
|
|||
HBASE-2283 row level atomicity (Kannan Muthukkaruppan via Stack)
|
||||
HBASE-2355 Unsynchronized logWriters map is mutated from several threads in
|
||||
HLog splitting (Todd Lipcon via Andrew Purtell)
|
||||
HBASE-2358 Store doReconstructionLog will fail if oldlogfile.log is empty
|
||||
and won't load region (Cosmin Lehene via Stack)
|
||||
|
||||
IMPROVEMENTS
|
||||
HBASE-1760 Cleanup TODOs in HTable
|
||||
|
|
|
@ -306,13 +306,14 @@ public class Store implements HConstants, HeapSize {
|
|||
// Nothing to do.
|
||||
return -1;
|
||||
}
|
||||
// Check its not empty.
|
||||
FileStatus [] stats = this.fs.listStatus(reconstructionLog);
|
||||
if (stats == null || stats.length == 0) {
|
||||
FileStatus stat = this.fs.getFileStatus(reconstructionLog);
|
||||
if (stat.getLen() <= 0) {
|
||||
LOG.warn("Passed reconstruction log " + reconstructionLog +
|
||||
" is zero-length");
|
||||
" is zero-length. Deleting existing file");
|
||||
fs.delete(reconstructionLog, false);
|
||||
return -1;
|
||||
}
|
||||
|
||||
// TODO: This could grow large and blow heap out. Need to get it into
|
||||
// general memory usage accounting.
|
||||
long maxSeqIdInLog = -1;
|
||||
|
|
Loading…
Reference in New Issue