Search in sources :

Example 1 with TopologyLogSearch

use of com.hortonworks.streamline.streams.logsearch.TopologyLogSearch in project streamline by hortonworks.

the class TopologyLogSearchService method getTopologyLogSearchInstance.

private TopologyLogSearch getTopologyLogSearchInstance(Topology topology) {
    Namespace namespace = environmentService.getNamespace(topology.getNamespaceId());
    if (namespace == null) {
        throw new RuntimeException("Corresponding namespace not found: " + topology.getNamespaceId());
    }
    TopologyLogSearch topologyLogSearch = topologyLogSearchContainer.findInstance(namespace);
    if (topologyLogSearch == null) {
        throw new RuntimeException("Can't find Topology Log Search for such namespace " + topology.getNamespaceId());
    }
    return topologyLogSearch;
}
Also used : TopologyLogSearch(com.hortonworks.streamline.streams.logsearch.TopologyLogSearch) Namespace(com.hortonworks.streamline.streams.cluster.catalog.Namespace)

Example 2 with TopologyLogSearch

use of com.hortonworks.streamline.streams.logsearch.TopologyLogSearch in project streamline by hortonworks.

the class TopologyLogSearchContainer method initTopologyLogSearch.

private TopologyLogSearch initTopologyLogSearch(Map<String, Object> conf, String className) {
    try {
        TopologyLogSearch topologyLogSearch = instantiate(className);
        topologyLogSearch.init(conf);
        return topologyLogSearch;
    } catch (IllegalAccessException | InstantiationException | ClassNotFoundException | ConfigException e) {
        throw new RuntimeException("Can't initialize Topology log search instance - Class Name: " + className, e);
    }
}
Also used : ConfigException(com.hortonworks.streamline.common.exception.ConfigException) DefaultTopologyLogSearch(com.hortonworks.streamline.streams.logsearch.DefaultTopologyLogSearch) TopologyLogSearch(com.hortonworks.streamline.streams.logsearch.TopologyLogSearch)

Aggregations

TopologyLogSearch (com.hortonworks.streamline.streams.logsearch.TopologyLogSearch)2 ConfigException (com.hortonworks.streamline.common.exception.ConfigException)1 Namespace (com.hortonworks.streamline.streams.cluster.catalog.Namespace)1 DefaultTopologyLogSearch (com.hortonworks.streamline.streams.logsearch.DefaultTopologyLogSearch)1