Package org.apache.hadoop.tools.GetConf

Examples of org.apache.hadoop.tools.GetConf.CommandHandler


  public void testEmptyConf() throws Exception {
    Configuration conf = new Configuration();
    // Verify getting addresses fails
    getAddressListFromTool(TestType.NAMENODE, conf, false);
    for (Command cmd : Command.values()) {
      CommandHandler handler = Command.getHandler(cmd.getName());
      if (handler.key != null) {
        // First test with configuration missing the required key
        String[] args = {handler.key};
        runTool(conf, args, false);
      }
View Full Code Here


   * and {@link Command#SECONDARY}
   */
  public void testTool() throws Exception {
    Configuration conf = new Configuration();
    for (Command cmd : Command.values()) {
      CommandHandler handler = Command.getHandler(cmd.getName());
      if (handler.key != null) {
        // Add the key to the conf and ensure tool returns the right value
        String[] args = {handler.key};
        conf.set(handler.key, "value");
        assertTrue(runTool(conf, args, true).contains("value"));
View Full Code Here

  public void testEmptyConf() throws Exception {
    Configuration conf = new Configuration();
    // Verify getting addresses fails
    getAddressListFromTool(TestType.NAMENODE, conf, false);
    for (Command cmd : Command.values()) {
      CommandHandler handler = Command.getHandler(cmd.getName());
      if (handler.key != null) {
        // First test with configuration missing the required key
        String[] args = {handler.key};
        runTool(conf, args, false);
      }
View Full Code Here

   * and {@link Command#SECONDARY}
   */
  public void testTool() throws Exception {
    Configuration conf = new Configuration();
    for (Command cmd : Command.values()) {
      CommandHandler handler = Command.getHandler(cmd.getName());
      if (handler.key != null) {
        // Add the key to the conf and ensure tool returns the right value
        String[] args = {handler.key};
        conf.set(handler.key, "value");
        assertTrue(runTool(conf, args, true).contains("value"));
View Full Code Here

TOP

Related Classes of org.apache.hadoop.tools.GetConf.CommandHandler

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.