Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 261C0E5B2 for ; Mon, 4 Feb 2013 00:22:14 +0000 (UTC) Received: (qmail 74473 invoked by uid 500); 4 Feb 2013 00:22:13 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 74391 invoked by uid 500); 4 Feb 2013 00:22:13 -0000 Mailing-List: contact dev-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list dev@hive.apache.org Received: (qmail 74321 invoked by uid 500); 4 Feb 2013 00:22:13 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 74297 invoked by uid 99); 4 Feb 2013 00:22:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Feb 2013 00:22:13 +0000 Date: Mon, 4 Feb 2013 00:22:13 +0000 (UTC) From: "Mark Grover (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-3810) HiveHistory.log need to replace '\r' with space before writing Entry.value to historyfile MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HIVE-3810?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mark Grover updated HIVE-3810: ------------------------------ Attachment: HIVE-3810.3.patch > HiveHistory.log need to replace '\r' with space before writing Entry.value to historyfile > ----------------------------------------------------------------------------------------- > > Key: HIVE-3810 > URL: https://issues.apache.org/jira/browse/HIVE-3810 > Project: Hive > Issue Type: Bug > Components: Logging > Reporter: qiangwang > Assignee: Mark Grover > Priority: Minor > Attachments: HIVE-3810.1.patch, HIVE-3810.2.patch, HIVE-3810.3.patch > > > HiveHistory.log will replace '\n' with space before writing Entry.value to history file: > val = val.replace('\n', ' '); > but HiveHistory.parseHiveHistory use BufferedReader.readLine which takes '\n', '\r', '\r\n' as line delimiter to parse history file > if val contains '\r', there is a high possibility that HiveHistory.parseLine will fail, in which case usually RecordTypes.valueOf(recType) will throw exception 'java.lang.IllegalArgumentException' > HiveHistory.log need to replace '\r' with space as well: > val = val.replace('\n', ' '); > changed to > val = val.replaceAll("\r|\n", " "); > or > val = val.replace('\r', ' ').replace('\n', ' '); -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira