Log message improvement and use StringBuilder for constructing messages instead
of String
-----------------------------------------------------------------------------------------
Key: HIVE-2180
URL: https://issues.apache.org/jira/browse/HIVE-2180
Project: Hive
Issue Type: Bug
Components: Query Processor
Affects Versions: 0.5.0, 0.8.0
Environment: Hadoop 0.20.1, Hive0.8.0 and SUSE Linux Enterprise Server
10 SP2 (i586) - Kernel 2.6.16.60-0.21-smp (5)
Reporter: Chinna Rao Lalam
Assignee: Chinna Rao Lalam
Priority: Minor
Need to properly format/present the error messages for better traceability.
For example in classes like ScriptOperator, FetchOperator, PartitionPruner etc,
{noformat}
LG.info("Executing " + Arrays.asList(wrappedCmdArgs));
LOG.info("tablename="+ hconf.get(HiveConf.ConfVars.HIVETABLENAME.varname));
{noformat}
The two lines which are being logged separately can be clubbed using string
builder and logged at once like
{noformat}
StringBuilder sb = new StringBuilder("Executing ");
sb.append(Arrays.asList(wrappedCmdArgs));
sb.append("\ntablename=");
sb.append(hconf.get(HiveConf.ConfVars.HIVETABLENAME.varname));
LOG.info(sb.toString());
{noformat}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira