Monthly Archive: May 2016

0

Hive statistics using beeline and expect script

Following expect script uses beeline interface to fetch statistics of tables within a database. Use username and queuename with your environment values. #!/usr/bin/expect -f # hive_statistics, v0.1, 2016-05, [email protected] # Usage: ./hive_statistics [database_name] set _database [lindex $argv 0] if {...

0

Hortonworks Data Platform Installation errata – Missing manual

Pre-requisites Creating service users and databases in MySQL JDBC connector error during ambari-server setup with MySQL MySql connection failing during ambari automated installation   Some useful bash scripts Create database and user on mysql for services like ambari, oozie, hue,...

0

MySQL Tips

Show all users Drop all databases Delete all users in MySQL with specific name Check and duplicate user grants Reset root password (mysql 5.7)   Tip #1: Show all users MariaDB [(none)]> select User,Host from mysql.user order by User, Host; Output...

0

Configure log files on HDP platform

  Kafka Storm Ranger HDFS Zookeeper Oozie Knox Hive & Hive metastore   1. Kafka Kafka currently uses org.apache.log4j.DailyRollingFileAppender, which doesn’t allow us to specify the max backup index, max file size. And by default, rolls every hour creating 24...

0

Insightful Hadoop administration commands

Tip #1 Quick list of operations Where? Example: /var/log/hadoop/hdfs cat hdfs-audit.log | awk ‘{cmds[$9]++}END{for (i in cmds)printf “%s %d\n”,i,cmds[i]}’ Results [user@server hdfs]$ cat hdfs-audit.log | awk ‘{cmds[$9]++}END{for (i in cmds)printf “%s %d\n”,i,cmds[i]}’ cmd=setTimes 52 cmd=listStatus 47422 cmd=create 36932 cmd=getfileinfo 7431182...

0

How To Install MySQL / MariaDB on CentOS 7

Source: http://www.liquidweb.com/kb/how-to-install-mysql-mariadb-on-centos-7/ MariaDB is a drop-in replacement for MySQL. It is easy to install, offers many speed and performance improvements, and is easy to integrate into most MySQL deployments. Answers for compatibility questions can be found at: MariaDB versus MySQL –...

0

Super charge bash with these bash_profile tips

Some tips and tricks to super charge bash Tip #01: Up down arrow auto complete ~/.inputrc #File: ~/.inputrc ## arrow up “\e[A”:history-search-backward ## arrow down “\e[B”:history-search-forward   Tip #2: Auto complete hostnames in ssh, scp. More details here. $ brew install...

0

ldapsearch – ldap command to test connection

Well the post name is a misnomer. Lately I’ve been using ldapsearch command to test connection to ldap server, hence the name. Following is the shell command, $ ldapsearch -x -LLL -h ldapserver.example.com -D username -w password -b “DC=example,DC=com” -s...

0

Setup bulk password-less ssh

Following script will help in setting up password-less ssh in one shot to multiple machines, Usage sample: $ remote-keyless.sh <file_of_hosts.txt> [password] #!/usr/bin/expect -f # remote-keyless.sh, v0.1, 2016-05-03, [email protected] # v0.2, 2016-09-28, [email protected] – added to make it compatible with pdsh ;)...