use of com.hortonworks.streamline.streams.cluster.service.metadata.json.Security in project streamline by hortonworks.
the class KafkaMetadataService method getTopicsFromZk.
public KafkaTopics getTopicsFromZk() throws ZookeeperClientException, IOException {
final Security security = getSecurity();
final List<String> topics = zkCli.getChildren(kafkaZkConnection.buildZkRootPath(ZK_RELATIVE_PATH_KAFKA_TOPICS));
return topics == null ? new KafkaTopics(Collections.emptyList(), security) : new KafkaTopics(topics, security);
}
use of com.hortonworks.streamline.streams.cluster.service.metadata.json.Security in project streamline by hortonworks.
the class StormBundleHintProvider method getHintsOnCluster.
@Override
public Map<String, Object> getHintsOnCluster(Cluster cluster, SecurityContext securityContext, Subject subject) {
Map<String, Object> hintClusterMap = new HashMap<>();
hintClusterMap.put(FIELD_NAME_CLUSTER_NAME, cluster.getName());
final Security security = getSecurity(cluster, securityContext, subject);
hintClusterMap.put(FIELD_NAME_PRINCIPAL, security.getPrincipals());
hintClusterMap.put(FIELD_NAME_KEYTAB_PATH, security.getKeytabs());
return hintClusterMap;
}
Aggregations