Java Code Examples for org.apache.hadoop.conf.Configuration.dumpConfiguration()

The following are Jave code examples for showing how to use dumpConfiguration() of the org.apache.hadoop.conf.Configuration class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: ditb   File: ConfServlet.java   Source Code and License Vote up 5 votes
/**
 * 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);
  }
}