HBASE-20609 SnapshotHFileCleaner#init should check that params is not null
This commit is contained in:
parent
c9f8c3436f
commit
6c1097e92f
|
@ -76,7 +76,7 @@ public class SnapshotHFileCleaner extends BaseHFileCleanerDelegate {
|
|||
|
||||
@Override
|
||||
public void init(Map<String, Object> params) {
|
||||
if (params.containsKey(HMaster.MASTER)) {
|
||||
if (params != null && params.containsKey(HMaster.MASTER)) {
|
||||
this.master = (MasterServices) params.get(HMaster.MASTER);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -375,6 +375,7 @@ public class TestHFileArchiving {
|
|||
|
||||
// The cleaner should be looping without long pauses to reproduce the race condition.
|
||||
HFileCleaner cleaner = new HFileCleaner(1, stoppable, conf, fs, archiveDir);
|
||||
assertFalse("cleaner should not be null", cleaner == null);
|
||||
try {
|
||||
choreService.scheduleChore(cleaner);
|
||||
|
||||
|
|
Loading…
Reference in New Issue