예제 #1
0
파일: JobHandle.cs 프로젝트: Kamsiy/api
 public JobHandle(BoaClient cli, int ID, DateTime dateTime, InputHandle data, CompileStatus compStat, ExecutionStatus execStat)
 {
     client         = cli;
     id             = ID;
     date           = dateTime;
     dataset        = data;
     compilerStatus = compStat;
     execStatus     = execStat;
 }
예제 #2
0
파일: Util.cs 프로젝트: Kamsiy/api
        public static JobHandle parseJob(BoaClient client, XmlRpcStruct job)
        {
            String[] keys = { "id", "submitted", "input", "compiler_status", "hadoop_status" };
            verifyKeys(job, keys);
            String   date    = ((String)job["submitted"]).Replace("-", "/");
            DateTime newDate = new DateTime(Convert.ToInt32(date.Substring(0, 4)), Convert.ToInt32(date.Substring(5, 2)), Convert.ToInt32(date.Substring(8, 2)), Convert.ToInt32(date.Substring(11, 2))
                                            , Convert.ToInt32(date.Substring(14, 2)), Convert.ToInt32(date.Substring(17, 2)));

            return(new JobHandle(
                       client,
                       Convert.ToInt32((String)job["id"]),
                       newDate,
                       parseDataset((XmlRpcStruct)job["input"]),
                       strToCompileStatus((String)job["compiler_status"]),
                       strToExecutionStatus((String)job["hadoop_status"])
                       ));
        }