Search in sources :

Example 1 with HashedMap

use of org.apache.storm.shade.org.apache.commons.collections.map.HashedMap in project storm by apache.

the class LocalAssignmentsBackendTest method mockedAssignment.

private Assignment mockedAssignment(int i) {
    Assignment ass = new Assignment();
    ass.set_master_code_dir("master_code_dir" + i);
    HashMap node_to_host = new HashMap();
    node_to_host.put("node" + i, "host" + i);
    ass.set_node_host(node_to_host);
    Map<List<Long>, NodeInfo> executor_node_port = new HashMap<>();
    Set<Long> nodePorts = new HashSet<>();
    nodePorts.add(9723L);
    executor_node_port.put(Arrays.asList(i + 0L), new NodeInfo("node" + i, nodePorts));
    ass.set_executor_node_port(executor_node_port);
    Map<List<Long>, Long> executor_start_time_secs = new HashMap<>();
    executor_start_time_secs.put(Arrays.asList(1L), 12345L);
    ass.set_executor_start_time_secs(executor_start_time_secs);
    ass.set_worker_resources(new HashedMap());
    ass.set_total_shared_off_heap(new HashedMap());
    ass.set_owner("o");
    return ass;
}
Also used : Assignment(org.apache.storm.generated.Assignment) HashMap(java.util.HashMap) NodeInfo(org.apache.storm.generated.NodeInfo) List(java.util.List) HashedMap(org.apache.storm.shade.org.apache.commons.collections.map.HashedMap) HashSet(java.util.HashSet)

Aggregations

HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 List (java.util.List)1 Assignment (org.apache.storm.generated.Assignment)1 NodeInfo (org.apache.storm.generated.NodeInfo)1 HashedMap (org.apache.storm.shade.org.apache.commons.collections.map.HashedMap)1