Pig
  1. Pig
  2. PIG-3046

An empty file name in -Dpig.additional.jars throws an error

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.10.0, 0.11
    • Fix Version/s: 0.12.0
    • Component/s: None
    • Labels:
    • Patch Info:
      Patch Available

      Description

      This issue was raised on the user mailing list. To reproduce it, please run the following command in MR mode:

      pig -Dpig.additional.jars=<jar1>::<jar2> <pig script>
      

      As can be seen, I put :: in the middle of -Dpig.additional.jars, and this causes the following error:

      Caused by: java.lang.IllegalArgumentException: Can not create a Path from
      an empty string at org.apache.hadoop.fs.Path.checkPathArg(Path.java:82)
      at org.apache.hadoop.fs.Path.<init>(Path.java:90)
      at org.apache.hadoop.fs.Path.<init>(Path.java:45)
      at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler.shipToHDFS(JobControlCompiler.java:1455)
      at
      org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler.putJarOnClassPathThroughDistributedCache(JobControlCompiler.java:1432)
      at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler.getJob(JobControlCompiler.java:508)
      

      Although it's not too hard to see what's wrong, it's not always easy to track down where an empty file name is from. In particular if various environment variables are set in another start-up script, it's time-consuming to identify the root cause.

      In fact, Pig should just skip an empty file name instead attempts to convert it to a path and throws an exception like this.

      1. PIG-3046_1.patch
        1.0 kB
        Prashant Kommireddi
      2. PIG-3046_2.patch
        0.6 kB
        Johnny Zhang
      3. PIG-3046_3.patch
        1.0 kB
        Prashant Kommireddi
      4. PIG-3046.patch
        1.0 kB
        Prashant Kommireddi

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Prashant Kommireddi
            Reporter:
            Cheolsoo Park
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development