You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 23 Next »

How to Build

Option 1 (with pre-built docker image)

Follow the steps on: https://hub.docker.com/r/mayjojo/hawq-devel/

Option 2 (build the dependencies by yourself)

OS requirement

Linux ( tested on redhat 6.x).

Dependencies

There are several dependencies (see the following table) you must install before building HAWQ. To build Apache HAWQ, gcc and some dependencies are needed. The libraries are tested on the version given. Most of the dependencies could be installed through yum. Other dependencies should be installed through the source tarball, which means the typically make 3 steps "./configure && make && make install".

Libraries should be installed using source tarball.

 

 

Libraries could be installed through yum.

NameVersoin
gperf
3.0.4
snappy-devel
1.1.3
bzip2-devel 
1.0.6
python-devel 
2.6.2
libevent-devel
1.4.6
krb5-devel
1.11.3
libuuid-devel
2.26.2
libgsasl-devel
1.8.0
libxml2-devel 
2.7.8
zlib-devel
1.2.3
readline-devel
6
openssl-devel
0.9.8
bison-devel
2.5
apr-devel
1.2.12
libyaml-devel
0.1.1
flex-devel
2.5.35

Get code and build HAWQ

  • The Apaceh HAWQ source code can be obtained from the GitHub: https://github.com/apache/incubator-hawq
  • Get source code
  • The code directory is CODEHOME/incubator-hawq. Then cd CODEHOME/incubator-hawq and build Apache HAWQ under this directory.
  • Run command to generate makefile.
    • ./configure
  • Or you could user --prefix=/hawq/install/path to change the Apache HAWQ install path.
    • ./configure --prefix=/hawq/install/path
  • You also could run the command with --help for more configuration.
    • ./configure --help
  • Run command to build
    • make
  • To build concurrently , run make with -j option.
    • make -j8

Install HAWQ

  • To install Apache HAWQ, run command
    • make install

Test In HAWQ

  • Unit test. To do unit test, go to the src/backend and run unittest check.
    • cd src/backend
    • make unittest-check
  • Install check. After installed Apache HAWQ , ensure HDFS work before init Apache HAWQ.Then init Apache HAWQ.To do install check, run the command below under incubator-hawq.
    • source /install/dir/greenplum_path.sh
    • hawq init cluster
    • make installcheck-good

Install YARN (Optional)

If you want to use YARN integration feature, you need to install YARN first.

  • Install libyarn
    • cd depends/libyarn/
    • mkdir build
    • cd build
    • ../bootstrap --prefix=/usr/local/
    • make
    • sudo make install

Init and Start Apache HAWQ

  • Before initializing HAWQ, you need to install HDFS and make sure it works
    • source /install/dir/greenplum_path.sh
    • hawq init cluster
    • hawq start cluster

Connect and Run basic queries

  • psql -d postgres
  • create table t ( i int );
  • insert into t values(1);
  • select * from t;

 


 




  • No labels