getRecentJobs

Parent Previous Next


语法


getRecentJobs(n)


参数


n是一个正整数。


详情


取得本地节点上最近N个批处理作业的状态。详情请参考批处理作业管理


例子



def jobDemo(n){

 s = 0

 for (x in 1 : n) {

   s += sum(sin rand(1.0, 100000000)-0.5)

   print("iteration " + x + " " + s)

 }

 return s

};


>submitJob("jobDemo1","job demo", jobDemo, 100);


>submitJob("jobDemo2",, jobDemo, 10);

jobDemo2


>getRecentJobs(10);

Node      UserID JobID    JobDesc  ReceivedTime            StartTime               EndTime                 ErrorMsg

--------- ------ -------- -------- ----------------------- ----------------------- ----------------------- --------

local8848 root   jobDemo1 job demo 2017.11.15T18:30:33.796 2017.11.15T18:30:33.797 2017.11.15T18:32:07.716

local8848 root   jobDemo2 jobDemo  2017.11.15T18:44:51.388 2017.11.15T18:44:51.389 2017.11.15T18:44:59.817