Package org.apache.hadoop.hdfs.server.datanode

Examples of org.apache.hadoop.hdfs.server.datanode.DataNode.shutdown()


    DataNode dn = dnprop.datanode;
    System.out.println("MiniDFSCluster Stopping DataNode " +
                       dn.getDatanodeInfo() +
                       " from a total of " + (dataNodes.size() + 1) +
                       " datanodes.");
    dn.shutdown();
    numDataNodes--;
    return dnprop;
  }

  /**
 
View Full Code Here


                  cluster.getNameNode().getNamespaceID()));
            namesystem.getAdditionalBlock(
              FILE1, holder, Arrays.<Node>asList(excludedNode)
            );

            dataNode.shutdown();
          }
          catch (IOException e) {
            fail("exception: " + StringUtils.stringifyException(e));
        }
      }
View Full Code Here

      DataNodeTestUtils.getDNRegistrationForBP(cluster.getDataNodes().get(0), poolId);
     
    waitForDatanodeState(reg.getStorageID(), true, 20000);

    // Shutdown and wait for datanode to be marked dead
    dn.shutdown();
    waitForDatanodeState(reg.getStorageID(), false, 20000);

    DatanodeProtocol dnp = cluster.getNameNodeRpc();
   
    ReceivedDeletedBlockInfo[] blocks = { new ReceivedDeletedBlockInfo(
View Full Code Here

      DataNodeTestUtils.getDNRegistrationForBP(cluster.getDataNodes().get(0), poolId);
     
    waitForDatanodeState(reg.getDatanodeUuid(), true, 20000);

    // Shutdown and wait for datanode to be marked dead
    dn.shutdown();
    waitForDatanodeState(reg.getDatanodeUuid(), false, 20000);

    DatanodeProtocol dnp = cluster.getNameNodeRpc();
   
    ReceivedDeletedBlockInfo[] blocks = { new ReceivedDeletedBlockInfo(
View Full Code Here

      List<LocatedBlock> locatedBlocks = DFSTestUtil.getAllBlocks(in);
      in.close();
      assertEquals(1, locatedBlocks.size());
      assertEquals(3, locatedBlocks.get(0).getLocations().length);
      DataNode dn = cluster.getDataNode(locatedBlocks.get(0).getLocations()[0].getIpcPort());
      dn.shutdown();
     
      // Reopen the file for append, which will need to add another DN to the
      // pipeline and in doing so trigger a block transfer.
      writeTestDataToFile(fs);
      assertEquals(PLAIN_TEXT + PLAIN_TEXT, DFSTestUtil.readFile(fs, TEST_PATH));
View Full Code Here

   */
  public void shutdownDataNodes() {
    for (int i = dataNodes.size()-1; i >= 0; i--) {
      LOG.info("Shutting down DataNode " + i);
      DataNode dn = dataNodes.remove(i).datanode;
      dn.shutdown();
      numDataNodes--;
    }
  }

  /**
 
View Full Code Here

    DataNode dn = dnprop.datanode;
    LOG.info("MiniDFSCluster Stopping DataNode " +
                       dn.getDisplayName() +
                       " from a total of " + (dataNodes.size() + 1) +
                       " datanodes.");
    dn.shutdown();
    numDataNodes--;
    return dnprop;
  }

  /*
 
View Full Code Here

      fail();
    } catch(Exception e) {
      // expecting exception here
    }
    if(dn != null)
      dn.shutdown();
    assertNull("Data-node startup should have failed.", dn);

    // 2. Test "file:" schema and no schema (path-only). Both should work.
    String dnDir1 = fileAsURI(dataDir).toString() + "1";
    String dnDir2 = makeURI("file", "localhost",
View Full Code Here

      // Try starting the DN with limit configured to the ulimit
      conf.setLong(DFSConfigKeys.DFS_DATANODE_MAX_LOCKED_MEMORY_KEY,
          memlockLimit);
      DataNode dn = null;
      dn = DataNode.createDataNode(new String[]{},  conf);
      dn.shutdown();
      // Try starting the DN with a limit > ulimit
      conf.setLong(DFSConfigKeys.DFS_DATANODE_MAX_LOCKED_MEMORY_KEY,
          memlockLimit+1);
      try {
        dn = DataNode.createDataNode(new String[]{}, conf);
View Full Code Here

   */
  public void shutdownDataNodes() {
    for (int i = dataNodes.size()-1; i >= 0; i--) {
      LOG.info("Shutting down DataNode " + i);
      DataNode dn = dataNodes.remove(i).datanode;
      dn.shutdown();
      numDataNodes--;
    }
  }

  /**
 
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.