Example usage for org.apache.hadoop.hdfs.security.token.block ExportedBlockKeys ExportedBlockKeys

List of usage examples for org.apache.hadoop.hdfs.security.token.block ExportedBlockKeys ExportedBlockKeys

Introduction

In this page you can find the example usage for org.apache.hadoop.hdfs.security.token.block ExportedBlockKeys ExportedBlockKeys.

Prototype

public ExportedBlockKeys() 

Source Link

Usage

From source file:io.hops.experiments.benchmarks.blockreporting.TinyDatanode.java

License:Apache License

void register(boolean isDataNodePopulated) throws Exception {
    List<BlockReportingNameNodeHandle> namenodes = nameNodeSelector.getNameNodes();
    // get versions from the namenode
    nsInfo = namenodes.get(0).getDataNodeRPC().versionRequest();
    dnRegistration = new DatanodeRegistration(
            new DatanodeID(DNS.getDefaultIP("default"), DNS.getDefaultHost("default", "default"), "",
                    getNodePort(dnIdx), DFSConfigKeys.DFS_DATANODE_HTTP_DEFAULT_PORT,
                    DFSConfigKeys.DFS_DATANODE_IPC_DEFAULT_PORT),
            new DataStorage(nsInfo, ""), new ExportedBlockKeys(), VersionInfo.getVersion());
    dnRegistration.setStorageID(createNewStorageId(dnRegistration.getXferPort(), dnIdx));
    // register datanode
    for (BlockReportingNameNodeHandle nn : namenodes) {
        dnRegistration = nn.getDataNodeRPC().registerDatanode(dnRegistration);
    }//from w w  w  .j a va  2  s. co  m
    //first block reports
    storage = new DatanodeStorage(dnRegistration.getStorageID());
    if (!isDataNodePopulated) {
        firstBlockReport(new BlockListAsLongs(null, null).getBlockListAsLongs());
    }
}