Ainhoa,

Did you provide correct username and password to connect to Hive server?
The problem I see is that it cannot launch a MapReduce job. SELECT * FROM
tab does not require a MR job so it works fine, while when you add WHERE
clause it fails.

Thanks,
Dmitry

On Tue, Nov 29, 2016 at 2:33 PM, Ainhoa Benitez <abeni...@corenetworks.es>
wrote:

> This is the error log:
>
>
> [training@miguel ~]$ hplsql -e "SELECT * FROM movies where movieid <5";
> SLF4J: Class path contains multiple SLF4J bindings.
> SLF4J: Found binding in [jar:file:/opt/cloudera/
> parcels/CDH-5.9.0-1.cdh5.9.0.p0.23/jars/slf4j-log4j12-1.7.
> 5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: Found binding in [jar:file:/opt/cloudera/
> parcels/CDH-5.9.0-1.cdh5.9.0.p0.23/jars/pig-0.12.0-cdh5.9.
> 0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: Found binding in [jar:file:/opt/cloudera/
> parcels/CDH-5.9.0-1.cdh5.9.0.p0.23/jars/slf4j-simple-1.7.5.
> jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: Found binding in [jar:file:/opt/cloudera/
> parcels/CDH-5.9.0-1.cdh5.9.0.p0.23/jars/avro-tools-1.7.6-
> cdh5.9.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
> explanation.
> SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
> 16/11/29 10:49:26 INFO jdbc.Utils: Supplied authorities: localhost:10000
> 16/11/29 10:49:26 INFO jdbc.Utils: Resolved authority: localhost:10000
> Open connection: jdbc:hive2://localhost:10000 (690 ms)
> Starting query
> Unhandled exception in HPL/SQL
> java.sql.SQLException: Error while processing statement: FAILED: Execution
> Error, return code 1 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
>         at org.apache.hive.jdbc.HiveStatement.execute(
> HiveStatement.java:279)
>         at org.apache.hive.jdbc.HiveStatement.executeQuery(
> HiveStatement.java:375)
>         at org.apache.hive.hplsql.Conn.executeQuery(Conn.java:63)
>         at org.apache.hive.hplsql.Exec.executeQuery(Exec.java:554)
>         at org.apache.hive.hplsql.Exec.executeQuery(Exec.java:563)
>         at org.apache.hive.hplsql.Select.select(Select.java:74)
>         at org.apache.hive.hplsql.Exec.visitSelect_stmt(Exec.java:993)
>         at org.apache.hive.hplsql.Exec.visitSelect_stmt(Exec.java:51)
>         at org.apache.hive.hplsql.HplsqlParser$Select_stmtContext.accept(
> HplsqlParser.java:14249)
>         at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.
> visitChildren(AbstractParseTreeVisitor.java:70)
>         at org.apache.hive.hplsql.Exec.visitStmt(Exec.java:985)
>         at org.apache.hive.hplsql.Exec.visitStmt(Exec.java:51)
>         at org.apache.hive.hplsql.HplsqlParser$StmtContext.
> accept(HplsqlParser.java:998)
>         at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.
> visitChildren(AbstractParseTreeVisitor.java:70)
>         at org.apache.hive.hplsql.HplsqlBaseVisitor.visitBlock(
> HplsqlBaseVisitor.java:28)
>         at org.apache.hive.hplsql.HplsqlParser$BlockContext.
> accept(HplsqlParser.java:438)
>         at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.
> visitChildren(AbstractParseTreeVisitor.java:70)
>         at org.apache.hive.hplsql.Exec.visitProgram(Exec.java:893)
>         at org.apache.hive.hplsql.Exec.visitProgram(Exec.java:51)
>         at org.apache.hive.hplsql.HplsqlParser$ProgramContext.
> accept(HplsqlParser.java:381)
>         at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(
> AbstractParseTreeVisitor.java:42)
>         at org.apache.hive.hplsql.Exec.run(Exec.java:753)
>         at org.apache.hive.hplsql.Exec.run(Exec.java:729)
>         at org.apache.hive.hplsql.Hplsql.main(Hplsql.java:23)
> [training@miguel ~]$
> [training@miguel ~]$ ssh bea
> The authenticity of host 'bea (10.164.79.119)' can't be established.
> RSA key fingerprint is f8:ce:3a:a0:92:23:3d:e7:3f:e1:42:50:4b:17:de:7d.
> Are you sure you want to continue connecting (yes/no)? yes
> Warning: Permanently added 'bea,10.164.79.119' (RSA) to the list of known
> hosts.
> Last login: Mon Nov 28 17:50:38 2016 from 10.164.77.156
>
>
> 2016-11-29 12:31 GMT+01:00 Dmitry Tolpeko <dmtolp...@gmail.com>:
>
>> Please post as text message to user@ list.
>>
>> On Tue, Nov 29, 2016 at 2:02 PM, Ainhoa Benitez <abeni...@corenetworks.es
>> > wrote:
>>
>>> Hello Dmitry,
>>>
>>> I attach a screenshot with the error (On the top is the query I executed)
>>>
>>> Thanks
>>>
>>> Ainhoa
>>>
>>>
>>> 2016-11-29 11:30 GMT+01:00 Dmitry Tolpeko <dmtolp...@gmail.com>:
>>>
>>>> Ainhoa,
>>>>
>>>> Can you please post the entire script? Also try to add --trace option
>>>> to see which query was actually executed in the database.
>>>>
>>>> Thanks,
>>>> Dmitry
>>>>
>>>> On Tue, Nov 29, 2016 at 11:44 AM, Ainhoa Benitez <
>>>> abeni...@corenetworks.es> wrote:
>>>>
>>>>> Good morning,
>>>>>
>>>>> my name is Ainhoa. I am starting to use the HPLSQL tool and up to now
>>>>> it was working fine. However, my issue has to do when using a simple where
>>>>> clause, does this tool accept to write a where clause?
>>>>>
>>>>> For example, the problem is the following:
>>>>>
>>>>> -I have a table named "test" with several fields. I make a select
>>>>> clause such as: "select * from test limit 3" and it displays the result
>>>>> with no result. I try to make another query selecting particular fields of
>>>>> the table and no problem.
>>>>>
>>>>> Nevertheless, the issue comes when I try to do some of the following
>>>>> queries:
>>>>>
>>>>> -Select count(*) from test;
>>>>>
>>>>> -Select * from test where movieid <5;
>>>>>
>>>>> I do not have any idea why the problem keeps occuring or how to solve
>>>>> it. Is there any possibility to make a query with where conditions? If so,
>>>>> how? And about count all fields query, what  could the problem be?
>>>>>
>>>>> Thanks so much for your help!!!
>>>>>
>>>>> Ainhoa
>>>>>
>>>>> Segun el Articulo 5 de la L.O.P.D, le informamos que sus datos constan
>>>>> en un fichero titularidad de CORE NETWORKS, S.L., cuya finalidad es la
>>>>> gestion administrativa. Podra ejercer su derecho de acceso, rectificacion,
>>>>> cancelacion y oposicion mediante correo postal a C/ Serrano Galvache, 56,
>>>>> Edificio Olmo, 1 Planta - C.P. 28033 (MADRID), o enviando un correo
>>>>> electrónico a i...@corenetworks.es.
>>>>>
>>>>
>>>>
>>>
>>> Segun el Articulo 5 de la L.O.P.D, le informamos que sus datos constan
>>> en un fichero titularidad de CORE NETWORKS, S.L., cuya finalidad es la
>>> gestion administrativa. Podra ejercer su derecho de acceso, rectificacion,
>>> cancelacion y oposicion mediante correo postal a C/ Serrano Galvache, 56,
>>> Edificio Olmo, 1 Planta - C.P. 28033 (MADRID), o enviando un correo
>>> electrónico a i...@corenetworks.es.
>>>
>>
>>
>
> Segun el Articulo 5 de la L.O.P.D, le informamos que sus datos constan en
> un fichero titularidad de CORE NETWORKS, S.L., cuya finalidad es la gestion
> administrativa. Podra ejercer su derecho de acceso, rectificacion,
> cancelacion y oposicion mediante correo postal a C/ Serrano Galvache, 56,
> Edificio Olmo, 1 Planta - C.P. 28033 (MADRID), o enviando un correo
> electrónico a i...@corenetworks.es.
>

Reply via email to