You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Ashutosh Chauhan (JIRA)" <ji...@apache.org> on 2013/07/08 16:55:49 UTC
[jira] [Commented] (HIVE-3810) HiveHistory.log need to replace '\r'
with space before writing Entry.value to historyfile
[ https://issues.apache.org/jira/browse/HIVE-3810?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13702043#comment-13702043 ]
Ashutosh Chauhan commented on HIVE-3810:
----------------------------------------
+1
> 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, HIVE-3810.4.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