Closed
Bug 1362088
Opened 9 years ago
Closed 8 years ago
SparkSession does not have access to Hive Metastore tables
Categories
(Data Platform and Tools :: General, enhancement, P2)
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: frank, Assigned: whd)
Details
(Whiteboard: [SvcOps])
The new way of using spark is using a SparkSession:
```
import org.apache.spark.sql.SparkSession
val spark = SparkSession
.builder()
.appName("my-app")
.getOrCreate()
```
Unfortunately, doing it this way the Hive tables are not accessible. `spark.sql("SELECT * FROM main_summary LIMIT 1")` errors out.
Updated•9 years ago
|
Points: --- → 1
Priority: -- → P1
Whiteboard: [SvcOps]
Updated•9 years ago
|
Points: 1 → 2
| Assignee | ||
Updated•9 years ago
|
Assignee: nobody → whd
| Assignee | ||
Comment 1•9 years ago
|
||
(In reply to Frank Bertsch [:frank] from comment #0)
> Unfortunately, doing it this way the Hive tables are not accessible.
> `spark.sql("SELECT * FROM main_summary LIMIT 1")` errors out.
Can you be more specific about the environment you are using and the error you are seeing? I just tried this from an interactive atmo cluster (emr 5.2.1) using spark-shell and it worked for me. I also saw enableHiveSupport at https://databricks.com/blog/2016/08/15/how-to-use-sparksession-in-apache-spark-2-0.html but didn't need to add it to get your example to work.
Flags: needinfo?(fbertsch)
Updated•8 years ago
|
Priority: P1 → P2
| Reporter | ||
Comment 2•8 years ago
|
||
Works for me now.
Status: NEW → RESOLVED
Closed: 8 years ago
Flags: needinfo?(fbertsch)
Resolution: --- → WORKSFORME
Updated•3 years ago
|
Component: Spark → General
You need to log in
before you can comment on or make changes to this bug.
Description
•