Repository: kafka
Updated Branches:
  refs/heads/0.10.1 5b29bb8b0 -> be20ea528


MINOR: remove unused code from InternalTopicManager

Remove isValidCleanupPolicy and related fields as they are never used.

Author: Damian Guy <damian....@gmail.com>

Reviewers: Eno Thereska, Guozhang Wang

Closes #1888 from dguy/minor-remove-unused

(cherry picked from commit a632716a3c9a871f325c6f13aefa9aed0add4b82)
Signed-off-by: Guozhang Wang <wangg...@gmail.com>


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

Branch: refs/heads/0.10.1
Commit: be20ea52892c91f59323e0be1108f689e5a44f95
Parents: 5b29bb8
Author: Damian Guy <damian....@gmail.com>
Authored: Wed Sep 21 11:13:39 2016 -0700
Committer: Guozhang Wang <wangg...@gmail.com>
Committed: Wed Sep 21 11:13:49 2016 -0700

----------------------------------------------------------------------
 .../processor/internals/InternalTopicManager.java  | 17 -----------------
 1 file changed, 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/be20ea52/streams/src/main/java/org/apache/kafka/streams/processor/internals/InternalTopicManager.java
----------------------------------------------------------------------
diff --git 
a/streams/src/main/java/org/apache/kafka/streams/processor/internals/InternalTopicManager.java
 
b/streams/src/main/java/org/apache/kafka/streams/processor/internals/InternalTopicManager.java
index 44de757..a65a2ae 100644
--- 
a/streams/src/main/java/org/apache/kafka/streams/processor/internals/InternalTopicManager.java
+++ 
b/streams/src/main/java/org/apache/kafka/streams/processor/internals/InternalTopicManager.java
@@ -24,7 +24,6 @@ import org.I0Itec.zkclient.ZkClient;
 import org.I0Itec.zkclient.exception.ZkNoNodeException;
 import org.I0Itec.zkclient.exception.ZkNodeExistsException;
 import org.I0Itec.zkclient.serialize.ZkSerializer;
-import org.apache.kafka.common.utils.Utils;
 import org.apache.kafka.streams.errors.StreamsException;
 import org.apache.zookeeper.ZooDefs;
 import org.slf4j.Logger;
@@ -36,9 +35,7 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
-import java.util.Locale;
 import java.util.Map;
-import java.util.Set;
 import java.util.concurrent.TimeUnit;
 
 public class InternalTopicManager {
@@ -52,7 +49,6 @@ public class InternalTopicManager {
     private static final String ZK_ENTITY_CONFIG_PATH = "/config/topics";
     // TODO: the following LogConfig dependency should be removed after KIP-4
     public static final String CLEANUP_POLICY_PROP = "cleanup.policy";
-    private static final Set<String> CLEANUP_POLICIES = Utils.mkSet("compact", 
"delete");
     public static final String RETENTION_MS = "retention.ms";
     public static final Long WINDOW_CHANGE_LOG_ADDITIONAL_RETENTION_DEFAULT = 
TimeUnit.MILLISECONDS.convert(1, TimeUnit.DAYS);
 
@@ -60,19 +56,6 @@ public class InternalTopicManager {
     private final int replicationFactor;
     private final long windowChangeLogAdditionalRetention;
 
-    public static boolean isValidCleanupPolicy(final String cleanupPolicy) {
-        if (cleanupPolicy == null) {
-            return false;
-        }
-        final String[] policies = 
cleanupPolicy.toLowerCase(Locale.ROOT).split(",");
-        for (String policy : policies) {
-            if (!CLEANUP_POLICIES.contains(policy.trim())) {
-                return false;
-            }
-        }
-        return true;
-    }
-
     private class ZKStringSerializer implements ZkSerializer {
 
         /**

Reply via email to