Skip to content

Instantly share code, notes, and snippets.

@iambrian
Last active October 18, 2016 02:25
Show Gist options
  • Save iambrian/b8ff149a5554e4c350b6f876d96ff261 to your computer and use it in GitHub Desktop.
Save iambrian/b8ff149a5554e4c350b6f876d96ff261 to your computer and use it in GitHub Desktop.
Configuring Hive for EMR
  1. Make sure hive is installed on your EMR instance

  2. Can't SSH into EMR master?

Error: Connection Refused --> check your security group permissions

Go to EC2 dashboard. Select your master instance. In the 'Description' tab, click the Security Group (probably ElasticMapReduce-master). Under the 'Inbound' tab, add a rule for SSH.

  1. Getting java errors when running 'hive' command

java.sql.SQLException: Access denied for user 'hive'@'localhost' (using password: YES)

Make an MySQL instance on RDS. Then add this as a file called 'hive-site.xml' under ~/hive/conf/hive-site.xml:

javax.jdo.option.ConnectionURL jdbc:mysql://YOURHOSTNAME:3306/hive?createDatabaseIfNotExist=true JDBC connect string for a JDBC metastore javax.jdo.option.ConnectionUserName YOURUSERNAME Username to use against metastore database javax.jdo.option.ConnectionPassword YOURPASSWORD Password to use against metastore database

Getting MissingTableException: Required table missing VERSION when starting hive on mysql

Go to ~/hive/bin/ and run this:

schematool -dbType mysql -initSchema

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment