Skip to content
This repository was archived by the owner on Sep 2, 2025. It is now read-only.

Commit cf49114

Browse files
committed
Remove unused Imports
1 parent 0fcfac4 commit cf49114

File tree

1 file changed

+13
-25
lines changed

1 file changed

+13
-25
lines changed

docker-monitoring-eparest/src/main/java/com/ca/docker/DataPoller.java

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,15 @@
44
package com.ca.docker;
55

66
import java.io.BufferedReader;
7-
import java.io.IOException;
87
import java.io.InputStream;
98
import java.io.InputStreamReader;
10-
import java.io.Reader;
11-
import java.math.BigDecimal;
12-
import java.math.BigInteger;
13-
import java.math.RoundingMode;
149
import java.net.HttpURLConnection;
1510
import java.net.URL;
16-
import java.nio.charset.Charset;
1711
import java.text.DecimalFormat;
1812
import java.util.ArrayList;
1913
import java.util.Date;
20-
import java.util.HashMap;
2114
import java.util.Iterator;
2215
import java.util.Map;
23-
import java.util.Map.Entry;
2416
import java.util.concurrent.ScheduledExecutorService;
2517
import java.util.concurrent.ScheduledThreadPoolExecutor;
2618
import java.util.concurrent.TimeUnit;
@@ -36,7 +28,6 @@
3628
import com.google.gson.Gson;
3729
import com.google.gson.JsonArray;
3830
import com.google.gson.JsonElement;
39-
import com.google.gson.JsonObject;
4031
import com.google.gson.JsonParser;
4132
import com.google.gson.JsonSyntaxException;
4233

@@ -216,21 +207,15 @@ public MetricFeedBundle makeMetrics(final Object hci, String additionalPath)
216207
*/
217208
private void makeMetrics(MetricFeedBundle mfb, String basePath, Object hci)
218209
{
219-
220-
// TODO Auto-generated method stub
221-
// if (hci instanceof HostInfo)
210+
Iterator<?> it = ((DockerInfo) hci).getDockerInfo().entrySet()
211+
.iterator();
212+
while (it.hasNext())
222213
{
223-
Iterator<?> it = ((DockerInfo) hci).getDockerInfo().entrySet()
224-
.iterator();
225-
while (it.hasNext())
226-
{
227-
final MetricPath metricPath = new MetricPath(basePath);
228-
Map.Entry pair = (Map.Entry) it.next();
229-
metricPath.addMetric((String) pair.getKey());
230-
makeMetric(metricPath.toString(), pair.getValue(), mfb);
231-
it.remove();
232-
}
233-
// makeMetric(metricPath.toString(), o, mfb);
214+
final MetricPath metricPath = new MetricPath(basePath);
215+
Map.Entry pair = (Map.Entry) it.next();
216+
metricPath.addMetric((String) pair.getKey());
217+
makeMetric(metricPath.toString(), pair.getValue(), mfb);
218+
it.remove();
234219
}
235220

236221
}
@@ -519,13 +504,15 @@ private Double getCPUPercentage(JsonNode node, String containerName)
519504

520505
return null;
521506
}
507+
522508
/**
523509
* This returns the percentage of 2 numbers upto 3 decimals
510+
*
524511
* @param d1
525512
* @param d2
526513
* @return
527514
*/
528-
private static Double percentage(Double d1, Double d2)
515+
private static Double percentage(Double d1, Double d2)
529516
{
530517
DecimalFormat df = new DecimalFormat();
531518
Double numerator = new Double(d1) * 100;
@@ -536,7 +523,8 @@ private static Double percentage(Double d1, Double d2)
536523
}
537524

538525
/**
539-
* Identify the memory utilization percentage
526+
* Identify the memory utilization percentage
527+
*
540528
* @param node
541529
* @param names
542530
* @return

0 commit comments

Comments
 (0)