zhongjiajie commented on code in PR #10792:
URL: https://github.com/apache/dolphinscheduler/pull/10792#discussion_r913519784


##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/BaseServiceImpl.java:
##########
@@ -122,6 +120,24 @@ public void putMsg(Result result, Status status, Object... 
statusParams) {
         }
     }
 
+    /**
+     * put Map object with both status and message to result object
+     *
+     * @param result result code
+     * @param mapObj Map object contain status and message.
+     */
+    @Override
+    public void putMsg(Result<Object> result, Map<String, Object> mapObj) {

Review Comment:
   Add for convenience method, I add this function more easier to convert map 
from `valid` to result



##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/QueueServiceImpl.java:
##########
@@ -64,6 +65,28 @@ public class QueueServiceImpl extends BaseServiceImpl 
implements QueueService {
     @Autowired
     private UserMapper userMapper;
 
+    /**
+     * Valid both queue and queueName when we want to create or update queue 
object
+     *
+     * @param queue queue value
+     * @param queueName queue name
+     * @return Optional of Status map
+     */
+    private Optional<Map<String, Object>> queueValid(String queue, String 
queueName) {

Review Comment:
   For reviewers, I add `valid` for both `queue` and `tenant` create or update 
process, to combine the same logic from each function



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to