Package org.apache.hadoop.util

Examples of org.apache.hadoop.util.HostsFileReader.refresh()


    System.out.println(reader.getHosts().toString());
    assertEquals(3, reader.getHosts().size());

    mover.removeHostFromFile(hosts.getAbsolutePath(), "host1.host.com");

    reader.refresh();
    assertEquals(2, reader.getHosts().size());

    mover.restoreFile(hosts.getAbsolutePath());

    reader.refresh();
View Full Code Here


    reader.refresh();
    assertEquals(2, reader.getHosts().size());

    mover.restoreFile(hosts.getAbsolutePath());

    reader.refresh();
    assertEquals(2, reader.getHosts().size());

    assertTrue(reader.getHosts().contains("host1.host.com"));
    assertFalse(reader.getHosts().contains("host3.host.com"));
  }
View Full Code Here

   
    TTMoverTestStub mover = new TTMoverTestStub(TEST_ROOT_DIR.toString());
    mover.setConf(conf);
    mover.run(new String[]{"-add", "host3"});

    reader.refresh();
    assertFalse(reader.getExcludedHosts().contains("host3"));

    assertTrue(reader.getHosts().contains("host3"));
   
  }
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.