HDDS-1281. Fix the findbug issue caused by HDDS-1163. Contributed by Aravindan Vijayan.

This commit is contained in:
Bharat Viswanadham 2019-03-15 21:06:44 -07:00
parent 2064ca015d
commit 926d548caa
No known key found for this signature in database
GPG Key ID: 6A6F3FB121D2F77C
3 changed files with 3 additions and 5 deletions

View File

@ -677,7 +677,7 @@ public void check() throws StorageContainerException {
KeyValueContainerCheck checker =
new KeyValueContainerCheck(containerData.getMetadataPath(), config,
containerId, containerData);
containerId);
switch (level) {
case FAST_CHECK:

View File

@ -52,20 +52,18 @@ public class KeyValueContainerCheck {
private static final Logger LOG = LoggerFactory.getLogger(Container.class);
private long containerID;
private KeyValueContainerData inMemContainerData; //from caller, maybe null
private KeyValueContainerData onDiskContainerData; //loaded from fs/disk
private Configuration checkConfig;
private String metadataPath;
public KeyValueContainerCheck(String metadataPath, Configuration conf,
long containerID, KeyValueContainerData containerData) {
long containerID) {
Preconditions.checkArgument(metadataPath != null);
this.checkConfig = conf;
this.containerID = containerID;
this.onDiskContainerData = null;
this.inMemContainerData = containerData;
this.metadataPath = metadataPath;
}

View File

@ -111,7 +111,7 @@ public TestKeyValueContainerCheck(String metadataImpl) {
KeyValueContainerCheck kvCheck =
new KeyValueContainerCheck(containerData.getMetadataPath(), conf,
containerID, containerData);
containerID);
// first run checks on a Open Container
error = kvCheck.fastCheck();