You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by Joseph <wx...@sina.com> on 2016/05/13 08:09:07 UTC
The metastore database gives errors when start spark-sql CLI.
Hi all,
I use PostgreSQL to store the hive metadata.
First, I imported a sql script to metastore database as follows:
psql -U postgres -d metastore -h 192.168.50.30 -f hive-schema-1.2.0.postgres.sql
Then, when I started $SPARK_HOME/bin/spark-sql, the PostgreSQL gave the following errors:
ERROR: syntax error at or near "@@" at character 5
STATEMENT: SET @@session.sql_mode=ANSI_QUOTES
ERROR: relation "v$instance" does not exist at character 21
STATEMENT: SELECT version FROM v$instance
ERROR: column "version" does not exist at character 10
STATEMENT: SELECT @@version
This does not affect normal use, but maybe it is a bug! ( I use spark 1.6.1 and hive 1.2.1)
Joseph
Re: The metastore database gives errors when start spark-sql CLI.
Posted by Mich Talebzadeh <mi...@gmail.com>.
I do not know Postgres but that sounds like a system table much like Oracle
v$instance?
Why running a Hive schema script against a hive schema/DB in Postgres
should impact system schema?
Mine is Oracle
sys@MYDB12.MICH.LOCAL> SELECT version FROM v$instance;
VERSION
-----------------
12.1.0.2.0
Otherwise just drop and recreate Hive DB/schema. However, check that the
problem with $instance has gone away.
This sounds like a system table corruption?
HTH
Dr Mich Talebzadeh
LinkedIn * https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw
<https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw>*
http://talebzadehmich.wordpress.com
On 13 May 2016 at 09:09, Joseph <wx...@sina.com> wrote:
>
> Hi all,
>
> I use PostgreSQL to store the hive metadata.
>
> First, I imported a sql script to metastore database as follows:
> psql -U postgres -d metastore -h 192.168.50.30 -f
> *hive-schema-1.2.0.postgres.sql*
>
> Then, when I started $SPARK_HOME/bin/*spark-sql*, the PostgreSQL gave
> the following errors:
>
> ERROR: syntax error at or near "@@" at character 5
> STATEMENT: SET @@session.sql_mode=ANSI_QUOTES
> ERROR: relation "v$instance" does not exist at character 21
> STATEMENT: SELECT version FROM v$instance
> ERROR: column "version" does not exist at character 10
> STATEMENT: SELECT @@version
>
> This does not affect normal use, but maybe it is a bug! ( I use spark
> 1.6.1 and hive 1.2.1)
>
> ------------------------------
> Joseph
>