File tree Expand file tree Collapse file tree
bookkeeper-admin/src/main/java/io/github/protocol/bookkeeper/admin/jdk Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,7 +30,10 @@ public AutoRecoveryStatus autoRecoveryStatus() throws BookkeeperAdminException {
3030 @ Override
3131 public void recoveryBookie (RecoveryBookieReqData reqData ) throws BookkeeperAdminException {
3232 try {
33- innerHttpClient .put (UrlConst .AUTO_RECOVERY , reqData );
33+ HttpResponse resp = innerHttpClient .put (UrlConst .AUTO_RECOVERY_BOOKIE , reqData );
34+ if ((resp .statusCode () < 200 || resp .statusCode () >= 300 ) && resp .body () != null ) {
35+ throw new BookkeeperAdminException (resp .bodyAsString ());
36+ }
3437 } catch (IOException | InterruptedException | ExecutionException e ) {
3538 throw new BookkeeperAdminException (e );
3639 }
Original file line number Diff line number Diff line change 11package io .github .protocol .bookkeeper .admin .jdk ;
22
3+ import com .fasterxml .jackson .annotation .JsonProperty ;
34import java .util .List ;
45
56public class RecoveryBookieReqData {
7+ @ JsonProperty ("bookie_src" )
68 private List <String > bookieSrc ;
7- private boolean deleteCookie ;
89
9- public List <String > getBookieSrc () {
10- return bookieSrc ;
11- }
10+ @ JsonProperty ("delete_cookie" )
11+ private boolean deleteCookie ;
1212
1313 public void setBookieSrc (List <String > bookieSrc ) {
1414 this .bookieSrc = bookieSrc ;
1515 }
1616
17- public boolean isDeleteCookie () {
18- return deleteCookie ;
19- }
20-
2117 public void setDeleteCookie (boolean deleteCookie ) {
2218 this .deleteCookie = deleteCookie ;
2319 }
You can’t perform that action at this time.
0 commit comments