Repository: atlas
Updated Branches:
  refs/heads/branch-1.0 8d06446ce -> 73185dc51


ATLAS-2983: Fixes and clean up for Atlas Kafka bridge utility

Signed-off-by: rmani <rm...@hortonworks.com>


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

Branch: refs/heads/branch-1.0
Commit: 73185dc51866f901aae23076ba8340fadbc1f2bb
Parents: 8d06446
Author: Umesh S Padashetty <uspadashe...@gmail.com>
Authored: Thu Nov 29 20:37:40 2018 +0530
Committer: rmani <rm...@hortonworks.com>
Committed: Thu Nov 29 17:27:28 2018 -0800

----------------------------------------------------------------------
 .../java/org/apache/atlas/kafka/bridge/KafkaBridge.java  | 11 ++++++-----
 .../org/apache/atlas/web/resources/AdminResource.java    |  2 +-
 2 files changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/atlas/blob/73185dc5/addons/kafka-bridge/src/main/java/org/apache/atlas/kafka/bridge/KafkaBridge.java
----------------------------------------------------------------------
diff --git 
a/addons/kafka-bridge/src/main/java/org/apache/atlas/kafka/bridge/KafkaBridge.java
 
b/addons/kafka-bridge/src/main/java/org/apache/atlas/kafka/bridge/KafkaBridge.java
index bf5d1e7..214dd25 100644
--- 
a/addons/kafka-bridge/src/main/java/org/apache/atlas/kafka/bridge/KafkaBridge.java
+++ 
b/addons/kafka-bridge/src/main/java/org/apache/atlas/kafka/bridge/KafkaBridge.java
@@ -53,6 +53,7 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
+import java.util.regex.Pattern;
 
 public class KafkaBridge {
     private static final Logger LOG = 
LoggerFactory.getLogger(KafkaBridge.class);
@@ -170,7 +171,7 @@ public class KafkaBridge {
         if (StringUtils.isNotEmpty(topicToImport)) {
             List<String> topics_subset = new ArrayList<>();
             for(String topic : topics) {
-                if (topic.startsWith(topicToImport)) {
+                if (Pattern.compile(topicToImport).matcher(topic).matches()) {
                     topics_subset.add(topic);
                 }
             }
@@ -305,12 +306,12 @@ public class KafkaBridge {
 
     private static  void printUsage(){
         System.out.println("Usage 1: import-kafka.sh");
-        System.out.println("Usage 2: import-kafka.sh [-n <topic regex> OR 
--topic <topic regex >]");
+        System.out.println("Usage 2: import-kafka.sh [-t <topic regex> OR 
--topic <topic regex>]");
         System.out.println("Usage 3: import-kafka.sh [-f <filename>]" );
         System.out.println("   Format:");
-        System.out.println("        topic1");
-        System.out.println("        topic2");
-        System.out.println("        topic3");
+        System.out.println("        topic1 OR topic1 regex");
+        System.out.println("        topic2 OR topic2 regex");
+        System.out.println("        topic3 OR topic3 regex");
     }
 
 

http://git-wip-us.apache.org/repos/asf/atlas/blob/73185dc5/webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java
----------------------------------------------------------------------
diff --git 
a/webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java 
b/webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java
index 3998932..3c24418 100755
--- a/webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java
+++ b/webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java
@@ -114,7 +114,7 @@ public class AdminResource {
     private static final String isEntityUpdateAllowed          = 
"atlas.entity.update.allowed";
     private static final String isEntityCreateAllowed          = 
"atlas.entity.create.allowed";
     private static final String editableEntityTypes            = 
"atlas.ui.editable.entity.types";
-    private static final String DEFAULT_EDITABLE_ENTITY_TYPES  = 
"hdfs_path,hbase_table,hbase_column,hbase_column_family,kafka_topic,hbase_namespace";
+    private static final String DEFAULT_EDITABLE_ENTITY_TYPES  = "hdfs_path";
     private static final List TIMEZONE_LIST  = 
Arrays.asList(TimeZone.getAvailableIDs());
 
     @Context

Reply via email to