public void writeXml(Writer out) throws IOException { writeXml(null, out); }
@Override public void writeXml(Writer out) throws IOException { encapsulated.writeXml(out); }
@Override public void writeXml(Writer out) throws IOException { encapsulated.writeXml(out); }
@Override public void writeXml(OutputStream out) throws IOException { encapsulated.writeXml(out); }
@Override public void writeXml(OutputStream out) throws IOException { encapsulated.writeXml(out); }
@Override public void writeXml(Writer out) throws IOException { conf.writeXml(out); }
@Override public void writeXml(OutputStream out) throws IOException { conf.writeXml(out); }
/** * Write out the non-default properties in this configuration to the given * {@link OutputStream} using UTF-8 encoding. * * @param out the output stream to write to. */ public void writeXml(OutputStream out) throws IOException { writeXml(new OutputStreamWriter(out, "UTF-8")); }
/** * Write out the non-default properties in this configuration to the given * {@link OutputStream} using UTF-8 encoding. * * @param out the output stream to write to. */ public void writeXml(OutputStream out) throws IOException { writeXml(new OutputStreamWriter(out, "UTF-8")); }
/** For debugging. List non-default properties to the terminal and exit. */ public static void main(String[] args) throws Exception { new Configuration().writeXml(System.out); }
/** For debugging. List non-default properties to the terminal and exit. */ public static void main(String[] args) throws Exception { new Configuration().writeXml(System.out); }
/** * For debugging. Dump configurations to system output as xml format. * Master and RS configurations can also be dumped using * http services. e.g. "curl http://master:16010/dump" */ public static void main(String[] args) throws Exception { HBaseConfiguration.create().writeXml(System.out); } }
/** * Write out the non-default properties in this configuration to the given * {@link OutputStream} using UTF-8 encoding. * * @param out the output stream to write to. */ public void writeXml(OutputStream out) throws IOException { writeXml(new OutputStreamWriter(out, "UTF-8")); }
/** For debugging. List non-default properties to the terminal and exit. */ public static void main(String[] args) throws Exception { new Configuration().writeXml(System.out); }
/** * Guts of the servlet - extracted for easy testing. */ static void writeResponse(Configuration conf, Writer out, String format) throws IOException, BadFormatException { if (FORMAT_JSON.equals(format)) { Configuration.dumpConfiguration(conf, out); } else if (FORMAT_XML.equals(format)) { conf.writeXml(out); } else { throw new BadFormatException("Bad format: " + format); } }
/** * Guts of the servlet - extracted for easy testing. */ static void writeResponse(Configuration conf, Writer out, String format, String propertyName) throws IOException, IllegalArgumentException, BadFormatException { if (FORMAT_JSON.equals(format)) { Configuration.dumpConfiguration(conf, propertyName, out); } else if (FORMAT_XML.equals(format)) { conf.writeXml(propertyName, out); } else { throw new BadFormatException("Bad format: " + format); } }
/** * Guts of the servlet - extracted for easy testing. */ static void writeResponse(Configuration conf, Writer out, String format) throws IOException, BadFormatException { //redact the sensitive information from the configuration values Configuration hconf = new Configuration(conf); HiveConfUtil.stripConfigurations(hconf); if (FORMAT_JSON.equals(format)) { Configuration.dumpConfiguration(hconf, out); } else if (FORMAT_XML.equals(format)) { hconf.writeXml(out); } else { throw new BadFormatException("Bad format: " + format); } }
/** * Saves configuration to a file. * * @param file File to save * @param conf Configuration contents to write to file * @throws IOException if there is an I/O error saving the file */ public static void saveConfig(File file, Configuration conf) throws IOException { Writer writer = new FileWriter(file); try { conf.writeXml(writer); } finally { writer.close(); } } }
public static File writeYarnSiteConfigXML(Configuration yarnConf) throws IOException { tmp.create(); File yarnSiteXML = new File(tmp.newFolder().getAbsolutePath() + "/yarn-site.xml"); try (FileWriter writer = new FileWriter(yarnSiteXML)) { yarnConf.writeXml(writer); writer.flush(); } return yarnSiteXML; }
/** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { Configuration secondaryConf = configurationSecondary(SECONDARY_AUTHORITY); secondaryConf.setInt("fs.igfs.block.size", 1024); String path = U.getIgniteHome() + SECONDARY_CFG_PATH; File file = new File(path); try (FileOutputStream fos = new FileOutputStream(file)) { secondaryConf.writeXml(fos); } startNodes(); }