hadoop-mapreduce-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aniket Mokashi (JIRA)" <j...@apache.org>
Subject [jira] [Created] (MAPREDUCE-5629) pig.script's deserialized version does not maintain line numbers
Date Sat, 16 Nov 2013 01:35:21 GMT
Aniket Mokashi created MAPREDUCE-5629:
-----------------------------------------

             Summary: pig.script's deserialized version does not maintain line numbers
                 Key: MAPREDUCE-5629
                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-5629
             Project: Hadoop Map/Reduce
          Issue Type: Bug
            Reporter: Aniket Mokashi


If pig.script is decoded with base64, it loses line numbers because the buffered reader that
adds the lines, removes '\n's.

{code}
ScriptState.java#setScript
protected void setScript(BufferedReader reader) {
        StringBuilder sb = new StringBuilder();
        try {
            String line = reader.readLine();
            while (line != null) {
                if (line.length() > 0) {
                    sb.append(line).append("\n");
                }
                line = reader.readLine();
            }
        } catch (IOException e) {
            LOG.warn("unable to parse the script", e);
        }
        setScript(sb.toString());
    }
{code}



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message