Quick Start Guide for Apache Hawq[作者:盛想]
来源:互联网 发布:知乎live可以回看吗 编辑:程序博客网 时间:2024/05/29 18:32
Apache HAWQ became an Apache open source project several weeks ago. Today I will introduce how we install and start Apache HAWQ.
Basic Requirements
Basic requirements has two parts, basic environments and some dependencies.
The first thing is to get a redhat 6.5 server and install the development tools during the setup of the system.
There are some dependencies you must install before the compiling. You should compile the libraries’ and install the libraries. Most libraries should compile and install to your system using the basic several steps :
cd $LIBRARY_CODE_HOME
./configure
make
Become root user and run :
make install
This way would install the libraries` headers to /usr/local/include and libraries file to /usr/local/lib or /usr/local/lib64. If you want to install the libraries in another place, you can use the --prefix=/the/path option when you run configure. For example:
./configure --prefix=/the/path/you/want
But don`t forget to add the /the/path/you/want to your LD_LIBRARY_PATH in case of HAWQ cannot find the libraries while compiling.
We have a libraries list that you should install before compile HAWQ. The list contains the library name , version and download url.
Install libhdfs3 follow the steps specified in README.md
Get Source Code
The Apache HAWQ source code can be obtained from Github. Click "Read More" in the bottom of this article to view the source code of HAWQ on Github. You could get the source code using git clone :
git clone https://github.com/apache/incubator-hawq.git
Install Procedure
The source code includes libyarn under $HAWQ_CODE_HOME/depends directory. And you need to compile and install it by hand. Change directory to libyarn folder and read README
cd $HAWQ_CODE_HOME/depends/libyarn/
To build libyarn, some libraries listed in the README are needed. You should install the libraries first and compile libyarn follow the steps specified in the README.
The first step of the building is to check whether you have installed all the dependencies. This is done by running the configure script.This script will run a number of tests to determine values for various system dependent variables and finally create the makefile. For a default installation simply run:
./configure
You could use --prefix=/hawq/install/path to change the HAWQ install path. Otherwise HAWQ would be install to /usr/local/ .
After finished configure, you can start to build HAWQ.To start the build, run:
make
To build concurrently, run make with -j option.For example :
make -j8
The build will take a few minutes depending on your hardware. The last line displayed should be:
All of HAWQ successfully made. Ready to install.
Become root user and run :
make install
You have installed HAWQ to your system !
Start Apache HAWQ
Since HAWQ bases on HDFS, you should ensure HDFS work before we init HAWQ. You could refer details from : http://hawq.docs.pivotal.io/docs-hawq/topics/InstallingHAWQ.html#preparingtoinstallhawq.
Now you can init and start HAWQ.
cd $APACHE_HAWQ_HOME
source greenplum_path.sh
hawq init cluster
Once you have inited successful, you can start HAWQ using:
hawq start cluster
To enter the database:
psql -d postgres
You can run the create database query to test that HAWQ is running:
[gpadmin@localhost ~]$ psql -d postgres
psql (8.2.15)
Type "help" for help.
postgres=# create database tpch;
CREATE DATABASE
postgres=# \c tpch
You are now connected to database "tpch" as user "gpadmin".
tpch=# create table t(i int);
CREATE TABLE
tpch=# \timing
Timing is on.
tpch=# insert into t select generate_series(1,100);
INSERT 0 100
Time: 166.311 ms
tpch=# select count(*) from t;
count
-------
100
(1 row)
Time: 127.698 ms
Basic Operations
When you want to stop hawq cluster, run:
hawq stop cluster
Or to restart the cluster:
hawq restart cluster
The usage of command hawq is
hawq <command> [<object>] [options]
The most commonly used hawq "commands" are:
start Start hawq service
stop Stop hawq service
init Init hawq service
restart Restart hawq service
The object are:
cluster Operate hawq cluster.
master Operate hawq master.
segment Operate local segment node.
standby Operate hawq standby.
allsegments Operate all segments.
If you want to know all the hawq command , just run hawq or hawq --help. You can find all the usage of hawq command.
- Quick Start Guide for Apache Hawq[作者:盛想]
- OpenSSH for Windows: Quick Start Guide
- OpenSSH for Windows: Quick Start Guide
- Flex quick start guide for PHP developers
- Quick Start Guide for Server Clusters
- Quick Start Guide for Z-Wave
- Dockerize Apache HAWQ [作者:陶征霖]
- Introducing The Newly Redesigned Apache HAWQ [作者:常雷]
- Apache HAWQ的资源管理之资源管控 [作者:霍瑞龙]
- 解密Apache HAWQ ——功能强大的SQL-on-Hadoop引擎 [作者:常雷]
- CodeSmith Quick Start Guide
- OpenLDAP Quick Start Guide
- Dom4j quick start guide
- Quartz Quick Start Guide
- Dom4j quick start guide
- Quartz Quick Start Guide
- GlassFish Quick Start Guide
- Subversion Quick-Start Guide
- Tomcat中文乱码问题的原理和解决方法
- mac终端打开出现问题:[forkpty: Resource temporarily unavailable]
- [Python开发] python使用nltk进行Chart Parsing
- hdu 5533 Dancing Stars on Me(水)
- 【鸟哥的linux私房菜-学习笔记】sed 工具
- Quick Start Guide for Apache Hawq[作者:盛想]
- Android文本输入框EditText方法说明和属性
- java synchronized详解
- mysql的行锁问题
- iOS自定义cell的写法
- 十年研发经验工程师的嵌入式学习书籍大推荐
- [maven2]maven2下pom.xml的json-lib的配置
- OpenMP: 使用OpenMP优化程序
- Introducing The Newly Redesigned Apache HAWQ [作者:常雷]