If you use only only 1 Master Node, you cannot have a Hawq Master and Standby
If I install Hawq Master on Same node with Ambari need to change PostGres Port from 5432 on Install
Prep
Ensure that httpd is installed
yum install httpd
sudo service httpd status
sudo service httpd start
Get and Install repo
Log onto Pivotal and download hdb-2.1.1.0-7.tar
/* On Ambari Node */
1. mkdir /staging
2. chmod a+rx /staging
3. scp -i <<your key>> -o 'StrictHostKeyChecking=no' hdb-2.1.1.0-7.tar root@<<ambarinode>>:~/staging
4. tar -zxvf hdb-2.1.1.0-7.tarcd /staging/hdb-2.1.1.0./setup_repo.sh
/* You should see the message “hdb-2.1.1.0 Repo file successfully created at /etc/yum.repos.d/hdb-2.1.1.0.repo. */
5. yum install -y hawq-ambari-plugin
6. cd /var/lib/hawq
7. ./add-hawq.py --user admin --password admin --stack HDP-2.5
/* if the repo is in the same node as Ambari else pint to where the repo lives*/
./add-hawq.py --user <admin-username> --password <admin-password> --stack HDP-2.5 --hawqrepo <hdb-2.1.x-url> --addonsrepo <hdb-add-ons-2.1.x-url>
8. ambari-server restart
Configurations during Install with Ambari
Set VM overcommit to 0 if you plan to use Hive and/or LLAP also on the same cluster; Don’t follow Pivotal docs to set this to 2 ele your Hive processes will have memory issues.
Advanced hdfs-site
Property
Setting
dfs.allow.truncate
true
dfs.block.access.token.enable
false for an unsecured HDFS cluster, or true for a secure cluster
SELECT gp_segment_id, COUNT(*)
FROM <<table>>
GROUP BY gp_segment_id
ORDER BY 1;
Creating Tables
<<TBD>
Make SURE AFTER YOU CREATE THE TABLE ANALYZE: As an Example:
vacuum analyze device.priority_counter_hist_rand;
Loading Data to Tables
<<TBD>
Potential HAWQ Errors
Too many open files in system
To fix this check the value for fs.file-max in /etc/sysctl.conf. If configured a value that is lower than the total # of open files for the entire system at a given point (lsof | wc -l) then we would have increase this. To increase this value follow the below steps
Open Files: lsof | wc -l
ulimit -a | grep open
Edit the following line in the /etc/sysctl.conf file:
fs.file-max = value #value is the new file descriptor limit that you want to set.
Apply the change by running the following command:# /sbin/sysctl -p
We can disable over-commit temporarily: echo 0 > /proc/sys/vm/overcommit_memory