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

Store size in bytes (not mbytes) in ResourceStatistics

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.12.0
    • Component/s: None
    • Labels:
      None
    • Patch Info:
      Patch Available
    • Release Note:
      Committed, thanks Prashant!

      Description

      In ResourceStatistics.java we see mBytes is public, and has a public getter/setter.

      47	    public Long mBytes; // size in megabytes
      
      196	    public Long getmBytes() {
      197	        return mBytes;
      198	    }
      199	    public ResourceStatistics setmBytes(Long mBytes) {
      200	        this.mBytes = mBytes;
      201	        return this;
      202	    }
      

      Typically sizes are stored as bytes, potentially having convenience functions to return with different units.

      If mBytes can be marked private without causing woes it might be worth storing size as bytes instead.

        Attachments

        1. PIG-2582.patch
          6 kB
          Prashant Kommireddi
        2. PIG-2582_1.patch
          8 kB
          Prashant Kommireddi
        3. PIG-2582_2.patch
          7 kB
          Prashant Kommireddi

          Activity

            People

            • Assignee:
              prkommireddi Prashant Kommireddi
              Reporter:
              traviscrawford Travis Crawford
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: