Search in sources :

Example 1 with BasicPlatform

use of org.apache.kafka.trogdor.basic.BasicPlatform in project kafka by apache.

the class AgentTest method createBasicPlatform.

private static BasicPlatform createBasicPlatform(Scheduler scheduler) {
    TreeMap<String, Node> nodes = new TreeMap<>();
    HashMap<String, String> config = new HashMap<>();
    config.put(Platform.Config.TROGDOR_AGENT_PORT, Integer.toString(Agent.DEFAULT_PORT));
    nodes.put("node01", new BasicNode("node01", "localhost", config, Collections.emptySet()));
    BasicTopology topology = new BasicTopology(nodes);
    return new BasicPlatform("node01", topology, scheduler, new BasicPlatform.ShellCommandRunner());
}
Also used : BasicPlatform(org.apache.kafka.trogdor.basic.BasicPlatform) BasicTopology(org.apache.kafka.trogdor.basic.BasicTopology) HashMap(java.util.HashMap) BasicNode(org.apache.kafka.trogdor.basic.BasicNode) Node(org.apache.kafka.trogdor.common.Node) TextNode(com.fasterxml.jackson.databind.node.TextNode) BasicNode(org.apache.kafka.trogdor.basic.BasicNode) TreeMap(java.util.TreeMap)

Example 2 with BasicPlatform

use of org.apache.kafka.trogdor.basic.BasicPlatform in project apache-kafka-on-k8s by banzaicloud.

the class AgentTest method createBasicPlatform.

private static BasicPlatform createBasicPlatform(Scheduler scheduler) {
    TreeMap<String, Node> nodes = new TreeMap<>();
    HashMap<String, String> config = new HashMap<>();
    nodes.put("node01", new BasicNode("node01", "localhost", config, Collections.<String>emptySet()));
    BasicTopology topology = new BasicTopology(nodes);
    return new BasicPlatform("node01", topology, scheduler, new BasicPlatform.ShellCommandRunner());
}
Also used : BasicPlatform(org.apache.kafka.trogdor.basic.BasicPlatform) BasicTopology(org.apache.kafka.trogdor.basic.BasicTopology) HashMap(java.util.HashMap) BasicNode(org.apache.kafka.trogdor.basic.BasicNode) Node(org.apache.kafka.trogdor.common.Node) BasicNode(org.apache.kafka.trogdor.basic.BasicNode) TreeMap(java.util.TreeMap)

Aggregations

HashMap (java.util.HashMap)2 TreeMap (java.util.TreeMap)2 BasicNode (org.apache.kafka.trogdor.basic.BasicNode)2 BasicPlatform (org.apache.kafka.trogdor.basic.BasicPlatform)2 BasicTopology (org.apache.kafka.trogdor.basic.BasicTopology)2 Node (org.apache.kafka.trogdor.common.Node)2 TextNode (com.fasterxml.jackson.databind.node.TextNode)1