Ejemplo n.º 1
0
  /** Shut down the cluster */
  public void shutDown() throws IOException, InterruptedException {
    System.out.println("Shutting down the Mini Avatar Cluster");
    // this doesn't work, so just leave the datanodes running,
    // they won't interfere with the next run
    shutDownDataNodes();

    shutDownAvatarNodes();
  }
Ejemplo n.º 2
0
 /*
  * Restart all datanodes
  */
 public synchronized boolean restartDataNodes() throws IOException, InterruptedException {
   shutDownDataNodes();
   int i = 0;
   for (DataNodeProperties dn : dataNodes) {
     i++;
     LOG.info("Restart Datanode " + i);
     dn.datanode = AvatarDataNode.instantiateDataNode(dn.dnArgs, new Configuration(dn.conf));
     dn.datanode.runDatanodeDaemon();
   }
   return true;
 }