Package org.xadoop.hadoop

Examples of org.xadoop.hadoop.HadoopConfFile


      }
    }

    // conf file
    Pipeline pipeline = null;
    HadoopConfFile confFileObj = null;
    if (xqueryengine.equals("zorba")) {
      pipeline = new Pipeline(querytext, XadoopConstants.PIPELINE_MAPPREFIX);
      XQueryMRZorbaConfFile confFileObjTmp = new XQueryMRZorbaConfFile(config);
      confFileObjTmp.setPipeline(pipeline.toString());
      System.out.println(pipeline.toString());
      confFileObjTmp.setQueryFile("/" + FILENAME_QUERY);
      confFileObj = confFileObjTmp;
    } else if (xqueryengine.equals("saxon")){
      pipeline = new Pipeline(querytext, XadoopConstants.SAXON_PIPELINE_MAPPREFIX);
      XQueryMRSaxonConfFile confFileObjTmp = new XQueryMRSaxonConfFile(config);
      confFileObjTmp.setPipeline(pipeline.toString());
      confFileObjTmp.setProlog("/" + FILENAME_QUERY);
     
      confFileObjTmp.setStreamEnabled(streamingEnabled);
     
      confFileObj = confFileObjTmp;
    } else {
      pipeline = new Pipeline(querytext, XadoopConstants.XQUERYMR_PIPELINE_MAPPREFIX);
      XQueryMRConfFile confFileObjTmp = new XQueryMRConfFile();
      confFileObjTmp.setPipeline(pipeline.toString());
      confFileObjTmp.setProlog("/" + FILENAME_QUERY);
      confFileObj = confFileObjTmp;
    }
   
    int numMapTasks = numTasksMap;
    int numReduceTasks = numTasksReduce;
    confFileObj.setMapredMapTasks(numMapTasks);
    confFileObj.setMapredReduceTasks(numReduceTasks);
    File confFile = new File(pathExecDir + FILENAME_CONF);
    try {
      FileWriter writer = new FileWriter(confFile);
      writer.write(confFileObj.toXml());
      writer.close();
    } catch (IOException e) {
      return new Failure("Failure writing conf file: " + e.getMessage());
    }
View Full Code Here

TOP

Related Classes of org.xadoop.hadoop.HadoopConfFile

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.