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 61985200BBC for ; Sun, 30 Oct 2016 06:38:10 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 601AF160B00; Sun, 30 Oct 2016 05:38:10 +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 5BA12160AF4 for ; Sun, 30 Oct 2016 06:38:09 +0100 (CET) Received: (qmail 78949 invoked by uid 500); 30 Oct 2016 05:38:07 -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 78939 invoked by uid 99); 30 Oct 2016 05:38:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 30 Oct 2016 05:38:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 5D9001A0487 for ; Sun, 30 Oct 2016 05:38:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.679 X-Spam-Level: * X-Spam-Status: No, score=1.679 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, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-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 (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id rquKwoNl-vNr for ; Sun, 30 Oct 2016 05:38:05 +0000 (UTC) Received: from mail-it0-f53.google.com (mail-it0-f53.google.com [209.85.214.53]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 205785FAEA for ; Sun, 30 Oct 2016 05:38:04 +0000 (UTC) Received: by mail-it0-f53.google.com with SMTP id e187so34328487itc.0 for ; Sat, 29 Oct 2016 22:38:04 -0700 (PDT) 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; bh=64WAHg07n/sB0AjNtHsaWcMmzzSOcv64cAA7YTHhNvU=; b=HQHEVRH/63+eqbqhYpgknEUGz13+OcZTgbabZD0BUilxOpUZ9npp8cbIs3F6lpGkdm CZuAPfoB3JddFss+tlEW7+MVh7EocPNuc6whzZ86eqhAn5rhhB3/j46HsuvENKs6DPFM ZXaP8Z0/eQAfcAACksLU1J+d01PxXJq/7DPeTRehRQVHW5mr3EifwDibM0RMVEhWAS3Z zYKlZ7FYrFTN0tXah+R/sKdrP9xFEdDvGvBLjSt//JLXUhFDQDsbbuuEljWKLuvoJMA3 HT1uEF7uUw7n9cstmJCNDnQqtAPNy+IAR8C2b24YoSH52L49TAsZ5DbehoxdjEqfUpIu yEyQ== 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; bh=64WAHg07n/sB0AjNtHsaWcMmzzSOcv64cAA7YTHhNvU=; b=bP+q8l24puDLNUTDRvq6Hunq/xwzI137ILkV7CgJqFz5B8yokwzvAEr4hfBLFZVhBP Gk986tt5JNbAacUrHkZfC3T+PjWaPgBF7tu2RciPGCakARmi42/WZed82E3RppQPXP3O hDPjM23DO4hJETPvNWB2Ry82IZhS3GaVh+gdXBxTa/yfOOolRUUd19kvNDvuQ1k8uejp cBfCLhhMGsh7zw9GglX81zP/CSKzs36q1l8l8D7pIT//1tQlWY5n5wHFjtuI4GdBmpAX 5wtcpfiGDO3V3H5FCBYWLcLnCLoGuWmC48shbih8FI8nITOk24gnkFAJGTIf5VbaX+9T 9haA== X-Gm-Message-State: ABUngvd2jBCtBXg07s8BPpe8dwLgXwLf2M7vJD3YyaHVH8bkGf5wqrG4JwDGKiwZspBVoLg2O5ilQ0kmYxYJHw== X-Received: by 10.107.135.20 with SMTP id j20mr3233668iod.116.1477805877240; Sat, 29 Oct 2016 22:37:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.25.213 with HTTP; Sat, 29 Oct 2016 22:37:56 -0700 (PDT) In-Reply-To: References: From: Premal Shah Date: Sat, 29 Oct 2016 22:37:56 -0700 Message-ID: Subject: Re: Hive/Tez local mode running out of memory To: user@hive.apache.org Content-Type: multipart/alternative; boundary=001a113f8e7a5c294b05400e7e1f archived-at: Sun, 30 Oct 2016 05:38:10 -0000 --001a113f8e7a5c294b05400e7e1f Content-Type: text/plain; charset=UTF-8 Hi Prasanth, Thanx for the reply. We don't override the log level. According to the docs, looks like the default level is INFO. Any other ideas? On Sat, Oct 29, 2016 at 3:25 PM, Prasanth Jayachandran < pjayachandran@hortonworks.com> wrote: > What is the value of hive.tez.log.level? My guess is this happens only in > DEBUG log level. > > Thanks > Prasanth > > > > > On Fri, Oct 28, 2016 at 9:40 PM -0700, "Premal Shah" < > premal.j.shah@gmail.com> wrote: > > Hive 2.0.1 > Hadoop 2.7.2 > Tex 0.8.4 > > We have a UDF in hive which take in some values and outputs a score. When > running a query on a table which calls the score function on every row, > looks like tez is not running the query on YARN, but trying to run it in > local mode. It then runs out of memory trying to insert that data into a > table. > > Here's the query > > > *ADD JAR score.jar; * > *CREATE TEMPORARY FUNCTION score AS 'hive.udf.ScoreUDF';* > > *CREATE TABLE abc AS* > *SELECT* > * id,* > * score(col1, col2) as score* > * , '2016-10-11' AS dt* > *FROM input_table* > *;* > > Here's the output of the shell > > Query ID = hadoop_20161028232841_5a06db96-ffaa-4e75-a657-c7cb46ccb3f5 > Total jobs = 1 > Launching Job 1 out of 1 > java.lang.OutOfMemoryError: Java heap space > at java.util.Arrays.copyOf(Arrays.java:3332) > at java.lang.AbstractStringBuilder.expandCapacity( > AbstractStringBuilder.java:137) > at java.lang.AbstractStringBuilder.ensureCapacityInternal( > AbstractStringBuilder.java:121) > at java.lang.AbstractStringBuilder.append( > AbstractStringBuilder.java:622) > at java.lang.StringBuilder.append(StringBuilder.java:202) > at com.google.protobuf.TextFormat.escapeBytes( > TextFormat.java:1283) > at com.google.protobuf.TextFormat$Printer. > printFieldValue(TextFormat.java:394) > at com.google.protobuf.TextFormat$Printer. > printSingleField(TextFormat.java:327) > at com.google.protobuf.TextFormat$Printer.printField( > TextFormat.java:286) > at com.google.protobuf.TextFormat$Printer.print( > TextFormat.java:273) > at com.google.protobuf.TextFormat$Printer. > printFieldValue(TextFormat.java:404) > at com.google.protobuf.TextFormat$Printer. > printSingleField(TextFormat.java:327) > at com.google.protobuf.TextFormat$Printer.printField( > TextFormat.java:286) > at com.google.protobuf.TextFormat$Printer.print( > TextFormat.java:273) > at com.google.protobuf.TextFormat$Printer. > printFieldValue(TextFormat.java:404) > at com.google.protobuf.TextFormat$Printer. > printSingleField(TextFormat.java:327) > at com.google.protobuf.TextFormat$Printer.printField( > TextFormat.java:286) > at com.google.protobuf.TextFormat$Printer.print( > TextFormat.java:273) > at com.google.protobuf.TextFormat$Printer. > printFieldValue(TextFormat.java:404) > at com.google.protobuf.TextFormat$Printer. > printSingleField(TextFormat.java:327) > at com.google.protobuf.TextFormat$Printer.printField( > TextFormat.java:283) > at com.google.protobuf.TextFormat$Printer.print( > TextFormat.java:273) > at com.google.protobuf.TextFormat$Printer. > printFieldValue(TextFormat.java:404) > at com.google.protobuf.TextFormat$Printer. > printSingleField(TextFormat.java:327) > at com.google.protobuf.TextFormat$Printer.printField( > TextFormat.java:283) > at com.google.protobuf.TextFormat$Printer.print( > TextFormat.java:273) > at com.google.protobuf.TextFormat$Printer. > printFieldValue(TextFormat.java:404) > at com.google.protobuf.TextFormat$Printer. > printSingleField(TextFormat.java:327) > at com.google.protobuf.TextFormat$Printer.printField( > TextFormat.java:286) > at com.google.protobuf.TextFormat$Printer.print( > TextFormat.java:273) > at com.google.protobuf.TextFormat$Printer.access$400( > TextFormat.java:248) > at com.google.protobuf.TextFormat.shortDebugString( > TextFormat.java:88) > FAILED: Execution Error, return code -101 from org.apache.hadoop.hive.ql.exec.tez.TezTask. > Java heap space > > > It looks like the job is not getting submitted to the cluster, but running > locally. We can't get tez to run the query on the cluster. > The hive shell starts with an Xmx of 4G. > > If I set hive.execution.engine = mr, then the query works, because it runs > on the hadoop cluster. > > What should we change to avoid this problem? > > Thanx > > -- > Regards, > Premal Shah. > -- Regards, Premal Shah. --001a113f8e7a5c294b05400e7e1f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Prasanth,
Thanx for the reply. We don't overrid= e the log level. According to the docs, looks like the default level is INF= O.
Any other ideas?

On Sat, Oct 29, 2016 at 3:25 PM, Prasanth Jayachand= ran <pjayachandran@hortonworks.com> wrote:
What is the value of hive.tez.log.level? My guess is this happens only= in DEBUG log level.=C2=A0

Thanks
Prasanth




On Fri, Oct 28, 2016 at 9:40 PM -0700, "Pre= mal Shah" <premal.j.s= hah@gmail.com> wrote:

Hive 2.0.1
Hadoop 2.7.2
Tex 0.8.4

We have a UDF in hive which take in some values and outputs a score. W= hen running a query on a table which calls the score function on every row,= looks like tez is not running the query on YARN, but trying to run it in l= ocal mode. It then runs out of memory trying to insert that data into a table.

Here's the query

ADD JAR score.jar;
CREATE TEMPORARY FUNCTION score AS 'hive.udf.ScoreUDF';=

CREATE TABLE abc AS
SELECT
=C2=A0 =C2=A0 id,
=C2=A0 =C2=A0 score(col1, col2) as score
=C2=A0 =C2=A0 , '2016-10-11' AS dt
FROM input_table
;

Here's the output of the shell

Query ID =3D hadoop_20161028232841_5a06db96-ffaa-4e75-a657-c= 7cb46ccb3f5
Total jobs =3D 1
Launching Job 1 out of 1
java.lang.OutOfMemoryError: Java heap space
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at java.util.Arrays.copyOf(Arrays.jav= a:3332)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:137)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:121)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at java.lang.AbstractStringBuilder.ap= pend(AbstractStringBuilder.java:622)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at java.lang.StringBuilder.append(Str= ingBuilder.java:202)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at com.google.protobuf.TextFormat.esc= apeBytes(TextFormat.java:1283)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at com.google.protobuf.TextFormat$Pri= nter.printFieldValue(TextFormat.java:394)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at com.google.protobuf.TextFormat$Pri= nter.printSingleField(TextFormat.java:327)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at com.google.protobuf.TextFormat$Pri= nter.printField(TextFormat.java:286)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at com.google.protobuf.TextFormat$Pri= nter.print(TextFormat.java:273)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at com.google.protobuf.TextFormat$Pri= nter.printFieldValue(TextFormat.java:404)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at com.google.protobuf.TextFormat$Pri= nter.printSingleField(TextFormat.java:327)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at com.google.protobuf.TextFormat$Pri= nter.printField(TextFormat.java:286)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at com.google.protobuf.TextFormat$Pri= nter.print(TextFormat.java:273)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at com.google.protobuf.TextFormat$Pri= nter.printFieldValue(TextFormat.java:404)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at com.google.protobuf.TextFormat$Pri= nter.printSingleField(TextFormat.java:327)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at com.google.protobuf.TextFormat$Pri= nter.printField(TextFormat.java:286)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at com.google.protobuf.TextFormat$Pri= nter.print(TextFormat.java:273)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at com.google.protobuf.TextFormat$Pri= nter.printFieldValue(TextFormat.java:404)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at com.google.protobuf.TextFormat$Pri= nter.printSingleField(TextFormat.java:327)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at com.google.protobuf.TextFormat$Pri= nter.printField(TextFormat.java:283)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at com.google.protobuf.TextFormat$Pri= nter.print(TextFormat.java:273)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at com.google.protobuf.TextFormat$Pri= nter.printFieldValue(TextFormat.java:404)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at com.google.protobuf.TextFormat$Pri= nter.printSingleField(TextFormat.java:327)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at com.google.protobuf.TextFormat$Pri= nter.printField(TextFormat.java:283)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at com.google.protobuf.TextFormat$Pri= nter.print(TextFormat.java:273)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at com.google.protobuf.TextFormat$Pri= nter.printFieldValue(TextFormat.java:404)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at com.google.protobuf.TextFormat$Pri= nter.printSingleField(TextFormat.java:327)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at com.google.protobuf.TextFormat$Pri= nter.printField(TextFormat.java:286)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at com.google.protobuf.TextFormat$Pri= nter.print(TextFormat.java:273)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at com.google.protobuf.TextFormat$Pri= nter.access$400(TextFormat.java:248)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at com.google.protobuf.TextFormat.sho= rtDebugString(TextFormat.java:88)
FAILED: Execution Error, return code -101 from org.apache.hadoop.hive.= ql.exec.tez.TezTask. Java heap space


It looks like the job is not getting submitted to the cluster, but run= ning locally. We can't get tez to run the query on the cluster.=C2=A0
The hive shell starts with an Xmx of 4G.=C2=A0

If I set hive.execution.engine =3D mr, then the query works, because i= t runs on the hadoop cluster.=C2=A0

What should we change to avoid this problem?

Thanx

--
Regards,
Premal Shah.



--
Regards,
Premal = Shah.
--001a113f8e7a5c294b05400e7e1f--