Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 9A220200BCC for ; Tue, 29 Nov 2016 13:42:48 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 991F1160B15; Tue, 29 Nov 2016 12:42:48 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 6FEE3160B05 for ; Tue, 29 Nov 2016 13:42:47 +0100 (CET) Received: (qmail 42022 invoked by uid 500); 29 Nov 2016 12:42:46 -0000 Mailing-List: contact user-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hive.apache.org Delivered-To: mailing list user@hive.apache.org Received: (qmail 42012 invoked by uid 99); 29 Nov 2016 12:42:46 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Nov 2016 12:42:46 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 8FDB51800EC for ; Tue, 29 Nov 2016 12:42:45 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.179 X-Spam-Level: * X-Spam-Status: No, score=1.179 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id MKPqAdeKr4q7 for ; Tue, 29 Nov 2016 12:42:39 +0000 (UTC) Received: from mail-qt0-f172.google.com (mail-qt0-f172.google.com [209.85.216.172]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id DE0675FC12 for ; Tue, 29 Nov 2016 12:42:38 +0000 (UTC) Received: by mail-qt0-f172.google.com with SMTP id p16so153015683qta.0 for ; Tue, 29 Nov 2016 04:42:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=8blYAw5mJjaFURSLWtE4hkQ31F9J4ZvfpOz9YZu4EVQ=; b=wH7N6cMPsuExMVe6Bp0f3l3p8eGpEL8xy7/IOxYNlyI1bMUspTPVeI71RJj1JYyPEZ vbUs+NC79kijHivShb6eCil2ZLvj4pwb1mF+3m+4cQTr6QSWsPn91cRshdU755iURebR GeYp9JM66G+4HszpuFFA7qKU6XZFzalHU0sGg5wCwQXlyJmtQ+stO3aaFnrIwuYeK1Ds mj7WG+81K+baB2AFWp+GZG+pbnliFNHqk9xGHx12as2A9ttsatdmC4ilObW+5cm6E3h3 DdGvFOiS7/ggbkCQEpddGRomMDiMSLPpHQFEBELwSTzA5LG9XzTOAHuTpkHt84KsNDPZ 9ZTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=8blYAw5mJjaFURSLWtE4hkQ31F9J4ZvfpOz9YZu4EVQ=; b=LLww6sFeHIgdnnpZAsesv5+gzJkxNybwO0C/Jld9tt5U0u13iUVskGjc364nLKMlRg AojNQ7Qkd/7zz6lFIN8d+ia/epAoS73PuI2XwW4jdvDBSduaIGc3aHWuBa9zdrySOiMI NpLMsfV4iYTrcC+XXVgfu+U51JMHJ8XTMIlAi3sp21lDm9F9/VRo7WrUd1P4B/lD/SPY NUkDWw4tGqoDi04NtnVFwKaDVxeZYZfNRy1Own+erkvmxQtXAQjpcIyFQG23zq/LIA10 QeGahHHkyty1NaNISuSGaHG/Fx8hVelWWYyPUUOxgT/MGsgbx6jMi5rYgSkXXf9kmIe6 CvZA== X-Gm-Message-State: AKaTC00gUrXmtoOyJlhNx7gxeHxPYz/ITigY0ucM6/Uqtz+cJMFgbxpi6uYZI70TzmaxrkJmu5Syg4bzquV9IA== X-Received: by 10.237.45.38 with SMTP id h35mr27376492qtd.9.1480423342673; Tue, 29 Nov 2016 04:42:22 -0800 (PST) MIME-Version: 1.0 Received: by 10.55.26.77 with HTTP; Tue, 29 Nov 2016 04:42:22 -0800 (PST) In-Reply-To: References: From: Dmitry Tolpeko Date: Tue, 29 Nov 2016 15:42:22 +0300 Message-ID: Subject: Re: Issues regarding HPLSQL tool To: Ainhoa Benitez Cc: user@hive.apache.org Content-Type: multipart/alternative; boundary=94eb2c124a7475127905426feb04 archived-at: Tue, 29 Nov 2016 12:42:48 -0000 --94eb2c124a7475127905426feb04 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 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: Executio= n > 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 : > >> Please post as text message to user@ list. >> >> On Tue, Nov 29, 2016 at 2:02 PM, Ainhoa Benitez > > wrote: >> >>> Hello Dmitry, >>> >>> I attach a screenshot with the error (On the top is the query I execute= d) >>> >>> Thanks >>> >>> Ainhoa >>> >>> >>> 2016-11-29 11:30 GMT+01:00 Dmitry Tolpeko : >>> >>>> 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 < >>>> abenitez@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 resu= lt >>>>> with no result. I try to make another query selecting particular fiel= ds 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? I= f 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 consta= n >>>>> en un fichero titularidad de CORE NETWORKS, S.L., cuya finalidad es l= a >>>>> gestion administrativa. Podra ejercer su derecho de acceso, rectifica= cion, >>>>> cancelacion y oposicion mediante correo postal a C/ Serrano Galvache,= 56, >>>>> Edificio Olmo, 1 Planta - C.P. 28033 (MADRID), o enviando un correo >>>>> electr=C3=B3nico a info@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, rectificaci= on, >>> cancelacion y oposicion mediante correo postal a C/ Serrano Galvache, 5= 6, >>> Edificio Olmo, 1 Planta - C.P. 28033 (MADRID), o enviando un correo >>> electr=C3=B3nico a info@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 gesti= on > 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=C3=B3nico a info@corenetworks.es. > --94eb2c124a7475127905426feb04 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Ainhoa,

Did yo= u provide correct username and password to connect to Hive server? The prob= lem 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 f= ails.=C2=A0

Thanks,
Dmitry

SLF4J: Actual binding is of type [org.slf4j.impl.= Log4jLoggerFactory]
16/11/29 10:49:26 INFO jdbc.Utils: Suppl= ied authorities: localhost:10000
16/11/29 10:49:26 INFO jdbc.Util= s: Resolved authority: localhost:10000
Open connection: jdbc:hive= 2://localhost:10000 (690 ms)
Starting query
Unhandled e= xception in HPL/SQL
java.sql.SQLException: Error while processing= statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.h= ive.ql.exec.mr.MapRedTask
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at org= .apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:279)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.apache.hive.jdbc.HiveState= ment.executeQuery(HiveStatement.java:375)
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 at org.apache.hive.hplsql.Conn.executeQuery(Conn.java:63)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.apache.hive.hplsql.Exec.ex= ecuteQuery(Exec.java:554)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.apac= he.hive.hplsql.Exec.executeQuery(Exec.java:563)
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 at org.apache.hive.hplsql.Select.select(Select.java:= 74)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.apache.hive.hplsql.Exec.visitSelect_stmt(Exec.java:993)
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 at org.apache.hive.hplsql.Exec.visitSelect_stmt(Exec.java:51)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.apache.hive.hplsql.HplsqlPars= er$Select_stmtContext.accept(HplsqlParser.java:14249)
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.antlr.v4.runtime.tree.AbstractParse= TreeVisitor.visitChildren(AbstractParseTreeVisitor.java:70)<= /div>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.apache.hive.hplsql.Exec.v= isitStmt(Exec.java:985)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.apache= .hive.hplsql.Exec.visitStmt(Exec.java:51)
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 at org.apache.hive.hplsql.HplsqlParser$StmtContext.acc= ept(HplsqlParser.java:998)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.ant= lr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(Ab= stractParseTreeVisitor.java:70)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = at org.apache.hive.hplsql.HplsqlBaseVisitor.visitBlock(HplsqlBase= Visitor.java:28)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.apache.hive.h= plsql.HplsqlParser$BlockContext.accept(HplsqlParser.java:438)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.antlr.v4.runtime.tree.Abstra= ctParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:70)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.apache.hive.hplsql.Exec= .visitProgram(Exec.java:893)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at = org.apache.hive.hplsql.Exec.visitProgram(Exec.java:51)
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 at org.apache.hive.hplsql.HplsqlParser$Progra= mContext.accept(HplsqlParser.java:381)
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visi= t(AbstractParseTreeVisitor.java:42)
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 at org.apache.hive.hplsql.Exec.run(Exec.java:753)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.apache.hive.hplsql.Exec.run(Exec.j= ava:729)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.apache.hive.hplsql.Hp= lsql.main(Hplsql.java:23)
[training@miguel ~]$
[tr= aining@miguel ~]$ ssh bea
The authenticity of host 'bea (10.1= 64.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 sur= e you want to continue connecting (yes/no)? yes
Warning: Permanen= tly 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

