aryangupta1998 commented on code in PR #5964:
URL: https://github.com/apache/ozone/pull/5964#discussion_r1453660176
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/ozoneimpl/ContainerReader.java:
##########
@@ -148,7 +148,18 @@ public void readVolume(File hddsVolumeRootDir) {
LOG.info("Start to verify containers on volume {}", hddsVolumeRootDir);
File currentDir = new File(idDir, Storage.STORAGE_DIR_CURRENT);
File[] containerTopDirs = currentDir.listFiles();
- if (containerTopDirs != null) {
+ if (containerTopDirs != null && containerTopDirs.length > 0) {
+ try {
+ // idDir is working directory having data
+ // and volume is initialized with temp path
+ hddsVolume.createTmpDirs(idDir.getName());
+ } catch (IOException e) {
+ LOG.error("Volume {} dir path {} can not be accessed to create " +
Review Comment:
Can we refactor something like,
`LOG.error("The tmp directory can't be created inside {} in the " +
"volume {}.", idDir.getName(), hddsVolumeRootDir, e);`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]