public JobRequest CreateJobRequest(string request) { ClientJobRequest clientReq = null; try { clientReq = UtilsHelper.DeserializeFromXml <ClientJobRequest>(request); } catch (Exception) { //TODO: add logging return(null); } JobRequest req; switch (clientReq.JobType) { case JobType.Hive: if (HiveJobRequest.TryParse(clientReq, out req)) { return(req); } break; case JobType.MapReduce: if (MapReduceJobRequest.TryParse(clientReq, out req)) { return(req); } break; } return(null); }
internal MapReduceJobRequestPassthroughAction CreateMapReduceJobRequestAction(MapReduceJobRequest request, DataAccess.Context.ClusterContainer container, string subscriptionId) { //TODO: Create/generate the job folder. //This is ok for now. When we start listing jobs we'll need to fix this. return(new MapReduceJobRequestPassthroughAction(container, subscriptionId) { Arguments = request.Arguments, ClassName = request.ApplicationName, JarFile = request.JarFile, Parameters = request.Parameters, Resources = request.Resources }); }