Examples of run()

Examples of org.apache.hadoop.hdfs.TestAvatarShell.ShortTxidWaitAvatarShell.run()

    // PushbackInputStream processes in reverse order.
    for (int i = input.length - 1; i >= 0; i--) {
    ShortTxidWaitAvatarShell shell = new ShortTxidWaitAvatarShell(conf);
    assertEquals(0, shell.run(new String[] { "-failover" }));
    int blocksAfter = blocksInFile();
    assertTrue(blocksBefore == blocksAfter);

View Full Code Here

Examples of org.apache.hadoop.hdfs.server.balancer.AvatarBalancer.run()

  private static void runBalancer() throws Exception {
    Configuration bconf = new Configuration(conf);
    bconf.setClass("fs.hdfs.impl", DistributedAvatarFileSystem.class,
    Balancer b = new AvatarBalancer(bconf);
    assertEquals(0, b.run(new String[] { "-threshold", "1" }));

  public void testBasic() throws Exception {
    cluster.startDataNodes(new long[] { CAPACITY }, 1, null, null, conf);
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.balancer.Balancer.Cli.run()

    waitForHeartBeat(totalUsedSpace, totalCapacity, client, cluster);

    final String[] args = { "-policy", "datanode" };
    final Tool tool = new Cli();   
    final int r = tool.run(args); // start rebalancing
    assertEquals("Tools should exit 0 on success", 0, r);
    waitForHeartBeat(totalUsedSpace, totalCapacity, client, cluster);
    LOG.info("Rebalancing with default ctor.");
    waitForBalancer(totalUsedSpace, totalCapacity, client, cluster);
View Full Code Here

Examples of org.apache.hadoop.hdfs.tools.DFSAdmin.run()

      // Saving image without safe mode should fail
      DFSAdmin admin = new DFSAdmin(conf);
      String[] args = new String[]{"-saveNamespace"};
      try {
      } catch(IOException eIO) {
        assertTrue(eIO.getLocalizedMessage().contains("Safe mode should be turned ON"));
      } catch(Exception e) {
        throw new IOException(e);
View Full Code Here

Examples of org.apache.hadoop.hdfs.tools.DFSHAAdmin.run()

  public void testManualFailoverWithDFSHAAdmin() throws Exception {
    DFSHAAdmin tool = new DFSHAAdmin();
        tool.run(new String[]{"-failover", "nn1", "nn2"}));
    waitForHAState(0, HAServiceState.STANDBY);
    waitForHAState(1, HAServiceState.ACTIVE);
        tool.run(new String[]{"-failover", "nn2", "nn1"}));
    waitForHAState(0, HAServiceState.ACTIVE);
View Full Code Here

Examples of org.apache.hadoop.hdfs.tools.DFSck.run()

    ByteArrayOutputStream bout = new ByteArrayOutputStream();
    PrintStream ps = new PrintStream(bout, true);
    DFSck dfsck = new DFSck(getConf(), ps);
    try {
    } catch (Exception e) {
      throw new IOException(e);
    ByteArrayInputStream bin = new ByteArrayInputStream(bout.toByteArray());
    return new BufferedReader(new InputStreamReader(bin));
View Full Code Here

Examples of org.apache.hadoop.hive.ql.Driver.run()

      return new SetProcessor().run(cmd.substring(firstToken.length()).trim()).getResponseCode();

    Driver driver = new HowlDriver();

    int ret = driver.run(cmd).getResponseCode();

    if (ret != 0) {
View Full Code Here

Examples of org.apache.hadoop.hive.ql.processors.CommandProcessor.run()

            isHiveQuery = true;
            response = driver.run(cmd);
          } else {
            isHiveQuery = false;
            response = proc.run(cmd_1);

          ret = response.getResponseCode();
          SQLState = response.getSQLState();
          errorMessage = response.getErrorMessage();
View Full Code Here

Examples of org.apache.hadoop.mapred.ExpireUnusedJobFiles.run()

    Pattern p = Pattern.compile("^(.+)\\/job_(\\d+)\\.(\\d+)_(\\d+)$");
    ExpireUnusedJobFiles expire = new ExpireUnusedJobFiles(new Clock(), conf,
      new Path(systemDir), p, THRESHOLD);

    LOG.info("Check dirs under " + systemDir);
    // check if the dirs have been removed
    boolean result;
    for (int i = 0; i < 10; i++) {
View Full Code Here

Examples of org.apache.hadoop.mapred.JobHistory.LogTask.run()


    for (PrintWriter out : writers) {
      LogTask task = new LogTask(out, buf.toString());
      if (sync) {
      } else {
View Full Code Here
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.