[ https://issues.apache.org/jira/browse/HBASE-21175?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16665402#comment-16665402 ]
Ted Yu commented on HBASE-21175: -------------------------------- Very close. {code} + * @throws IOException throws an IOException if there's problem creating a table {code} Is the description accurate ? Is there other scenario where IOE is thrown ? {code} + // Avoid passing a null master to CleanerChore, see HBASE-21175 {code} nit: Please move the start of comment two spaces to the left. > Partially initialized SnapshotHFileCleaner leads to NPE during > TestHFileArchiving > --------------------------------------------------------------------------------- > > Key: HBASE-21175 > URL: https://issues.apache.org/jira/browse/HBASE-21175 > Project: HBase > Issue Type: Test > Reporter: Ted Yu > Assignee: Artem Ervits > Priority: Minor > Labels: snapshot > Attachments: HBASE-21175.v01.patch, HBASE-21175.v04.patch, > HBASE-21175.v05.patch > > > TestHFileArchiving#testCleaningRace creates HFileCleaner instance within the > test. > When SnapshotHFileCleaner.init() is called, there is no master parameter > passed in {{params}}. > When the chore runs the cleaner during the test, NPE comes out of this line > in getDeletableFiles(): > {code} > return cache.getUnreferencedFiles(files, master.getSnapshotManager()); > {code} > since master is null. > We should either check for the null master or, pass master instance properly > when constructing the cleaner instance. -- This message was sent by Atlassian JIRA (v7.6.3#76005)