public static JobTracker buildByProperties(JobTrackerProperties properties) {

        properties.checkProperties();

        JobTracker jobTracker = new JobTracker();
        jobTracker.setRegistryAddress(properties.getRegistryAddress());
        if (StringUtils.isNotEmpty(properties.getClusterName())) {
            jobTracker.setClusterName(properties.getClusterName());
        }
        if (properties.getListenPort() != null) {
            jobTracker.setListenPort(properties.getListenPort());
        }
        if (StringUtils.isNotEmpty(properties.getIdentity())) {
            jobTracker.setIdentity(properties.getIdentity());
        }
        if (StringUtils.isNotEmpty(properties.getBindIp())) {
            jobTracker.setBindIp(properties.getBindIp());
        }
        if (CollectionUtils.isNotEmpty(properties.getConfigs())) {
            for (Map.Entry<String, String> entry : properties.getConfigs().entrySet()) {
                jobTracker.addConfig(entry.getKey(), entry.getValue());
            }
        }
        return jobTracker;
    }
@author Robert HG (254963746@qq.com) on 4/21/16.
lts-jobtracker/src/main/java/com/github/ltsopensource/jobtracker/JobTrackerBuilder.java