HBASE-22376 master can fail to start w/NPE if lastflushedseqids file is empty
Signed-off-by: Peter Somogyi <psomogyi@apache.org>
This commit is contained in:
parent
420fbba6ae
commit
3641e7a97d
|
@ -1007,7 +1007,7 @@ public class HMaster extends HRegionServer implements MasterServices {
|
|||
try {
|
||||
this.serverManager.loadLastFlushedSequenceIds();
|
||||
} catch (IOException e) {
|
||||
LOG.debug("Failed to load last flushed sequence id of regions"
|
||||
LOG.info("Failed to load last flushed sequence id of regions"
|
||||
+ " from file system", e);
|
||||
}
|
||||
// Set ourselves as active Master now our claim has succeeded up in zk.
|
||||
|
|
|
@ -1126,6 +1126,10 @@ public class ServerManager {
|
|||
try {
|
||||
FlushedSequenceId flushedSequenceId =
|
||||
FlushedSequenceId.parseDelimitedFrom(in);
|
||||
if (flushedSequenceId == null) {
|
||||
LOG.info(".lastflushedseqids found at {} is empty", lastFlushedSeqIdPath);
|
||||
return;
|
||||
}
|
||||
for (FlushedRegionSequenceId flushedRegionSequenceId : flushedSequenceId
|
||||
.getRegionSequenceIdList()) {
|
||||
byte[] encodedRegionName = flushedRegionSequenceId
|
||||
|
|
Loading…
Reference in New Issue