Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
Archivo: Util.cs Proyecto: 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"])
                       ));
        }