From ce77f460e308895d4c50e16c40f63fa953fd273d Mon Sep 17 00:00:00 2001 From: LiuGuoHua Date: Thu, 22 Feb 2024 09:35:49 +0800 Subject: [PATCH] 1. formatted code --- .../jobhistory/dao/JobHistoryMapper.java | 34 +-- .../jobhistory/dao/JobStatisticsMapper.java | 52 ++-- .../restful/api/QueryRestfulApi.java | 39 +-- .../restful/api/StatisticsRestfulApi.java | 271 +++++++++--------- .../impl/JobHistoryQueryServiceImpl.scala | 16 +- .../impl/JobStatisticsQueryServiceImpl.scala | 43 ++- 6 files changed, 231 insertions(+), 224 deletions(-) diff --git a/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/dao/JobHistoryMapper.java b/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/dao/JobHistoryMapper.java index a229163946..c01720a5f3 100644 --- a/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/dao/JobHistoryMapper.java +++ b/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/dao/JobHistoryMapper.java @@ -132,22 +132,24 @@ List selectFailoverJobHistory( @Param("limit") Integer limit); List taskDurationTopN( - @Param("startDate") Date startDate, - @Param("endDate") Date endDate, - @Param("umUser") String username, - @Param("engineType") String engineType); + @Param("startDate") Date startDate, + @Param("endDate") Date endDate, + @Param("umUser") String username, + @Param("engineType") String engineType); + List taskDurationTopNWithUserCreator( - @Param("umUser") String username, - @Param("userCreatorKey") String userCreatorKey, - @Param("userCreatorValue") String userCreator, - @Param("startDate") Date startDate, - @Param("endDate") Date endDate, - @Param("engineType") String engineType); + @Param("umUser") String username, + @Param("userCreatorKey") String userCreatorKey, + @Param("userCreatorValue") String userCreator, + @Param("startDate") Date startDate, + @Param("endDate") Date endDate, + @Param("engineType") String engineType); + List taskDurationTopNWithCreatorOnly( - @Param("umUser") String username, - @Param("userCreatorKey") String userCreatorKey, - @Param("creator") String userCreator, - @Param("startDate") Date startDate, - @Param("endDate") Date endDate, - @Param("engineType") String engineType); + @Param("umUser") String username, + @Param("userCreatorKey") String userCreatorKey, + @Param("creator") String userCreator, + @Param("startDate") Date startDate, + @Param("endDate") Date endDate, + @Param("engineType") String engineType); } diff --git a/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/dao/JobStatisticsMapper.java b/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/dao/JobStatisticsMapper.java index 2016caca3b..9c0ee86d9e 100644 --- a/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/dao/JobStatisticsMapper.java +++ b/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/dao/JobStatisticsMapper.java @@ -26,38 +26,38 @@ public interface JobStatisticsMapper { JobStatistics taskExecutionStatistics( - @Param("umUser") String username, - @Param("startDate") Date startDate, - @Param("endDate") Date endDate, - @Param("engineType") String engineType); + @Param("umUser") String username, + @Param("startDate") Date startDate, + @Param("endDate") Date endDate, + @Param("engineType") String engineType); JobStatistics taskExecutionStatisticsWithUserCreator( - @Param("umUser") String username, - @Param("userCreatorKey") String userCreatorKey, - @Param("userCreatorValue") String userCreator, - @Param("startDate") Date startDate, - @Param("endDate") Date endDate, - @Param("engineType") String engineType); + @Param("umUser") String username, + @Param("userCreatorKey") String userCreatorKey, + @Param("userCreatorValue") String userCreator, + @Param("startDate") Date startDate, + @Param("endDate") Date endDate, + @Param("engineType") String engineType); JobStatistics taskExecutionStatisticsWithCreatorOnly( - @Param("umUser") String username, - @Param("userCreatorKey") String userCreatorKey, - @Param("creator") String userCreator, - @Param("startDate") Date startDate, - @Param("endDate") Date endDate, - @Param("engineType") String engineType); + @Param("umUser") String username, + @Param("userCreatorKey") String userCreatorKey, + @Param("creator") String userCreator, + @Param("startDate") Date startDate, + @Param("endDate") Date endDate, + @Param("engineType") String engineType); JobStatistics engineExecutionStatisticsWithUserCreator( - @Param("umUser") String username, - @Param("userCreatorValue") String userCreator, - @Param("startDate") Date startDate, - @Param("endDate") Date endDate, - @Param("engineType") String engineType); + @Param("umUser") String username, + @Param("userCreatorValue") String userCreator, + @Param("startDate") Date startDate, + @Param("endDate") Date endDate, + @Param("engineType") String engineType); JobStatistics engineExecutionStatistics( - @Param("umUser") String username, - @Param("creator") String userCreator, - @Param("startDate") Date startDate, - @Param("endDate") Date endDate, - @Param("engineType") String engineType); + @Param("umUser") String username, + @Param("creator") String userCreator, + @Param("startDate") Date startDate, + @Param("endDate") Date endDate, + @Param("engineType") String engineType); } diff --git a/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/restful/api/QueryRestfulApi.java b/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/restful/api/QueryRestfulApi.java index 1a73734b98..0ae72b84b3 100644 --- a/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/restful/api/QueryRestfulApi.java +++ b/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/restful/api/QueryRestfulApi.java @@ -416,26 +416,30 @@ public Message listundone( /** Method list should not contain subjob, which may cause performance problems. */ @ApiOperation(value = "listDurationTop", notes = "listDurationTop", response = Message.class) @ApiImplicitParams({ - @ApiImplicitParam(name = "startDate", dataType = "long", example = "1658937600001"), - @ApiImplicitParam(name = "endDate", dataType = "long", example = "1658937600000"), - @ApiImplicitParam(name = "executeApplicationName", dataType = "String"), - @ApiImplicitParam(name = "creator", required = false, dataType = "String", value = "creator"), - @ApiImplicitParam(name = "proxyUser", required = false, dataType = "String", value = "proxyUser"), - @ApiImplicitParam(name = "pageNow", required = false, dataType = "Integer", value = "page now"), - @ApiImplicitParam(name = "pageSize", dataType = "Integer"), + @ApiImplicitParam(name = "startDate", dataType = "long", example = "1658937600001"), + @ApiImplicitParam(name = "endDate", dataType = "long", example = "1658937600000"), + @ApiImplicitParam(name = "executeApplicationName", dataType = "String"), + @ApiImplicitParam(name = "creator", required = false, dataType = "String", value = "creator"), + @ApiImplicitParam( + name = "proxyUser", + required = false, + dataType = "String", + value = "proxyUser"), + @ApiImplicitParam(name = "pageNow", required = false, dataType = "Integer", value = "page now"), + @ApiImplicitParam(name = "pageSize", dataType = "Integer"), }) @RequestMapping(path = "/listDurationTop", method = RequestMethod.GET) public Message listDurationTop( - HttpServletRequest req, - @RequestParam(value = "startDate", required = false) Long startDate, - @RequestParam(value = "endDate", required = false) Long endDate, - @RequestParam(value = "executeApplicationName", required = false) + HttpServletRequest req, + @RequestParam(value = "startDate", required = false) Long startDate, + @RequestParam(value = "endDate", required = false) Long endDate, + @RequestParam(value = "executeApplicationName", required = false) String executeApplicationName, - @RequestParam(value = "creator", required = false) String creator, - @RequestParam(value = "proxyUser", required = false) String proxyUser, - @RequestParam(value = "pageNow", required = false) Integer pageNow, - @RequestParam(value = "pageSize", required = false) Integer pageSize) - throws QueryException { + @RequestParam(value = "creator", required = false) String creator, + @RequestParam(value = "proxyUser", required = false) String proxyUser, + @RequestParam(value = "pageNow", required = false) Integer pageNow, + @RequestParam(value = "pageSize", required = false) Integer pageSize) + throws QueryException { if (StringUtils.isEmpty(pageNow)) { pageNow = 1; } @@ -483,7 +487,8 @@ public Message listDurationTop( PageHelper.startPage(pageNow, pageSize); try { queryTasks = - jobHistoryQueryService.taskDurationTopN(sDate, eDate, proxyUser, creator, executeApplicationName); + jobHistoryQueryService.taskDurationTopN( + sDate, eDate, proxyUser, creator, executeApplicationName); } finally { PageHelper.clearPage(); } diff --git a/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/restful/api/StatisticsRestfulApi.java b/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/restful/api/StatisticsRestfulApi.java index bb73edee5d..23a12c2b94 100644 --- a/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/restful/api/StatisticsRestfulApi.java +++ b/linkis-public-enhancements/linkis-jobhistory/src/main/java/org/apache/linkis/jobhistory/restful/api/StatisticsRestfulApi.java @@ -47,142 +47,149 @@ @RequestMapping(path = "/jobhistory/jobstatistics") public class StatisticsRestfulApi { - private Logger log = LoggerFactory.getLogger(this.getClass()); + private Logger log = LoggerFactory.getLogger(this.getClass()); - @Autowired - private JobStatisticsQueryService jobStatisticsQueryService; + @Autowired private JobStatisticsQueryService jobStatisticsQueryService; - @ApiOperation(value = "taskCount", notes = "taskCount", response = Message.class) - @ApiImplicitParams({ - @ApiImplicitParam(name = "startDate", dataType = "long"), - @ApiImplicitParam(name = "endDate", required = false, dataType = "long", value = "end date"), - @ApiImplicitParam(name = "executeApplicationName", dataType = "String"), - @ApiImplicitParam(name = "creator", required = false, dataType = "String", value = "creator"), - @ApiImplicitParam(name = "proxyUser", required = false, dataType = "String", value = "proxyUser"), - }) - @RequestMapping(path = "/taskCount", method = RequestMethod.GET) - public Message taskCount( - HttpServletRequest req, - @RequestParam(value = "startDate", required = false) Long startDate, - @RequestParam(value = "endDate", required = false) Long endDate, - @RequestParam(value = "executeApplicationName", required = false) - String executeApplicationName, - @RequestParam(value = "creator", required = false) String creator, - @RequestParam(value = "proxyUser", required = false) String proxyUser) - throws IOException, QueryException { - if (endDate == null) { - endDate = System.currentTimeMillis(); - } - if (startDate == null) { - startDate = 0L; - } - Date sDate = new Date(startDate); - Date eDate = new Date(endDate); - if (startDate == 0L) { - sDate = DateUtils.addDays(eDate, -1); - } - if (sDate.getTime() == eDate.getTime()) { - Calendar instance = Calendar.getInstance(); - instance.setTimeInMillis(endDate); - instance.add(Calendar.DAY_OF_MONTH, 1); - eDate = new Date(instance.getTime().getTime()); - } - if (StringUtils.isEmpty(proxyUser)) { - proxyUser = null; - } else { - if (!QueryUtils.checkNameValid(proxyUser)) { - return Message.error("Invalid proxyUser : " + proxyUser); - } - } - if (StringUtils.isEmpty(creator)) { - creator = null; - } else { - if (!QueryUtils.checkNameValid(creator)) { - return Message.error("Invalid creator : " + creator); - } - } - if (!StringUtils.isEmpty(executeApplicationName)) { - if (!QueryUtils.checkNameValid(executeApplicationName)) { - return Message.error("Invalid applicationName : " + executeApplicationName); - } - } else { - executeApplicationName = null; - } - JobStatistics jobStatistics = - jobStatisticsQueryService.taskExecutionStatistics( - sDate, eDate, proxyUser, creator, executeApplicationName); - - return Message.ok() - .data("sumCount", jobStatistics.getSumCount()) - .data("succeedCount", jobStatistics.getSucceedCount()) - .data("failedCount", jobStatistics.getFailedCount()) - .data("cancelledCount", jobStatistics.getCancelledCount()); + @ApiOperation(value = "taskCount", notes = "taskCount", response = Message.class) + @ApiImplicitParams({ + @ApiImplicitParam(name = "startDate", dataType = "long"), + @ApiImplicitParam(name = "endDate", required = false, dataType = "long", value = "end date"), + @ApiImplicitParam(name = "executeApplicationName", dataType = "String"), + @ApiImplicitParam(name = "creator", required = false, dataType = "String", value = "creator"), + @ApiImplicitParam( + name = "proxyUser", + required = false, + dataType = "String", + value = "proxyUser"), + }) + @RequestMapping(path = "/taskCount", method = RequestMethod.GET) + public Message taskCount( + HttpServletRequest req, + @RequestParam(value = "startDate", required = false) Long startDate, + @RequestParam(value = "endDate", required = false) Long endDate, + @RequestParam(value = "executeApplicationName", required = false) + String executeApplicationName, + @RequestParam(value = "creator", required = false) String creator, + @RequestParam(value = "proxyUser", required = false) String proxyUser) + throws IOException, QueryException { + if (endDate == null) { + endDate = System.currentTimeMillis(); + } + if (startDate == null) { + startDate = 0L; + } + Date sDate = new Date(startDate); + Date eDate = new Date(endDate); + if (startDate == 0L) { + sDate = DateUtils.addDays(eDate, -1); + } + if (sDate.getTime() == eDate.getTime()) { + Calendar instance = Calendar.getInstance(); + instance.setTimeInMillis(endDate); + instance.add(Calendar.DAY_OF_MONTH, 1); + eDate = new Date(instance.getTime().getTime()); + } + if (StringUtils.isEmpty(proxyUser)) { + proxyUser = null; + } else { + if (!QueryUtils.checkNameValid(proxyUser)) { + return Message.error("Invalid proxyUser : " + proxyUser); + } + } + if (StringUtils.isEmpty(creator)) { + creator = null; + } else { + if (!QueryUtils.checkNameValid(creator)) { + return Message.error("Invalid creator : " + creator); + } + } + if (!StringUtils.isEmpty(executeApplicationName)) { + if (!QueryUtils.checkNameValid(executeApplicationName)) { + return Message.error("Invalid applicationName : " + executeApplicationName); + } + } else { + executeApplicationName = null; } + JobStatistics jobStatistics = + jobStatisticsQueryService.taskExecutionStatistics( + sDate, eDate, proxyUser, creator, executeApplicationName); - @ApiOperation(value = "engineCount", notes = "engineCount", response = Message.class) - @ApiImplicitParams({ - @ApiImplicitParam(name = "startDate", dataType = "long"), - @ApiImplicitParam(name = "endDate", required = false, dataType = "long", value = "end date"), - @ApiImplicitParam(name = "executeApplicationName", dataType = "String"), - @ApiImplicitParam(name = "creator", required = false, dataType = "String", value = "creator"), - @ApiImplicitParam(name = "proxyUser", required = false, dataType = "String", value = "proxyUser"), - }) - @RequestMapping(path = "/engineCount", method = RequestMethod.GET) - public Message engineCount( - HttpServletRequest req, - @RequestParam(value = "startDate", required = false) Long startDate, - @RequestParam(value = "endDate", required = false) Long endDate, - @RequestParam(value = "executeApplicationName", required = false) - String executeApplicationName, - @RequestParam(value = "creator", required = false) String creator, - @RequestParam(value = "proxyUser", required = false) String proxyUser) - throws IOException, QueryException { - if (endDate == null) { - endDate = System.currentTimeMillis(); - } - if (startDate == null) { - startDate = 0L; - } - Date sDate = new Date(startDate); - Date eDate = new Date(endDate); - if (startDate == 0L) { - sDate = DateUtils.addDays(eDate, -1); - } - if (sDate.getTime() == eDate.getTime()) { - Calendar instance = Calendar.getInstance(); - instance.setTimeInMillis(endDate); - instance.add(Calendar.DAY_OF_MONTH, 1); - eDate = new Date(instance.getTime().getTime()); - } - if (StringUtils.isEmpty(proxyUser)) { - proxyUser = null; - } else { - if (!QueryUtils.checkNameValid(proxyUser)) { - return Message.error("Invalid proxyUser : " + proxyUser); - } - } - if (StringUtils.isEmpty(creator)) { - creator = null; - } else { - if (!QueryUtils.checkNameValid(creator)) { - return Message.error("Invalid creator : " + creator); - } - } - if (!StringUtils.isEmpty(executeApplicationName)) { - if (!QueryUtils.checkNameValid(executeApplicationName)) { - return Message.error("Invalid applicationName : " + executeApplicationName); - } - } else { - executeApplicationName = null; - } - JobStatistics jobStatistics = - jobStatisticsQueryService.engineExecutionStatistics( - sDate, eDate, proxyUser, creator, executeApplicationName); + return Message.ok() + .data("sumCount", jobStatistics.getSumCount()) + .data("succeedCount", jobStatistics.getSucceedCount()) + .data("failedCount", jobStatistics.getFailedCount()) + .data("cancelledCount", jobStatistics.getCancelledCount()); + } - return Message.ok() - .data("countEngine", jobStatistics.getSumCount()) - .data("countEngineSucceed", jobStatistics.getSucceedCount()) - .data("countEngineFailed", jobStatistics.getFailedCount()) - .data("countEngineShutting", jobStatistics.getCancelledCount()); + @ApiOperation(value = "engineCount", notes = "engineCount", response = Message.class) + @ApiImplicitParams({ + @ApiImplicitParam(name = "startDate", dataType = "long"), + @ApiImplicitParam(name = "endDate", required = false, dataType = "long", value = "end date"), + @ApiImplicitParam(name = "executeApplicationName", dataType = "String"), + @ApiImplicitParam(name = "creator", required = false, dataType = "String", value = "creator"), + @ApiImplicitParam( + name = "proxyUser", + required = false, + dataType = "String", + value = "proxyUser"), + }) + @RequestMapping(path = "/engineCount", method = RequestMethod.GET) + public Message engineCount( + HttpServletRequest req, + @RequestParam(value = "startDate", required = false) Long startDate, + @RequestParam(value = "endDate", required = false) Long endDate, + @RequestParam(value = "executeApplicationName", required = false) + String executeApplicationName, + @RequestParam(value = "creator", required = false) String creator, + @RequestParam(value = "proxyUser", required = false) String proxyUser) + throws IOException, QueryException { + if (endDate == null) { + endDate = System.currentTimeMillis(); } + if (startDate == null) { + startDate = 0L; + } + Date sDate = new Date(startDate); + Date eDate = new Date(endDate); + if (startDate == 0L) { + sDate = DateUtils.addDays(eDate, -1); + } + if (sDate.getTime() == eDate.getTime()) { + Calendar instance = Calendar.getInstance(); + instance.setTimeInMillis(endDate); + instance.add(Calendar.DAY_OF_MONTH, 1); + eDate = new Date(instance.getTime().getTime()); + } + if (StringUtils.isEmpty(proxyUser)) { + proxyUser = null; + } else { + if (!QueryUtils.checkNameValid(proxyUser)) { + return Message.error("Invalid proxyUser : " + proxyUser); + } + } + if (StringUtils.isEmpty(creator)) { + creator = null; + } else { + if (!QueryUtils.checkNameValid(creator)) { + return Message.error("Invalid creator : " + creator); + } + } + if (!StringUtils.isEmpty(executeApplicationName)) { + if (!QueryUtils.checkNameValid(executeApplicationName)) { + return Message.error("Invalid applicationName : " + executeApplicationName); + } + } else { + executeApplicationName = null; + } + JobStatistics jobStatistics = + jobStatisticsQueryService.engineExecutionStatistics( + sDate, eDate, proxyUser, creator, executeApplicationName); + + return Message.ok() + .data("countEngine", jobStatistics.getSumCount()) + .data("countEngineSucceed", jobStatistics.getSucceedCount()) + .data("countEngineFailed", jobStatistics.getFailedCount()) + .data("countEngineShutting", jobStatistics.getCancelledCount()); + } } diff --git a/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/impl/JobHistoryQueryServiceImpl.scala b/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/impl/JobHistoryQueryServiceImpl.scala index 0bdaace660..84b73d6a23 100644 --- a/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/impl/JobHistoryQueryServiceImpl.scala +++ b/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/impl/JobHistoryQueryServiceImpl.scala @@ -486,14 +486,15 @@ class JobHistoryQueryServiceImpl extends JobHistoryQueryService with Logging { } } - override def taskDurationTopN(sDate: Date, eDate: Date, username: String, creator: String, engineType: String): util.List[JobHistory] = { + override def taskDurationTopN( + sDate: Date, + eDate: Date, + username: String, + creator: String, + engineType: String + ): util.List[JobHistory] = { val result = if (StringUtils.isBlank(creator)) { - jobHistoryMapper.taskDurationTopN( - sDate, - eDate, - username, - engineType - ) + jobHistoryMapper.taskDurationTopN(sDate, eDate, username, engineType) } else if (StringUtils.isBlank(username)) { val fakeLabel = new UserCreatorLabel jobHistoryMapper.taskDurationTopNWithCreatorOnly( @@ -524,4 +525,5 @@ class JobHistoryQueryServiceImpl extends JobHistoryQueryService with Logging { } result } + } diff --git a/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/impl/JobStatisticsQueryServiceImpl.scala b/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/impl/JobStatisticsQueryServiceImpl.scala index a3bca1dd1a..27b8173d05 100644 --- a/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/impl/JobStatisticsQueryServiceImpl.scala +++ b/linkis-public-enhancements/linkis-jobhistory/src/main/scala/org/apache/linkis/jobhistory/service/impl/JobStatisticsQueryServiceImpl.scala @@ -17,12 +17,14 @@ package org.apache.linkis.jobhistory.service.impl -import org.apache.commons.lang3.StringUtils import org.apache.linkis.common.utils.{Logging, Utils} import org.apache.linkis.jobhistory.dao.JobStatisticsMapper import org.apache.linkis.jobhistory.entity.JobStatistics import org.apache.linkis.jobhistory.service.JobStatisticsQueryService import org.apache.linkis.manager.label.entity.engine.UserCreatorLabel + +import org.apache.commons.lang3.StringUtils + import org.springframework.beans.factory.annotation.Autowired import org.springframework.stereotype.Service @@ -35,19 +37,14 @@ class JobStatisticsQueryServiceImpl extends JobStatisticsQueryService with Loggi private var jobStatisticsMapper: JobStatisticsMapper = _ override def taskExecutionStatistics( - sDate: Date, - eDate: Date, - username: String, - creator: String, - engineType: String - ): JobStatistics = { + sDate: Date, + eDate: Date, + username: String, + creator: String, + engineType: String + ): JobStatistics = { val result = if (StringUtils.isBlank(creator)) { - jobStatisticsMapper.taskExecutionStatistics( - username, - sDate, - eDate, - engineType - ) + jobStatisticsMapper.taskExecutionStatistics(username, sDate, eDate, engineType) } else if (StringUtils.isBlank(username)) { val fakeLabel = new UserCreatorLabel jobStatisticsMapper.taskExecutionStatisticsWithCreatorOnly( @@ -80,20 +77,14 @@ class JobStatisticsQueryServiceImpl extends JobStatisticsQueryService with Loggi } override def engineExecutionStatistics( - sDate: Date, - eDate: Date, - username: String, - creator: String, - engineType: String - ): JobStatistics = { + sDate: Date, + eDate: Date, + username: String, + creator: String, + engineType: String + ): JobStatistics = { val result = if (StringUtils.isBlank(username) || StringUtils.isBlank(creator)) { - jobStatisticsMapper.engineExecutionStatistics( - username, - creator, - sDate, - eDate, - engineType - ) + jobStatisticsMapper.engineExecutionStatistics(username, creator, sDate, eDate, engineType) } else { val fakeLabel = new UserCreatorLabel fakeLabel.setUser(username)