Skip to content

Commit

Permalink
add debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
rdhabalia committed Feb 6, 2019
1 parent 81d5cdf commit 8820eac
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ public void gc(GarbageCleaner garbageCleaner) {
return;
}

long startTime = System.currentTimeMillis();
LOG.info("starting gc - zk traversing");
try {
// Get a set of all ledgers on the bookie
NavigableSet<Long> bkActiveLedgers = Sets.newTreeSet(ledgerStorage.getActiveLedgersInRange(0,
Expand Down Expand Up @@ -217,6 +219,8 @@ public void gc(GarbageCleaner garbageCleaner) {
// ignore exception, collecting garbage next time
LOG.warn("Exception when iterating over the metadata {}", t);
} finally {
long endTime = System.currentTimeMillis();
LOG.info("Total GC time {}", TimeUnit.MILLISECONDS.toSeconds(endTime - startTime));
if (zk != null) {
try {
zk.close();
Expand Down

0 comments on commit 8820eac

Please sign in to comment.