Example usage for org.apache.hadoop.hdfs.server.common Storage STORAGE_DIR_CURRENT

List of usage examples for org.apache.hadoop.hdfs.server.common Storage STORAGE_DIR_CURRENT

Introduction

In this page you can find the example usage for org.apache.hadoop.hdfs.server.common Storage STORAGE_DIR_CURRENT.

Prototype

String STORAGE_DIR_CURRENT

To view the source code for org.apache.hadoop.hdfs.server.common Storage STORAGE_DIR_CURRENT.

Click Source Link

Usage

From source file:com.mellanox.r4h.MiniDFSCluster.java

License:Apache License

/**
 * Get current directory corresponding to the datanode as defined in
 * (@link Storage#STORAGE_DIR_CURRENT}//from   w ww. j a  va  2s .com
 * 
 * @param storageDir
 *            the storage directory of a datanode.
 * @return the datanode current directory
 */
public static String getDNCurrentDir(File storageDir) {
    return storageDir + "/" + Storage.STORAGE_DIR_CURRENT + "/";
}

From source file:com.mellanox.r4h.MiniDFSCluster.java

License:Apache License

/**
 * Get finalized directory for a block pool
 * /*  www  .  j av  a2s.c  om*/
 * @param storageDir
 *            storage directory
 * @param bpid
 *            Block pool Id
 * @return finalized directory for a block pool
 */
public static File getRbwDir(File storageDir, String bpid) {
    return new File(getBPDir(storageDir, bpid, Storage.STORAGE_DIR_CURRENT) + DataStorage.STORAGE_DIR_RBW);
}

From source file:com.mellanox.r4h.MiniDFSCluster.java

License:Apache License

/**
 * Get finalized directory for a block pool
 * //from w w  w. j  ava 2s .  c  o m
 * @param storageDir
 *            storage directory
 * @param bpid
 *            Block pool Id
 * @return finalized directory for a block pool
 */
public static File getFinalizedDir(File storageDir, String bpid) {
    return new File(
            getBPDir(storageDir, bpid, Storage.STORAGE_DIR_CURRENT) + DataStorage.STORAGE_DIR_FINALIZED);
}