bitflicker64 commented on code in PR #3233:
URL: https://github.com/apache/hugegraph/pull/3233#discussion_r4090998235


##########
hugegraph-pd/hg-pd-service/src/main/java/org/apache/hugegraph/pd/rest/TaskAPI.java:
##########
@@ -89,9 +89,16 @@ public String splitPartitions() {
         }
     }
 
-    @GetMapping(value = "/balanceLeaders")
-    public Map<Integer, Long> balanceLeaders() throws PDException {
-        return pdRestService.balancePartitionLeader();
+    @GetMapping(value = "/balanceLeaders", produces = 
MediaType.APPLICATION_JSON_VALUE)
+    @ResponseBody
+    public String balanceLeaders() {

Review Comment:
   `45c0c9ba`: `StoreAPI.balanceLeaders` now catches `PDException` and answers 
`toJSON(e)`, so `GET /v1/balanceLeaders` returns the same 
`{"status":1001,"error":...}` body as `/v1/task/balanceLeaders`. The test is 
renamed to `BalanceLeadersAPITest` and covers the refused and successful cases 
on both routes; 17 tests in hg-pd-service pass on JDK 11.
   



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to