Commit 18a4984a by Umesh S Padashetty Committed by rmani

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

Signed-off-by: 's avatarrmani <rmani@hortonworks.com>
parent 5ebb1690
......@@ -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");
}
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment