feature(web): 增加 hive 表维度统计
This commit is contained in:
@@ -11,6 +11,11 @@ import com.lanyuanxiaoyao.service.forest.service.InfoService;
|
|||||||
import com.lanyuanxiaoyao.service.forest.service.QueueService;
|
import com.lanyuanxiaoyao.service.forest.service.QueueService;
|
||||||
import com.lanyuanxiaoyao.service.forest.service.YarnService;
|
import com.lanyuanxiaoyao.service.forest.service.YarnService;
|
||||||
import com.lanyuanxiaoyao.service.web.entity.JobIdAndAliasVO;
|
import com.lanyuanxiaoyao.service.web.entity.JobIdAndAliasVO;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
import java.util.concurrent.ExecutionException;
|
||||||
import org.eclipse.collections.api.factory.Lists;
|
import org.eclipse.collections.api.factory.Lists;
|
||||||
import org.eclipse.collections.api.factory.Maps;
|
import org.eclipse.collections.api.factory.Maps;
|
||||||
import org.eclipse.collections.api.list.ImmutableList;
|
import org.eclipse.collections.api.list.ImmutableList;
|
||||||
@@ -22,12 +27,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.time.format.DateTimeFormatter;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.concurrent.CompletableFuture;
|
|
||||||
import java.util.concurrent.ExecutionException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 概览
|
* 概览
|
||||||
*
|
*
|
||||||
@@ -56,17 +55,23 @@ public class OverviewController extends BaseController {
|
|||||||
CompletableFuture<Long> tableFocusCountFuture = CompletableFuture.supplyAsync(infoService::tableFocusCount, ExecutorProvider.EXECUTORS);
|
CompletableFuture<Long> tableFocusCountFuture = CompletableFuture.supplyAsync(infoService::tableFocusCount, ExecutorProvider.EXECUTORS);
|
||||||
CompletableFuture<Long> hudiCountFuture = CompletableFuture.supplyAsync(infoService::hudiCount, ExecutorProvider.EXECUTORS);
|
CompletableFuture<Long> hudiCountFuture = CompletableFuture.supplyAsync(infoService::hudiCount, ExecutorProvider.EXECUTORS);
|
||||||
CompletableFuture<Long> hudiFocusCountFuture = CompletableFuture.supplyAsync(infoService::hudiFocusCount, ExecutorProvider.EXECUTORS);
|
CompletableFuture<Long> hudiFocusCountFuture = CompletableFuture.supplyAsync(infoService::hudiFocusCount, ExecutorProvider.EXECUTORS);
|
||||||
|
CompletableFuture<Long> hiveCountFuture = CompletableFuture.supplyAsync(infoService::hiveCount, ExecutorProvider.EXECUTORS);
|
||||||
|
CompletableFuture<Long> hiveFocusCountFuture = CompletableFuture.supplyAsync(infoService::hiveFocusCount, ExecutorProvider.EXECUTORS);
|
||||||
CompletableFuture.allOf(
|
CompletableFuture.allOf(
|
||||||
tableCountFuture,
|
tableCountFuture,
|
||||||
tableFocusCountFuture,
|
tableFocusCountFuture,
|
||||||
hudiCountFuture,
|
hudiCountFuture,
|
||||||
hudiFocusCountFuture
|
hudiFocusCountFuture,
|
||||||
|
hiveCountFuture,
|
||||||
|
hiveFocusCountFuture
|
||||||
).get();
|
).get();
|
||||||
return responseData()
|
return responseData()
|
||||||
.withData("table_count", tableCountFuture.get())
|
.withData("table_count", tableCountFuture.get())
|
||||||
.withData("table_focus_count", tableFocusCountFuture.get())
|
.withData("table_focus_count", tableFocusCountFuture.get())
|
||||||
.withData("hudi_count", hudiCountFuture.get())
|
.withData("hudi_count", hudiCountFuture.get())
|
||||||
.withData("hudi_focus_count", hudiFocusCountFuture.get());
|
.withData("hudi_focus_count", hudiFocusCountFuture.get())
|
||||||
|
.withData("hive_count", hiveCountFuture.get())
|
||||||
|
.withData("hive_focus_count", hiveFocusCountFuture.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("yarn-job")
|
@GetMapping("yarn-job")
|
||||||
|
|||||||
@@ -215,12 +215,17 @@ function overviewTab() {
|
|||||||
body: [
|
body: [
|
||||||
{
|
{
|
||||||
type: 'tpl',
|
type: 'tpl',
|
||||||
tpl: '逻辑表:<span class="font-bold mr-1">${PADSTART(table_count, 4)} (<span class="text-primary">${PADSTART(table_focus_count, 4)}</span>, ${PADSTART(table_count - table_focus_count, 4)})</span>',
|
tpl: '逻辑表:<span class="font-bold mr-1 font-mono">${PADSTART(table_count, 4)} (<span class="text-primary">${PADSTART(table_focus_count, 4)}</span>, ${PADSTART(table_count - table_focus_count, 4)})</span>',
|
||||||
},
|
},
|
||||||
'<br>',
|
'<br>',
|
||||||
{
|
{
|
||||||
type: 'tpl',
|
type: 'tpl',
|
||||||
tpl: '湖底表:<span class="font-bold mr-1">${PADSTART(hudi_count, 4)} (<span class="text-primary">${PADSTART(hudi_focus_count, 4)}</span>, ${PADSTART(hudi_count - hudi_focus_count, 4)})</span>',
|
tpl: '湖底表:<span class="font-bold mr-1 font-mono">${PADSTART(hudi_count, 4)} (<span class="text-primary">${PADSTART(hudi_focus_count, 4)}</span>, ${PADSTART(hudi_count - hudi_focus_count, 4)})</span>',
|
||||||
|
},
|
||||||
|
'<br>',
|
||||||
|
{
|
||||||
|
type: 'tpl',
|
||||||
|
tpl: '嗨福表:<span class="font-bold mr-1 font-mono">${PADSTART(hive_count, 4)} (<span class="text-primary">${PADSTART(hive_focus_count, 4)}</span>, ${PADSTART(hive_count - hive_focus_count, 4)})</span>',
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user