Pig
  1. Pig
  2. PIG-2499

Pig TestGrunt.testShellCommand occasionally fails

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: build
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      The following code fails from time to time (with a NPE since fileReader.readLine() returns null) :

                  strCmd = "sh bash -c 'touch TouchedFileInsideGrunt_61 | ls | grep TouchedFileInsideGrunt_61 > fileContainingTouchedFileInsideGruntShell_71'";
                  cmd = new ByteArrayInputStream(strCmd.getBytes());
                  reader = new InputStreamReader(cmd);
                  grunt = new Grunt(new BufferedReader(reader), context);
                  grunt.exec();
                  fileReader = new BufferedReader(new FileReader("fileContainingTouchedFileInsideGruntShell_71"));
                  assertTrue(fileReader.readLine().equals("TouchedFileInsideGrunt_61"));
      
      1. PIG-2499.patch
        0.8 kB
        Tom White

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Tom White
            Reporter:
            Tom White
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development