Hops Hadoop is a distribution of Apache Hadoop with distributed metadata.
Hops (Hadoop Open Platform-as-a-Service) is a next generation distribution of Apache Hadoop with scalable, highly available, customizable metadata. Hops consists internally of two main sub projects, HopsFs and HopsYarn. HopsFS is a new implementation of the Hadoop Filesystem (HDFS), that supports multiple stateless NameNodes, where the metadata is stored in MySQL Cluster, an in-memory distributed database. HopsFS enables more scalable clusters than Apache HDFS (up to ten times larger clusters), and enables NameNode metadata to be both customized and analyzed, because it can now be easily accessed via a SQL API. HopsYARN introduces a distributed stateless Resource Manager, whose state is migrated to MySQL Cluster. This enables our YARN architecture to have no down-time, with failover of a ResourceManager happening in a few seconds. Together, HopsFS and HopsYARN enable Hadoop clusters to scale to larger volumes and higher throughput.
You can find the latest Hops documentation, including a programming guide, on the project web page. This README file only contains basic setup and compilation instructions.
For compiling the Hops Hadoop Distribution you will need the following software.
We combine Apache and GPL licensed code, from Hops and MySQL Cluster, respectively, by providing a DAL API (similar to JDBC). We dynamically link our DAL implementation for MySQL Cluster with the Hops code. Both binaries are distributed separately.
Perform the following steps in the following order to compile the Hops Hadoop Distribution.
git clone https://github.com/hopshadoop/hops-metadata-dal
The master
branch contains all the newly developed features and bug fixes. For more stable version you can use the branches corresponding to releases. If you choose to use a release branch then also checkout the corresponding release branch in the other Hops Projects.
git checkout master
mvn clean install -DskipTests
git clone https://github.com/hopshadoop/hops-metadata-dal-impl-ndb
git checkout master
mvn clean install -DskipTests
This project also contains c++ code that requires RonDB libndbclient.so
library. Download the RonDB Distribution and extract the libndbclient.so
library. Alternatively you can extract it from the jar file.
cd tmp
wget https://archiva.hops.works/repository/Hops/com/mysql/ndb/clusterj-native/21.04.0/clusterj-native-21.04.0-natives-linux.jar
unzip clusterj-native-21.04.0-natives-linux.jar
cp libndbclient.so /usr/lib
See this section for specifying the database URI
and username/password
.
git clone https://github.com/hopshadoop/hops
git checkout master
mvn package generate-sources -Pdist,native -DskipTests -Dtar
mvn clean generate-sources install -Pndb -DskipTests
mvn test-compile
For running tests use the ndb
profile to add the the database access layer driver to the class path. The driver is loaded at run time. For example,
mvn test -Dtest=TestFileCreation -Pndb
Set the ndb
profile in the IDE if you are running the unit test in an IDE. For example, in IntelliJ you can do this by
View --> Tool Windows --> Maven Projects
Expand the "Profiles"
Check the "ndb" profile
There are two way to configure the NDB data access layer driver
**Hard Coding The Database Configuration Parameters: **
While compiling the database access layer all the required configuration parameters can be written to the ./hops-metadata-dal-impl-ndb/src/main/resources/ndb-config.properties
file. When the diver is loaded it will try to connect to the database specified in the configuration file.
**hdfs-site.xml: **
Add dfs.storage.driver.configfile
parameter to hdfs-site.xml to read the configuration file from a sepcified path. For example, to read the configuration file in the current directory add the following the hdfs-site.xml
<property>
<name>dfs.storage.driver.configfile</name>
<value>hops-ndb-config.properties</value>
</property>
The Hops stack includes a number of services also requires a number of third-party distributed services:
Due to the complexity of installing and configuring all Hops’ services, we recommend installing Hops using the automated installer Karamel/Chef. Detailed documentation on the steps for installing and configuring all services in Hops is not discussed here. Instead, Chef cookbooks contain all the installation and configuration steps needed to install and configure Hops. The Chef cookbooks are available at: https://github.com/hopshadoop.
For more information on how to configure cloud-based installations, go to help documentation at http://www.karamel.io. For on-premises installations, we provide some additional installation details and tips later in this section.
For on-premises (bare-metal) installations, you will need to prepare for installation by:
Identifying a master host, from which you will run Karamel;
Identifying a set of target hosts, on which the Hops software and 3rd party services will be installed.
The master must be able to connect using SSH to all the target nodes, on which the software will be installed. If you have not already copied the master’s public key to the .ssh/authorized_keys file of all target hosts, you can do so by preparing the machines as follows:
sudo apt-get install pssh
or
yum install pssh
vim hosts.txt
# Enter the row-separated IP addresses of all target nodes in hosts.txt
128.112.152.122
18.31.0.190
128.232.103.201
.....
pscp -h hosts.txt -P PASSWORD -i USER ~/.ssh/id_rsa.pub /tmp
pssh -h hosts.txt -i USER -P PASSWORD mkdir -p /home/USER/.ssh
pssh -h hosts.txt -i USER -P PASSWORD cat /tmp/id_rsa.pub >> /home/USER/.ssh/authorized_keys
Update your Karamel cluster definition file to include the IP addresses of the target machines and the USER account name. After you have clicked on the launch menu item, you will come to a ssh dialog. On the ssh dialog, you need to open the advanced section. Here, you will need to enter the password for the USER account on the target machines ( sudo password text input box). If your ssh keypair is password protected, you will also need to enter it again here in the keypair password text input box.
You can install Hops on your laptop/desktop with Vagrant. You will need to have the following software packages installed:
You can now run vagrant, using:
sudo apt-get install virtualbox vagrant
vagrant plugin install vagrant-omnibus
git clone https://github.com/hopshadoop/hopsworks-chef.git
cd hopsworks-chef
berks vendor cookbooks
vagrant up
This distribution includes cryptographic software. The country in which you currently reside may have restrictions on the import, possession, use, and/or re-export to another country, of encryption software. BEFORE using any encryption software, please check your country’s laws, regulations and policies concerning the import, possession, or use, and re-export of encryption software, to see if this is permitted. See http://www.wassenaar.org/ for more information.
The U.S. Government Department of Commerce, Bureau of Industry and Security (BIS), has classified this software as Export Commodity Control Number (ECCN) 5D002.C.1, which includes information security software using or performing cryptographic functions with asymmetric algorithms. The form and manner of this Apache Software Foundation distribution makes it eligible for export under the License Exception ENC Technology Software Unrestricted (TSU) exception (see the BIS Export Administration Regulations, Section 740.13) for both object code and source code.
The following provides more details on the included cryptographic software: Hadoop Core uses the SSL libraries from the Jetty project written by mortbay.org.
Hops is released under an Apache 2.0 license.