Examples of writeXml()


Examples of org.apache.oozie.util.XConfiguration.writeXml()

        OutputStream os = new FileOutputStream(getTestCaseDir() + "/config-default.xml");
        XConfiguration defaultConf = new XConfiguration();
        defaultConf.set("a", "AA");
        defaultConf.set("b", "BB");
        defaultConf.set("e", "${d}${d}");
        defaultConf.writeXml(os);
        os.close();

        final DagEngine engine = new DagEngine(getTestUser(), "a");
        Configuration conf = new XConfiguration();
        conf.set(OozieClient.APP_PATH, "file://" + getTestCaseDir() + File.separator + "workflow.xml");
View Full Code Here

Examples of org.apache.oozie.util.XConfiguration.writeXml()

            DistributedCache.addCacheFile(new URI(programPath.toUri().getPath()), fs.getConf());

            File actionXml = new File(getTestCaseDir(), "action.xml");
            os = new FileOutputStream(actionXml);
            jobConf.writeXml(os);
            os.close();

            File newIdProperties = new File(getTestCaseDir(), "newId.properties");

            System.setProperty("oozie.action.conf.xml", actionXml.getAbsolutePath());
View Full Code Here

Examples of org.apache.oozie.util.XConfiguration.writeXml()

        PigMain.setPigScript(jobConf, script.toString(), new String[] { "IN=" + inputDir.toUri().getPath(),
                "OUT=" + outputDir.toUri().getPath() }, new String[] { "-v" });

        File actionXml = new File(getTestCaseDir(), "action.xml");
        OutputStream os = new FileOutputStream(actionXml);
        jobConf.writeXml(os);
        os.close();

        File statsDataFile = new File(getTestCaseDir(), "statsdata.properties");

        File hadoopIdsFile = new File(getTestCaseDir(), "hadoopIds.properties");
View Full Code Here

Examples of org.apache.oozie.util.XConfiguration.writeXml()

            HiveMain.setHiveScript(jobConf, script.toString(), new String[]{"IN=" + inputDir.toUri().getPath(),
                    "OUT=" + outputDir.toUri().getPath()});

            File actionXml = new File(getTestCaseDir(), "action.xml");
            OutputStream os = new FileOutputStream(actionXml);
            jobConf.writeXml(os);
            os.close();

            //needed in the testcase classpath
            URL url = Thread.currentThread().getContextClassLoader().getResource("PigMain.txt");
            File classPathDir = new File(url.getPath()).getParentFile();
View Full Code Here

Examples of org.apache.oozie.util.XConfiguration.writeXml()

            new LauncherSecurityManager();
            String user = System.getProperty("user.name");
            try {
                os = new FileOutputStream(hiveSite);
                jobConf.writeXml(os);
                os.close();
                HiveMain.main(null);
            }
            catch (SecurityException ex) {
                if (LauncherSecurityManager.getExitInvoked()) {
View Full Code Here

Examples of org.apache.oozie.util.XConfiguration.writeXml()

        jobConf.set("hadoop.job.ugi", getTestUser() + "," + getTestGroup());

       
        File actionXml = new File(getTestCaseDir(), "action.xml");
        OutputStream os = new FileOutputStream(actionXml);
        jobConf.writeXml(os);
        os.close();

        File newIdProperties = new File(getTestCaseDir(), "newId.properties");

        System.setProperty("oozie.action.conf.xml", actionXml.getAbsolutePath());
View Full Code Here

Examples of org.apache.sentry.binding.hive.conf.HiveAuthzConf.writeXml()

      authzConf.set(entry.getKey(), entry.getValue());
    }
    File hiveSite = new File(confDir, "hive-site.xml");
    File accessSite = new File(confDir, HiveAuthzConf.AUTHZ_SITE_FILE);
    OutputStream out = new FileOutputStream(accessSite);
    authzConf.writeXml(out);
    out.close();
    // points hive-site.xml at access-site.xml
    hiveConf.set(HiveAuthzConf.HIVE_SENTRY_CONF_URL, accessSite.toURI().toURL()
        .toExternalForm());
    if(!properties.containsKey(HiveConf.ConfVars.HIVE_SERVER2_SESSION_HOOK.varname)) {
View Full Code Here

Examples of org.apache.solr.client.solrj.request.UpdateRequest.writeXML()

                  OutputStreamWriter writer = new OutputStreamWriter(out, "UTF-8");
                  writer.append( "<stream>" ); // can be anything...
                  UpdateRequest req = queue.poll( 250, TimeUnit.MILLISECONDS );
                  while( req != null ) {
                    log.debug( "sending: {}" , req );
                    req.writeXML( writer );
                   
                    // check for commit or optimize
                    SolrParams params = req.getParams();
                    if( params != null ) {
                      String fmt = null;
View Full Code Here

Examples of org.apache.wookie.util.html.HtmlSerializer.writeXml()

  private String parse(String content){
    StringWriter writer = new StringWriter();
    HtmlSerializer ser = new HtmlSerializer(properties);
    try {
      TagNode html = cleaner.clean(content);
      ser.writeXml(html, writer, "UTF-8");
      return writer.getBuffer().toString();
    } catch (IOException e) {
      return null;
    }
  }
View Full Code Here

Examples of org.earth3d.jearth.draw.tree.GeometryMapTree.writeXML()

   */
  protected Geometry createGeometryFile(String filename) throws IOException {
    GeometryMapTree gmt = new GeometryMapTree();
    gmt.getTextureConnections().addConnection(new ConnectionURL("textures/0.mxml"));
    gmt.getHeightfieldConnections().addConnection(new ConnectionURL("heightfield/0.mxml"));
    gmt.writeXML(filename, getMapName());
   
    return gmt;
  }

  /**
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.