ServletContext ctx = req.getSession().getServletContext();
String pathUploadDir = (String) ctx.getAttribute(XadoopConstants.CTX_PATHUPLOADDIR);
XadoopConfig config = (XadoopConfig) ctx.getAttribute(XadoopConstants.CTX_CONFIG);
// get required parameters
PostRequest postReq = new PostRequest();
try {
postReq.parse(req, pathUploadDir, true);
} catch (Exception e) {
return new Failure(e.getMessage());
}
String xqueryengine = postReq.getFormField(XQueryMRPage.XMLPARSER);
String querytext = postReq.getFormField(XQueryMRPage.QUERYTEXT);
String streamingEnabled = postReq.getFormField(XQueryMRPage.STREAMING_SUPPORT);
String datatext = postReq.getFormField(XQueryMRPage.DATATEXT);
String dataExists = postReq.getFormField(XQueryMRPage.DATAEXISTS);
String datafile = postReq.getFormField(XQueryMRPage.DATAFILE);
String datapath = postReq.getFormField(XQueryMRPage.DATAPATH);
String numTasksMapStr = postReq.getFormField(XQueryMRPage.NUMTASKSMAP);
String numTasksRedStr = postReq.getFormField(XQueryMRPage.NUMTASKSRED);
// execution directory
Date now = new Date();
String pathExecDir = pathUploadDir + execDirFormat.format(now) + "/";
File execDir = new File(pathExecDir);