Search Java Code Snippets


  Help us in improving the repository. Add new snippets through 'Submit Code Snippet ' link.





#Java - Code Snippets for '#NameNode' - 6 code snippet(s) found

 Sample 1. Code Sample / Example / Snippet of org.apache.hadoop.hdfs.server.namenode.DatanodeDescriptor.BlockTargetPair

  public BlockCommand(int action, List<BlockTargetPair> blocktargetlist) {

super(action);



blocks = new Block[blocktargetlist.size()];

targets = new DatanodeInfo[blocks.length][];

for(int i = 0; i < blocks.length; i++) {

BlockTargetPair p = blocktargetlist.get(i);

blocks[i] = p.block;

targets[i] = p.targets;

}

}




   Like      Feedback      org.apache.hadoop.hdfs.server.namenode.DatanodeDescriptor.BlockTargetPair


 Sample 2. Usage of org.apache.hadoop.hdfs.server.namenode.FSEditLog.EditLogFileInputStream

EditLogFileInputStream edits =
new EditLogFileInputStream(getImageFile(sd, NameNodeFile.EDITS));
numEdits = FSEditLog.loadFSEdits(edits);
edits.close();
File editsNew = getImageFile(sd, NameNodeFile.EDITS_NEW);
if (editsNew.exists() && editsNew.length() > 0) {
edits = new EditLogFileInputStream(editsNew);
numEdits += FSEditLog.loadFSEdits(edits);
edits.close();

   Like      Feedback     EditLogFileInputStream  Apache Hadoop


 Sample 3. Usage of org.apache.hadoop.hdfs.server.namenode.NameNode

NameNode nn = (NameNode)context.getAttribute("name.node");
Configuration conf = new Configuration(
(Configuration)context.getAttribute("name.conf"));
UnixUserGroupInformation.saveToConf(conf,
UnixUserGroupInformation.UGI_PROPERTY_NAME, ugi);
return DFSClient.createNamenode(nn.getNameNodeAddress(), conf);

   Like      Feedback     Apache Hadoop  NameNode


 Sample 4. Example / Sample of import org.apache.hadoop.hdfs.server.namenode.DatanodeDescriptor.BlockTargetPair;

  public BlockCommand(int action, List<BlockTargetPair> blocktargetlist) {

super(action);



blocks = new Block[blocktargetlist.size()];

targets = new DatanodeInfo[blocks.length][];

for(int i = 0; i < blocks.length; i++) {

BlockTargetPair p = blocktargetlist.get(i);

blocks[i] = p.block;

targets[i] = p.targets;

}

}




   Like      Feedback      org.apache.hadoop.hdfs.server.namenode.DatanodeDescriptor.BlockTargetPair


Subscribe to Java News and Posts. Get latest updates and posts on Java from Buggybread.com
Enter your email address:
Delivered by FeedBurner
 Sample 5. Code Sample / Example / Snippet of org.apache.hadoop.hdfs.server.namenode.NameNode

  protected ClientProtocol createNameNodeProxy(UnixUserGroupInformation ugi

) throws IOException {

ServletContext context = getServletContext();

NameNode nn = (NameNode)context.getAttribute("name.node");

Configuration conf = new Configuration(

(Configuration)context.getAttribute("name.conf"));

UnixUserGroupInformation.saveToConf(conf,

UnixUserGroupInformation.UGI_PROPERTY_NAME, ugi);

return DFSClient.createNamenode(nn.getNameNodeAddress(), conf);

}


   Like      Feedback      org.apache.hadoop.hdfs.server.namenode.NameNode


 Sample 6. Code Sample / Example / Snippet of org.apache.hadoop.hdfs.server.namenode.FSNamesystem

  private void doMerge(CheckpointSignature sig) throws IOException {

FSNamesystem namesystem =

new FSNamesystem(checkpointImage, conf);

assert namesystem.dir.fsImage == checkpointImage;

checkpointImage.doMerge(sig);

}


   Like      Feedback      org.apache.hadoop.hdfs.server.namenode.FSNamesystem



Subscribe to Java News and Posts. Get latest updates and posts on Java from Buggybread.com
Enter your email address:
Delivered by FeedBurner