Xiao Qin's Software

Auburn University

Software

HDFS-HC: A Data Placement Module for Heterogeneous Hadoop Clusters

HDFS-HC2 (a.k.a. CRBalancer) · Paper: April 2010 · Release: November 2014

HDFS-HC is a software module for rebalancing data load in heterogeneous Hadoop clusters. This data placement tool is integrated into the Hadoop distributed file system (HDFS) to initially distribute a large data set to multiple nodes according to the computing capacity of each node.

Download Source Code Report (PDF) Paper (PDF) Slides

Cite This Work

If you use HDFS-HC in your research, please cite our paper and software. We highly appreciate the credit.

  • J. Xie, S. Yin, X.-J. Ruan, Z.-Y. Ding, Y. Tian, J. Majors, A. Manzanares, and X. Qin, "Improving MapReduce Performance via Data Placement in Heterogeneous Hadoop Clusters," Proc. 19th Int'l Heterogeneity in Computing Workshop, Atlanta, Georgia, April 2010. [PDF | PPT]
    BibTeX
    @inproceedings{xie2010improving,
      title     = {Improving {MapReduce} Performance via Data Placement in Heterogeneous {Hadoop} Clusters},
      author    = {Xie, Jiong and Yin, Shu and Ruan, Xiaojun and Ding, Zhiyang and Tian, Yun and Majors, James and Manzanares, Adam and Qin, Xiao},
      booktitle = {Proceedings of the 19th International Heterogeneity in Computing Workshop (HCW)},
      address   = {Atlanta, Georgia},
      month     = apr,
      year      = {2010}
    }
  • Sanket Reddy Chintapalli, "Analysis of Data Placement Strategy based on Computing Power of Nodes on Heterogeneous Hadoop Clusters," Technical Report, Department of Computer Science and Software Engineering, Auburn University, Nov. 2014. [PDF | Slides | Source Code]
    BibTeX
    @techreport{chintapalli2014analysis,
      title       = {Analysis of Data Placement Strategy based on Computing Power of Nodes on Heterogeneous {Hadoop} Clusters},
      author      = {Chintapalli, Sanket Reddy},
      institution = {Department of Computer Science and Software Engineering, Auburn University},
      month       = nov,
      year        = {2014}
    }

Before You Start

If you are not familiar with Hadoop, the MapReduce overview explains the background of MapReduce and how to install Hadoop on a cluster. This page shows how to install and use the HDFS-HC data placement tool in a heterogeneous Hadoop cluster.

Supported Platforms

Required Software

Download and Extract

Download hdfs-hc2.tar.gz, a recent Hadoop HDFS project in which the HDFS-HC module is integrated, and extract it:

tar -xvzf hdfs-hc2.tar.gz

Install Hadoop

Install Hadoop before working with HDFS-HC2:

Start and Stop Hadoop

To start your Hadoop cluster, start both HDFS and Map-Reduce. Format a new distributed file system, then start HDFS on the designated NameNode and Map-Reduce on the designated JobTracker:

$ bin/hadoop namenode -format
$ bin/start-dfs.sh
$ bin/start-mapred.sh

bin/start-dfs.sh consults the ${HADOOP_CONF_DIR}/slaves file on the NameNode and starts the DataNode daemon on all the listed slaves; bin/start-mapred.sh does the same on the JobTracker and starts the TaskTracker daemons.

To stop them, run these on the NameNode and the JobTracker:

$ bin/stop-dfs.sh
$ bin/stop-mapred.sh

Hadoop daemon logs are written to ${HADOOP_LOG_DIR} (by default ${HADOOP_HOME}/logs).

Run HDFS-HC2 (CRBalancer)

Before you start, please read How to Contribute to Hadoop.

What Is in the Package

  1. The JAR file hadoop-hdfs-2.3.0.jar
  2. The script hdfs
  3. The Hadoop HDFS project folder hadoop-hdfs.tar.gz. Its BUILDING.txt file describes how to compile, build, and modify the source code.

Steps

  1. Replace hadoop-hdfs-2.3.0.jar in HADOOP_HOME_PATH/share/Hadoop/hdfs.
  2. Replace the script file HADOOP_HOME_PATH/bin/hdfs.
  3. Run the script with these parameters:
hdfs -file {full path to computation ratio file} -namenodename {hostname of the namenode} -port {port number to access the namenode}

The Computation Ratio File

The file lists one node per line with its ratio:

hostname1 ratio
hostname2 ratio
...
hostnameN ratio

The ratios are calculated by placing the entire data set on a single node and finding their least common multiple. Place the file in HDFS with hadoop fs -put HDFS_DIRECTORY_PATH/filename. For example:

hpxeon01 0.36
jedi05 0.54

Example command:

hdfs crbalancer -file /user/sanket/crmap.txt -namenodename hpxeon01 -port 54310

Reading the Source Code

  1. Open the Hadoop HDFS project folder.
  2. Go to hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/crbalancer.
  3. There are three files: CRBalancer.java, CRBalancingPolicy.java, and CRNamenodeConnector.java.
  4. CRBalancer.java is the main program; it decides how to move data among nodes based on their computing power.
  5. CRBalancingPolicy calculates and stores the space each node occupies, which aids that decision.
  6. CRNamenodeConnector connects to the NameNode to get information about the DataNodes.
  7. Each program marks where its code differs from the original Hadoop balancer, which balances nodes by space utilization rather than computing power.

Questions

Please contact Sanket Reddy Chintapalli at szc0060@auburn.edu, Jiong Xie at jzx0009@auburn.edu, or Xiao Qin at xqin@auburn.edu.

License

Acknowledgments

This software is based upon work supported by the US National Science Foundation under Grants CCF-0845257 (CAREER), CNS-0917137 (CSR), CNS-0757778 (CSR), CCF-0742187 (CPA), CNS-0831502 (CyberTrust), CNS-0855251 (CRI), OCI-0753305 (CI-TEAM), DUE-0837341 (CCLI), and DUE-0830831 (SFS), as well as Auburn University under a startup grant and a gift (Number 2005-04-070) from the Intel Corporation.