http://spark.apache.org/docs/latest/sql-programming-guide.html
Code for mean average precision https://github.com/echen/link-prediction/blob/master/Scorer.scala
When connection to hive fails http://stackoverflow.com/questions/22651105/java-sql-sqlexception-failed-to-start-database-var-lib-hive-metastore-metasto