Apache Gora provides an in-memory data model and persistence for big data. It supports persisting to column stores, key/value stores, document stores and RDBMSs, and analyzing the data. It supports Apache Hadoop MapReduce support. Here is How to Install Apache Gora on Ubuntu Server. Gora is one software, example works of which will clarify our article how MySQL used in Big Data Analysis.
How to Install Apache Gora on Ubuntu Server
We are taking it granted that the server already has Hadoop installed and running. We will require Apache Maven to build the Gora source code. As Hadoop installed, Java already installed. Still, we will sow the steps. We can install Maven with Ubuntu’s package manager or build it :
1 2 3 4 5 | apt update -y apt upgrade -y sudo add-apt-repository ppa:webupd8team/java apt update -y apt install oracle-java8-installer |
Verify the Java version by running the following command:
---
1 | java -version |
We can download the latest stable version of Apache Maven from its official website, we are using Maven 3, always get the latest :
1 | http://www-eu.apache.org/dist/maven/ |
Run these commands :
1 2 3 4 5 | cd /opt/ wget http://www-eu.apache.org/dist/maven/maven-3/3.5.3/binaries/apache-maven-3.5.3-bin.tar.gz tar -xvzf apache-maven-3.5.3-bin.tar.gz sudo mv apache-maven-3.5.3 maven ls -al |
Next, we will need to setup the environment variables such as M2_HOME, M2
, MAVEN_OPTS
, and PATH
. We can create a mavenenv.sh
file inside of the /etc/profile.d/
directory :
1 2 | touch /etc/profile.d/mavenenv.sh nano /etc/profile.d/mavenenv.sh |
Add the following lines:
1 2 | export M2_HOME=/opt/maven export PATH=${M2_HOME}/bin:${PATH} |
Save and close the file, run the following commands:
1 2 3 | sudo chmod +x /etc/profile.d/mavenenv.sh source /etc/profile.d/mavenenv.sh mvn --version |
Apache Gora available here :
1 | http://gora.apache.org/downloads.html |
Run :
1 2 3 | wget http://www.apache.org/dyn/closer.cgi/gora/0.8/apache-gora-0.8-src.tar.gz tar -xvzf apache-gora-0.8-src.tar.gz ls -al |
If required, rename the directory to gora
. Now run :
1 2 3 4 | cd gora mvn clean install ## we can go to modules directory and install modules # mvn clean install |
If your project however uses maven, then you can include Gora dependencies to your project by adding the following lines to your pom.xml
file:
1 2 3 4 5 6 7 8 9 10 11 | <dependency> <groupId>org.apache.gora</groupId> <artifactId>gora-core</artifactId> <version>${version}</version> </dependency> <dependency> <groupId>org.apache.gora</groupId> <artifactId>gora-accumulo</artifactId> <version>${version}</version> </dependency> |
Apache Gora reads configuration from a properties file name gora.properties
. On official website, you’ll find general and database specific settings :
1 | http://gora.apache.org/current/gora-conf.html |