#Java - Code Snippets for '#NameNode' - 6 code snippet(s) found |
|
Sample 1. 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 2. 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 3. 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 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 |
|
|
|
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 |
|
|