You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by Anusha Shamanur <an...@gmail.com> on 2015/02/27 16:17:59 UTC
Failed to parse Hive query
Hi,
I am trying to do this in spark-shell:
val hiveCtx = neworg.apache.spark.sql.hive.HiveContext(sc) val
listTables =hiveCtx.hql("show tables")
The second line fails to execute with this message:
warning: there were 1 deprecation warning(s); re-run with -deprecation for
details org.apache.spark.sql.hive.HiveQl$ParseException: Failed to parse:
show tables at
org.apache.spark.sql.hive.HiveQl$.createPlan(HiveQl.scala:239) at
org.apache.spark.sql.hive.ExtendedHiveQlParser$$anonfun$hiveQl$1.apply(ExtendedHiveQlParser.scala:50)
at
org.apache.spark.sql.hive.ExtendedHiveQlParser$$anonfun$hiveQl$1.apply(ExtendedHiveQlParser.scala:49)
at scala.util.parsing.combinator.Parsers$Success.map(Parsers.scala:136) at
scala.util.parsing.combinator.Parsers$Success.map(Parsers.scala:135) at
scala.util.parsing.combinator.Parsers$Parser$$anonfun$map$1.apply(Parsers.scala:242)
... at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala) Caused
by: java.lang.NullPointerException: Conf non-local session path expected to
be non-null at
com.google.common.base.Preconditions.checkNotNull(Preconditions.java:204)
at
org.apache.hadoop.hive.ql.session.SessionState.getHDFSSessionPath(SessionState.java:586)
at org.apache.hadoop.hive.ql.Context.(Context.java:129) at
org.apache.hadoop.hive.ql.Context.(Context.java:116) at
org.apache.spark.sql.hive.HiveQl$.getAst(HiveQl.scala:227) at
org.apache.spark.sql.hive.HiveQl$.createPlan(HiveQl.scala:240) ... 87 more
Any help would be appreciated.
--
Sent from Gmail mobile
Re: Failed to parse Hive query
Posted by Anusha Shamanur <an...@gmail.com>.
Hi,
I reconfigured everything. Still facing the same issue.
Can someone please help?
On Friday, February 27, 2015, Anusha Shamanur <an...@gmail.com> wrote:
> I do.
> What tags should I change in this?
> I changed the value of hive.exec.scratchdir to /tmp/hive.
> What else?
>
> On Fri, Feb 27, 2015 at 2:14 PM, Michael Armbrust <michael@databricks.com
> <javascript:_e(%7B%7D,'cvml','michael@databricks.com');>> wrote:
>
>> Do you have a hive-site.xml file or a core-site.xml file? Perhaps
>> something is misconfigured there?
>>
>> On Fri, Feb 27, 2015 at 7:17 AM, Anusha Shamanur <anushasb11@gmail.com
>> <javascript:_e(%7B%7D,'cvml','anushasb11@gmail.com');>> wrote:
>>
>>> Hi,
>>>
>>> I am trying to do this in spark-shell:
>>>
>>> val hiveCtx = neworg.apache.spark.sql.hive.HiveContext(sc) val listTables =hiveCtx.hql("show tables")
>>>
>>> The second line fails to execute with this message:
>>>
>>> warning: there were 1 deprecation warning(s); re-run with -deprecation
>>> for details org.apache.spark.sql.hive.HiveQl$ParseException: Failed to
>>> parse: show tables at
>>> org.apache.spark.sql.hive.HiveQl$.createPlan(HiveQl.scala:239) at
>>> org.apache.spark.sql.hive.ExtendedHiveQlParser$$anonfun$hiveQl$1.apply(ExtendedHiveQlParser.scala:50)
>>> at
>>> org.apache.spark.sql.hive.ExtendedHiveQlParser$$anonfun$hiveQl$1.apply(ExtendedHiveQlParser.scala:49)
>>> at scala.util.parsing.combinator.Parsers$Success.map(Parsers.scala:136) at
>>> scala.util.parsing.combinator.Parsers$Success.map(Parsers.scala:135) at
>>> scala.util.parsing.combinator.Parsers$Parser$$anonfun$map$1.apply(Parsers.scala:242)
>>>
>>> ... at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
>>> Caused by: java.lang.NullPointerException: Conf non-local session path
>>> expected to be non-null at
>>> com.google.common.base.Preconditions.checkNotNull(Preconditions.java:204)
>>> at
>>> org.apache.hadoop.hive.ql.session.SessionState.getHDFSSessionPath(SessionState.java:586)
>>> at org.apache.hadoop.hive.ql.Context.(Context.java:129) at
>>> org.apache.hadoop.hive.ql.Context.(Context.java:116) at
>>> org.apache.spark.sql.hive.HiveQl$.getAst(HiveQl.scala:227) at
>>> org.apache.spark.sql.hive.HiveQl$.createPlan(HiveQl.scala:240) ... 87 more
>>>
>>>
>>> Any help would be appreciated.
>>>
>>>
>>>
>>> --
>>> Sent from Gmail mobile
>>>
>>
>>
>
>
> --
> Regards,
> Anusha
>
--
Sent from Gmail mobile
Re: Failed to parse Hive query
Posted by Anusha Shamanur <an...@gmail.com>.
I do.
What tags should I change in this?
I changed the value of hive.exec.scratchdir to /tmp/hive.
What else?
On Fri, Feb 27, 2015 at 2:14 PM, Michael Armbrust <mi...@databricks.com>
wrote:
> Do you have a hive-site.xml file or a core-site.xml file? Perhaps
> something is misconfigured there?
>
> On Fri, Feb 27, 2015 at 7:17 AM, Anusha Shamanur <an...@gmail.com>
> wrote:
>
>> Hi,
>>
>> I am trying to do this in spark-shell:
>>
>> val hiveCtx = neworg.apache.spark.sql.hive.HiveContext(sc) val listTables =hiveCtx.hql("show tables")
>>
>> The second line fails to execute with this message:
>>
>> warning: there were 1 deprecation warning(s); re-run with -deprecation
>> for details org.apache.spark.sql.hive.HiveQl$ParseException: Failed to
>> parse: show tables at
>> org.apache.spark.sql.hive.HiveQl$.createPlan(HiveQl.scala:239) at
>> org.apache.spark.sql.hive.ExtendedHiveQlParser$$anonfun$hiveQl$1.apply(ExtendedHiveQlParser.scala:50)
>> at
>> org.apache.spark.sql.hive.ExtendedHiveQlParser$$anonfun$hiveQl$1.apply(ExtendedHiveQlParser.scala:49)
>> at scala.util.parsing.combinator.Parsers$Success.map(Parsers.scala:136) at
>> scala.util.parsing.combinator.Parsers$Success.map(Parsers.scala:135) at
>> scala.util.parsing.combinator.Parsers$Parser$$anonfun$map$1.apply(Parsers.scala:242)
>>
>> ... at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala) Caused
>> by: java.lang.NullPointerException: Conf non-local session path expected to
>> be non-null at
>> com.google.common.base.Preconditions.checkNotNull(Preconditions.java:204)
>> at
>> org.apache.hadoop.hive.ql.session.SessionState.getHDFSSessionPath(SessionState.java:586)
>> at org.apache.hadoop.hive.ql.Context.(Context.java:129) at
>> org.apache.hadoop.hive.ql.Context.(Context.java:116) at
>> org.apache.spark.sql.hive.HiveQl$.getAst(HiveQl.scala:227) at
>> org.apache.spark.sql.hive.HiveQl$.createPlan(HiveQl.scala:240) ... 87 more
>>
>>
>> Any help would be appreciated.
>>
>>
>>
>> --
>> Sent from Gmail mobile
>>
>
>
--
Regards,
Anusha
Re: Failed to parse Hive query
Posted by Michael Armbrust <mi...@databricks.com>.
Do you have a hive-site.xml file or a core-site.xml file? Perhaps
something is misconfigured there?
On Fri, Feb 27, 2015 at 7:17 AM, Anusha Shamanur <an...@gmail.com>
wrote:
> Hi,
>
> I am trying to do this in spark-shell:
>
> val hiveCtx = neworg.apache.spark.sql.hive.HiveContext(sc) val listTables =hiveCtx.hql("show tables")
>
> The second line fails to execute with this message:
>
> warning: there were 1 deprecation warning(s); re-run with -deprecation for
> details org.apache.spark.sql.hive.HiveQl$ParseException: Failed to parse:
> show tables at
> org.apache.spark.sql.hive.HiveQl$.createPlan(HiveQl.scala:239) at
> org.apache.spark.sql.hive.ExtendedHiveQlParser$$anonfun$hiveQl$1.apply(ExtendedHiveQlParser.scala:50)
> at
> org.apache.spark.sql.hive.ExtendedHiveQlParser$$anonfun$hiveQl$1.apply(ExtendedHiveQlParser.scala:49)
> at scala.util.parsing.combinator.Parsers$Success.map(Parsers.scala:136) at
> scala.util.parsing.combinator.Parsers$Success.map(Parsers.scala:135) at
> scala.util.parsing.combinator.Parsers$Parser$$anonfun$map$1.apply(Parsers.scala:242)
>
> ... at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala) Caused
> by: java.lang.NullPointerException: Conf non-local session path expected to
> be non-null at
> com.google.common.base.Preconditions.checkNotNull(Preconditions.java:204)
> at
> org.apache.hadoop.hive.ql.session.SessionState.getHDFSSessionPath(SessionState.java:586)
> at org.apache.hadoop.hive.ql.Context.(Context.java:129) at
> org.apache.hadoop.hive.ql.Context.(Context.java:116) at
> org.apache.spark.sql.hive.HiveQl$.getAst(HiveQl.scala:227) at
> org.apache.spark.sql.hive.HiveQl$.createPlan(HiveQl.scala:240) ... 87 more
>
>
> Any help would be appreciated.
>
>
>
> --
> Sent from Gmail mobile
>