JobHistory history=new JobHistory();
JobContext jobContext=new JobContext();
jobContext.setWorkDir(temp.getParent());
jobContext.setJobHistory(history);
jobContext.setProperties(new HierarchyProperties(new HashMap<String, String>()));
UploadHdfsFileJob job=new UploadHdfsFileJob(jobContext, temp.getAbsolutePath(), hdfsLibPath);
Integer exitCode=job.run();
if(exitCode!=0){
log.error(history.getLog().getContent());
resp.getWriter().write(history.getLog().getContent());
}else{
resp.getWriter().write("[[uri=hdfs://"+hdfsLibPath+File.separator+temp.getName()+"]]");