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.
importorg.apache.spark.sql.hive.HiveContext
val hiveContext = new org.apache.spark.sql.hive.HiveContext(sc)
import hiveContext._
val hive_tables=hiveContext.sql("show tables")
val first = hiveContext.sql("select * from olympics limit 5")
first.show()