Maps.<String,String>newHashMap(), processors, 1024,
Lists.<Volume>newArrayList(), null);
when(node.getHardware()).thenReturn(hardware);
Set<Instance> instances = Sets.newLinkedHashSet();
Instance master = new Instance(new Credentials("", ""),
Sets.newHashSet(HadoopNameNodeClusterActionHandler.ROLE,
HadoopJobTrackerClusterActionHandler.ROLE),
"10.0.0.1", "10.0.0.1", "1", node);
instances.add(master);
for (int i = 0; i < numberOfWorkers; i++) {
int id = i + 2;
instances.add(new Instance(new Credentials("", ""),
Sets.newHashSet(HadoopDataNodeClusterActionHandler.ROLE,
HadoopTaskTrackerClusterActionHandler.ROLE),
"10.0.0." + id, "10.0.0." + id, id + "", node));
}
return new Cluster(instances);