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 0CB63D04C for ; Tue, 18 Dec 2012 05:27:51 +0000 (UTC) Received: (qmail 45088 invoked by uid 500); 18 Dec 2012 05:27:49 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 44849 invoked by uid 500); 18 Dec 2012 05:27:48 -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 44816 invoked by uid 99); 18 Dec 2012 05:27:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Dec 2012 05:27:46 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of grover.markgrover@gmail.com designates 209.85.220.172 as permitted sender) Received: from [209.85.220.172] (HELO mail-vc0-f172.google.com) (209.85.220.172) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Dec 2012 05:27:40 +0000 Received: by mail-vc0-f172.google.com with SMTP id fw7so310722vcb.31 for ; Mon, 17 Dec 2012 21:27:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=pmGRWQc14rVPiXWKWS+7mV35QGUjVdrKfqU+SOqOrkw=; b=lkTTjJgESHH0MrboknDjUg3Xlw2huRwKQwwmbVtRcnDcaTOtptbWV5j+M0acvYpHGX ayn4+/3f/vXnHE24um1d42aKleEHwTTiIwcwKQmcmDRxg1hCxKBCcD7iZqozfLl8DzcR zrEVKlvDwkhdrJhbB7YyMjTekwqj9RtWVPWWviAE4lKTiuDpWOI5UokuY+3IzPDTq0aJ ugZ/y+TWTn3JdxL/Idv6h33jSov9ax2YpgxAvkcgPwWewo4FdENGdm5Ss7am3ZZObXIz IdPRjbTbOZKcchjV5lQa8sgxT0l9j5aWdUF8vudITWzh0/Awohg9iDrsoL/znTvRrZmc t6IQ== MIME-Version: 1.0 Received: by 10.52.176.6 with SMTP id ce6mr1016181vdc.57.1355808439305; Mon, 17 Dec 2012 21:27:19 -0800 (PST) Received: by 10.52.37.15 with HTTP; Mon, 17 Dec 2012 21:27:19 -0800 (PST) In-Reply-To: References: Date: Mon, 17 Dec 2012 21:27:19 -0800 Message-ID: Subject: Re: HiveHistory and HiveHistoryViewer From: Mark Grover To: user@hive.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Qiang, Good point. Uploaded a new patch. Thanks! On Mon, Dec 17, 2012 at 9:14 PM, Qiang Wang wrote: > "HiveHistory.parseHiveHistory use BufferedReader.readLine which takes '\n', > '\r', '\r\n' as line delimiter to parse history file" > > And clients may be on mac, which takes '\r' as line delimiter > > So I think '\r' should also be replaced with space in HiveHistory.log, so > that HiveHistory.parseHiveHistory could be consistent with HiveHistory.log > and allow clients from mac > > Thanks! > > > 2012/12/18 Mark Grover >> >> Looks like a bug to me. This is the original JIRA that introduced this >> change: >> https://issues.apache.org/jira/browse/HIVE-176 >> >> I don't think back in the day, we really cared about clients being on >> windows. >> >> In any case, thanks for filing the JIRA, I have uploaded a patch which >> I think doesn't break anything for linux clients and fixes things up >> for Windows clients. Take a look, feedback welcome. The intent is the >> same as your suggestions but the approach is a little more >> conservative. If you feel strongly that it should be done according to >> one of your suggestions, let me know, I will take another look. >> >> Thanks! >> Mark >> >> On Mon, Dec 17, 2012 at 5:48 AM, Qiang Wang wrote: >> > anybody has an idea about this ? >> > >> > https://issues.apache.org/jira/browse/HIVE-3810 >> > >> > >> > >> > 2012/12/16 Qiang Wang >> >> >> >> glad to receive your reply! >> >> >> >> here is my point: >> >> Firstly, I think HiveHistoryViewer is inconsistent with HiveHistory. >> >> Secondly, hive server may be deloyed on linux, but client can be >> >> anywhere. >> >> hql from client will be logged into history file and hql may contails >> >> '\r' >> >> >> >> >> >> 2012/12/16 afancy >> >>> >> >>> I don\t think it is a bug. If the program in hive writes logs to >> >>> HiveHistory.log using '\n' to indicate the end of a line. Then, it is >> >>> OK to >> >>> use val = val.replace('\n', ' ');. Anyway, >> >>> new line depends what on your OS: Hive is typically deployed on Linux. >> >>> DOS & Windows: \r\n 0D0A (hex), 13,10 (decimal) >> >>> >> >>> Unix & Mac OS X: \n, 0A, 10 >> >>> Macintosh (OS 9): \r, 0D, 13 >> >>> >> >>> On Sun, Dec 16, 2012 at 11:23 AM, Qiang Wang >> >>> wrote: >> >>>> >> >>>> '\n', '\r', >> >>> >> >>> >> >>> >> >>> >> >> >> > > >