Package com.taobao.zeus.jobs.sub.tool

Examples of com.taobao.zeus.jobs.sub.tool.MemUseRateJob


public class WorkerHeartBeat {

  public ChannelFuture execute(WorkerContext context){
    JobContext jobContext=JobContext.getTempJobContext();
    MemUseRateJob job=new MemUseRateJob(jobContext, 1);
    try {
      int exitCode = -1;
      int count = 0;
      while(count<3 && exitCode!=0){
        count++;
        exitCode=job.run();
      }
      if(exitCode!=0) {
        ScheduleInfoLog.error("HeartBeat Shell Error",new Exception(jobContext.getJobHistory().getLog().getContent()));
        // 防止后面NPE
        jobContext.putData("mem", 1.0);
View Full Code Here

TOP

Related Classes of com.taobao.zeus.jobs.sub.tool.MemUseRateJob

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.