int port = ConfigExtension.getSupervisorDeamonHttpserverPort(conf);
Httpserver httpserver = new Httpserver(port, conf);
httpserver.start();
//Step 8 start uploading every 60 secs
MetricSendClient client;
if (ConfigExtension.isAlimonitorMetricsPost(conf)) {
client = new AlimonitorClient(AlimonitorClient.DEFAUT_ADDR,
AlimonitorClient.DEFAULT_PORT, true);
} else {
client = new MetricSendClient();
}
UploadSupervMetric uploadMetric = new UploadSupervMetric(conf, stormClusterState,
supervisorId, active, 60, client);
AsyncLoopThread uploadMetricThread = new AsyncLoopThread(uploadMetric);
threads.add(uploadMetricThread);