kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject kafka git commit: MINOR: Remove unused method, redundant in interface definition and add final for object used in sychronization
Date Mon, 14 Mar 2016 22:09:53 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk c1a56c683 -> cf40acc2b


MINOR: Remove unused method, redundant in interface definition and add final for object used
in sychronization

guozhangwang Very minor cleanup.

Author: Liquan Pei <liquanpei@gmail.com>

Reviewers: Guozhang Wang <wangguoz@gmail.com>

Closes #1063 from Ishiihara/minor-cleanup


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/cf40acc2
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/cf40acc2
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/cf40acc2

Branch: refs/heads/trunk
Commit: cf40acc2b17cf6d32cee712dad6c88a851ae0715
Parents: c1a56c6
Author: Liquan Pei <liquanpei@gmail.com>
Authored: Mon Mar 14 15:09:47 2016 -0700
Committer: Guozhang Wang <wangguoz@gmail.com>
Committed: Mon Mar 14 15:09:47 2016 -0700

----------------------------------------------------------------------
 .../processor/internals/ProcessorStateManager.java      | 12 ------------
 .../streams/processor/internals/PunctuationQueue.java   |  2 +-
 .../streams/processor/internals/RecordCollector.java    |  4 ++--
 3 files changed, 3 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/cf40acc2/streams/src/main/java/org/apache/kafka/streams/processor/internals/ProcessorStateManager.java
----------------------------------------------------------------------
diff --git a/streams/src/main/java/org/apache/kafka/streams/processor/internals/ProcessorStateManager.java
b/streams/src/main/java/org/apache/kafka/streams/processor/internals/ProcessorStateManager.java
index bae30e3..c8f289e 100644
--- a/streams/src/main/java/org/apache/kafka/streams/processor/internals/ProcessorStateManager.java
+++ b/streams/src/main/java/org/apache/kafka/streams/processor/internals/ProcessorStateManager.java
@@ -137,8 +137,6 @@ public class ProcessorStateManager {
         }
     }
 
-
-
     public File baseDir() {
         return this.baseDir;
     }
@@ -305,16 +303,6 @@ public class ProcessorStateManager {
         return stores.get(name);
     }
 
-    public void cleanup() throws IOException {
-        // clean up any unknown files in the state directory
-        for (File file : this.baseDir.listFiles()) {
-            if (!this.stores.containsKey(file.getName())) {
-                log.info("Deleting state directory {}", file.getAbsolutePath());
-                file.delete();
-            }
-        }
-    }
-
     public void flush() {
         if (!this.stores.isEmpty()) {
             log.debug("Flushing stores.");

http://git-wip-us.apache.org/repos/asf/kafka/blob/cf40acc2/streams/src/main/java/org/apache/kafka/streams/processor/internals/PunctuationQueue.java
----------------------------------------------------------------------
diff --git a/streams/src/main/java/org/apache/kafka/streams/processor/internals/PunctuationQueue.java
b/streams/src/main/java/org/apache/kafka/streams/processor/internals/PunctuationQueue.java
index b4b7afe..d7d7eee 100644
--- a/streams/src/main/java/org/apache/kafka/streams/processor/internals/PunctuationQueue.java
+++ b/streams/src/main/java/org/apache/kafka/streams/processor/internals/PunctuationQueue.java
@@ -21,7 +21,7 @@ import java.util.PriorityQueue;
 
 public class PunctuationQueue {
 
-    private PriorityQueue<PunctuationSchedule> pq = new PriorityQueue<>();
+    private final PriorityQueue<PunctuationSchedule> pq = new PriorityQueue<>();
 
     public void schedule(PunctuationSchedule sched) {
         synchronized (pq) {

http://git-wip-us.apache.org/repos/asf/kafka/blob/cf40acc2/streams/src/main/java/org/apache/kafka/streams/processor/internals/RecordCollector.java
----------------------------------------------------------------------
diff --git a/streams/src/main/java/org/apache/kafka/streams/processor/internals/RecordCollector.java
b/streams/src/main/java/org/apache/kafka/streams/processor/internals/RecordCollector.java
index cd8af9b..eb731be 100644
--- a/streams/src/main/java/org/apache/kafka/streams/processor/internals/RecordCollector.java
+++ b/streams/src/main/java/org/apache/kafka/streams/processor/internals/RecordCollector.java
@@ -37,12 +37,12 @@ public class RecordCollector {
     /**
      * A supplier of a {@link RecordCollector} instance.
      */
-    public static interface Supplier {
+    public interface Supplier {
         /**
          * Get the record collector.
          * @return the record collector
          */
-        public RecordCollector recordCollector();
+        RecordCollector recordCollector();
     }
 
     private static final Logger log = LoggerFactory.getLogger(RecordCollector.class);


Mime
View raw message