All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.alibaba.schedulerx.worker.logcollector.ClientLoggerMessage Maven / Gradle / Ivy

There is a newer version: 1.12.2
Show newest version
package com.alibaba.schedulerx.worker.logcollector;

import org.apache.commons.lang.StringUtils;

/**
 * 客户端日志记录
 *
 * @author 陆昆
 * @create 2018-12-10 下午8:38
 **/
public class ClientLoggerMessage {
    public static final String INSTANCE_TRIGGER_SUCCESS = "submit jobInstance success:";

    public static final String INSTANCE_TRIGGER_FAIL = "server trigger client fail:";
    
    public static final String INSTANCE_INIT_FAIL = "instance init fail:";

    public static final String INSTANCE_FINISH = "instance finished, final status is:";

    public static final String INSTANCE_KILL_START_SUCCESS = "server kill instance start success:";

    public static final String INSTANCE_KILL_START_FAIL = "server kill instance start fail:";

    public static final String CONTAINER_START_FAIL = "container start instance fail:";

    public static final String CONTAINER_KILL_SUCCESS = "container kill instance success:";

    public static final String CONTAINER_KILL_FAIL = "container kill instance fail:";

    public static final String JOB_PROCESSOR_EXEC_FAIL = "job processor exec fail:";

    public static final String STANDALONE_INSTANCE_INIT_SUCCESS = "standalone taskMaster init success:";

    public static final String STANDALONE_INSTANCE_INIT_FAIL = "standalone taskMaster init fail:";

    public static final String BROADCAST_INSTANCE_INIT_SUCCESS = "broadcast taskMaster init success worker addr is ";

    public static final String BROADCAST_INSTANCE_INIT_FAIL = "broadcast taskMaster init fail worker addr is ";

    public static final String INSTANCE_KILL_FAIL = "kill instance tell worker fail worker addr is ";

    public static final String MAP_INSTANCE_FAIL = "map task init fail:";

    public static final String MAP_CREATE_TASK_FAIL = "create task fail size ";

    public static final String MAP_INSTANCE_PULL_JOB_FAIL = "map task pull fail:";

    public static final String MAP_INSTANCE_DISPATCH_JOB_FAIL = "map task dispatch fail:";

    public static String appendMessage(String baseMessage,  String... appendMessages) {
        StringBuilder sb = new StringBuilder();
        if (StringUtils.isNotBlank(baseMessage)) {
            sb.append(baseMessage);
            if (appendMessages != null) {
                for (String appendMessage : appendMessages) {
                    sb.append(appendMessage);
                }
            }
        }
        return sb.toString();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy