Package org.apache.hadoop.hdfs.server.namenode

Examples of org.apache.hadoop.hdfs.server.namenode.NameNode.addBlock()


        else
          throw new RemoteException(NotReplicatedYetException.class.getName(),
                                    exceptionMsg);
      }
    };
    when(mockNN.addBlock(anyString(),
                         anyString(),
                         any(Block.class),
                         any(DatanodeInfo[].class))).thenAnswer(answer);

    final DFSClient client = new DFSClient(null, mockNN, conf, null);
View Full Code Here


        else
          throw new RemoteException(NotReplicatedYetException.class.getName(),
                                    exceptionMsg);
      }
    };
    when(mockNN.addBlock(anyString(),
                         anyString(),
                         any(Block.class),
                         any(DatanodeInfo[].class))).thenAnswer(answer);

    final DFSClient client = new DFSClient(null, mockNN, conf, null);
View Full Code Here

    String src1 = "/testEditLog1";
    NameNode nn = cluster.getNameNode();
    String clientName = ((DistributedFileSystem) fs).getClient().clientName;
    fs.create(new Path(src));
    for (int i = 0; i < 10; i++) {
      Block b = nn.addBlock(src, clientName).getBlock();
      nn.abandonBlock(b, src, clientName);
    }
    fs.create(new Path(src1));
    nn.addBlock(src1, clientName);
    cluster.restartNameNode(0, new String[] {}, false);
View Full Code Here

    for (int i = 0; i < 10; i++) {
      Block b = nn.addBlock(src, clientName).getBlock();
      nn.abandonBlock(b, src, clientName);
    }
    fs.create(new Path(src1));
    nn.addBlock(src1, clientName);
    cluster.restartNameNode(0, new String[] {}, false);
    nn = cluster.getNameNode();
    assertTrue(nn.isInSafeMode());
    nn.setSafeMode(SafeModeAction.SAFEMODE_LEAVE);
  }
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.