public String getDataCenter() { return getEndpointSnitchInfoProxy().getDatacenter(); }
public String getRack() { return getEndpointSnitchInfoProxy().getRack(); }
public String getDataCenter() { return getEndpointSnitchInfoProxy().getDatacenter(); }
public String getRack() { return getEndpointSnitchInfoProxy().getRack(); }
public String getRack() { return getEndpointSnitchInfoProxy().getRack(); }
public String getDataCenter() { return getEndpointSnitchInfoProxy().getDatacenter(); }
public String getDataCenter() { try { return getEndpointSnitchInfoProxy().getDatacenter(getEndpoint()); } catch (UnknownHostException e) { return "Unknown"; } }
public String getRack() { try { return getEndpointSnitchInfoProxy().getRack(getEndpoint()); } catch (UnknownHostException e) { return "Unknown"; } }
public static SortedMap<String, SetHostStat> getOwnershipByDc(NodeProbe probe, boolean resolveIp, Map<String, String> tokenToEndpoint, Map<InetAddress, Float> ownerships) { SortedMap<String, SetHostStat> ownershipByDc = Maps.newTreeMap(); EndpointSnitchInfoMBean epSnitchInfo = probe.getEndpointSnitchInfoProxy(); try { for (Entry<String, String> tokenAndEndPoint : tokenToEndpoint.entrySet()) { String dc = epSnitchInfo.getDatacenter(tokenAndEndPoint.getValue()); if (!ownershipByDc.containsKey(dc)) ownershipByDc.put(dc, new SetHostStat(resolveIp)); ownershipByDc.get(dc).add(tokenAndEndPoint.getKey(), tokenAndEndPoint.getValue(), ownerships); } } catch (UnknownHostException e) { throw new RuntimeException(e); } return ownershipByDc; } }
public static SortedMap<String, SetHostStat> getOwnershipByDc(NodeProbe probe, boolean resolveIp, Map<String, String> tokenToEndpoint, Map<InetAddress, Float> ownerships) { SortedMap<String, SetHostStat> ownershipByDc = Maps.newTreeMap(); EndpointSnitchInfoMBean epSnitchInfo = probe.getEndpointSnitchInfoProxy(); try { for (Entry<String, String> tokenAndEndPoint : tokenToEndpoint.entrySet()) { String dc = epSnitchInfo.getDatacenter(tokenAndEndPoint.getValue()); if (!ownershipByDc.containsKey(dc)) ownershipByDc.put(dc, new SetHostStat(resolveIp)); ownershipByDc.get(dc).add(tokenAndEndPoint.getKey(), tokenAndEndPoint.getValue(), ownerships); } } catch (UnknownHostException e) { throw new RuntimeException(e); } return ownershipByDc; } }
@Override public void execute(NodeProbe probe) { // display cluster name, snitch and partitioner System.out.println("Cluster Information:"); System.out.println("\tName: " + probe.getClusterName()); System.out.println("\tSnitch: " + probe.getEndpointSnitchInfoProxy().getSnitchName()); System.out.println("\tPartitioner: " + probe.getPartitioner()); // display schema version for each node System.out.println("\tSchema versions:"); Map<String, List<String>> schemaVersions = probe.getSpProxy().getSchemaVersions(); for (String version : schemaVersions.keySet()) { System.out.println(format("\t\t%s: %s%n", version, schemaVersions.get(version))); } } }
public static SortedMap<String, SetHostStat> getOwnershipByDc(NodeProbe probe, boolean resolveIp, Map<String, String> tokenToEndpoint, Map<InetAddress, Float> ownerships) { SortedMap<String, SetHostStat> ownershipByDc = Maps.newTreeMap(); EndpointSnitchInfoMBean epSnitchInfo = probe.getEndpointSnitchInfoProxy(); try { for (Entry<String, String> tokenAndEndPoint : tokenToEndpoint.entrySet()) { String dc = epSnitchInfo.getDatacenter(tokenAndEndPoint.getValue()); if (!ownershipByDc.containsKey(dc)) ownershipByDc.put(dc, new SetHostStat(resolveIp)); ownershipByDc.get(dc).add(tokenAndEndPoint.getKey(), tokenAndEndPoint.getValue(), ownerships); } } catch (UnknownHostException e) { throw new RuntimeException(e); } return ownershipByDc; } }
private static SortedMap<String, SetHostStat> getOwnershipByDc(NodeProbe probe, boolean resolveIp, Map<String, String> tokenToEndpoint, Map<InetAddress, Float> ownerships) { SortedMap<String, SetHostStat> ownershipByDc = Maps.newTreeMap(); EndpointSnitchInfoMBean epSnitchInfo = probe.getEndpointSnitchInfoProxy(); try { for (Entry<String, String> tokenAndEndPoint : tokenToEndpoint.entrySet()) { String dc = epSnitchInfo.getDatacenter(tokenAndEndPoint.getValue()); if (!ownershipByDc.containsKey(dc)) ownershipByDc.put(dc, new SetHostStat(resolveIp)); ownershipByDc.get(dc).add(tokenAndEndPoint.getKey(), tokenAndEndPoint.getValue(), ownerships); } } catch (UnknownHostException e) { throw new RuntimeException(e); } return ownershipByDc; }
@Override public void execute(NodeProbe probe) { // display cluster name, snitch and partitioner System.out.println("Cluster Information:"); System.out.println("\tName: " + probe.getClusterName()); String snitch = probe.getEndpointSnitchInfoProxy().getSnitchName(); boolean dynamicSnitchEnabled = false; if (snitch.equals(DynamicEndpointSnitch.class.getName())) { snitch = probe.getDynamicEndpointSnitchInfoProxy().getSubsnitchClassName(); dynamicSnitchEnabled = true; } System.out.println("\tSnitch: " + snitch); System.out.println("\tDynamicEndPointSnitch: " + (dynamicSnitchEnabled ? "enabled" : "disabled")); System.out.println("\tPartitioner: " + probe.getPartitioner()); // display schema version for each node System.out.println("\tSchema versions:"); Map<String, List<String>> schemaVersions = probe.getSpProxy().getSchemaVersions(); for (String version : schemaVersions.keySet()) { System.out.println(format("\t\t%s: %s%n", version, schemaVersions.get(version))); } } }
@Override public void execute(NodeProbe probe) { // display cluster name, snitch and partitioner System.out.println("Cluster Information:"); System.out.println("\tName: " + probe.getClusterName()); String snitch = probe.getEndpointSnitchInfoProxy().getSnitchName(); boolean dynamicSnitchEnabled = false; if (snitch.equals(DynamicEndpointSnitch.class.getName())) { snitch = probe.getDynamicEndpointSnitchInfoProxy().getSubsnitchClassName(); dynamicSnitchEnabled = true; } System.out.println("\tSnitch: " + snitch); System.out.println("\tDynamicEndPointSnitch: " + (dynamicSnitchEnabled ? "enabled" : "disabled")); System.out.println("\tPartitioner: " + probe.getPartitioner()); // display schema version for each node System.out.println("\tSchema versions:"); Map<String, List<String>> schemaVersions = probe.getSpProxy().getSchemaVersions(); for (String version : schemaVersions.keySet()) { System.out.println(format("\t\t%s: %s%n", version, schemaVersions.get(version))); } } }
@Override public void execute(NodeProbe probe) { // display cluster name, snitch and partitioner System.out.println("Cluster Information:"); System.out.println("\tName: " + probe.getClusterName()); String snitch = probe.getEndpointSnitchInfoProxy().getSnitchName(); boolean dynamicSnitchEnabled = false; if (snitch.equals(DynamicEndpointSnitch.class.getName())) { snitch = probe.getDynamicEndpointSnitchInfoProxy().getSubsnitchClassName(); dynamicSnitchEnabled = true; } System.out.println("\tSnitch: " + snitch); System.out.println("\tDynamicEndPointSnitch: " + (dynamicSnitchEnabled ? "enabled" : "disabled")); System.out.println("\tPartitioner: " + probe.getPartitioner()); // display schema version for each node System.out.println("\tSchema versions:"); Map<String, List<String>> schemaVersions = probe.getSpProxy().getSchemaVersions(); for (String version : schemaVersions.keySet()) { System.out.println(format("\t\t%s: %s%n", version, schemaVersions.get(version))); } } }
try rack = probe.getEndpointSnitchInfoProxy().getRack(endpoint);
try rack = probe.getEndpointSnitchInfoProxy().getRack(endpoint);
unreachableNodes = probe.getUnreachableNodes(); hostIDMap = probe.getHostIdMap(); epSnitchInfo = probe.getEndpointSnitchInfoProxy();
unreachableNodes = probe.getUnreachableNodes(); hostIDMap = probe.getHostIdMap(); epSnitchInfo = probe.getEndpointSnitchInfoProxy();