Skip to content

Commit

Permalink
HBASE-22376 master can fail to start w/NPE if lastflushedseqids file …
Browse files Browse the repository at this point in the history
…is empty

Signed-off-by: Peter Somogyi <[email protected]>
  • Loading branch information
sershe-apache committed May 10, 2019
1 parent 420fbba commit 3641e7a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,7 @@ private void finishActiveMasterInitialization(MonitoredTask status) throws IOExc
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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1126,6 +1126,10 @@ public void loadLastFlushedSequenceIds() throws IOException {
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
Expand Down

0 comments on commit 3641e7a

Please sign in to comment.