The problem is probably with the command. It would've been better if you had mentioned the command that you are using. Anyways, here's a working code:
Use the following commands to connect to hive.
val hiveContext = new org.apache.spark.sql.hive.HiveContext(sc)
val hive_tables=hiveContext.sql("show tables")
val first = hiveContext.sql("select * from olympics limit 5")