You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "Amemeda (via GitHub)" <gi...@apache.org> on 2026/10/07 19:59:00 UTC
[PR] Add new logic to determine server icon status [accumulo]
Amemeda opened a new pull request, #6581:
URL: https://github.com/apache/accumulo/pull/6581
(no comment)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix Scan Server Status Icon colors in 4.0.0 Monitor [accumulo]
Posted by "dlmarion (via GitHub)" <gi...@apache.org>.
dlmarion commented on code in PR #6581:
URL: https://github.com/apache/accumulo/pull/6581#discussion_r4257919769
##########
server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/functions.js:
##########
@@ -575,11 +575,24 @@ function getStoredStatusData() {
}
function getComponentStatus(statusData, componentType) {
+ const status = statusData.componentStatuses[componentType];
+
+ if (componentType === 'SCAN_SERVER'){
+ const respondingServers = getServerCounts(status).at(0);
+ const totalServers = getServerCounts(status).at(1);
Review Comment:
You should be able to call `getServerCounts` once, store the response in a variable, and then get the counts from the response via a variable.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix Server Status Icon colors in 4.0.0 Monitor [accumulo]
Posted by "Amemeda (via GitHub)" <gi...@apache.org>.
Amemeda commented on code in PR #6581:
URL: https://github.com/apache/accumulo/pull/6581#discussion_r4211844563
##########
server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/navbar.js:
##########
@@ -91,14 +91,24 @@ function updateServerCount(elementId, status) {
if (!status || Number(status.serverCount) <= 0) {
$element.text('0/0');
- return;
+ return STATUS.OK;
}
Review Comment:
Is this if even needed anymore with the new logic? it is basically checking 1 possible outcome of responding servers = total servers and returning the same status too
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix Scan Server Status Icon colors in 4.0.0 Monitor [accumulo]
Posted by "Amemeda (via GitHub)" <gi...@apache.org>.
Amemeda commented on code in PR #6581:
URL: https://github.com/apache/accumulo/pull/6581#discussion_r4232818353
##########
server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/functions.js:
##########
@@ -575,11 +575,26 @@ function getStoredStatusData() {
}
function getComponentStatus(statusData, componentType) {
+ const status = statusData.componentStatuses[componentType];
+
+ // trying to get the component's server counts
+ const respondingServers = getServerCounts(status).at(0);
+ const totalServers = getServerCounts(status).at(1);
+
+ if (componentType === 'SCAN_SERVER'){
+ if (respondingServers === totalServers) {
+ return 'OK';
+ } else if (respondingServers === 0 && totalServers > 0) {
+ return 'ERROR';
+ } else if (respondingServers > 0 && respondingServers < totalServers){
+ return 'WARN'
+ }
+ }
+
Review Comment:
Created and implemented new function getServerCounts to get the current component's responding servers and total servers counts. I believe something like this is needed in order to properly set the expected status of only Scan Servers
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix Scan Server Status Icon colors in 4.0.0 Monitor [accumulo]
Posted by "Amemeda (via GitHub)" <gi...@apache.org>.
Amemeda commented on code in PR #6581:
URL: https://github.com/apache/accumulo/pull/6581#discussion_r4232818353
##########
server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/functions.js:
##########
@@ -575,11 +575,26 @@ function getStoredStatusData() {
}
function getComponentStatus(statusData, componentType) {
+ const status = statusData.componentStatuses[componentType];
+
+ // trying to get the component's server counts
+ const respondingServers = getServerCounts(status).at(0);
+ const totalServers = getServerCounts(status).at(1);
+
+ if (componentType === 'SCAN_SERVER'){
+ if (respondingServers === totalServers) {
+ return 'OK';
+ } else if (respondingServers === 0 && totalServers > 0) {
+ return 'ERROR';
+ } else if (respondingServers > 0 && respondingServers < totalServers){
+ return 'WARN'
+ }
+ }
+
Review Comment:
Created and implemented new function getServerCounts to get the current component's responding servers and total servers counts. I believe something like this is needed in order to properly set the expected status of only Scan Servers
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix Server Status Icon colors in 4.0.0 Monitor [accumulo]
Posted by "Amemeda (via GitHub)" <gi...@apache.org>.
Amemeda commented on code in PR #6581:
URL: https://github.com/apache/accumulo/pull/6581#discussion_r4232818353
##########
server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/functions.js:
##########
@@ -575,11 +575,26 @@ function getStoredStatusData() {
}
function getComponentStatus(statusData, componentType) {
+ const status = statusData.componentStatuses[componentType];
+
+ // trying to get the component's server counts
+ const respondingServers = getServerCounts(status).at(0);
+ const totalServers = getServerCounts(status).at(1);
+
+ if (componentType === 'SCAN_SERVER'){
+ if (respondingServers === totalServers) {
+ return 'OK';
+ } else if (respondingServers === 0 && totalServers > 0) {
+ return 'ERROR';
+ } else if (respondingServers > 0 && respondingServers < totalServers){
+ return 'WARN'
+ }
+ }
+
Review Comment:
Attempting to create and implement new function to get the current component's responding servers and total servers counts. I believe something like this is needed in order to properly set the expected status of only Scan Servers
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix Server Status Icon colors in 4.0.0 Monitor [accumulo]
Posted by "Amemeda (via GitHub)" <gi...@apache.org>.
Amemeda commented on code in PR #6581:
URL: https://github.com/apache/accumulo/pull/6581#discussion_r4211844563
##########
server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/navbar.js:
##########
@@ -91,14 +91,24 @@ function updateServerCount(elementId, status) {
if (!status || Number(status.serverCount) <= 0) {
$element.text('0/0');
- return;
+ return STATUS.OK;
}
Review Comment:
Is this if even needed anymore with the new logic? it is basically checking 1 possible condition of responding servers = total servers and returning the same status too
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix Server Status Icon colors in 4.0.0 Monitor [accumulo]
Posted by "Amemeda (via GitHub)" <gi...@apache.org>.
Amemeda commented on code in PR #6581:
URL: https://github.com/apache/accumulo/pull/6581#discussion_r4211844563
##########
server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/navbar.js:
##########
@@ -91,14 +91,24 @@ function updateServerCount(elementId, status) {
if (!status || Number(status.serverCount) <= 0) {
$element.text('0/0');
- return;
+ return STATUS.OK;
}
Review Comment:
Is this if even needed anymore with the new logic? If this condition is checking that there are 0 responding servers / 0 total servers, then it is equivalent to checking responding === total which I added a little lower and returns the same status
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix Server Status Icon colors in 4.0.0 Monitor [accumulo]
Posted by "Amemeda (via GitHub)" <gi...@apache.org>.
Amemeda commented on PR #6581:
URL: https://github.com/apache/accumulo/pull/6581#issuecomment-6065187402
> I think the only change we need is in `getComponentStatus()` in `functions.js`. Adding a new check "if `status.hasServers` is false AND the component type is scan server, return OK" since scan servers are optional. That would fix both status circles and the navbar.js changes can be reverted.
This introduces a problem for Scan Servers, In the case where there are no responding Scan Servers out of nonzero total, the icon should be red, but with that added logic it allows the icon to remain green. Is there a way for me to add to that condition to check the total scan servers?
<img width="343" height="251" alt="image" src="https://github.com/user-attachments/assets/ea1aa129-2839-4fc4-bf5e-03c08321084a" />
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix Server Status Icon colors in 4.0.0 Monitor [accumulo]
Posted by "DomGarguilo (via GitHub)" <gi...@apache.org>.
DomGarguilo commented on PR #6581:
URL: https://github.com/apache/accumulo/pull/6581#issuecomment-6064362198
I think there are some issues with this approach. This new code replaces the status the server sends with one recomputed from the counts which loses things the server already checks for (like WARN for servers that are not reporting metrics will now show green here). It also only fixes the scan servers circle in the drop down and does not properly affect the rolled up Servers circle which still uses the old status so it will stay red with 0 scan servers.
I think the only change we need is in `getComponentStatus()` in `functions.js`. Adding a new check "if `status.hasServers` is false AND the component type is scan server, return OK" since scan servers are optional. That would fix both status circles and the navbar.js changes can be reverted.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix Scan Server Status Icon colors in 4.0.0 Monitor [accumulo]
Posted by "DomGarguilo (via GitHub)" <gi...@apache.org>.
DomGarguilo merged PR #6581:
URL: https://github.com/apache/accumulo/pull/6581
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix Server Status Icon colors in 4.0.0 Monitor [accumulo]
Posted by "Amemeda (via GitHub)" <gi...@apache.org>.
Amemeda commented on PR #6581:
URL: https://github.com/apache/accumulo/pull/6581#issuecomment-6063524700
@dlmarion could you take a look at my screenshots? The new status logic applies to all the servers in the dropdown. for some reason, the Manager status icon gets set separately so I'm not sure if the conditions should also apply to the Manager.
I think the overall Server status icon needs to update to the status of the "worst" server status, like red if just one of them is ERROR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix Scan Server Status Icon colors in 4.0.0 Monitor [accumulo]
Posted by "Amemeda (via GitHub)" <gi...@apache.org>.
Amemeda commented on code in PR #6581:
URL: https://github.com/apache/accumulo/pull/6581#discussion_r4259577167
##########
server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/functions.js:
##########
@@ -575,11 +575,24 @@ function getStoredStatusData() {
}
function getComponentStatus(statusData, componentType) {
+ const status = statusData.componentStatuses[componentType];
+
+ if (componentType === 'SCAN_SERVER'){
+ const respondingServers = getServerCounts(status).at(0);
+ const totalServers = getServerCounts(status).at(1);
Review Comment:
updated in 999b8dbd01d97771669beae713de621f3bd0c092
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org