Search in sources :

Example 1 with Security

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);
}
Also used : KafkaTopics(com.hortonworks.streamline.streams.cluster.service.metadata.json.KafkaTopics) Security(com.hortonworks.streamline.streams.cluster.service.metadata.json.Security)

Example 2 with 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;
}
Also used : HashMap(java.util.HashMap) Security(com.hortonworks.streamline.streams.cluster.service.metadata.json.Security)

Aggregations

Security (com.hortonworks.streamline.streams.cluster.service.metadata.json.Security)2 KafkaTopics (com.hortonworks.streamline.streams.cluster.service.metadata.json.KafkaTopics)1 HashMap (java.util.HashMap)1