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 {...
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,...
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...
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...
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 –...
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...
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...
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 ;)...
Script file below, #!/usr/bin/expect -f # adds server to known hosts list # file containing list of hostnames is passed as 1st arg set host_file [lindex $argv 0] set f [open $host_file] set hosts [split [read $f] “\n”] close $f...