bookkeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eolive...@apache.org
Subject [bookkeeper] branch master updated: ISSUE #247: Missing JavaDoc for classes
Date Tue, 25 Jul 2017 09:08:10 GMT
This is an automated email from the ASF dual-hosted git repository.

eolivelli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git


The following commit(s) were added to refs/heads/master by this push:
     new ce57aca  ISSUE #247: Missing JavaDoc for classes
ce57aca is described below

commit ce57acaa1686493fd32fc58d3332d956db06122b
Author: Sijie Guo <sijie@apache.org>
AuthorDate: Tue Jul 25 11:08:03 2017 +0200

    ISSUE #247: Missing JavaDoc for classes
    
    Descriptions of the changes in this PR:
    
    - Addressed the `TODO` comments by adding JavaDoc
    - Make sure there is a Github issue for each unaddressed `TODO` comment
    
    Author: Sijie Guo <sijie@apache.org>
    
    Reviewers: Enrico Olivelli <eolivelli@apache.org>
    
    This closes #285 from sijie/issue_247, closes #247
---
 .../apache/bookkeeper/benchmark/BenchBookie.java   |   2 +-
 .../benchmark/BenchReadThroughputLatency.java      |   2 +-
 .../benchmark/BenchThroughputLatency.java          |   2 +-
 .../apache/bookkeeper/benchmark/MySqlClient.java   |   4 +-
 .../apache/bookkeeper/benchmark/package-info.java  |   4 +-
 .../org/apache/bookkeeper/auth/AuthCallbacks.java  |   2 +-
 .../auth/AuthProviderFactoryFactory.java           |   2 +-
 .../apache/bookkeeper/auth/BookieAuthProvider.java |   5 +-
 .../apache/bookkeeper/auth/ClientAuthProvider.java |   2 +-
 .../org/apache/bookkeeper/auth/package-info.java   |   4 +-
 .../bookkeeper/bookie/BookKeeperServerStats.java   |   2 +-
 .../java/org/apache/bookkeeper/bookie/Bookie.java  |   4 +-
 .../apache/bookkeeper/bookie/BookieException.java  |  20 ++-
 .../bookkeeper/bookie/BufferedChannelBase.java     |   3 +-
 .../bookkeeper/bookie/CheckpointSourceList.java    |   2 +-
 .../org/apache/bookkeeper/bookie/EntryKey.java     |   4 +-
 .../apache/bookkeeper/bookie/EntryLocation.java    |   4 +-
 .../bookkeeper/bookie/IndexPersistenceMgr.java     |   2 +-
 .../bookie/InterleavedLedgerStorage.java           |   7 +-
 .../bookie/LastAddConfirmedUpdateNotification.java |   4 +-
 .../apache/bookkeeper/bookie/LedgerStorage.java    |   5 +-
 .../bookkeeper/bookie/LedgerStorageFactory.java    |   2 +-
 .../bookkeeper/bookie/MarkerFileChannel.java       | 146 ---------------------
 .../bookkeeper/bookie/SortedLedgerStorage.java     |   7 +-
 .../org/apache/bookkeeper/bookie/package-info.java |   4 +-
 .../org/apache/bookkeeper/client/LedgerHandle.java |   2 +-
 .../bookkeeper/meta/AbstractZkLedgerManager.java   |  10 --
 .../bookkeeper/meta/HierarchicalLedgerManager.java |   1 -
 .../bookkeeper/meta/MSLedgerManagerFactory.java    |   1 +
 .../bookkeeper/proto/ReadEntryProcessor.java       |   2 +-
 .../bookkeeper/zookeeper/ZooKeeperWatcherBase.java |   1 +
 .../bookkeeper/bookie/IndexPersistenceMgrTest.java |   1 -
 .../bookkeeper/stats/CodahaleMetricsProvider.java  |   2 +-
 .../bookkeeper/stats/CodahaleStatsLogger.java      |   2 +-
 .../org/apache/bookkeeper/stats/package-info.java  |   4 +-
 .../apache/bookkeeper/stats/PrometheusCounter.java |   2 +-
 .../stats/PrometheusMetricsProvider.java           |   2 +-
 .../bookkeeper/stats/PrometheusOpStatsLogger.java  |   2 +-
 .../bookkeeper/stats/PrometheusStatsLogger.java    |   2 +-
 .../org/apache/bookkeeper/stats/package-info.java  |   4 +-
 .../twitter/finagle/FinagleStatsLoggerImpl.java    |   2 +-
 .../stats/twitter/finagle/package-info.java        |   4 +-
 .../stats/twitter/ostrich/OstrichProvider.java     |   2 +-
 .../stats/twitter/ostrich/package-info.java        |   4 +-
 .../stats/twitter/science/HTTPStatsExporter.java   |   1 -
 .../stats/twitter/science/OpStatsLoggerImpl.java   |   1 -
 .../twitter/science/TwitterStatsProvider.java      |   2 +-
 .../stats/twitter/science/package-info.java        |   4 +-
 .../bookkeeper/stats/CachingStatsLogger.java       |   2 +-
 .../bookkeeper/stats/CachingStatsProvider.java     |   5 +-
 .../apache/bookkeeper/stats/NullStatsLogger.java   |  11 +-
 .../apache/bookkeeper/stats/NullStatsProvider.java |   2 +-
 .../java/org/apache/bookkeeper/stats/Stats.java    |   2 +-
 .../org/apache/bookkeeper/stats/package-info.java  |   4 +-
 54 files changed, 98 insertions(+), 231 deletions(-)

