tubemq-server/src/main/java/org/apache/tubemq/server/master/web/handler/WebMasterInfoHandler.java
/**
     * transfer current master to another node
     *
     * @param req  HttpServletRequest
     * @return
     */
transfer current master to another node

@param req  HttpServletRequest
@return
transfer current master to another node @param req HttpServletRequest @return
public StringBuilder transferCurrentMaster(HttpServletRequest req) {
        StringBuilder strBuffer = new StringBuilder(512);
        try {
            WebParameterUtils.reqAuthorizeCheck(master, brokerConfManager, req.getParameter("confModAuthToken"));
            brokerConfManager.transferMaster();
            strBuffer.append("{\"result\":true,\"errCode\":0," +
                    "\"errMsg\":\"TransferMaster method called, please wait 20 seconds!\"}");
        } catch (Exception e2) {
            strBuffer.append("{\"result\":false,\"errCode\":400,\"errMsg\":\"")
                    .append(e2.getMessage()).append("\"}");
        }
        return strBuffer;
    }
public StringBuilder transferCurrentMaster ( HttpServletRequest req ) { StringBuilder strBuffer = new StringBuilder ( 512 ) ; try { WebParameterUtils . reqAuthorizeCheck ( master , brokerConfManager , req . getParameter ( "confModAuthToken" ) ) ; brokerConfManager . transferMaster ( ) ; strBuffer . append ( "{\"result\":true,\"errCode\":0," + "\"errMsg\":\"TransferMaster method called, please wait 20 seconds!\"}" ) ; } catch ( Exception e2 ) { strBuffer . append ( "{\"result\":false,\"errCode\":400,\"errMsg\":\"" ) . append ( e2 . getMessage ( ) ) . append ( "\"}" ) ; } return strBuffer ; }
transfer current master to another node
transfer current master to another node