This is an automated email from the ASF dual-hosted git repository.
xianjingfeng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-uniffle.git
The following commit(s) were added to refs/heads/master by this push:
new ecbf2e794 [#960][part-4] feat(dashboard): Fix some display bugs and
optimize the display format. (#1326)
ecbf2e794 is described below
commit ecbf2e79423505dd44bf54c612572c5c9da71175
Author: yl09099 <[email protected]>
AuthorDate: Mon Dec 11 14:32:27 2023 +0800
[#960][part-4] feat(dashboard): Fix some display bugs and optimize the
display format. (#1326)
### What changes were proposed in this pull request?
1.Fixed a bug that returned data from some interface calls.
2.Modify some memory to be represented in tape units.
### Why are the changes needed?
The dashboard page cannot display some indicators.
Fix: #960
### Does this PR introduce any user-facing change?
No.
### How was this patch tested?
Existing UT.
---
.../org/apache/uniffle/common/ServerStatus.java | 1 +
.../uniffle/coordinator/ApplicationManager.java | 4 ++
.../apache/uniffle/coordinator/ClusterManager.java | 2 +
.../org/apache/uniffle/coordinator/ServerNode.java | 5 +++
.../uniffle/coordinator/SimpleClusterManager.java | 1 +
.../web/resource/ApplicationResource.java | 16 +++----
.../coordinator/web/resource/ServerResource.java | 23 +++++++---
.../main/webapp/src/components/ApplicationPage.vue | 1 -
.../webapp/src/components/ShuffleServerPage.vue | 24 +++++------
.../shufflecomponent/ActiveNodeListPage.vue | 19 +++++----
.../DecommissionednodeListPage.vue | 18 ++++----
.../DecommissioningNodeListPage.vue | 18 ++++----
.../shufflecomponent/ExcludeNodeList.vue | 4 +-
.../components/shufflecomponent/LostNodeList.vue | 18 ++++----
.../shufflecomponent/UnhealthyNodeListPage.vue | 18 ++++----
dashboard/src/main/webapp/src/utils/common.js | 49 ++++++++++++++++++++++
proto/src/main/proto/Rss.proto | 1 +
17 files changed, 151 insertions(+), 71 deletions(-)
diff --git a/common/src/main/java/org/apache/uniffle/common/ServerStatus.java
b/common/src/main/java/org/apache/uniffle/common/ServerStatus.java
index d5f257a46..6853f17a4 100644
--- a/common/src/main/java/org/apache/uniffle/common/ServerStatus.java
+++ b/common/src/main/java/org/apache/uniffle/common/ServerStatus.java
@@ -29,6 +29,7 @@ public enum ServerStatus {
DECOMMISSIONED(2),
LOST(3),
UNHEALTHY(4),
+ EXCLUDED(5),
UNKNOWN(-1);
static final Map<Integer, ServerStatus> VALUE_MAP =
diff --git
a/coordinator/src/main/java/org/apache/uniffle/coordinator/ApplicationManager.java
b/coordinator/src/main/java/org/apache/uniffle/coordinator/ApplicationManager.java
index 92f780341..3ade47fec 100644
---
a/coordinator/src/main/java/org/apache/uniffle/coordinator/ApplicationManager.java
+++
b/coordinator/src/main/java/org/apache/uniffle/coordinator/ApplicationManager.java
@@ -527,6 +527,10 @@ public class ApplicationManager implements Closeable {
return REMOTE_PATH_SCHEMA;
}
+ public Map<String, Map<String, Long>> getCurrentUserAndApp() {
+ return currentUserAndApp;
+ }
+
public void close() {
if (detectStorageScheduler != null) {
detectStorageScheduler.shutdownNow();
diff --git
a/coordinator/src/main/java/org/apache/uniffle/coordinator/ClusterManager.java
b/coordinator/src/main/java/org/apache/uniffle/coordinator/ClusterManager.java
index 5cd76c7c1..131f89dee 100644
---
a/coordinator/src/main/java/org/apache/uniffle/coordinator/ClusterManager.java
+++
b/coordinator/src/main/java/org/apache/uniffle/coordinator/ClusterManager.java
@@ -63,6 +63,8 @@ public interface ClusterManager extends Closeable,
Reconfigurable {
*/
List<ServerNode> getUnhealthyServerList();
+ Set<String> getExcludeNodes();
+
/** @return number of server nodes in the cluster */
int getNodesNum();
diff --git
a/coordinator/src/main/java/org/apache/uniffle/coordinator/ServerNode.java
b/coordinator/src/main/java/org/apache/uniffle/coordinator/ServerNode.java
index 65df63203..93b1e59c3 100644
--- a/coordinator/src/main/java/org/apache/uniffle/coordinator/ServerNode.java
+++ b/coordinator/src/main/java/org/apache/uniffle/coordinator/ServerNode.java
@@ -21,6 +21,7 @@ import java.util.Map;
import java.util.Set;
import com.google.common.collect.Maps;
+import com.google.common.collect.Sets;
import org.apache.uniffle.common.ServerStatus;
import org.apache.uniffle.common.storage.StorageInfo;
@@ -41,6 +42,10 @@ public class ServerNode implements Comparable<ServerNode> {
private Map<String, StorageInfo> storageInfo;
private int nettyPort = -1;
+ public ServerNode(String id) {
+ this(id, "", 0, 0, 0, 0, 0, Sets.newHashSet(), ServerStatus.EXCLUDED);
+ }
+
// Only for test
public ServerNode(
String id,
diff --git
a/coordinator/src/main/java/org/apache/uniffle/coordinator/SimpleClusterManager.java
b/coordinator/src/main/java/org/apache/uniffle/coordinator/SimpleClusterManager.java
index cc5c1f7d7..8796d4aab 100644
---
a/coordinator/src/main/java/org/apache/uniffle/coordinator/SimpleClusterManager.java
+++
b/coordinator/src/main/java/org/apache/uniffle/coordinator/SimpleClusterManager.java
@@ -285,6 +285,7 @@ public class SimpleClusterManager implements ClusterManager
{
return Lists.newArrayList(unhealthyNodes);
}
+ @Override
public Set<String> getExcludeNodes() {
return excludeNodes;
}
diff --git
a/coordinator/src/main/java/org/apache/uniffle/coordinator/web/resource/ApplicationResource.java
b/coordinator/src/main/java/org/apache/uniffle/coordinator/web/resource/ApplicationResource.java
index f2e120522..7c621c5b4 100644
---
a/coordinator/src/main/java/org/apache/uniffle/coordinator/web/resource/ApplicationResource.java
+++
b/coordinator/src/main/java/org/apache/uniffle/coordinator/web/resource/ApplicationResource.java
@@ -19,12 +19,11 @@ package org.apache.uniffle.coordinator.web.resource;
import java.util.ArrayList;
import java.util.Comparator;
-import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import java.util.Set;
import javax.servlet.ServletContext;
+import com.google.common.collect.Maps;
import org.apache.hbase.thirdparty.javax.ws.rs.GET;
import org.apache.hbase.thirdparty.javax.ws.rs.Path;
import org.apache.hbase.thirdparty.javax.ws.rs.Produces;
@@ -46,9 +45,8 @@ public class ApplicationResource extends BaseResource {
public Response<Map<String, Integer>> getAppTotality() {
return execute(
() -> {
- Set<String> appIds = getApplicationManager().getAppIds();
- Map<String, Integer> appTotalityMap = new HashMap<>();
- appTotalityMap.put("appTotality", appIds.size());
+ Map<String, Integer> appTotalityMap = Maps.newHashMap();
+ appTotalityMap.put("appTotality",
getApplicationManager().getAppIds().size());
return appTotalityMap;
});
}
@@ -59,7 +57,7 @@ public class ApplicationResource extends BaseResource {
return execute(
() -> {
Map<String, Map<String, Long>> currentUserAndApp =
- getApplicationManager().getQuotaManager().getCurrentUserAndApp();
+ getApplicationManager().getCurrentUserAndApp();
List<UserAppNumVO> usercnt = new ArrayList<>();
for (Map.Entry<String, Map<String, Long>> stringMapEntry :
currentUserAndApp.entrySet()) {
String userName = stringMapEntry.getKey();
@@ -77,10 +75,8 @@ public class ApplicationResource extends BaseResource {
return execute(
() -> {
List<AppInfoVO> userToAppList = new ArrayList<>();
- Map<String, Map<String, Long>> currentUserAndApp = new HashMap<>();
- if (getApplicationManager().getQuotaManager() != null) {
- currentUserAndApp =
getApplicationManager().getQuotaManager().getCurrentUserAndApp();
- }
+ Map<String, Map<String, Long>> currentUserAndApp =
+ getApplicationManager().getCurrentUserAndApp();
for (Map.Entry<String, Map<String, Long>> userAppIdTimestampMap :
currentUserAndApp.entrySet()) {
String userName = userAppIdTimestampMap.getKey();
diff --git
a/coordinator/src/main/java/org/apache/uniffle/coordinator/web/resource/ServerResource.java
b/coordinator/src/main/java/org/apache/uniffle/coordinator/web/resource/ServerResource.java
index b6cd5b855..8bf0f11d4 100644
---
a/coordinator/src/main/java/org/apache/uniffle/coordinator/web/resource/ServerResource.java
+++
b/coordinator/src/main/java/org/apache/uniffle/coordinator/web/resource/ServerResource.java
@@ -17,7 +17,7 @@
package org.apache.uniffle.coordinator.web.resource;
-import java.util.Collections;
+import java.util.Collection;
import java.util.Comparator;
import java.util.HashSet;
import java.util.List;
@@ -72,6 +72,11 @@ public class ServerResource extends BaseResource {
serverList = clusterManager.getUnhealthyServerList();
} else if (ServerStatus.LOST.name().equalsIgnoreCase(status)) {
serverList = clusterManager.getLostServerList();
+ } else if (ServerStatus.EXCLUDED.name().equalsIgnoreCase(status)) {
+ serverList =
+ clusterManager.getExcludeNodes().stream()
+ .map(excludeNodeStr -> new ServerNode(excludeNodeStr))
+ .collect(Collectors.toList());
} else {
serverList = clusterManager.list();
}
@@ -79,7 +84,7 @@ public class ServerResource extends BaseResource {
serverList.stream()
.filter(
server -> {
- if (status != null &&
!server.getStatus().toString().equals(status)) {
+ if (status != null &&
!server.getStatus().name().equalsIgnoreCase(status)) {
return false;
}
return true;
@@ -171,10 +176,18 @@ public class ServerResource extends BaseResource {
return execute(
() -> {
ClusterManager clusterManager = getClusterManager();
+ List<ServerNode> excludeNodes =
+ clusterManager.getExcludeNodes().stream()
+ .map(exclude -> new ServerNode(exclude))
+ .collect(Collectors.toList());
Map<String, Integer> stringIntegerHash =
- Stream.concat(
-
clusterManager.getServerList(Collections.emptySet()).stream(),
- clusterManager.getLostServerList().stream())
+ Stream.of(
+ clusterManager.list(),
+ clusterManager.getLostServerList(),
+ excludeNodes,
+ clusterManager.getUnhealthyServerList())
+ .flatMap(Collection::stream)
+ .distinct()
.collect(
Collectors.groupingBy(
n -> n.getStatus().name(), Collectors.reducing(0, n
-> 1, Integer::sum)));
diff --git a/dashboard/src/main/webapp/src/components/ApplicationPage.vue
b/dashboard/src/main/webapp/src/components/ApplicationPage.vue
index 8d96f6254..1729311b9 100644
--- a/dashboard/src/main/webapp/src/components/ApplicationPage.vue
+++ b/dashboard/src/main/webapp/src/components/ApplicationPage.vue
@@ -67,7 +67,6 @@ export default {
async function getApplicationInfoListPage() {
const res = await getApplicationInfoList();
- console.log(res)
pageData.appInfoData = res.data.data
}
diff --git a/dashboard/src/main/webapp/src/components/ShuffleServerPage.vue
b/dashboard/src/main/webapp/src/components/ShuffleServerPage.vue
index 4f319d0e2..1a8af5298 100644
--- a/dashboard/src/main/webapp/src/components/ShuffleServerPage.vue
+++ b/dashboard/src/main/webapp/src/components/ShuffleServerPage.vue
@@ -26,7 +26,7 @@
<span class="cardtile">Active</span>
</div>
</template>
- <div class="activenode">{{
dataList.allshuffleServerSize.activeNode }}</div>
+ <div class="activenode">{{ dataList.allshuffleServerSize.ACTIVE ??
0 }}</div>
</el-card>
</router-link>
</el-col>
@@ -38,7 +38,7 @@
<span class="cardtile">Decommissioning</span>
</div>
</template>
- <div class="decommissioningnode">{{
dataList.allshuffleServerSize.decommissioningNode }}</div>
+ <div class="decommissioningnode">{{
dataList.allshuffleServerSize.DECOMMISSIONING ?? 0 }}</div>
</el-card>
</router-link>
</el-col>
@@ -50,7 +50,7 @@
<span class="cardtile">Decommissioned</span>
</div>
</template>
- <div class="decommissionednode">{{
dataList.allshuffleServerSize.decommissionedNode }}</div>
+ <div class="decommissionednode">{{
dataList.allshuffleServerSize.DECOMMISSIONED ?? 0 }}</div>
</el-card>
</router-link>
</el-col>
@@ -62,7 +62,7 @@
<span class="cardtile">Lost</span>
</div>
</template>
- <div class="lostnode">{{ dataList.allshuffleServerSize.lostNode
}}</div>
+ <div class="lostnode">{{ dataList.allshuffleServerSize.LOST ?? 0
}}</div>
</el-card>
</router-link>
</el-col>
@@ -74,7 +74,7 @@
<span class="cardtile">Unhealthy</span>
</div>
</template>
- <div class="unhealthynode">{{
dataList.allshuffleServerSize.unhealthyNode }}</div>
+ <div class="unhealthynode">{{
dataList.allshuffleServerSize.UNHEALTHY ?? 0 }}</div>
</el-card>
</router-link>
</el-col>
@@ -86,7 +86,7 @@
<span class="cardtile">Excludes</span>
</div>
</template>
- <div class="excludesnode">{{
dataList.allshuffleServerSize.excludesNode }}</div>
+ <div class="excludesnode">{{
dataList.allshuffleServerSize.EXCLUDED ?? 0 }}</div>
</el-card>
</router-link>
</el-col>
@@ -108,12 +108,12 @@ export default {
setup() {
const dataList = reactive({
allshuffleServerSize: {
- activeNode: 0,
- decommissionedNode: 0,
- decommissioningNode: 0,
- excludesNode: 0,
- lostNode: 0,
- unhealthyNode: 0
+ ACTIVE: 0,
+ DECOMMISSIONED: 0,
+ DECOMMISSIONING: 0,
+ EXCLUDED: 0,
+ LOST: 0,
+ UNHEALTHY: 0
}
})
diff --git
a/dashboard/src/main/webapp/src/components/shufflecomponent/ActiveNodeListPage.vue
b/dashboard/src/main/webapp/src/components/shufflecomponent/ActiveNodeListPage.vue
index 128fe0948..703f15a53 100644
---
a/dashboard/src/main/webapp/src/components/shufflecomponent/ActiveNodeListPage.vue
+++
b/dashboard/src/main/webapp/src/components/shufflecomponent/ActiveNodeListPage.vue
@@ -18,16 +18,16 @@
<template>
<div>
<el-table :data="pageData.tableData" height="550" style="width: 100%">
- <el-table-column prop="id" label="Id" min-width="180"/>
+ <el-table-column prop="id" label="Id" min-width="140"/>
<el-table-column prop="ip" label="IP" min-width="80"/>
- <el-table-column prop="grpcPort" label="Port" min-width="80"/>
- <el-table-column prop="usedMemory" label="UsedMem" min-width="80"/>
- <el-table-column prop="preAllocatedMemory" label="PreAllocatedMem"
min-width="80"/>
- <el-table-column prop="availableMemory" label="AvailableMem"
min-width="80"/>
- <el-table-column prop="totalMemory" label="TotalMem" min-width="80"/>
+ <el-table-column prop="grpcPort" label="GrpcPort" min-width="80"/>
+ <el-table-column prop="nettyPort" label="NettyPort" min-width="80"/>
+ <el-table-column prop="usedMemory" label="UsedMem" min-width="80"
:formatter="memFormatter"/>
+ <el-table-column prop="preAllocatedMemory" label="PreAllocatedMem"
min-width="80" :formatter="memFormatter"/>
+ <el-table-column prop="availableMemory" label="AvailableMem"
min-width="80" :formatter="memFormatter"/>
<el-table-column prop="eventNumInFlush" label="FlushNum" min-width="80"/>
<el-table-column prop="status" label="Status" min-width="80"/>
- <el-table-column prop="timestamp" label="ResigerTime" min-width="80"/>
+ <el-table-column prop="timestamp" label="ResigerTime" min-width="80"
:formatter="dateFormatter"/>
<el-table-column prop="tags" label="Tags" min-width="80"/>
</el-table>
</div>
@@ -35,6 +35,7 @@
<script>
import {onMounted, reactive} from 'vue'
import { getShuffleActiveNodes} from "@/api/api";
+import {memFormatter, dateFormatter} from "@/utils/common";
export default {
setup() {
@@ -44,10 +45,10 @@ export default {
id: "",
ip: "",
grpcPort: 0,
+ nettyPort:0,
usedMemory: 0,
preAllocatedMemory: 0,
availableMemory: 0,
- totalMemory: 0,
eventNumInFlush: 0,
tags: "",
status: "",
@@ -64,7 +65,7 @@ export default {
onMounted(() => {
getShuffleActiveNodesPage();
})
- return {pageData}
+ return {pageData, memFormatter, dateFormatter}
}
}
</script>
diff --git
a/dashboard/src/main/webapp/src/components/shufflecomponent/DecommissionednodeListPage.vue
b/dashboard/src/main/webapp/src/components/shufflecomponent/DecommissionednodeListPage.vue
index d22fee178..1a0fa63d3 100644
---
a/dashboard/src/main/webapp/src/components/shufflecomponent/DecommissionednodeListPage.vue
+++
b/dashboard/src/main/webapp/src/components/shufflecomponent/DecommissionednodeListPage.vue
@@ -18,16 +18,16 @@
<template>
<div>
<el-table :data="pageData.tableData" height="550" style="width: 100%">
- <el-table-column prop="id" label="Id" min-width="180"/>
+ <el-table-column prop="id" label="Id" min-width="140"/>
<el-table-column prop="ip" label="IP" min-width="80"/>
<el-table-column prop="grpcPort" label="Port" min-width="80"/>
- <el-table-column prop="usedMemory" label="UsedMem" min-width="80"/>
- <el-table-column prop="preAllocatedMemory" label="PreAllocatedMem"
min-width="80"/>
- <el-table-column prop="availableMemory" label="AvailableMem"
min-width="80"/>
- <el-table-column prop="totalMemory" label="TotalMem" min-width="80"/>
+ <el-table-column prop="nettyPort" label="NettyPort" min-width="80"/>
+ <el-table-column prop="usedMemory" label="UsedMem" min-width="80"
:formatter="memFormatter"/>
+ <el-table-column prop="preAllocatedMemory" label="PreAllocatedMem"
min-width="80" :formatter="memFormatter"/>
+ <el-table-column prop="availableMemory" label="AvailableMem"
min-width="80" :formatter="memFormatter"/>
<el-table-column prop="eventNumInFlush" label="FlushNum" min-width="80"/>
<el-table-column prop="status" label="Status" min-width="80"/>
- <el-table-column prop="timestamp" label="ResigerTime" min-width="80"/>
+ <el-table-column prop="timestamp" label="ResigerTime" min-width="80"
:formatter="dateFormatter"/>
<el-table-column prop="tags" label="Tags" min-width="80"/>
</el-table>
</div>
@@ -35,6 +35,7 @@
<script>
import {onMounted, reactive} from 'vue'
import { getShuffleDecommissionedList } from "@/api/api";
+import {memFormatter, dateFormatter} from "@/utils/common";
export default {
setup() {
@@ -44,10 +45,10 @@ export default {
id: "",
ip: "",
grpcPort: 0,
+ nettyPort:0,
usedMemory: 0,
preAllocatedMemory: 0,
availableMemory: 0,
- totalMemory: 0,
eventNumInFlush: 0,
tags: "",
status: "",
@@ -64,7 +65,8 @@ export default {
onMounted(() => {
getShuffleDecommissionedListPage();
})
- return {pageData}
+
+ return {pageData, memFormatter, dateFormatter}
}
}
</script>
diff --git
a/dashboard/src/main/webapp/src/components/shufflecomponent/DecommissioningNodeListPage.vue
b/dashboard/src/main/webapp/src/components/shufflecomponent/DecommissioningNodeListPage.vue
index 08e4063aa..930f64304 100644
---
a/dashboard/src/main/webapp/src/components/shufflecomponent/DecommissioningNodeListPage.vue
+++
b/dashboard/src/main/webapp/src/components/shufflecomponent/DecommissioningNodeListPage.vue
@@ -18,16 +18,16 @@
<template>
<div>
<el-table :data="pageData.tableData" height="550" style="width: 100%">
- <el-table-column prop="id" label="Id" min-width="180"/>
+ <el-table-column prop="id" label="Id" min-width="140"/>
<el-table-column prop="ip" label="IP" min-width="80"/>
<el-table-column prop="grpcPort" label="Port" min-width="80"/>
- <el-table-column prop="usedMemory" label="UsedMem" min-width="80"/>
- <el-table-column prop="preAllocatedMemory" label="PreAllocatedMem"
min-width="80"/>
- <el-table-column prop="availableMemory" label="AvailableMem"
min-width="80"/>
- <el-table-column prop="totalMemory" label="TotalMem" min-width="80"/>
+ <el-table-column prop="nettyPort" label="NettyPort" min-width="80"/>
+ <el-table-column prop="usedMemory" label="UsedMem" min-width="80"
:formatter="memFormatter"/>
+ <el-table-column prop="preAllocatedMemory" label="PreAllocatedMem"
min-width="80" :formatter="memFormatter"/>
+ <el-table-column prop="availableMemory" label="AvailableMem"
min-width="80" :formatter="memFormatter"/>
<el-table-column prop="eventNumInFlush" label="FlushNum" min-width="80"/>
<el-table-column prop="status" label="Status" min-width="80"/>
- <el-table-column prop="timestamp" label="ResigerTime" min-width="80"/>
+ <el-table-column prop="timestamp" label="ResigerTime" min-width="80"
:formatter="dateFormatter"/>
<el-table-column prop="tags" label="Tags" min-width="80"/>
</el-table>
</div>
@@ -35,6 +35,7 @@
<script>
import {onMounted, reactive} from 'vue'
import { getShuffleDecommissioningList } from "@/api/api";
+import {memFormatter, dateFormatter} from "@/utils/common";
export default {
setup() {
@@ -44,10 +45,10 @@ export default {
id: "",
ip: "",
grpcPort: 0,
+ nettyPort:0,
usedMemory: 0,
preAllocatedMemory: 0,
availableMemory: 0,
- totalMemory: 0,
eventNumInFlush: 0,
tags: "",
status: "",
@@ -64,7 +65,8 @@ export default {
onMounted(() => {
getShuffleDecommissioningListPage();
})
- return {pageData}
+
+ return {pageData, memFormatter, dateFormatter}
}
}
</script>
diff --git
a/dashboard/src/main/webapp/src/components/shufflecomponent/ExcludeNodeList.vue
b/dashboard/src/main/webapp/src/components/shufflecomponent/ExcludeNodeList.vue
index 6ba95524f..4c0286ee3 100644
---
a/dashboard/src/main/webapp/src/components/shufflecomponent/ExcludeNodeList.vue
+++
b/dashboard/src/main/webapp/src/components/shufflecomponent/ExcludeNodeList.vue
@@ -18,7 +18,7 @@
<template>
<div>
<el-table :data="pageData.tableData" height="550" style="width: 100%">
- <el-table-column prop="excludeNodeId" label="ExcludeNodeId"
min-width="180"/>
+ <el-table-column prop="id" label="ExcludeNodeId" min-width="180"/>
</el-table>
</div>
</template>
@@ -31,7 +31,7 @@ export default {
const pageData = reactive({
tableData: [
{
- excludeNodeId:""
+ id:""
}
]
})
diff --git
a/dashboard/src/main/webapp/src/components/shufflecomponent/LostNodeList.vue
b/dashboard/src/main/webapp/src/components/shufflecomponent/LostNodeList.vue
index febbe9881..902951cdc 100644
--- a/dashboard/src/main/webapp/src/components/shufflecomponent/LostNodeList.vue
+++ b/dashboard/src/main/webapp/src/components/shufflecomponent/LostNodeList.vue
@@ -18,16 +18,16 @@
<template>
<div>
<el-table :data="pageData.tableData" height="550" style="width: 100%">
- <el-table-column prop="id" label="Id" min-width="180"/>
+ <el-table-column prop="id" label="Id" min-width="140"/>
<el-table-column prop="ip" label="IP" min-width="80"/>
<el-table-column prop="grpcPort" label="Port" min-width="80"/>
- <el-table-column prop="usedMemory" label="UsedMem" min-width="80"/>
- <el-table-column prop="preAllocatedMemory" label="PreAllocatedMem"
min-width="80"/>
- <el-table-column prop="availableMemory" label="AvailableMem"
min-width="80"/>
- <el-table-column prop="totalMemory" label="TotalMem" min-width="80"/>
+ <el-table-column prop="nettyPort" label="NettyPort" min-width="80"/>
+ <el-table-column prop="usedMemory" label="UsedMem" min-width="80"
:formatter="memFormatter"/>
+ <el-table-column prop="preAllocatedMemory" label="PreAllocatedMem"
min-width="80" :formatter="memFormatter"/>
+ <el-table-column prop="availableMemory" label="AvailableMem"
min-width="80" :formatter="memFormatter"/>
<el-table-column prop="eventNumInFlush" label="FlushNum" min-width="80"/>
<el-table-column prop="status" label="Status" min-width="80"/>
- <el-table-column prop="timestamp" label="ResigerTime" min-width="80"/>
+ <el-table-column prop="timestamp" label="ResigerTime" min-width="80"
:formatter="dateFormatter"/>
<el-table-column prop="tags" label="Tags" min-width="80"/>
</el-table>
</div>
@@ -35,6 +35,7 @@
<script>
import {onMounted, reactive} from 'vue'
import { getShuffleLostList } from "@/api/api";
+import {memFormatter, dateFormatter} from "@/utils/common";
export default {
setup() {
@@ -44,10 +45,10 @@ export default {
id: "",
ip: "",
grpcPort: 0,
+ nettyPort:0,
usedMemory: 0,
preAllocatedMemory: 0,
availableMemory: 0,
- totalMemory: 0,
eventNumInFlush: 0,
tags: "",
status: "",
@@ -64,7 +65,8 @@ export default {
onMounted(() => {
getShuffleLostListPage();
})
- return {pageData}
+
+ return {pageData, memFormatter, dateFormatter}
}
}
</script>
diff --git
a/dashboard/src/main/webapp/src/components/shufflecomponent/UnhealthyNodeListPage.vue
b/dashboard/src/main/webapp/src/components/shufflecomponent/UnhealthyNodeListPage.vue
index c80ec3900..f66346dcd 100644
---
a/dashboard/src/main/webapp/src/components/shufflecomponent/UnhealthyNodeListPage.vue
+++
b/dashboard/src/main/webapp/src/components/shufflecomponent/UnhealthyNodeListPage.vue
@@ -18,16 +18,16 @@
<template>
<div>
<el-table :data="pageData.tableData" height="550" style="width: 100%">
- <el-table-column prop="id" label="Id" min-width="180"/>
+ <el-table-column prop="id" label="Id" min-width="140"/>
<el-table-column prop="ip" label="IP" min-width="80"/>
<el-table-column prop="grpcPort" label="Port" min-width="80"/>
- <el-table-column prop="usedMemory" label="UsedMem" min-width="80"/>
- <el-table-column prop="preAllocatedMemory" label="PreAllocatedMem"
min-width="80"/>
- <el-table-column prop="availableMemory" label="AvailableMem"
min-width="80"/>
- <el-table-column prop="totalMemory" label="TotalMem" min-width="80"/>
+ <el-table-column prop="nettyPort" label="NettyPort" min-width="80"/>
+ <el-table-column prop="usedMemory" label="UsedMem" min-width="80"
:formatter="memFormatter"/>
+ <el-table-column prop="preAllocatedMemory" label="PreAllocatedMem"
min-width="80" :formatter="memFormatter"/>
+ <el-table-column prop="availableMemory" label="AvailableMem"
min-width="80" :formatter="memFormatter"/>
<el-table-column prop="eventNumInFlush" label="FlushNum" min-width="80"/>
<el-table-column prop="status" label="Status" min-width="80"/>
- <el-table-column prop="timestamp" label="ResigerTime" min-width="80"/>
+ <el-table-column prop="timestamp" label="ResigerTime" min-width="80"
:formatter="dateFormatter"/>
<el-table-column prop="tags" label="Tags" min-width="80"/>
</el-table>
</div>
@@ -35,6 +35,7 @@
<script>
import {onMounted, reactive} from 'vue'
import { getShuffleUnhealthyList } from "@/api/api";
+import {memFormatter, dateFormatter} from "@/utils/common";
export default {
setup() {
@@ -44,10 +45,10 @@ export default {
id: "",
ip: "",
grpcPort: 0,
+ nettyPort:0,
usedMemory: 0,
preAllocatedMemory: 0,
availableMemory: 0,
- totalMemory: 0,
eventNumInFlush: 0,
tags: "",
status: "",
@@ -64,7 +65,8 @@ export default {
onMounted(() => {
getShuffleUnhealthyListPage();
})
- return {pageData}
+
+ return {pageData, memFormatter, dateFormatter}
}
}
</script>
diff --git a/dashboard/src/main/webapp/src/utils/common.js
b/dashboard/src/main/webapp/src/utils/common.js
new file mode 100644
index 000000000..2bbbdf1ef
--- /dev/null
+++ b/dashboard/src/main/webapp/src/utils/common.js
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import moment from "moment"
+/**
+ * Format the memory display value.
+ * @param row
+ * @param column
+ * @param cellValue
+ * @returns {string}
+ */
+const memFormatter = (row, column, cellValue) => {
+ var arrUnit = ["B", "K", "M", "G", "T", "P"],
+ baseStep = 1024,
+ unitCount = arrUnit.length,
+ unitIndex = 0;
+ while(cellValue >= baseStep && unitIndex < unitCount - 1){
+ unitIndex++;
+ cellValue /= baseStep;
+ }
+ cellValue = cellValue.toFixed(2);
+ return cellValue + " " + arrUnit[unitIndex];
+}
+/**
+ * Format the time display value.
+ * @param row
+ * @param column
+ * @param cellValue
+ * @returns {string}
+ */
+const dateFormatter = (row, column, cellValue) => {
+ return moment(cellValue).format("YYYY-MM-DD hh:mm:ss");
+}
+
+export {memFormatter, dateFormatter}
diff --git a/proto/src/main/proto/Rss.proto b/proto/src/main/proto/Rss.proto
index 3b3ad8e59..ace16b6b8 100644
--- a/proto/src/main/proto/Rss.proto
+++ b/proto/src/main/proto/Rss.proto
@@ -241,6 +241,7 @@ enum ServerStatus {
DECOMMISSIONED = 2;
LOST = 3;
UNHEALTHY = 4;
+ EXCLUDED = 5;
// todo: more status, such as UPGRADING
}