Hi Jacek, We will try to create the default database if it does not exist. Hive actually relies on that AlreadyExistsException to determine if a db already exists and ignore the error to implement the logic of "CREATE DATABASE IF NOT EXISTS". So, that message does not mean any bad thing happened. I think we can avoid of having this error log by changing https://github.com/apache/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/SessionCatalog.scala#L84-L91. Basically, we will check if the default db already exists and we only call create database if the default db does not exist. Do you want to try it?
Thanks, Yin On Tue, Aug 16, 2016 at 7:33 PM, Jacek Laskowski <ja...@japila.pl> wrote: > Hi, > > I'm working with today's build and am facing the issue: > > scala> Seq(A(4)).toDS > 16/08/16 19:26:26 ERROR RetryingHMSHandler: > AlreadyExistsException(message:Database default already exists) > at org.apache.hadoop.hive.metastore.HiveMetaStore$ > HMSHandler.create_database(HiveMetaStore.java:891) > ... > > res1: org.apache.spark.sql.Dataset[A] = [id: int] > > scala> spark.version > res2: String = 2.1.0-SNAPSHOT > > See the complete stack trace at > https://gist.github.com/jaceklaskowski/a969fdd5c2c9cdb736bf647b01257a3e. > > I'm quite positive that it didn't happen a day or two ago. > > Pozdrawiam, > Jacek Laskowski > ---- > https://medium.com/@jaceklaskowski/ > Mastering Apache Spark 2.0 http://bit.ly/mastering-apache-spark > Follow me at https://twitter.com/jaceklaskowski > > --------------------------------------------------------------------- > To unsubscribe e-mail: dev-unsubscr...@spark.apache.org > >