bookkeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From si...@apache.org
Subject [1/2] bookkeeper git commit: BOOKKEEPER-687: Use static final Logger for hedwig related modules (Ankur Garg via sijie)
Date Thu, 16 Jul 2015 06:28:58 GMT
Repository: bookkeeper
Updated Branches:
  refs/heads/master a80bba272 -> 8c1b9ebc2


http://git-wip-us.apache.org/repos/asf/bookkeeper/blob/8c1b9ebc/hedwig-server/src/test/java/org/apache/hedwig/server/delivery/TestFIFODeliveryManager.java
----------------------------------------------------------------------
diff --git a/hedwig-server/src/test/java/org/apache/hedwig/server/delivery/TestFIFODeliveryManager.java
b/hedwig-server/src/test/java/org/apache/hedwig/server/delivery/TestFIFODeliveryManager.java
index 8388dea..ebc26f1 100644
--- a/hedwig-server/src/test/java/org/apache/hedwig/server/delivery/TestFIFODeliveryManager.java
+++ b/hedwig-server/src/test/java/org/apache/hedwig/server/delivery/TestFIFODeliveryManager.java
@@ -50,7 +50,7 @@ import org.slf4j.LoggerFactory;
 import com.google.protobuf.ByteString;
 
 public class TestFIFODeliveryManager {
-    static Logger logger = LoggerFactory.getLogger(TestFIFODeliveryManager.class);
+    private static final Logger logger = LoggerFactory.getLogger(TestFIFODeliveryManager.class);
 
     static class TestCallback implements Callback<MessageSeqId> {
         AtomicBoolean success = new AtomicBoolean(false);

http://git-wip-us.apache.org/repos/asf/bookkeeper/blob/8c1b9ebc/hedwig-server/src/test/java/org/apache/hedwig/server/meta/MetadataManagerFactoryTestCase.java
----------------------------------------------------------------------
diff --git a/hedwig-server/src/test/java/org/apache/hedwig/server/meta/MetadataManagerFactoryTestCase.java
b/hedwig-server/src/test/java/org/apache/hedwig/server/meta/MetadataManagerFactoryTestCase.java
index fb543ef..644500d 100644
--- a/hedwig-server/src/test/java/org/apache/hedwig/server/meta/MetadataManagerFactoryTestCase.java
+++ b/hedwig-server/src/test/java/org/apache/hedwig/server/meta/MetadataManagerFactoryTestCase.java
@@ -27,7 +27,6 @@ import org.apache.bookkeeper.metastore.InMemoryMetaStore;
 import org.apache.hedwig.server.common.ServerConfiguration;
 import org.apache.hedwig.server.meta.MetadataManagerFactory;
 import org.apache.hedwig.server.meta.ZkMetadataManagerFactory;
-import org.apache.hedwig.util.Callback;
 import org.apache.hedwig.zookeeper.ZooKeeperTestBase;
 
 import org.junit.After;
@@ -41,7 +40,7 @@ import org.slf4j.LoggerFactory;
 
 @RunWith(Parameterized.class)
 public abstract class MetadataManagerFactoryTestCase extends ZooKeeperTestBase {
-    static Logger LOG = LoggerFactory.getLogger(MetadataManagerFactoryTestCase.class);
+    private static final Logger LOG = LoggerFactory.getLogger(MetadataManagerFactoryTestCase.class);
 
     protected MetadataManagerFactory metadataManagerFactory;
     protected ServerConfiguration conf;

http://git-wip-us.apache.org/repos/asf/bookkeeper/blob/8c1b9ebc/hedwig-server/src/test/java/org/apache/hedwig/server/meta/TestFactoryLayout.java
----------------------------------------------------------------------
diff --git a/hedwig-server/src/test/java/org/apache/hedwig/server/meta/TestFactoryLayout.java
b/hedwig-server/src/test/java/org/apache/hedwig/server/meta/TestFactoryLayout.java
index b11500f..7e15135 100644
--- a/hedwig-server/src/test/java/org/apache/hedwig/server/meta/TestFactoryLayout.java
+++ b/hedwig-server/src/test/java/org/apache/hedwig/server/meta/TestFactoryLayout.java
@@ -27,7 +27,6 @@ import org.apache.hedwig.protocol.PubSubProtocol.ManagerMeta;
 import org.apache.hedwig.server.common.ServerConfiguration;
 import org.apache.hedwig.zookeeper.ZooKeeperTestBase;
 import org.apache.hedwig.zookeeper.ZkUtils;
-import org.apache.zookeeper.ZooKeeper;
 import org.apache.zookeeper.CreateMode;
 import org.apache.zookeeper.ZooDefs.Ids;
 

http://git-wip-us.apache.org/repos/asf/bookkeeper/blob/8c1b9ebc/hedwig-server/src/test/java/org/apache/hedwig/server/meta/TestMetadataManagerFactory.java
----------------------------------------------------------------------
diff --git a/hedwig-server/src/test/java/org/apache/hedwig/server/meta/TestMetadataManagerFactory.java
b/hedwig-server/src/test/java/org/apache/hedwig/server/meta/TestMetadataManagerFactory.java
index f816729..8b9016a 100644
--- a/hedwig-server/src/test/java/org/apache/hedwig/server/meta/TestMetadataManagerFactory.java
+++ b/hedwig-server/src/test/java/org/apache/hedwig/server/meta/TestMetadataManagerFactory.java
@@ -23,23 +23,16 @@ package org.apache.hedwig.server.meta;
 import org.apache.zookeeper.WatchedEvent;
 import org.apache.zookeeper.Watcher;
 import org.apache.zookeeper.ZooKeeper;
-import org.apache.zookeeper.CreateMode;
-import org.apache.zookeeper.ZooDefs.Ids;
 import java.io.IOException;
 import java.util.concurrent.CyclicBarrier;
 import java.util.concurrent.CountDownLatch;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
-import java.util.Map;
-
 import com.google.protobuf.ByteString;
-
 import org.apache.hedwig.protocol.PubSubProtocol.ManagerMeta;
 import org.apache.hedwig.server.common.ServerConfiguration;
 import org.apache.hedwig.zookeeper.ZooKeeperTestBase;
-import org.junit.After;
-import org.junit.Before;
 import org.junit.Test;
 import org.junit.Assert;
 
@@ -47,7 +40,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class TestMetadataManagerFactory extends ZooKeeperTestBase {
-    static Logger LOG = LoggerFactory.getLogger(TestMetadataManagerFactory.class);
+    private static final Logger LOG = LoggerFactory.getLogger(TestMetadataManagerFactory.class);
 
     static class TestServerConfiguration extends ServerConfiguration {
         String hedwigPrefix = "/hedwig";

http://git-wip-us.apache.org/repos/asf/bookkeeper/blob/8c1b9ebc/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/BookKeeperTestBase.java
----------------------------------------------------------------------
diff --git a/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/BookKeeperTestBase.java
b/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/BookKeeperTestBase.java
index a932ffd..b71d037 100644
--- a/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/BookKeeperTestBase.java
+++ b/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/BookKeeperTestBase.java
@@ -54,7 +54,7 @@ import org.slf4j.LoggerFactory;
  *
  */
 public class BookKeeperTestBase extends ZooKeeperTestBase {
-    private static Logger LOG = LoggerFactory.getLogger(BookKeeperTestBase.class);
+    private static final Logger LOG = LoggerFactory.getLogger(BookKeeperTestBase.class);
 
     class TestBookie extends Bookie {
         final long readDelay;

http://git-wip-us.apache.org/repos/asf/bookkeeper/blob/8c1b9ebc/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/MessageBoundedPersistenceTest.java
----------------------------------------------------------------------
diff --git a/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/MessageBoundedPersistenceTest.java
b/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/MessageBoundedPersistenceTest.java
index 8d78fc5..08f287c 100644
--- a/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/MessageBoundedPersistenceTest.java
+++ b/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/MessageBoundedPersistenceTest.java
@@ -47,7 +47,7 @@ import org.apache.hedwig.server.HedwigHubTestBase;
 import org.apache.hedwig.server.common.ServerConfiguration;
 
 public class MessageBoundedPersistenceTest extends HedwigHubTestBase {
-    protected static Logger logger = LoggerFactory.getLogger(MessageBoundedPersistenceTest.class);
+    protected static final Logger logger = LoggerFactory.getLogger(MessageBoundedPersistenceTest.class);
 
     protected class SmallReadAheadServerConfiguration
         extends HedwigHubTestBase.HubServerConfiguration {

http://git-wip-us.apache.org/repos/asf/bookkeeper/blob/8c1b9ebc/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/TestBookKeeperPersistenceManager.java
----------------------------------------------------------------------
diff --git a/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/TestBookKeeperPersistenceManager.java
b/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/TestBookKeeperPersistenceManager.java
index 0459359..d65750b 100644
--- a/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/TestBookKeeperPersistenceManager.java
+++ b/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/TestBookKeeperPersistenceManager.java
@@ -72,7 +72,7 @@ import static org.junit.Assert.*;
 
 @RunWith(Parameterized.class)
 public class TestBookKeeperPersistenceManager {
-    static Logger logger = LoggerFactory.getLogger(TestPersistenceManagerBlackBox.class);
+    private static final Logger logger = LoggerFactory.getLogger(TestPersistenceManagerBlackBox.class);
 
     BookKeeperTestBase bktb;
     private final int numBookies = 3;

http://git-wip-us.apache.org/repos/asf/bookkeeper/blob/8c1b9ebc/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/TestBookKeeperPersistenceManagerBlackBox.java
----------------------------------------------------------------------
diff --git a/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/TestBookKeeperPersistenceManagerBlackBox.java
b/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/TestBookKeeperPersistenceManagerBlackBox.java
index f7bcac8..1f30b5b 100644
--- a/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/TestBookKeeperPersistenceManagerBlackBox.java
+++ b/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/TestBookKeeperPersistenceManagerBlackBox.java
@@ -19,10 +19,6 @@ package org.apache.hedwig.server.persistence;
 
 import java.util.concurrent.Executors;
 import java.util.concurrent.ScheduledExecutorService;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
 import org.junit.After;
 import org.junit.Before;
 

http://git-wip-us.apache.org/repos/asf/bookkeeper/blob/8c1b9ebc/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/TestBookkeeperPersistenceManagerWhiteBox.java
----------------------------------------------------------------------
diff --git a/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/TestBookkeeperPersistenceManagerWhiteBox.java
b/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/TestBookkeeperPersistenceManagerWhiteBox.java
index f9dde4f..da2b06c 100644
--- a/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/TestBookkeeperPersistenceManagerWhiteBox.java
+++ b/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/TestBookkeeperPersistenceManagerWhiteBox.java
@@ -48,7 +48,7 @@ import static org.junit.Assert.*;
 
 public class TestBookkeeperPersistenceManagerWhiteBox {
 
-    protected static Logger logger =
+    protected static final Logger logger =
         LoggerFactory.getLogger(TestBookkeeperPersistenceManagerWhiteBox.class);
 
     BookKeeperTestBase bktb;

http://git-wip-us.apache.org/repos/asf/bookkeeper/blob/8c1b9ebc/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/TestDeadlock.java
----------------------------------------------------------------------
diff --git a/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/TestDeadlock.java
b/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/TestDeadlock.java
index 6e81fc7..90c1817 100644
--- a/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/TestDeadlock.java
+++ b/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/TestDeadlock.java
@@ -44,7 +44,7 @@ import org.apache.hedwig.util.ConcurrencyUtils;
 
 public class TestDeadlock extends HedwigHubTestBase {
 
-    protected static Logger logger = LoggerFactory.getLogger(TestDeadlock.class);
+    protected static final Logger logger = LoggerFactory.getLogger(TestDeadlock.class);
 
     // Client side variables
     protected HedwigClient client;

http://git-wip-us.apache.org/repos/asf/bookkeeper/blob/8c1b9ebc/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/TestLocalDBPersistenceManagerBlackBox.java
----------------------------------------------------------------------
diff --git a/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/TestLocalDBPersistenceManagerBlackBox.java
b/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/TestLocalDBPersistenceManagerBlackBox.java
index 6a87259..856eab4 100644
--- a/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/TestLocalDBPersistenceManagerBlackBox.java
+++ b/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/TestLocalDBPersistenceManagerBlackBox.java
@@ -17,9 +17,6 @@
  */
 package org.apache.hedwig.server.persistence;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
 import org.junit.After;
 import org.junit.Before;
 

http://git-wip-us.apache.org/repos/asf/bookkeeper/blob/8c1b9ebc/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/TestPersistenceManagerBlackBox.java
----------------------------------------------------------------------
diff --git a/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/TestPersistenceManagerBlackBox.java
b/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/TestPersistenceManagerBlackBox.java
index 0133d10..52a5874 100644
--- a/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/TestPersistenceManagerBlackBox.java
+++ b/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/TestPersistenceManagerBlackBox.java
@@ -41,7 +41,7 @@ public abstract class TestPersistenceManagerBlackBox {
     protected PersistenceManager persistenceManager;
     protected int NUM_MESSAGES_TO_TEST = 5;
     protected int NUM_TOPICS_TO_TEST = 5;
-    static Logger logger = LoggerFactory.getLogger(TestPersistenceManagerBlackBox.class);
+    private static final Logger logger = LoggerFactory.getLogger(TestPersistenceManagerBlackBox.class);
     TestCallback testCallback = new TestCallback();
 
     RuntimeException failureException;

http://git-wip-us.apache.org/repos/asf/bookkeeper/blob/8c1b9ebc/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/TestReadAheadCacheWhiteBox.java
----------------------------------------------------------------------
diff --git a/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/TestReadAheadCacheWhiteBox.java
b/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/TestReadAheadCacheWhiteBox.java
index 2179030..ae08005 100644
--- a/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/TestReadAheadCacheWhiteBox.java
+++ b/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/TestReadAheadCacheWhiteBox.java
@@ -22,7 +22,6 @@ import static org.junit.Assert.*;
 import java.util.List;
 
 import org.apache.hedwig.protocol.PubSubProtocol;
-import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 

http://git-wip-us.apache.org/repos/asf/bookkeeper/blob/8c1b9ebc/hedwig-server/src/test/java/org/apache/hedwig/server/subscriptions/TestUpdateSubscriptionState.java
----------------------------------------------------------------------
diff --git a/hedwig-server/src/test/java/org/apache/hedwig/server/subscriptions/TestUpdateSubscriptionState.java
b/hedwig-server/src/test/java/org/apache/hedwig/server/subscriptions/TestUpdateSubscriptionState.java
index f185bb4..d5569de 100644
--- a/hedwig-server/src/test/java/org/apache/hedwig/server/subscriptions/TestUpdateSubscriptionState.java
+++ b/hedwig-server/src/test/java/org/apache/hedwig/server/subscriptions/TestUpdateSubscriptionState.java
@@ -36,8 +36,6 @@ import org.junit.Test;
 
 import com.google.protobuf.ByteString;
 
-import static org.junit.Assert.*;
-
 public class TestUpdateSubscriptionState extends HedwigHubTestBase {
 
     private static final int RETENTION_SECS_VALUE = 100;

http://git-wip-us.apache.org/repos/asf/bookkeeper/blob/8c1b9ebc/hedwig-server/src/test/java/org/apache/hedwig/server/topics/TestConcurrentTopicAcquisition.java
----------------------------------------------------------------------
diff --git a/hedwig-server/src/test/java/org/apache/hedwig/server/topics/TestConcurrentTopicAcquisition.java
b/hedwig-server/src/test/java/org/apache/hedwig/server/topics/TestConcurrentTopicAcquisition.java
index 0d508ca..04fb451 100644
--- a/hedwig-server/src/test/java/org/apache/hedwig/server/topics/TestConcurrentTopicAcquisition.java
+++ b/hedwig-server/src/test/java/org/apache/hedwig/server/topics/TestConcurrentTopicAcquisition.java
@@ -21,8 +21,6 @@ import java.util.concurrent.LinkedBlockingQueue;
 import java.util.concurrent.SynchronousQueue;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicInteger;
-
-import org.apache.hedwig.client.conf.ClientConfiguration;
 import org.apache.hedwig.client.HedwigClient;
 import org.apache.hedwig.client.api.Publisher;
 import org.apache.hedwig.client.api.Subscriber;

http://git-wip-us.apache.org/repos/asf/bookkeeper/blob/8c1b9ebc/hedwig-server/src/test/java/org/apache/hedwig/server/topics/TestMMTopicManager.java
----------------------------------------------------------------------
diff --git a/hedwig-server/src/test/java/org/apache/hedwig/server/topics/TestMMTopicManager.java
b/hedwig-server/src/test/java/org/apache/hedwig/server/topics/TestMMTopicManager.java
index 4c54d39..c75ff05 100644
--- a/hedwig-server/src/test/java/org/apache/hedwig/server/topics/TestMMTopicManager.java
+++ b/hedwig-server/src/test/java/org/apache/hedwig/server/topics/TestMMTopicManager.java
@@ -21,7 +21,6 @@ import java.util.concurrent.Executors;
 import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.SynchronousQueue;
 
-import org.apache.zookeeper.KeeperException;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
@@ -34,20 +33,18 @@ import org.apache.hedwig.exceptions.PubSubException.CompositeException;
 import org.apache.hedwig.server.common.ServerConfiguration;
 import org.apache.hedwig.server.meta.MetadataManagerFactoryTestCase;
 import org.apache.hedwig.server.meta.TopicOwnershipManager;
-import org.apache.bookkeeper.versioning.Version;
 import org.apache.bookkeeper.versioning.Versioned;
 import org.apache.hedwig.util.Callback;
 import org.apache.hedwig.util.ConcurrencyUtils;
 import org.apache.hedwig.util.Either;
 import org.apache.hedwig.util.HedwigSocketAddress;
 import org.apache.hedwig.util.Pair;
-import org.apache.hedwig.zookeeper.ZooKeeperTestBase;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class TestMMTopicManager extends MetadataManagerFactoryTestCase {
 
-    static Logger LOG = LoggerFactory.getLogger(TestMMTopicManager.class);
+    private static final Logger LOG = LoggerFactory.getLogger(TestMMTopicManager.class);
 
     protected MMTopicManager tm;
     protected TopicOwnershipManager tom;

http://git-wip-us.apache.org/repos/asf/bookkeeper/blob/8c1b9ebc/hedwig-server/src/test/java/org/apache/hedwig/server/topics/TestZkTopicManager.java
----------------------------------------------------------------------
diff --git a/hedwig-server/src/test/java/org/apache/hedwig/server/topics/TestZkTopicManager.java
b/hedwig-server/src/test/java/org/apache/hedwig/server/topics/TestZkTopicManager.java
index 2f016f5..90e77b2 100644
--- a/hedwig-server/src/test/java/org/apache/hedwig/server/topics/TestZkTopicManager.java
+++ b/hedwig-server/src/test/java/org/apache/hedwig/server/topics/TestZkTopicManager.java
@@ -42,7 +42,7 @@ import org.slf4j.LoggerFactory;
 
 public class TestZkTopicManager extends ZooKeeperTestBase {
 
-    static Logger LOG = LoggerFactory.getLogger(TestZkTopicManager.class);
+    private static final Logger LOG = LoggerFactory.getLogger(TestZkTopicManager.class);
 
     protected ZkTopicManager tm;
 


Mime
View raw message