Skip to content

Commit 0be5178

Browse files
authored
Remove graphs from monitor (apache#5108)
remove graphs from the homepage of the monitor along with related endpoints, server code and packages.
1 parent 6c92726 commit 0be5178

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;
@@ -137,35 +134,6 @@ public static void main(String[] args) throws Exception {
137134
private int totalTables = 0;
138135
private final AtomicBoolean monitorInitialized = new AtomicBoolean(false);
139136

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

304268
lookupRateTracker.startingUpdates();
305269
indexCacheHitTracker.startingUpdates();
@@ -310,15 +274,11 @@ public void fetchData() {
310274
for (TabletServerStatus server : mmi.tServerInfo) {
311275
TableInfo summary = TableInfoUtil.summarizeTableStats(server);
312276
totalIngestRate += summary.ingestRate;
313-
totalIngestByteRate += summary.ingestByteRate;
314277
totalQueryRate += summary.queryRate;
315278
totalScanRate += summary.scanRate;
316-
totalQueryByteRate += summary.queryByteRate;
317279
totalEntries += summary.recs;
318280
totalHoldTime += server.holdTime;
319281
totalLookups += server.lookups;
320-
majorCompactions += summary.majors.running;
321-
minorCompactions += summary.minors.running;
322282
lookupRateTracker.updateTabletServer(server.name, server.lastContact, server.lookups);
323283
indexCacheHitTracker.updateTabletServer(server.name, server.lastContact,
324284
server.indexCacheHits);
@@ -343,40 +303,13 @@ public void fetchData() {
343303
}
344304
this.totalIngestRate = totalIngestRate;
345305
this.totalTables = totalTables;
346-
totalIngestByteRate = totalIngestByteRate / 1000000.0;
347306
this.totalQueryRate = totalQueryRate;
348307
this.totalScanRate = totalScanRate;
349-
totalQueryByteRate = totalQueryByteRate / 1000000.0;
350308
this.totalEntries = totalEntries;
351309
this.totalTabletCount = totalTabletCount;
352310
this.totalHoldTime = totalHoldTime;
353311
this.totalLookups = totalLookups;
354312

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

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

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

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

0 commit comments

Comments
 (0)