Grokbase Groups Hive user June 2010
FAQ
Hey guys,

We have a very simple JDBC client that uses the Hive JDBC driver to execute
queries. We are trying to use it to execute a simple "create temporary
function ..." statement, but Hive is throwing the following error:

Exception in thread "main" java.sql.SQLException: Query returned non-zero
code: 9, cause: FAILED: Execution Error, return code 1 from
org.apache.hadoop.hive.ql.exec.FunctionTask
at
org.apache.hadoop.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:173)
at org.apache.hadoop.hive.jdbc.HiveStatement.execute(HiveStatement.java:115)
at HiveJdbcClient.main(HiveJdbcClient.java:31)

A simple "ADD FILE ..." works just fine, as well as other queries. This is
using Hive 0.5.

Thanks,
Ryan

Search Discussions

  • Vinithra Varadharajan at Jun 2, 2010 at 7:35 pm
    Hi Ryan,

    Did you register the UDF with ADD JAR <udf.jar>? Note that you currently
    cannot register a jar that is on HDFS (HIVE-1157).

    In case you've already done the above, have you tried the query from the
    Hive CLI - do you get the same error?

    Also, could you attach the detailed logs from /tmp/<username>/hive?

    -Vinithra
    On Wed, Jun 2, 2010 at 11:37 AM, Ryan LeCompte wrote:

    Hey guys,

    We have a very simple JDBC client that uses the Hive JDBC driver to execute
    queries. We are trying to use it to execute a simple "create temporary
    function ..." statement, but Hive is throwing the following error:

    Exception in thread "main" java.sql.SQLException: Query returned non-zero
    code: 9, cause: FAILED: Execution Error, return code 1 from
    org.apache.hadoop.hive.ql.exec.FunctionTask
    at
    org.apache.hadoop.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:173)
    at
    org.apache.hadoop.hive.jdbc.HiveStatement.execute(HiveStatement.java:115)
    at HiveJdbcClient.main(HiveJdbcClient.java:31)

    A simple "ADD FILE ..." works just fine, as well as other queries. This is
    using Hive 0.5.

    Thanks,
    Ryan
  • Ryan LeCompte at Jun 2, 2010 at 8:45 pm
    Hi Vinithra,

    Yes, we registered the UDF with the ADD JAR command... and also the commands
    work fine in the CLI, it's only through the JDBC interface that it doesn't
    work.

    Could someone try executing one of these commands via JDBC to see if it's a
    legitimate bug in 0.5?

    Thanks!

    Ryan

    On Wed, Jun 2, 2010 at 3:34 PM, Vinithra Varadharajan wrote:

    Hi Ryan,

    Did you register the UDF with ADD JAR <udf.jar>? Note that you currently
    cannot register a jar that is on HDFS (HIVE-1157).

    In case you've already done the above, have you tried the query from the
    Hive CLI - do you get the same error?

    Also, could you attach the detailed logs from /tmp/<username>/hive?

    -Vinithra

    On Wed, Jun 2, 2010 at 11:37 AM, Ryan LeCompte wrote:

    Hey guys,

    We have a very simple JDBC client that uses the Hive JDBC driver to
    execute queries. We are trying to use it to execute a simple "create
    temporary function ..." statement, but Hive is throwing the following error:

    Exception in thread "main" java.sql.SQLException: Query returned non-zero
    code: 9, cause: FAILED: Execution Error, return code 1 from
    org.apache.hadoop.hive.ql.exec.FunctionTask
    at
    org.apache.hadoop.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:173)
    at
    org.apache.hadoop.hive.jdbc.HiveStatement.execute(HiveStatement.java:115)
    at HiveJdbcClient.main(HiveJdbcClient.java:31)

    A simple "ADD FILE ..." works just fine, as well as other queries. This is
    using Hive 0.5.

    Thanks,
    Ryan
  • Ryan LeCompte at Jun 3, 2010 at 2:18 pm
    Just closing the loop here. Turns out it was a bug on our side... We had
    single quotes in the initial ADD JAR command, which was causing the
    subsequent create temporary function call to fail. Removed the quotes and
    now we're all set.

    Thanks,
    Ryan

    On Wed, Jun 2, 2010 at 4:44 PM, Ryan LeCompte wrote:

    Hi Vinithra,

    Yes, we registered the UDF with the ADD JAR command... and also the
    commands work fine in the CLI, it's only through the JDBC interface that it
    doesn't work.

    Could someone try executing one of these commands via JDBC to see if it's a
    legitimate bug in 0.5?

    Thanks!

    Ryan



    On Wed, Jun 2, 2010 at 3:34 PM, Vinithra Varadharajan <
    vinithra@cloudera.com> wrote:
    Hi Ryan,

    Did you register the UDF with ADD JAR <udf.jar>? Note that you currently
    cannot register a jar that is on HDFS (HIVE-1157).

    In case you've already done the above, have you tried the query from the
    Hive CLI - do you get the same error?

    Also, could you attach the detailed logs from /tmp/<username>/hive?

    -Vinithra

    On Wed, Jun 2, 2010 at 11:37 AM, Ryan LeCompte wrote:

    Hey guys,

    We have a very simple JDBC client that uses the Hive JDBC driver to
    execute queries. We are trying to use it to execute a simple "create
    temporary function ..." statement, but Hive is throwing the following error:

    Exception in thread "main" java.sql.SQLException: Query returned non-zero
    code: 9, cause: FAILED: Execution Error, return code 1 from
    org.apache.hadoop.hive.ql.exec.FunctionTask
    at
    org.apache.hadoop.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:173)
    at
    org.apache.hadoop.hive.jdbc.HiveStatement.execute(HiveStatement.java:115)
    at HiveJdbcClient.main(HiveJdbcClient.java:31)

    A simple "ADD FILE ..." works just fine, as well as other queries. This
    is using Hive 0.5.

    Thanks,
    Ryan

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categorieshive, hadoop
postedJun 2, '10 at 6:37p
activeJun 3, '10 at 2:18p
posts4
users2
websitehive.apache.org

People

Translate

site design / logo © 2021 Grokbase