Skip to content

Commit b57fcd1

Browse files
committed
Remove graphs from monitor
1 parent 5b2bb6e commit b57fcd1

39 files changed

+3
-12053
lines changed

LICENSE

-30
Original file line numberDiff line numberDiff line change
@@ -284,36 +284,6 @@ Files:
284284
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
285285
OTHER DEALINGS IN THE SOFTWARE.
286286

287-
## Flot 4.2.6 (https://github.com/flot/flot)
288-
289-
Files:
290-
* server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/external/flot/*
291-
292-
Copyright (c) 2007-2014 IOLA and Ole Laursen
293-
294-
Available under the MIT License
295-
(see server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/external/flot/LICENSE.txt)
296-
297-
Flot bundles additional works:
298-
299-
jquery.flot.pie.js
300-
Flot plugin for rendering pie charts.
301-
302-
Copyright (c) 2007-2014 IOLA and Ole Laursen.
303-
Licensed under the MIT license.
304-
305-
* Created by Brian Medendorp
306-
* Updated with contributions from btburnett3, Anthony Aragues and Xavi Ivars
307-
308-
jquery.flot.resize.js
309-
* Inline dependency:
310-
* jQuery resize event - v1.1 - 3/14/2010
311-
* http://benalman.com/projects/jquery-resize-plugin/
312-
*
313-
* Copyright (c) 2010 "Cowboy" Ben Alman
314-
* Dual licensed under the MIT and GPL licenses.
315-
* http://benalman.com/about/license/
316-
317287
## Bootstrap v5.3.2 (https://getbootstrap.com/)
318288

319289
Files:

assemble/src/main/resources/LICENSE

-29
Original file line numberDiff line numberDiff line change
@@ -286,35 +286,6 @@ Files:
286286
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
287287
OTHER DEALINGS IN THE SOFTWARE.
288288

289-
## Flot (https://github.com/flot/flot)
290-
291-
Copyright (c) 2007-2014 IOLA and Ole Laursen
292-
293-
Available under the MIT License
294-
(see org/apache/accumulo/monitor/resources/external/flot/LICENSE.txt in the accumulo-monitor jar)
295-
296-
Flot bundles additional works:
297-
298-
jquery.flot.pie.js
299-
Flot plugin for rendering pie charts.
300-
301-
Copyright (c) 2007-2014 IOLA and Ole Laursen.
302-
Licensed under the MIT license.
303-
304-
* Created by Brian Medendorp
305-
* Updated with contributions from btburnett3, Anthony Aragues and Xavi Ivars
306-
307-
jquery.flot.resize.js
308-
* Inline dependency:
309-
* jQuery resize event - v1.1 - 3/14/2010
310-
* http://benalman.com/projects/jquery-resize-plugin/
311-
*
312-
* Copyright (c) 2010 "Cowboy" Ben Alman
313-
* Dual licensed under the MIT and GPL licenses.
314-
* http://benalman.com/about/license/
315-
316-
distributed under the MIT license (see above)
317-
318289
## Bootstrap v5.3.2 (https://getbootstrap.com/)
319290

320291
Files:

server/monitor/src/main/appended-resources/META-INF/LICENSE

-30
Original file line numberDiff line numberDiff line change
@@ -46,36 +46,6 @@ Files:
4646
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
4747
OTHER DEALINGS IN THE SOFTWARE.
4848

49-
## Flot 4.2.6 (https://github.com/flot/flot)
50-
51-
Files:
52-
* server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/external/flot/*
53-
54-
Copyright (c) 2007-2014 IOLA and Ole Laursen
55-
56-
Available under the MIT License
57-
(see server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/external/flot/LICENSE.txt)
58-
59-
Flot bundles additional works:
60-
61-
jquery.flot.pie.js
62-
Flot plugin for rendering pie charts.
63-
64-
Copyright (c) 2007-2014 IOLA and Ole Laursen.
65-
Licensed under the MIT license.
66-
67-
* Created by Brian Medendorp
68-
* Updated with contributions from btburnett3, Anthony Aragues and Xavi Ivars
69-
70-
jquery.flot.resize.js
71-
* Inline dependency:
72-
* jQuery resize event - v1.1 - 3/14/2010
73-
* http://benalman.com/projects/jquery-resize-plugin/
74-
*
75-
* Copyright (c) 2010 "Cowboy" Ben Alman
76-
* Dual licensed under the MIT and GPL licenses.
77-
* http://benalman.com/about/license/
78-
7949
## Bootstrap v5.3.2 (https://getbootstrap.com/)
8050

8151
Files:

server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java

-122
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,15 @@
2020

2121
import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
2222
import static java.nio.charset.StandardCharsets.UTF_8;
23-
import static java.util.concurrent.TimeUnit.HOURS;
2423

2524
import java.net.InetAddress;
2625
import java.net.URL;
2726
import java.net.UnknownHostException;
28-
import java.util.ArrayList;
2927
import java.util.Arrays;
3028
import java.util.Collections;
3129
import java.util.HashMap;
3230
import java.util.HashSet;
3331
import java.util.Iterator;
34-
import java.util.LinkedList;
3532
import java.util.List;
3633
import java.util.Map;
3734
import java.util.Map.Entry;
@@ -138,35 +135,6 @@ public static void main(String[] args) throws Exception {
138135
private int totalTables = 0;
139136
private final AtomicBoolean monitorInitialized = new AtomicBoolean(false);
140137

141-
private static <T> List<Pair<Long,T>> newMaxList() {
142-
return Collections.synchronizedList(new LinkedList<>() {
143-
144-
private static final long serialVersionUID = 1L;
145-
private final long maxDelta = HOURS.toMillis(1);
146-
147-
@Override
148-
public boolean add(Pair<Long,T> obj) {
149-
boolean result = super.add(obj);
150-
if (obj.getFirst() - get(0).getFirst() > maxDelta) {
151-
remove(0);
152-
}
153-
return result;
154-
}
155-
156-
});
157-
}
158-
159-
private final List<Pair<Long,Double>> loadOverTime = newMaxList();
160-
private final List<Pair<Long,Double>> ingestRateOverTime = newMaxList();
161-
private final List<Pair<Long,Double>> ingestByteRateOverTime = newMaxList();
162-
private final List<Pair<Long,Integer>> minorCompactionsOverTime = newMaxList();
163-
private final List<Pair<Long,Integer>> majorCompactionsOverTime = newMaxList();
164-
private final List<Pair<Long,Double>> lookupsOverTime = newMaxList();
165-
private final List<Pair<Long,Long>> queryRateOverTime = newMaxList();
166-
private final List<Pair<Long,Long>> scanRateOverTime = newMaxList();
167-
private final List<Pair<Long,Double>> queryByteRateOverTime = newMaxList();
168-
private final List<Pair<Long,Double>> indexCacheHitRateOverTime = newMaxList();
169-
private final List<Pair<Long,Double>> dataCacheHitRateOverTime = newMaxList();
170138
private EventCounter lookupRateTracker = new EventCounter();
171139
private EventCounter indexCacheHitTracker = new EventCounter();
172140
private EventCounter indexCacheRequestTracker = new EventCounter();
@@ -251,9 +219,7 @@ synchronized long calculateCount() {
251219
public void fetchData() {
252220
ServerContext context = getContext();
253221
double totalIngestRate = 0.;
254-
double totalIngestByteRate = 0.;
255222
double totalQueryRate = 0.;
256-
double totalQueryByteRate = 0.;
257223
double totalScanRate = 0.;
258224
long totalEntries = 0;
259225
int totalTabletCount = 0;
@@ -299,8 +265,6 @@ public void fetchData() {
299265
}
300266
}
301267
if (mmi != null) {
302-
int majorCompactions = 0;
303-
int minorCompactions = 0;
304268

305269
lookupRateTracker.startingUpdates();
306270
indexCacheHitTracker.startingUpdates();
@@ -311,15 +275,11 @@ public void fetchData() {
311275
for (TabletServerStatus server : mmi.tServerInfo) {
312276
TableInfo summary = TableInfoUtil.summarizeTableStats(server);
313277
totalIngestRate += summary.ingestRate;
314-
totalIngestByteRate += summary.ingestByteRate;
315278
totalQueryRate += summary.queryRate;
316279
totalScanRate += summary.scanRate;
317-
totalQueryByteRate += summary.queryByteRate;
318280
totalEntries += summary.recs;
319281
totalHoldTime += server.holdTime;
320282
totalLookups += server.lookups;
321-
majorCompactions += summary.majors.running;
322-
minorCompactions += summary.minors.running;
323283
lookupRateTracker.updateTabletServer(server.name, server.lastContact, server.lookups);
324284
indexCacheHitTracker.updateTabletServer(server.name, server.lastContact,
325285
server.indexCacheHits);
@@ -344,40 +304,13 @@ public void fetchData() {
344304
}
345305
this.totalIngestRate = totalIngestRate;
346306
this.totalTables = totalTables;
347-
totalIngestByteRate = totalIngestByteRate / 1000000.0;
348307
this.totalQueryRate = totalQueryRate;
349308
this.totalScanRate = totalScanRate;
350-
totalQueryByteRate = totalQueryByteRate / 1000000.0;
351309
this.totalEntries = totalEntries;
352310
this.totalTabletCount = totalTabletCount;
353311
this.totalHoldTime = totalHoldTime;
354312
this.totalLookups = totalLookups;
355313

356-
ingestRateOverTime.add(new Pair<>(currentTime, totalIngestRate));
357-
ingestByteRateOverTime.add(new Pair<>(currentTime, totalIngestByteRate));
358-
359-
double totalLoad = 0.;
360-
for (TabletServerStatus status : mmi.tServerInfo) {
361-
if (status != null) {
362-
totalLoad += status.osLoad;
363-
}
364-
}
365-
loadOverTime.add(new Pair<>(currentTime, totalLoad));
366-
367-
minorCompactionsOverTime.add(new Pair<>(currentTime, minorCompactions));
368-
majorCompactionsOverTime.add(new Pair<>(currentTime, majorCompactions));
369-
370-
lookupsOverTime.add(new Pair<>(currentTime, lookupRateTracker.calculateRate()));
371-
372-
queryRateOverTime.add(new Pair<>(currentTime, (long) totalQueryRate));
373-
queryByteRateOverTime.add(new Pair<>(currentTime, totalQueryByteRate));
374-
375-
scanRateOverTime.add(new Pair<>(currentTime, (long) totalScanRate));
376-
377-
calcCacheHitRate(indexCacheHitRateOverTime, currentTime, indexCacheHitTracker,
378-
indexCacheRequestTracker);
379-
calcCacheHitRate(dataCacheHitRateOverTime, currentTime, dataCacheHitTracker,
380-
dataCacheRequestTracker);
381314
}
382315
try {
383316
this.problemSummary = ProblemReports.getInstance(context).summarize();
@@ -412,17 +345,6 @@ public void fetchData() {
412345
}
413346
}
414347

415-
private static void calcCacheHitRate(List<Pair<Long,Double>> hitRate, long currentTime,
416-
EventCounter cacheHits, EventCounter cacheReq) {
417-
long req = cacheReq.calculateCount();
418-
if (req > 0) {
419-
hitRate.add(
420-
new Pair<>(currentTime, cacheHits.calculateCount() / (double) cacheReq.calculateCount()));
421-
} else {
422-
hitRate.add(new Pair<>(currentTime, null));
423-
}
424-
}
425-
426348
private GCStatus fetchGcStatus() {
427349
ServerContext context = getContext();
428350
GCStatus result = null;
@@ -985,54 +907,10 @@ public long getStartTime() {
985907
return START_TIME;
986908
}
987909

988-
public List<Pair<Long,Double>> getLoadOverTime() {
989-
return new ArrayList<>(loadOverTime);
990-
}
991-
992-
public List<Pair<Long,Double>> getIngestRateOverTime() {
993-
return new ArrayList<>(ingestRateOverTime);
994-
}
995-
996-
public List<Pair<Long,Double>> getIngestByteRateOverTime() {
997-
return new ArrayList<>(ingestByteRateOverTime);
998-
}
999-
1000-
public List<Pair<Long,Integer>> getMinorCompactionsOverTime() {
1001-
return new ArrayList<>(minorCompactionsOverTime);
1002-
}
1003-
1004-
public List<Pair<Long,Integer>> getMajorCompactionsOverTime() {
1005-
return new ArrayList<>(majorCompactionsOverTime);
1006-
}
1007-
1008-
public List<Pair<Long,Double>> getLookupsOverTime() {
1009-
return new ArrayList<>(lookupsOverTime);
1010-
}
1011-
1012910
public double getLookupRate() {
1013911
return lookupRateTracker.calculateRate();
1014912
}
1015913

1016-
public List<Pair<Long,Long>> getQueryRateOverTime() {
1017-
return new ArrayList<>(queryRateOverTime);
1018-
}
1019-
1020-
public List<Pair<Long,Long>> getScanRateOverTime() {
1021-
return new ArrayList<>(scanRateOverTime);
1022-
}
1023-
1024-
public List<Pair<Long,Double>> getQueryByteRateOverTime() {
1025-
return new ArrayList<>(queryByteRateOverTime);
1026-
}
1027-
1028-
public List<Pair<Long,Double>> getIndexCacheHitRateOverTime() {
1029-
return new ArrayList<>(indexCacheHitRateOverTime);
1030-
}
1031-
1032-
public List<Pair<Long,Double>> getDataCacheHitRateOverTime() {
1033-
return new ArrayList<>(dataCacheHitRateOverTime);
1034-
}
1035-
1036914
@Override
1037915
public boolean isActiveService() {
1038916
return monitorInitialized.get();

0 commit comments

Comments
 (0)