Skip to content

Commit

Permalink
HDDS-12162. Log available space of HddsVolume and DbVolume upon Datan…
Browse files Browse the repository at this point in the history
…ode startup (apache#7777)
  • Loading branch information
smengcl authored Jan 30, 2025
1 parent a2825fd commit c7872f7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,10 @@ public long getUsedSpace() {
public SpaceUsageSource snapshot() {
return this; // immutable
}

@Override
public String toString() {
return "capacity=" + capacity + ", used=" + used + ", available=" + available;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ protected DbVolume(Builder b) throws IOException {

this.hddsDbStorePathMap = new HashMap<>();
if (!b.getFailedVolume() && getVolumeInfo().isPresent()) {
LOG.info("Creating DbVolume: {} of storage type : {} capacity : {}",
LOG.info("Creating DbVolume: {} of storage type: {}, {}",
getStorageDir(), b.getStorageType(),
getVolumeInfo().get().getCapacity());
getCurrentUsage());

initialize();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,10 @@ private HddsVolume(Builder b) throws IOException {
this.volumeInfoMetrics =
new VolumeInfoMetrics(b.getVolumeRootStr(), this);

LOG.info("Creating HddsVolume: {} of storage type : {} capacity : {}",
getStorageDir(), b.getStorageType(),
getVolumeInfo().get().getCapacity());
LOG.info("Creating HddsVolume: {} of storage type: {}, {}",
getStorageDir(),
b.getStorageType(),
getCurrentUsage());

initialize();
} else {
Expand Down

0 comments on commit c7872f7

Please sign in to comment.