diff --git a/bookkeeper-benchmark/src/main/java/org/apache/bookkeeper/benchmark/BenchBookie.java b/bookkeeper-benchmark/src/main/java/org/apache/bookkeeper/benchmark/BenchBookie.java
index 2342704..3421b98 100644
--- a/bookkeeper-benchmark/src/main/java/org/apache/bookkeeper/benchmark/BenchBookie.java
+++ b/bookkeeper-benchmark/src/main/java/org/apache/bookkeeper/benchmark/BenchBookie.java
@@ -49,7 +49,7 @@ import io.netty.channel.epoll.EpollEventLoopGroup;
 import io.netty.channel.nio.NioEventLoopGroup;
 
 /**
- * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+ * A utility class used for benchmarking the performance of bookies.
  */
 public class BenchBookie {
     static final Logger LOG = LoggerFactory.getLogger(BenchBookie.class);
diff --git a/bookkeeper-benchmark/src/main/java/org/apache/bookkeeper/benchmark/BenchReadThroughputLatency.java b/bookkeeper-benchmark/src/main/java/org/apache/bookkeeper/benchmark/BenchReadThroughputLatency.java
index 336f07e..5f86135 100644
--- a/bookkeeper-benchmark/src/main/java/org/apache/bookkeeper/benchmark/BenchReadThroughputLatency.java
+++ b/bookkeeper-benchmark/src/main/java/org/apache/bookkeeper/benchmark/BenchReadThroughputLatency.java
@@ -48,7 +48,7 @@ import java.util.concurrent.atomic.AtomicInteger;
 import static com.google.common.base.Charsets.UTF_8;
 
 /**
- * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+ * A benchmark that benchmarks the read throughput and latency.
  */
 public class BenchReadThroughputLatency {
     static final Logger LOG = LoggerFactory.getLogger(BenchReadThroughputLatency.class);
diff --git a/bookkeeper-benchmark/src/main/java/org/apache/bookkeeper/benchmark/BenchThroughputLatency.java b/bookkeeper-benchmark/src/main/java/org/apache/bookkeeper/benchmark/BenchThroughputLatency.java
index 874a26a..df6d295 100644
--- a/bookkeeper-benchmark/src/main/java/org/apache/bookkeeper/benchmark/BenchThroughputLatency.java
+++ b/bookkeeper-benchmark/src/main/java/org/apache/bookkeeper/benchmark/BenchThroughputLatency.java
@@ -57,7 +57,7 @@ import org.slf4j.LoggerFactory;
 import static com.google.common.base.Charsets.UTF_8;
 
 /**
- * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+ * A benchmark that benchmarks write throughput and latency.
  */
 public class BenchThroughputLatency implements AddCallback, Runnable {
     static final Logger LOG = LoggerFactory.getLogger(BenchThroughputLatency.class);
diff --git a/bookkeeper-benchmark/src/main/java/org/apache/bookkeeper/benchmark/MySqlClient.java b/bookkeeper-benchmark/src/main/java/org/apache/bookkeeper/benchmark/MySqlClient.java
index f04a997..34f9ceb 100644
--- a/bookkeeper-benchmark/src/main/java/org/apache/bookkeeper/benchmark/MySqlClient.java
+++ b/bookkeeper-benchmark/src/main/java/org/apache/bookkeeper/benchmark/MySqlClient.java
@@ -35,7 +35,7 @@ import static com.google.common.base.Charsets.UTF_8;
 import org.apache.zookeeper.KeeperException;
 
 /**
- * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+ * A mysql client performing writes and reads that used for benchmark comparison with BookKeeper.
  */
 public class MySqlClient {
     static final Logger LOG = LoggerFactory.getLogger(MySqlClient.class);
@@ -67,8 +67,6 @@ public class MySqlClient {
             stmt.execute("create table data(transaction_id bigint PRIMARY KEY AUTO_INCREMENT, content TEXT);");
             LOG.info("Database initialization terminated");
         } catch (SQLException e) {
-
-            // TODO Auto-generated catch block
             e.printStackTrace();
         }
     }
diff --git a/bookkeeper-benchmark/src/main/java/org/apache/bookkeeper/benchmark/package-info.java b/bookkeeper-benchmark/src/main/java/org/apache/bookkeeper/benchmark/package-info.java
index 3296a78..84918ae 100644
--- a/bookkeeper-benchmark/src/main/java/org/apache/bookkeeper/benchmark/package-info.java
+++ b/bookkeeper-benchmark/src/main/java/org/apache/bookkeeper/benchmark/package-info.java
@@ -18,6 +18,6 @@
  *
  */
 /**
- * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+ * Benchmark utils for benchmarking the performance of Apache BookKeeper.
  */
-package org.apache.bookkeeper.benchmark;
\ No newline at end of file
+package org.apache.bookkeeper.benchmark;
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/auth/AuthCallbacks.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/auth/AuthCallbacks.java
index 27f9ac5..74134b5 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/auth/AuthCallbacks.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/auth/AuthCallbacks.java
@@ -22,7 +22,7 @@ package org.apache.bookkeeper.auth;
 public abstract class AuthCallbacks {
 
     /**
-     * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+     * Generic callback used in authentication providers.
      */
     public interface GenericCallback<T> {
 
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/auth/AuthProviderFactoryFactory.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/auth/AuthProviderFactoryFactory.java
index f84dfb3..9ead4c2 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/auth/AuthProviderFactoryFactory.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/auth/AuthProviderFactoryFactory.java
@@ -30,7 +30,7 @@ import org.apache.bookkeeper.client.ClientConnectionPeer;
 import org.apache.bookkeeper.bookie.BookieConnectionPeer;
 
 /**
- * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+ * A factory to manage the authentication provider factories.
  */
 public class AuthProviderFactoryFactory {
 
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/auth/BookieAuthProvider.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/auth/BookieAuthProvider.java
index cd0a0bb..8de0af2 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/auth/BookieAuthProvider.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/auth/BookieAuthProvider.java
@@ -28,12 +28,13 @@ import org.apache.bookkeeper.bookie.BookieConnectionPeer;
 
 /**
  * Bookie authentication provider interface.
- * This must be implemented by any party wishing to implement
+ *
+ * <p>This must be implemented by any party wishing to implement
  * an authentication mechanism for bookkeeper connections.
  */
 public interface BookieAuthProvider {
     /**
-     * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+     * A factory to create the bookie authentication provider.
      */
     interface Factory {
         /**
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/auth/ClientAuthProvider.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/auth/ClientAuthProvider.java
index 043cea2..318541c 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/auth/ClientAuthProvider.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/auth/ClientAuthProvider.java
@@ -32,7 +32,7 @@ import org.apache.bookkeeper.client.ClientConnectionPeer;
  */
 public interface ClientAuthProvider {
     /**
-     * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+     * A factory to create the authentication providers for bookkeeper clients.
      */
     interface Factory {
         /**
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/auth/package-info.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/auth/package-info.java
index 5c86fab..d3b4b9d 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/auth/package-info.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/auth/package-info.java
@@ -15,6 +15,6 @@
  * the License.
  */
 /**
- * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+ * Classes used to handle authentication in bookies and clients.
  */
-package org.apache.bookkeeper.auth;
\ No newline at end of file
+package org.apache.bookkeeper.auth;
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookKeeperServerStats.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookKeeperServerStats.java
index eae8f1a..bfd1cc1 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookKeeperServerStats.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookKeeperServerStats.java
@@ -21,7 +21,7 @@
 package org.apache.bookkeeper.bookie;
 
 /**
- * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+ * A utility class used for managing the <i>stats constants</i> used in server side.
  */
 public interface BookKeeperServerStats {
 
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java
index 37252bb..80da02c 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java
@@ -178,7 +178,7 @@ public class Bookie extends BookieCriticalThread {
     private final OpStatsLogger readBytesStats;
 
     /**
-     * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+     * Exception is thrown when no such a ledger is found in this bookie.
      */
     public static class NoLedgerException extends IOException {
         private static final long serialVersionUID = 1L;
@@ -193,7 +193,7 @@ public class Bookie extends BookieCriticalThread {
     }
 
     /**
-     * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+     * Exception is thrown when no such an entry is found in this bookie.
      */
     public static class NoEntryException extends IOException {
         private static final long serialVersionUID = 1L;
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookieException.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookieException.java
index c62d611..e98d637 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookieException.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookieException.java
@@ -22,7 +22,8 @@ package org.apache.bookkeeper.bookie;
  */
 
 /**
- * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+ * Signals that a Bookie exception of some sort has occurred. This class
+ * is the general class of exceptions produced by failed or interrupted bookie operations.
  */
 @SuppressWarnings("serial")
 public abstract class BookieException extends Exception {
@@ -58,7 +59,7 @@ public abstract class BookieException extends Exception {
     }
 
     /**
-     * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+     * An exception code indicates the failure reason.
      */
     public interface Code {
         int OK = 0;
@@ -119,7 +120,7 @@ public abstract class BookieException extends Exception {
     }
 
     /**
-     * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+     * Signals that an unauthorized operation attempts to access the data in a bookie.
      */
     public static class BookieUnauthorizedAccessException extends BookieException {
         public BookieUnauthorizedAccessException() {
@@ -128,7 +129,7 @@ public abstract class BookieException extends Exception {
     }
 
     /**
-     * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+     * Signals that an illegal operation attempts to access the data in a bookie.
      */
     public static class BookieIllegalOpException extends BookieException {
         public BookieIllegalOpException() {
@@ -137,7 +138,7 @@ public abstract class BookieException extends Exception {
     }
 
     /**
-     * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+     * Signals that a ledger has been fenced in a bookie. No more entries can be appended to that ledger.
      */
     public static class LedgerFencedException extends BookieException {
         public LedgerFencedException() {
@@ -146,7 +147,9 @@ public abstract class BookieException extends Exception {
     }
 
     /**
-     * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+     * Signal that an invalid cookie is found when starting a bookie.
+     *
+     * <p>This exception is mainly used for detecting if there is any malformed configuration in a bookie.
      */
     public static class InvalidCookieException extends BookieException {
         public InvalidCookieException() {
@@ -163,7 +166,7 @@ public abstract class BookieException extends Exception {
     }
 
     /**
-     * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+     * Signals that an exception occurs on upgrading a bookie.
      */
     public static class UpgradeException extends BookieException {
         public UpgradeException() {
@@ -179,6 +182,9 @@ public abstract class BookieException extends Exception {
         }
     }
     
+    /**
+     * Signals when multiple ledger/journal directories are mounted in same disk partition.
+     */
     public static class DiskPartitionDuplicationException extends BookieException {
         public DiskPartitionDuplicationException() {
             super(Code.DiskPartitionDuplicationException);
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BufferedChannelBase.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BufferedChannelBase.java
index bd8c843..ef4d6f3 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BufferedChannelBase.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BufferedChannelBase.java
@@ -21,7 +21,8 @@ import java.io.IOException;
 import java.nio.channels.FileChannel;
 
 /**
- * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+ * A {@code BufferedChannelBase} adds functionlity to an existing file channel, the ability
+ * to buffer the input and output data. This class is a base class for wrapping the {@link FileChannel}.
  */
 public abstract class BufferedChannelBase {
     protected final FileChannel fileChannel;
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/CheckpointSourceList.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/CheckpointSourceList.java
index 4c61da2..5cce117 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/CheckpointSourceList.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/CheckpointSourceList.java
@@ -26,7 +26,7 @@ import com.google.common.base.Objects;
 import com.google.common.collect.Lists;
 
 /**
- * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+ * A {@code CheckpointSourceList} manages a list of {@link CheckpointSource}s.
  */
 public class CheckpointSourceList implements CheckpointSource {
 
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/EntryKey.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/EntryKey.java
index 4169ede..fb7ddc5 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/EntryKey.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/EntryKey.java
@@ -23,7 +23,9 @@ import java.io.Serializable;
 import java.util.Comparator;
 
 /**
- * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+ * An {@code EntryKey} represents an entry in a ledger, identified by {@code ledgerId} and {@code entryId}.
+ *
+ * <p>This class is mainly used in {@code SortedLedgerStorage} for managing and sorting the entries in the memtable.
  */
 public class EntryKey {
     long ledgerId;
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/EntryLocation.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/EntryLocation.java
index df21959..87005ce 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/EntryLocation.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/EntryLocation.java
@@ -22,7 +22,7 @@
 package org.apache.bookkeeper.bookie;
 
 /**
- * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+ * An {@code EntryLocation} represents the location where an entry is stored.
  */
 public class EntryLocation {
     public final long ledger;
@@ -34,4 +34,4 @@ public class EntryLocation {
         this.entry = entry;
         this.location = location;
     }
-}
\ No newline at end of file
+}
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/IndexPersistenceMgr.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/IndexPersistenceMgr.java
index 859e8d7..6118002 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/IndexPersistenceMgr.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/IndexPersistenceMgr.java
@@ -48,7 +48,7 @@ import static org.apache.bookkeeper.bookie.BookKeeperServerStats.LEDGER_CACHE_NU
 import static org.apache.bookkeeper.bookie.BookKeeperServerStats.NUM_OPEN_LEDGERS;
 
 /**
- * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+ * A {@code IndexPersistenceMgr} is responsible for managing the persistence state for the index in a bookie.
  */
 public class IndexPersistenceMgr {
     private static final Logger LOG = LoggerFactory.getLogger(IndexPersistenceMgr.class);
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/InterleavedLedgerStorage.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/InterleavedLedgerStorage.java
index 151209f..117c687 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/InterleavedLedgerStorage.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/InterleavedLedgerStorage.java
@@ -52,8 +52,9 @@ import static org.apache.bookkeeper.bookie.BookKeeperServerStats.STORAGE_GET_ENT
 import static org.apache.bookkeeper.bookie.BookKeeperServerStats.STORAGE_GET_OFFSET;
 
 /**
- * Interleave ledger storage
- * This ledger storage implementation stores all entries in a single
+ * Interleave ledger storage.
+ *
+ * <p>This ledger storage implementation stores all entries in a single
  * file and maintains an index file for each ledger.
  */
 public class InterleavedLedgerStorage implements CompactableLedgerStorage, EntryLogListener {
@@ -463,7 +464,7 @@ public class InterleavedLedgerStorage implements CompactableLedgerStorage, Entry
         // in ledger storage and ready to be synced to disk.
         // TODO: we could consider remove checkpointSource and checkpointSouce#newCheckpoint
         // later if we provide kind of LSN (Log/Journal Squeuence Number)
-        // mechanism when adding entry.
+        // mechanism when adding entry. {@link https://github.com/apache/bookkeeper/issues/279}
         checkpointHolder.setNextCheckpoint(checkpointSource.newCheckpoint());
     }
 }
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/LastAddConfirmedUpdateNotification.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/LastAddConfirmedUpdateNotification.java
index f52ccf9..a0c112d 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/LastAddConfirmedUpdateNotification.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/LastAddConfirmedUpdateNotification.java
@@ -21,7 +21,9 @@
 package org.apache.bookkeeper.bookie;
 
 /**
- * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+ * A signal object is used for notifying the observers when the {@code LastAddConfirmed} is advanced.
+ *
+ * <p>The signal object contains the latest {@code LastAddConfirmed} and when the {@code LastAddConfirmed} is advanced.
  */
 public class LastAddConfirmedUpdateNotification {
     public long lastAddConfirmed;
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/LedgerStorage.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/LedgerStorage.java
index b142c2b..80aa965 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/LedgerStorage.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/LedgerStorage.java
@@ -31,8 +31,7 @@ import org.apache.bookkeeper.stats.StatsLogger;
 import org.apache.bookkeeper.meta.LedgerManager;
 
 /**
- * Interface for storing ledger data
- * on persistant storage.
+ * Interface for storing ledger data on persistent storage.
  */
 public interface LedgerStorage {
 
@@ -148,7 +147,7 @@ public interface LedgerStorage {
     void deleteLedger(long ledgerId) throws IOException;
 
     /**
-     * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+     * Signals that a ledger is deleted by the garbage collection thread.
      */
     interface LedgerDeletionListener {
         void ledgerDeleted(long ledgerId);
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/LedgerStorageFactory.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/LedgerStorageFactory.java
index 6ff0ed2..6a9d0c4 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/LedgerStorageFactory.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/LedgerStorageFactory.java
@@ -25,7 +25,7 @@ import java.io.IOException;
 import org.apache.bookkeeper.util.ReflectionUtils;
 
 /**
- * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+ * A factory that creates {@link LedgerStorage} by reflection.
  */
 public class LedgerStorageFactory {
     public static LedgerStorage createLedgerStorage(String name) throws IOException {
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/MarkerFileChannel.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/MarkerFileChannel.java
deleted file mode 100644
index 786508e..0000000
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/MarkerFileChannel.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-package org.apache.bookkeeper.bookie;
-
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.nio.MappedByteBuffer;
-import java.nio.channels.FileChannel;
-import java.nio.channels.FileLock;
-import java.nio.channels.ReadableByteChannel;
-import java.nio.channels.WritableByteChannel;
-
-/**
- * This class is just a stub that can be used in collections with FileChannels.
- */
-public class MarkerFileChannel extends FileChannel {
-
-    @Override
-    public void force(boolean metaData) throws IOException {
-        // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public FileLock lock(long position, long size, boolean shared)
-            throws IOException {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    @Override
-    public MappedByteBuffer map(MapMode mode, long position, long size)
-            throws IOException {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    @Override
-    public long position() throws IOException {
-        // TODO Auto-generated method stub
-        return 0;
-    }
-
-    @Override
-    public FileChannel position(long newPosition) throws IOException {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    @Override
-    public int read(ByteBuffer dst) throws IOException {
-        // TODO Auto-generated method stub
-        return 0;
-    }
-
-    @Override
-    public int read(ByteBuffer dst, long position) throws IOException {
-        // TODO Auto-generated method stub
-        return 0;
-    }
-
-    @Override
-    public long read(ByteBuffer[] dsts, int offset, int length)
-            throws IOException {
-        // TODO Auto-generated method stub
-        return 0;
-    }
-
-    @Override
-    public long size() throws IOException {
-        // TODO Auto-generated method stub
-        return 0;
-    }
-
-    @Override
-    public long transferFrom(ReadableByteChannel src, long position, long count)
-            throws IOException {
-        // TODO Auto-generated method stub
-        return 0;
-    }
-
-    @Override
-    public long transferTo(long position, long count, WritableByteChannel target)
-            throws IOException {
-        // TODO Auto-generated method stub
-        return 0;
-    }
-
-    @Override
-    public FileChannel truncate(long size) throws IOException {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    @Override
-    public FileLock tryLock(long position, long size, boolean shared)
-            throws IOException {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    @Override
-    public int write(ByteBuffer src) throws IOException {
-        // TODO Auto-generated method stub
-        return 0;
-    }
-
-    @Override
-    public int write(ByteBuffer src, long position) throws IOException {
-        // TODO Auto-generated method stub
-        return 0;
-    }
-
-    @Override
-    public long write(ByteBuffer[] srcs, int offset, int length)
-            throws IOException {
-        // TODO Auto-generated method stub
-        return 0;
-    }
-
-    @Override
-    protected void implCloseChannel() throws IOException {
-        // TODO Auto-generated method stub
-
-    }
-
-}
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/SortedLedgerStorage.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/SortedLedgerStorage.java
index ff2aa42..7151062 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/SortedLedgerStorage.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/SortedLedgerStorage.java
@@ -39,7 +39,10 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+ * A {@code SortedLedgerStorage} is an extension of {@link InterleavedLedgerStorage}. It
+ * is comprised of two {@code MemTable}s and a {@code InterleavedLedgerStorage}. All the
+ * entries will be first added into a {@code MemTable}, and then be flushed back to the
+ * {@code InterleavedLedgerStorage} when the {@code MemTable} becomes full.
  */
 public class SortedLedgerStorage extends InterleavedLedgerStorage
         implements LedgerStorage, CacheCallback, SkipListFlusher {
@@ -199,7 +202,7 @@ public class SortedLedgerStorage extends InterleavedLedgerStorage
                     }
                 } catch (IOException e) {
                     // TODO: if we failed to flush data, we should switch the bookie back to readonly mode
-                    //       or shutdown it.
+                    //       or shutdown it. {@link https://github.com/apache/bookkeeper/issues/280}
                     LOG.error("Exception thrown while flushing skip list cache.", e);
                 }
             }
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/package-info.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/package-info.java
index a44adb5..c0d08ba 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/package-info.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/package-info.java
@@ -17,6 +17,6 @@
  * under the License.
  */
 /**
- * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+ * Provides a <i>Bookie</i> server that stores entries for clients.
  */
-package org.apache.bookkeeper.bookie;
\ No newline at end of file
+package org.apache.bookkeeper.bookie;
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java
index e77342b..2cd5903 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java
@@ -379,7 +379,7 @@ public class LedgerHandle implements AutoCloseable {
                 List<PendingAddOp> pendingAdds;
 
                 if (isClosed()) {
-                    // TODO: make ledger metadata immutable
+                    // TODO: make ledger metadata immutable {@link https://github.com/apache/bookkeeper/issues/281}
                     // Although the metadata is already closed, we don't need to proceed zookeeper metadata update, but
                     // we still need to error out the pending add ops.
                     //
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/AbstractZkLedgerManager.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/AbstractZkLedgerManager.java
index f3fd9e0..3965eb6 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/AbstractZkLedgerManager.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/AbstractZkLedgerManager.java
@@ -178,16 +178,6 @@ abstract class AbstractZkLedgerManager implements LedgerManager, Watcher {
     public void process(WatchedEvent event) {
         LOG.info("Received watched event {} from zookeeper based ledger manager.", event);
         if (Event.EventType.None == event.getType()) {
-            /** TODO: BOOKKEEPER-537 to handle expire events.
-            if (Event.KeeperState.Expired == event.getState()) {
-                LOG.info("ZooKeeper client expired on ledger manager.");
-                Set<Long> keySet = new HashSet<Long>(listeners.keySet());
-                for (Long lid : keySet) {
-                    scheduler.submit(new ReadLedgerMetadataTask(lid));
-                    LOG.info("Re-read ledger metadata for {} after zookeeper session expired.", lid);
-                }
-            }
-            **/
             return;
         }
         String path = event.getPath();
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/HierarchicalLedgerManager.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/HierarchicalLedgerManager.java
index 8fd3701..fe260fc 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/HierarchicalLedgerManager.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/HierarchicalLedgerManager.java
@@ -80,7 +80,6 @@ class HierarchicalLedgerManager extends AbstractHierarchicalLedgerManager {
 
     @Override
     protected long getLedgerId(String ledgerPath) throws IOException {
-        // TODO Auto-generated method stub
         if (!ledgerPath.startsWith(ledgerRootPath)) {
             throw new IOException("it is not a valid hashed path name : " + ledgerPath);
         }
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/MSLedgerManagerFactory.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/MSLedgerManagerFactory.java
index 90d5e3d..6612683 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/MSLedgerManagerFactory.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/MSLedgerManagerFactory.java
@@ -107,6 +107,7 @@ public class MSLedgerManagerFactory extends LedgerManagerFactory {
             metastore = MetastoreFactory.createMetaStore(msName);
 
             // TODO: should record version in somewhere. e.g. ZooKeeper
+            // {@link https://github.com/apache/bookkeeper/issues/282}
             int msVersion = metastore.getVersion();
             metastore.init(conf, msVersion);
         } catch (Throwable t) {
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/ReadEntryProcessor.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/ReadEntryProcessor.java
index 91ddcbb..9cc7d17 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/ReadEntryProcessor.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/ReadEntryProcessor.java
@@ -70,7 +70,7 @@ class ReadEntryProcessor extends PacketProcessorBase {
                 LOG.debug("##### Read entry ##### {} -- ref-count: {}", data.readableBytes(), data.refCnt());
             }
             if (null != fenceResult) {
-                // TODO:
+                // TODO: {@link https://github.com/apache/bookkeeper/issues/283}
                 // currently we don't have readCallback to run in separated read
                 // threads. after BOOKKEEPER-429 is complete, we could improve
                 // following code to make it not wait here
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/zookeeper/ZooKeeperWatcherBase.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/zookeeper/ZooKeeperWatcherBase.java
index ded7524..7a98668 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/zookeeper/ZooKeeperWatcherBase.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/zookeeper/ZooKeeperWatcherBase.java
@@ -125,6 +125,7 @@ public class ZooKeeperWatcherBase implements Watcher {
             LOG.debug("Received {} from ZooKeeper server", event.getState());
         }
         // TODO: Needs to handle AuthFailed, SaslAuthenticated events
+        //       {@link https://github.com/apache/bookkeeper/issues/284}
         switch (event.getState()) {
         case SyncConnected:
             LOG.info("ZooKeeper client is connected now.");
diff --git a/bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/IndexPersistenceMgrTest.java b/bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/IndexPersistenceMgrTest.java
index 15a13ee..a3cce93 100644
--- a/bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/IndexPersistenceMgrTest.java
+++ b/bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/IndexPersistenceMgrTest.java
@@ -74,7 +74,6 @@ public class IndexPersistenceMgrTest {
 
     @After
     public void tearDown() throws Exception {
-        //TODO: it is being shut down but never started. why?
         ledgerMonitor.shutdown();
         FileUtils.deleteDirectory(journalDir);
         FileUtils.deleteDirectory(ledgerDir);
diff --git a/bookkeeper-stats-providers/codahale-metrics-provider/src/main/java/org/apache/bookkeeper/stats/CodahaleMetricsProvider.java b/bookkeeper-stats-providers/codahale-metrics-provider/src/main/java/org/apache/bookkeeper/stats/CodahaleMetricsProvider.java
index 5ba6236..f1fa824 100644
--- a/bookkeeper-stats-providers/codahale-metrics-provider/src/main/java/org/apache/bookkeeper/stats/CodahaleMetricsProvider.java
+++ b/bookkeeper-stats-providers/codahale-metrics-provider/src/main/java/org/apache/bookkeeper/stats/CodahaleMetricsProvider.java
@@ -44,7 +44,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+ * A {@link StatsProvider} implemented based on <i>Codahale</i> metrics library.
  */
 @SuppressWarnings("deprecation")
 public class CodahaleMetricsProvider implements StatsProvider {
diff --git a/bookkeeper-stats-providers/codahale-metrics-provider/src/main/java/org/apache/bookkeeper/stats/CodahaleStatsLogger.java b/bookkeeper-stats-providers/codahale-metrics-provider/src/main/java/org/apache/bookkeeper/stats/CodahaleStatsLogger.java
index 5149ff2..3be6fdd 100644
--- a/bookkeeper-stats-providers/codahale-metrics-provider/src/main/java/org/apache/bookkeeper/stats/CodahaleStatsLogger.java
+++ b/bookkeeper-stats-providers/codahale-metrics-provider/src/main/java/org/apache/bookkeeper/stats/CodahaleStatsLogger.java
@@ -21,7 +21,7 @@ import com.codahale.metrics.MetricRegistry;
 import static com.codahale.metrics.MetricRegistry.name;
 
 /**
- * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+ * A {@link StatsLogger} implemented based on <i>Codahale</i> metrics library.
  */
 public class CodahaleStatsLogger implements StatsLogger {
     protected final String basename;
diff --git a/bookkeeper-stats-providers/codahale-metrics-provider/src/main/java/org/apache/bookkeeper/stats/package-info.java b/bookkeeper-stats-providers/codahale-metrics-provider/src/main/java/org/apache/bookkeeper/stats/package-info.java
index 4a266c4..7276104 100644
--- a/bookkeeper-stats-providers/codahale-metrics-provider/src/main/java/org/apache/bookkeeper/stats/package-info.java
+++ b/bookkeeper-stats-providers/codahale-metrics-provider/src/main/java/org/apache/bookkeeper/stats/package-info.java
@@ -15,6 +15,6 @@
  * the License.
  */
 /**
- * @TODO: Write JavaDoc Comment {@link https://github.com/apache/bookkepeer/issues/247}
+ * A lightweight stats library implemention based on <i>Codahale</i> metrics library.
  */
-package org.apache.bookkeeper.stats;
\ No newline at end of file
+package org.apache.bookkeeper.stats;
diff --git a/bookkeeper-stats-providers/prometheus-metrics-provider/src/main/java/org/apache/bookkeeper/stats/PrometheusCounter.java b/bookkeeper-stats-providers/prometheus-metrics-provider/src/main/java/org/apache/bookkeeper/stats/PrometheusCounter.java
index 5c73f38..60e19bd 100644
--- a/bookkeeper-stats-providers/prometheus-metrics-provider/src/main/java/org/apache/bookkeeper/stats/PrometheusCounter.java
+++ b/bookkeeper-stats-providers/prometheus-metrics-provider/src/main/java/org/apache/bookkeeper/stats/PrometheusCounter.java
@@ -21,7 +21,7 @@ import io.prometheus.client.CollectorRegistry;
 import io.prometheus.client.Gauge;
 
 /**
- * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+ * A {@link Counter} implementation based on <i>Prometheus</i> metrics library.
  */
 public class PrometheusCounter implements Counter {
 
diff --git a/bookkeeper-stats-providers/prometheus-metrics-provider/src/main/java/org/apache/bookkeeper/stats/PrometheusMetricsProvider.java b/bookkeeper-stats-providers/prometheus-metrics-provider/src/main/java/org/apache/bookkeeper/stats/PrometheusMetricsProvider.java
index a595ed5..b745d26 100644
--- a/bookkeeper-stats-providers/prometheus-metrics-provider/src/main/java/org/apache/bookkeeper/stats/PrometheusMetricsProvider.java
+++ b/bookkeeper-stats-providers/prometheus-metrics-provider/src/main/java/org/apache/bookkeeper/stats/PrometheusMetricsProvider.java
@@ -33,7 +33,7 @@ import io.prometheus.client.hotspot.StandardExports;
 import io.prometheus.client.hotspot.ThreadExports;
 
 /**
- * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+ * A <i>Prometheus</i> based {@link StatsProvider} implementation.
  */
 public class PrometheusMetricsProvider implements StatsProvider {
 
diff --git a/bookkeeper-stats-providers/prometheus-metrics-provider/src/main/java/org/apache/bookkeeper/stats/PrometheusOpStatsLogger.java b/bookkeeper-stats-providers/prometheus-metrics-provider/src/main/java/org/apache/bookkeeper/stats/PrometheusOpStatsLogger.java
index f9a9457..b30fd99 100644
--- a/bookkeeper-stats-providers/prometheus-metrics-provider/src/main/java/org/apache/bookkeeper/stats/PrometheusOpStatsLogger.java
+++ b/bookkeeper-stats-providers/prometheus-metrics-provider/src/main/java/org/apache/bookkeeper/stats/PrometheusOpStatsLogger.java
@@ -22,7 +22,7 @@ import io.prometheus.client.CollectorRegistry;
 import io.prometheus.client.Summary;
 
 /**
- * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+ * A {@code Prometheus} based {@link OpStatsLogger} implementation.
  */
 public class PrometheusOpStatsLogger implements OpStatsLogger {
 
diff --git a/bookkeeper-stats-providers/prometheus-metrics-provider/src/main/java/org/apache/bookkeeper/stats/PrometheusStatsLogger.java b/bookkeeper-stats-providers/prometheus-metrics-provider/src/main/java/org/apache/bookkeeper/stats/PrometheusStatsLogger.java
index ccf1d6b..b25960c 100644
--- a/bookkeeper-stats-providers/prometheus-metrics-provider/src/main/java/org/apache/bookkeeper/stats/PrometheusStatsLogger.java
+++ b/bookkeeper-stats-providers/prometheus-metrics-provider/src/main/java/org/apache/bookkeeper/stats/PrometheusStatsLogger.java
@@ -22,7 +22,7 @@ import io.prometheus.client.Collector;
 import io.prometheus.client.CollectorRegistry;
 
 /**
- * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+ * A {@code Prometheus} based {@link StatsLogger} implementation.
  */
 public class PrometheusStatsLogger implements StatsLogger {
 
diff --git a/bookkeeper-stats-providers/prometheus-metrics-provider/src/main/java/org/apache/bookkeeper/stats/package-info.java b/bookkeeper-stats-providers/prometheus-metrics-provider/src/main/java/org/apache/bookkeeper/stats/package-info.java
index d77aeda..a264d8f 100644
--- a/bookkeeper-stats-providers/prometheus-metrics-provider/src/main/java/org/apache/bookkeeper/stats/package-info.java
+++ b/bookkeeper-stats-providers/prometheus-metrics-provider/src/main/java/org/apache/bookkeeper/stats/package-info.java
@@ -15,6 +15,6 @@
  * the License.
  */
 /**
- * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+ * A stats provider implementation based on {@link Prometheus}.
  */
-package org.apache.bookkeeper.stats;
\ No newline at end of file
+package org.apache.bookkeeper.stats;
diff --git a/bookkeeper-stats-providers/twitter-finagle-provider/src/main/java/org/apache/bookkeeper/stats/twitter/finagle/FinagleStatsLoggerImpl.java b/bookkeeper-stats-providers/twitter-finagle-provider/src/main/java/org/apache/bookkeeper/stats/twitter/finagle/FinagleStatsLoggerImpl.java
index a6fda06..46448a6 100644
--- a/bookkeeper-stats-providers/twitter-finagle-provider/src/main/java/org/apache/bookkeeper/stats/twitter/finagle/FinagleStatsLoggerImpl.java
+++ b/bookkeeper-stats-providers/twitter-finagle-provider/src/main/java/org/apache/bookkeeper/stats/twitter/finagle/FinagleStatsLoggerImpl.java
@@ -30,7 +30,7 @@ import java.util.HashMap;
 import java.util.Map;
 
 /**
- * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+ * A <i>Finagle Stats</i> library based {@link StatsLogger} implementation.
  */
 public class FinagleStatsLoggerImpl implements StatsLogger {
     private final StatsReceiver stats;
diff --git a/bookkeeper-stats-providers/twitter-finagle-provider/src/main/java/org/apache/bookkeeper/stats/twitter/finagle/package-info.java b/bookkeeper-stats-providers/twitter-finagle-provider/src/main/java/org/apache/bookkeeper/stats/twitter/finagle/package-info.java
index 65629d7..a839cd3 100644
--- a/bookkeeper-stats-providers/twitter-finagle-provider/src/main/java/org/apache/bookkeeper/stats/twitter/finagle/package-info.java
+++ b/bookkeeper-stats-providers/twitter-finagle-provider/src/main/java/org/apache/bookkeeper/stats/twitter/finagle/package-info.java
@@ -16,6 +16,6 @@
  * limitations under the License.
  */
 /**
- * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+ * A stats provider implemented based on <i>finagle stats</i> library.
  */
-package org.apache.bookkeeper.stats.twitter.finagle;
\ No newline at end of file
+package org.apache.bookkeeper.stats.twitter.finagle;
diff --git a/bookkeeper-stats-providers/twitter-ostrich-provider/src/main/java/org/apache/bookkeeper/stats/twitter/ostrich/OstrichProvider.java b/bookkeeper-stats-providers/twitter-ostrich-provider/src/main/java/org/apache/bookkeeper/stats/twitter/ostrich/OstrichProvider.java
index 662dfb0..e36d573 100644
--- a/bookkeeper-stats-providers/twitter-ostrich-provider/src/main/java/org/apache/bookkeeper/stats/twitter/ostrich/OstrichProvider.java
+++ b/bookkeeper-stats-providers/twitter-ostrich-provider/src/main/java/org/apache/bookkeeper/stats/twitter/ostrich/OstrichProvider.java
@@ -36,7 +36,7 @@ import scala.util.matching.Regex;
 import java.util.concurrent.TimeUnit;
 
 /**
- * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+ * A <i>Twitter Ostrich</i> library based {@link StatsProvider} implementation.
  */
 public class OstrichProvider implements StatsProvider {
 
diff --git a/bookkeeper-stats-providers/twitter-ostrich-provider/src/main/java/org/apache/bookkeeper/stats/twitter/ostrich/package-info.java b/bookkeeper-stats-providers/twitter-ostrich-provider/src/main/java/org/apache/bookkeeper/stats/twitter/ostrich/package-info.java
index 4dfac05..2db2584 100644
--- a/bookkeeper-stats-providers/twitter-ostrich-provider/src/main/java/org/apache/bookkeeper/stats/twitter/ostrich/package-info.java
+++ b/bookkeeper-stats-providers/twitter-ostrich-provider/src/main/java/org/apache/bookkeeper/stats/twitter/ostrich/package-info.java
@@ -15,6 +15,6 @@
  * the License.
  */
 /**
- * @TODO: Write JavaDOc comment {@link https://github.com/apache/bookkepeer/issues/247}
+ * A stats provider implemented based on <i>Twitter Ostrich</i> library.
  */
-package org.apache.bookkeeper.stats.twitter.ostrich;
\ No newline at end of file
+package org.apache.bookkeeper.stats.twitter.ostrich;
diff --git a/bookkeeper-stats-providers/twitter-science-provider/src/main/java/org/apache/bookkeeper/stats/twitter/science/HTTPStatsExporter.java b/bookkeeper-stats-providers/twitter-science-provider/src/main/java/org/apache/bookkeeper/stats/twitter/science/HTTPStatsExporter.java
index 56791c0..34e0eea 100644
--- a/bookkeeper-stats-providers/twitter-science-provider/src/main/java/org/apache/bookkeeper/stats/twitter/science/HTTPStatsExporter.java
+++ b/bookkeeper-stats-providers/twitter-science-provider/src/main/java/org/apache/bookkeeper/stats/twitter/science/HTTPStatsExporter.java
@@ -49,7 +49,6 @@ public class HTTPStatsExporter {
 
     public void start() throws Exception {
         // Start the sampler. Sample every 1 second and retain for 1 hour
-        // TODO: Make this configurable if needed.
         TimeSeriesRepository sampler = new TimeSeriesRepositoryImpl(Stats.STAT_REGISTRY,
                 Amount.of(1L, Time.SECONDS), Amount.of(1L, Time.HOURS));
         sampler.start(this.shutDownRegistry);
diff --git a/bookkeeper-stats-providers/twitter-science-provider/src/main/java/org/apache/bookkeeper/stats/twitter/science/OpStatsLoggerImpl.java b/bookkeeper-stats-providers/twitter-science-provider/src/main/java/org/apache/bookkeeper/stats/twitter/science/OpStatsLoggerImpl.java
index 24c8429..00928ad 100644
--- a/bookkeeper-stats-providers/twitter-science-provider/src/main/java/org/apache/bookkeeper/stats/twitter/science/OpStatsLoggerImpl.java
+++ b/bookkeeper-stats-providers/twitter-science-provider/src/main/java/org/apache/bookkeeper/stats/twitter/science/OpStatsLoggerImpl.java
@@ -54,7 +54,6 @@ public class OpStatsLoggerImpl implements OpStatsLogger {
     }
 
     public synchronized void clear() {
-        //TODO: Figure out how to clear RequestStats. Till then this is a no-op
     }
 
     /**
diff --git a/bookkeeper-stats-providers/twitter-science-provider/src/main/java/org/apache/bookkeeper/stats/twitter/science/TwitterStatsProvider.java b/bookkeeper-stats-providers/twitter-science-provider/src/main/java/org/apache/bookkeeper/stats/twitter/science/TwitterStatsProvider.java
index 197d06f..75c2842 100644
--- a/bookkeeper-stats-providers/twitter-science-provider/src/main/java/org/apache/bookkeeper/stats/twitter/science/TwitterStatsProvider.java
+++ b/bookkeeper-stats-providers/twitter-science-provider/src/main/java/org/apache/bookkeeper/stats/twitter/science/TwitterStatsProvider.java
@@ -24,7 +24,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+ * A stats provider implemented based on <i>Twitter Stats</i> library.
  */
 public class TwitterStatsProvider implements StatsProvider {
 
diff --git a/bookkeeper-stats-providers/twitter-science-provider/src/main/java/org/apache/bookkeeper/stats/twitter/science/package-info.java b/bookkeeper-stats-providers/twitter-science-provider/src/main/java/org/apache/bookkeeper/stats/twitter/science/package-info.java
index 1901816..bc358f4 100644
--- a/bookkeeper-stats-providers/twitter-science-provider/src/main/java/org/apache/bookkeeper/stats/twitter/science/package-info.java
+++ b/bookkeeper-stats-providers/twitter-science-provider/src/main/java/org/apache/bookkeeper/stats/twitter/science/package-info.java
@@ -15,6 +15,6 @@
  * the License.
  */
 /**
- * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+ * A stats provider implementation based on <i>Twitter Science Stats</i> library.
  */
-package org.apache.bookkeeper.stats.twitter.science;
\ No newline at end of file
+package org.apache.bookkeeper.stats.twitter.science;
diff --git a/bookkeeper-stats/src/main/java/org/apache/bookkeeper/stats/CachingStatsLogger.java b/bookkeeper-stats/src/main/java/org/apache/bookkeeper/stats/CachingStatsLogger.java
index b39d3a9..69b6d17 100644
--- a/bookkeeper-stats/src/main/java/org/apache/bookkeeper/stats/CachingStatsLogger.java
+++ b/bookkeeper-stats/src/main/java/org/apache/bookkeeper/stats/CachingStatsLogger.java
@@ -20,7 +20,7 @@ import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 
 /**
- * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+ * A {@code StatsLogger} that caches the stats objects created by other {@code StatsLogger}.
  */
 public class CachingStatsLogger implements StatsLogger {
 
diff --git a/bookkeeper-stats/src/main/java/org/apache/bookkeeper/stats/CachingStatsProvider.java b/bookkeeper-stats/src/main/java/org/apache/bookkeeper/stats/CachingStatsProvider.java
index 715fd53..5e34bf1 100644
--- a/bookkeeper-stats/src/main/java/org/apache/bookkeeper/stats/CachingStatsProvider.java
+++ b/bookkeeper-stats/src/main/java/org/apache/bookkeeper/stats/CachingStatsProvider.java
@@ -22,7 +22,10 @@ import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 
 /**
- * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+ * A {@code CachingStatsProvider} adds the caching functionality to an existing {@code StatsProvider}.
+ *
+ * <p>The stats provider will cache the stats objects created by the other {@code StatsProvider} to allow
+ * the reusability of stats objects and avoid creating a lot of stats objects.
  */
 public class CachingStatsProvider implements StatsProvider {
 
diff --git a/bookkeeper-stats/src/main/java/org/apache/bookkeeper/stats/NullStatsLogger.java b/bookkeeper-stats/src/main/java/org/apache/bookkeeper/stats/NullStatsLogger.java
index bf68788..2d242c5 100644
--- a/bookkeeper-stats/src/main/java/org/apache/bookkeeper/stats/NullStatsLogger.java
+++ b/bookkeeper-stats/src/main/java/org/apache/bookkeeper/stats/NullStatsLogger.java
@@ -19,12 +19,18 @@ package org.apache.bookkeeper.stats;
 import java.util.concurrent.TimeUnit;
 
 /**
- * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+ * A <i>no-op</i> {@code StatsLogger}.
+ *
+ * <p>Metrics are not recorded, making this receiver useful in unit tests and as defaults in
+ * situations where metrics are not strictly required.
  */
 public class NullStatsLogger implements StatsLogger {
 
     public static final NullStatsLogger INSTANCE = new NullStatsLogger();
 
+    /**
+     * A <i>no-op</i> {@code OpStatsLogger}.
+     */
     static class NullOpStatsLogger implements OpStatsLogger {
         final OpStatsData nullOpStats = new OpStatsData(0, 0, 0, new long[6]);
 
@@ -60,6 +66,9 @@ public class NullStatsLogger implements StatsLogger {
     }
     static NullOpStatsLogger nullOpStatsLogger = new NullOpStatsLogger();
 
+    /**
+     * A <i>no-op</i> {@code Counter}.
+     */
     static class NullCounter implements Counter {
         @Override
         public void clear() {
diff --git a/bookkeeper-stats/src/main/java/org/apache/bookkeeper/stats/NullStatsProvider.java b/bookkeeper-stats/src/main/java/org/apache/bookkeeper/stats/NullStatsProvider.java
index 4d9e228..21703f7 100644
--- a/bookkeeper-stats/src/main/java/org/apache/bookkeeper/stats/NullStatsProvider.java
+++ b/bookkeeper-stats/src/main/java/org/apache/bookkeeper/stats/NullStatsProvider.java
@@ -19,7 +19,7 @@ package org.apache.bookkeeper.stats;
 import org.apache.commons.configuration.Configuration;
 
 /**
- * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+ * A <i>no-op</i> stats provider implementation.
  */
 public class NullStatsProvider implements StatsProvider {
 
diff --git a/bookkeeper-stats/src/main/java/org/apache/bookkeeper/stats/Stats.java b/bookkeeper-stats/src/main/java/org/apache/bookkeeper/stats/Stats.java
index 2c970c0..033e420 100644
--- a/bookkeeper-stats/src/main/java/org/apache/bookkeeper/stats/Stats.java
+++ b/bookkeeper-stats/src/main/java/org/apache/bookkeeper/stats/Stats.java
@@ -28,7 +28,7 @@ import java.lang.reflect.Constructor;
 import java.lang.reflect.InvocationTargetException;
 
 /**
- * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+ * An umbrella class for loading stats provider.
  */
 public class Stats {
     static final Logger LOG = LoggerFactory.getLogger(Stats.class);
diff --git a/bookkeeper-stats/src/main/java/org/apache/bookkeeper/stats/package-info.java b/bookkeeper-stats/src/main/java/org/apache/bookkeeper/stats/package-info.java
index d77aeda..4e335d4 100644
--- a/bookkeeper-stats/src/main/java/org/apache/bookkeeper/stats/package-info.java
+++ b/bookkeeper-stats/src/main/java/org/apache/bookkeeper/stats/package-info.java
@@ -15,6 +15,6 @@
  * the License.
  */
 /**
- * @TODO: Write JavaDoc comment {@link https://github.com/apache/bookkepeer/issues/247}
+ * A lightweight stats library used for exporting bookkeeper stats.
  */
-package org.apache.bookkeeper.stats;
\ No newline at end of file
+package org.apache.bookkeeper.stats;

-- 
To stop receiving notification emails like this one, please contact
['"commits@bookkeeper.apache.org" <commits@bookkeeper.apache.org>'].

Mime
View raw message