Return-Path: X-Original-To: apmail-hive-user-archive@www.apache.org Delivered-To: apmail-hive-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8C1BBDB35 for ; Mon, 10 Dec 2012 16:37:06 +0000 (UTC) Received: (qmail 93154 invoked by uid 500); 10 Dec 2012 16:37:05 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 92846 invoked by uid 500); 10 Dec 2012 16:37:04 -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 92815 invoked by uid 99); 10 Dec 2012 16:37:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Dec 2012 16:37:04 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of vinod@vinodsingh.com designates 209.85.216.48 as permitted sender) Received: from [209.85.216.48] (HELO mail-qa0-f48.google.com) (209.85.216.48) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Dec 2012 16:36:58 +0000 Received: by mail-qa0-f48.google.com with SMTP id l8so2014350qaq.14 for ; Mon, 10 Dec 2012 08:36:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:x-gm-message-state; bh=r+6XSHwhvkZVuPoC/P563B769LP4+qTrnqYUTzR5IOE=; b=KArC7UlX/7qd+V87dDZirckQGCmnHdIGU24StYpFEqgELeVjAunzmtrvLn0saXTrIk KjtVPALj2qDV25M7mPfU90f9xood9FvmjtzrwaQIfvw1vY9NUDu0IN4P3dxXbfaa+mbq JbuKRt1I+emLtYf9h5iGN9Il/wcKp6OqmibKvKMB0KsTJ+uK+kJyZImgAn33/KLn0AE8 jshb4kzhh9dc0tr8mgv68ETlOKo5CE1segljOSj7bo1SZHlSuwDZtYcxucHQ/4SxTSoA w+Gr3BAidaRTi0PfUBqNen/IL5Ak2DO/kkFcf0TTk7iHqpVf2TFMG5wdUP6ykW/KPIzj WThg== Received: by 10.224.215.131 with SMTP id he3mr27833007qab.41.1355157397092; Mon, 10 Dec 2012 08:36:37 -0800 (PST) MIME-Version: 1.0 Received: by 10.49.6.41 with HTTP; Mon, 10 Dec 2012 08:36:17 -0800 (PST) In-Reply-To: References: From: =?UTF-8?B?4KS14KS/4KSo4KWL4KSmIOCkuOCkv+CkguCkuQ==?= Date: Mon, 10 Dec 2012 22:06:17 +0530 Message-ID: Subject: Re: Running commands at hive cli or hive thirft startup To: user@hive.apache.org Content-Type: multipart/alternative; boundary=20cf3005140a44baef04d0822b3d X-Gm-Message-State: ALoCoQmYHDw6GQqmIDaJ/449TPKfHmhTV0N5yG/6ZUCXubfeADuKy7D5xjTXUSmkmAA9ZxvPXCrV X-Virus-Checked: Checked by ClamAV on apache.org --20cf3005140a44baef04d0822b3d Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I did not tried thrift, so not sure whether this will work or not. Thanks, Vinod On Mon, Dec 10, 2012 at 9:31 PM, John Omernik wrote: > Will that work for my thrift server connections? > > > On Sun, Dec 9, 2012 at 7:56 PM, =E0=A4=B5=E0=A4=BF=E0=A4=A8=E0=A5=8B=E0= =A4=A6 =E0=A4=B8=E0=A4=BF=E0=A4=82=E0=A4=B9 wrote: > >> Put a .hiverc file in your home directory containing commands, Hive CLI >> will execute all of them at startup. >> >> Thanks, >> Vinod >> >> On Sun, Dec 9, 2012 at 10:25 PM, John Omernik wrote: >> >>> I am looking for ways to streamline some of my analytics. One thing I >>> notice is that when I use hive cli, or connect to my hive thrift server= , >>> there are a some commands I always end up running for my session. If I >>> have multiple CLIs or connections to Thrift, then I have to run it each >>> time. If I lose a connection to hive thrift, I have to run them. Etc e= tc. >>> >>> My thought was, is there a way that upon opening a hive cli or >>> connection to a hive thrift server, could I have certain commands be >>> executed? >>> >>> These commands include a use command to get me to a specific database >>> (perhaps there is a default database config variable?) or loading up al= l >>> the temporary functions I use (UDFs) . >>> >>> For example, I have a UDF to do URL decoding: >>> >>> CREATE TEMPORARY FUNCTION uridecode AS 'org.domain.analytics.URIDECODE; >>> >>> Can I get this to run auto magically at hive cli start or thrift server >>> connection? >>> >>> If not, could we build it in that we can add UDFs to hive without doing >>> a recompile that stay in permanently? >>> >>> I would welcome discussion on this! >>> >>> >>> >> > --20cf3005140a44baef04d0822b3d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I did not tried thrift, so not sure whether this will work or not.

Thanks,
Vinod

On Mon, Dec 10, 2012 at 9:31 PM, John Omernik <john@omernik.com> wrote:
Will that work for my thrift server connecti= ons?=C2=A0


On Sun, Dec 9, 2012 at 7:56 PM, =E0=A4=B5=E0=A4=BF=E0=A4=A8=E0=A5=8B=E0=A4= =A6 =E0=A4=B8=E0=A4=BF=E0=A4=82=E0=A4=B9 <vinod@vinodsingh.com><= /span> wrote:
Put a .hiverc file in your home directory co= ntaining commands, Hive CLI will execute all of them at startup.

Thanks,
Vinod

On Sun, Dec 9, 2012 at 10:25 PM, John Omernik <john@omernik.com= > wrote:
I am looking for ways to streamline some of = my analytics. One thing I notice is that when I use hive cli, or connect to= my hive thrift server, there are a some commands I always end up running f= or my session. =C2=A0If I have multiple CLIs or connections to Thrift, then= I have to run it each time. If I lose a connection to hive thrift, I have = to run them. =C2=A0Etc etc.=C2=A0

My thought was, is there a way that upon opening a hive cli = or connection to a hive thrift server, could I have certain commands be exe= cuted?

These commands include a use command to get= me to a specific database (perhaps there is a default database config vari= able?) or loading up all the temporary functions I use (UDFs) .=C2=A0

For example, I have a UDF to do URL decoding:

CREATE TEMPORARY FUNCTION uridecode AS 'org.domain.anal= ytics.URIDECODE;

Can I get this to run auto magica= lly at hive cli start or thrift server connection?

If not, could we build it in that we can add UDFs to hi= ve without doing a recompile that stay in permanently? =C2=A0
I would welcome discussion on this!




--20cf3005140a44baef04d0822b3d--