Member since
04-23-2018
20
Posts
0
Kudos Received
0
Solutions
05-18-2018
04:26 PM
@Felix Albani, Felix Albani I would be glad to mark the answer as helpful, but don't know how to do that.
... View more
05-18-2018
04:25 PM
@Felix Albani I would be glad to mark the answer as helpful, but don't know how to do that.
... View more
05-17-2018
04:32 PM
Hi @Felix Albani, According to @Aditya Sirna's reply to a similar thread, Spark 2 (which is what I am using - NOT Spark 1) has a different warehouse location, which, I suppose, explains why LOCATION must be used. @Aditya Sirna, if I want to create a Hive database with Spark, do I have to use the location statement? If so, what location statement should I use if I want to keep my databases and tables managed by the Hive metastore?
... View more
05-17-2018
04:16 PM
According to this Hortonworks community URL, Location is NOT mandatory. But it was the only way I was able to create a database.
... View more
05-17-2018
04:05 PM
@Felix Albani Thank you for your reply. That suggestion actually worked! However, I don't understand why it is necessary to specify the database location in HDFS. Why does that have to be done in HDP? In other Hadoop/Spark distributions, I haven't had to specify the database filepath and database name when creating Hive databases with Spark. I still believe there is a configuration problem with Hive and Spark with HDP.
... View more
05-16-2018
08:58 PM
Hi @Felix Albani, Thanks for your reply. Unfortunately, the suggestion didn't work. First, it took FOREVER to launch pyspark with the yarn option $ pyspark --master yarn option (and I still don't understand why that option was needed). And also, when it did launch, it ultimately threw a bunch of java errors.
... View more
05-16-2018
08:54 PM
@Felix_Albani, Thanks for your reply. Unfortunately, the suggestion didn't work. First, it took FOREVER to launch pyspark with the yarn option $ pyspark --master yarn
option (and I still don't understand why that option was needed). And also, when it did launch, it ultimately threw a bunch of java errors.
... View more
05-16-2018
06:59 PM
Hi, After installing HDP 2.6.3, I ran Pyspark in the terminal, then initiated a Spark Session, and tried to create a new database (see last line of code: $ pyspark
> from pyspark.sql import SparkSession
> spark = SparkSession.builder.master("local").appName("test").enableHiveSupport().getOrCreate()
> spark.sql("show databases").show()
> spark.sql("create database if not exists NEW_DB")
However, PySpark threw an error where it was trying to create a database locally: AnalysisException: 'org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Unable to create database path file:/home/jdoe/spark-warehouse/new_db.db, failed to create database new_db);' I wasn't trying to create a database locally. I was trying to create a database within Hive. Is there a configuration problem with HDP 2.6.3? Please advise. Thanks.
... View more
Labels:
- Labels:
-
Apache Hive