Pig
  1. Pig
  2. PIG-2730

TFileStorage getStatistics incorrectly throws an exception instead of returning null

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.11, 0.10.1
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      TFileStorage.java throws an exception in getStatistics:

      @Override
      public ResourceStatistics getStatistics(String location, Job job) throws IOException {
        throw new UnsupportedOperationException();
      }
      

      However the interface for LoadMetadata.java states null should be returned if statistics are not available:

      /**
       * Get statistics about the data to be loaded.  If no statistics are
       * available, then null should be returned. If the implementing class also extends
       * {@link LoadFunc}, then {@link LoadFunc#setLocation(String, org.apache.hadoop.mapreduce.Job)}
       * is guaranteed to be called before this method.
       * @param location Location as returned by 
       * {@link LoadFunc#relativeToAbsolutePath(String, org.apache.hadoop.fs.Path)}
       * @param job The {@link Job} object - this should be used only to obtain 
       * cluster properties through {@link Job#getConfiguration()} and not to set/query
       * any runtime job information.  
       * @return statistics about the data to be loaded.  If no statistics are
       * available, then null should be returned.
       * @throws IOException if an exception occurs while retrieving statistics
       */
      ResourceStatistics getStatistics(String location, Job job) 
      throws IOException;
      
      1. PIG-2730.1.patch
        0.5 kB
        Travis Crawford

        Activity

        Travis Crawford created issue -
        Travis Crawford made changes -
        Field Original Value New Value
        Attachment PIG-2730.1.patch [ 12530287 ]
        Travis Crawford made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Daniel Dai made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Hadoop Flags Reviewed [ 10343 ]
        Fix Version/s 0.11 [ 12318878 ]
        Fix Version/s 0.10.1 [ 12320547 ]
        Resolution Fixed [ 1 ]
        Daniel Dai made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Travis Crawford
            Reporter:
            Travis Crawford
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development