HickwallMetric implements MetricProxy { @Override public void writeBinMultiDataPoint(MetricData rawData) throws MetricProxyException { DataPoint bmp = convertToHickwallFormat(rawData); if (!datas.offer(bmp)) { logger.warn("Hickwall queue overflow, will drop data"); } } HickwallMetric(); @Override void writeBinMultiDataPoint(MetricData rawData); @Override int getOrder();  }
@Test public void testHickWall() throws MetricProxyException, IOException { int port = 11111; logger.info("[testHickWall]{}", port); scheduled.scheduleAtFixedRate(new AbstractExceptionLogTask() { @Override protected void doRun() throws Exception { HostPort hostPort = new HostPort("127.0.0.1", port); MetricData metricData = new MetricData("retrans", "dc", "cluster", "shard"); metricData.setValue(1000); metricData.setHostPort(hostPort); metricData.setTimestampMilli(System.currentTimeMillis()); hickwallMetricProxy.writeBinMultiDataPoint(metricData); } }, 0, 2, TimeUnit.SECONDS); waitForAnyKeyToExit(); }