Description
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', ' ');