/** * /api/v1/topology-workers/:id -> topo workers. */ @GET @Path("/topology-workers/{id}") @AuthNimbusOp(value = "getTopology", needsTopoId = true) @Produces("application/json") public Response getTopologyWorkers(@PathParam("id") String id, @QueryParam(callbackParameterName) String callback) throws TException { try (NimbusClient nimbusClient = NimbusClient.getConfiguredClient(config)) { id = URLDecoder.decode(id); return UIHelpers.makeStandardResponse( UIHelpers.getTopologyWorkers( nimbusClient.getClient().getTopologyInfo(id), config ), callback ); } }
throw new Exception("Could not find a topology named " + name); TopologyInfo info = client.getTopologyInfo(id); int uptime = info.get_uptime_secs(); long acked = 0;
throw new Exception("Could not find a topology named " + name); TopologyInfo info = client.getTopologyInfo(id); int uptime = info.get_uptime_secs(); long acked = 0;
LOG.info("Capturing {}...", topologyName); String topologyId = topologySummary.get_id(); TopologyInfo info = client.getTopologyInfo(topologyId); TopologyPageInfo tpinfo = client.getTopologyPageInfo(topologyId, ":all-time", false); @SuppressWarnings("checkstyle:VariableDeclarationUsageDistance")
long totalLatCount = 0; for (String id: ids) { TopologyInfo info = client.getTopologyInfo(id); @SuppressWarnings("checkstyle:VariableDeclarationUsageDistance") TopologyPageInfo tpi = client.getTopologyPageInfo(id, ":all-time", false);
throw new Exception("Could not find a topology named " + name); TopologyInfo info = client.getTopologyInfo(id); int uptime = info.get_uptime_secs(); long acked = 0;
public static MetricsSample factory(Nimbus.Iface client, String topologyName) throws Exception { // "************ Sampling Metrics ***************** ClusterSummary clusterSummary = client.getClusterInfo(); // get topology info TopologySummary topSummary = getTopologySummary(clusterSummary, topologyName); int topologyExecutors = topSummary.get_num_executors(); int topologyWorkers = topSummary.get_num_workers(); int topologyTasks = topSummary.get_num_tasks(); TopologyInfo topInfo = client.getTopologyInfo(topSummary.get_id()); MetricsSample sample = getMetricsSample(topInfo); sample.numWorkers = topologyWorkers; sample.numExecutors = topologyExecutors; sample.numTasks = topologyTasks; return sample; }
public static TopologyInfo getTopologyInfo(String name, String asUser, Map<String, Object> topoConf) { try (NimbusClient client = NimbusClient.getConfiguredClientAs(topoConf, asUser)) { String topologyId = getTopologyId(name, client.getClient()); if (null != topologyId) { return client.getClient().getTopologyInfo(topologyId); } return null; } catch (Exception e) { throw new RuntimeException(e); } }