201= 6-11-29 12:31 GMT+01:00 Dmitry Tolpeko <dmtolpeko@gmail.com>:
Please post= as text message to user@ list.

On Tue, Nov 29, 2016 at 2:02 PM, Ainhoa Be= nitez <abenitez@corenetworks.es> wrote:
Hello Dmitry,=C2=A0

I attach a screenshot with the error (On the top is the query I executed)=

Thanks

Ainhoa
=

2= 016-11-29 11:30 GMT+01:00 Dmitry Tolpeko <dmtolpeko@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 <abenitez@corene= tworks.es> wrote:
Good morning,=C2=A0

my na= me is Ainhoa. I am starting to use the HPLSQL tool and up to now it was wor= king fine. However, my issue has to do when using a simple where clause, do= es this tool accept to write a where clause?

For e= xample, the problem is the following:

-I have a ta= ble 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.=C2=A0

Nevertheless, the issu= e comes when I try to do some of the following queries:

-Select count(*) from test;

-Select * from t= est where movieid <5;

I do not have any idea wh= y the problem keeps occuring or how to solve it. Is there any possibility t= o make a query with where conditions? If so, how? And about count all field= s query, what =C2=A0could the problem be?

Thanks s= o much for your help!!!

Ainhoa

Segun el Articulo 5 de la L.O.P.D, le informamos que s= us datos constan en un fichero titularidad de CORE NETWORKS, S.L., cuya fin= alidad es la gestion administrativa. Podra ejercer su derecho de acceso, re= ctificacion, cancelacion y oposicion mediante correo postal a C/ Serrano Ga= lvache, 56, Edificio Olmo, 1 Planta - C.P. 28033 (MADRID), o enviando un co= rreo electr=C3=B3nico a info@corenetworks.es.

=


Segun el Articulo 5 de la L.O.P.D, le informamos que sus datos con= stan 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= =C3=B3nico a info@corenetworks.es.




Segun el Articulo 5 de la L.O.P.D, le informamos que sus datos con= stan 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= =C3=B3nico a info@corenetworks.es.


--94eb2c124a7475127905426feb04--