Uploaded image for project: 'Pig'
  1. Pig
  2. PIG-4155

Quitting grunt shell using CTRL-D character throws exception

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.14.0
    • Fix Version/s: 0.14.0
    • Component/s: grunt
    • Labels:
      None
    • Environment:

      Hadoop 2.4.0.2.1.4.0-632
      java version "1.7.0_55"
      pig - trunk

    • Hadoop Flags:
      Reviewed

      Description

      jline returns null when CTRL-D is given as input. This results in NPE in grunt because StringReader constructor throws NPE.

      String line = super.readLine();
      String paramSubLine = pc.doParamSubstitution(new BufferedReader(new StringReader(line)));
      return paramSubLine;
      
      java.lang.NullPointerException
              at java.io.StringReader.<init>(StringReader.java:33)
              at org.apache.pig.Main$ConsoleReaderWithParamSub.readLine(Main.java:1057)
              at jline.ConsoleReaderInputStream$ConsoleLineInputStream.read(ConsoleReaderInputStream.java:92)
              at java.io.InputStream.read(InputStream.java:154)
              at java.io.SequenceInputStream.read(SequenceInputStream.java:191)
              at java.io.SequenceInputStream.read(SequenceInputStream.java:194)
              at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)
      

        Attachments

        1. PIG-4155.patch
          0.5 kB
          Abhishek Agarwal

          Activity

            People

            • Assignee:
              abhishek.agarwal Abhishek Agarwal
              Reporter:
              abhishek.agarwal Abhishek Agarwal
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: