You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Travis Crawford (Created) (JIRA)" <ji...@apache.org> on 2012/03/13 21:22:39 UTC

[jira] [Created] (PIG-2582) Store size in bytes (not mbytes) in ResourceStatistics

Store size in bytes (not mbytes) in ResourceStatistics
------------------------------------------------------

                 Key: PIG-2582
                 URL: https://issues.apache.org/jira/browse/PIG-2582
             Project: Pig
          Issue Type: Bug
            Reporter: Travis Crawford
            Priority: Minor


In [ResourceStatistics.java|http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/ResourceStatistics.java?view=markup] we see mBytes is public, and has a public getter/setter.

{code}
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	    }
{code}

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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (PIG-2582) Store size in bytes (not mbytes) in ResourceStatistics

Posted by "Prashant Kommireddi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13488484#comment-13488484 ] 

Prashant Kommireddi commented on PIG-2582:
------------------------------------------

Thanks for keeping an eye out on this, Prasanth!
                
> Store size in bytes (not mbytes) in ResourceStatistics
> ------------------------------------------------------
>
>                 Key: PIG-2582
>                 URL: https://issues.apache.org/jira/browse/PIG-2582
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Travis Crawford
>            Assignee: Prashant Kommireddi
>            Priority: Minor
>         Attachments: PIG-2582_1.patch, PIG-2582_2.patch, PIG-2582.patch
>
>
> In [ResourceStatistics.java|http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/ResourceStatistics.java?view=markup] we see mBytes is public, and has a public getter/setter.
> {code}
> 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	    }
> {code}
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (PIG-2582) Store size in bytes (not mbytes) in ResourceStatistics

Posted by "Prashant Kommireddi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2582?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Prashant Kommireddi updated PIG-2582:
-------------------------------------

    Patch Info: Patch Available
      Assignee: Prashant Kommireddi
    
> Store size in bytes (not mbytes) in ResourceStatistics
> ------------------------------------------------------
>
>                 Key: PIG-2582
>                 URL: https://issues.apache.org/jira/browse/PIG-2582
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Travis Crawford
>            Assignee: Prashant Kommireddi
>            Priority: Minor
>         Attachments: PIG-2582.patch
>
>
> In [ResourceStatistics.java|http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/ResourceStatistics.java?view=markup] we see mBytes is public, and has a public getter/setter.
> {code}
> 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	    }
> {code}
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIG-2582) Store size in bytes (not mbytes) in ResourceStatistics

Posted by "Prashant Kommireddi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13479528#comment-13479528 ] 

Prashant Kommireddi commented on PIG-2582:
------------------------------------------

Sure. 

"So as per the implementation logic, only if mBytes!=null and numRecords!=null it will return the size in MB else it will return whatever it contains which in my case works fine." - this works but might be confusing/inconsistent though. I will wait for Travis/others to comment on this patch and let's stay in touch on how this might affect PIG-2831.
                
> Store size in bytes (not mbytes) in ResourceStatistics
> ------------------------------------------------------
>
>                 Key: PIG-2582
>                 URL: https://issues.apache.org/jira/browse/PIG-2582
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Travis Crawford
>            Assignee: Prashant Kommireddi
>            Priority: Minor
>         Attachments: PIG-2582.patch
>
>
> In [ResourceStatistics.java|http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/ResourceStatistics.java?view=markup] we see mBytes is public, and has a public getter/setter.
> {code}
> 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	    }
> {code}
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (PIG-2582) Store size in bytes (not mbytes) in ResourceStatistics

Posted by "Bill Graham (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2582?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bill Graham updated PIG-2582:
-----------------------------

    Fix Version/s: 0.12
    
> Store size in bytes (not mbytes) in ResourceStatistics
> ------------------------------------------------------
>
>                 Key: PIG-2582
>                 URL: https://issues.apache.org/jira/browse/PIG-2582
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Travis Crawford
>            Assignee: Prashant Kommireddi
>            Priority: Minor
>             Fix For: 0.12
>
>         Attachments: PIG-2582_1.patch, PIG-2582_2.patch, PIG-2582.patch
>
>
> In [ResourceStatistics.java|http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/ResourceStatistics.java?view=markup] we see mBytes is public, and has a public getter/setter.
> {code}
> 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	    }
> {code}
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIG-2582) Store size in bytes (not mbytes) in ResourceStatistics

Posted by "Prashant Kommireddi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13490795#comment-13490795 ] 

Prashant Kommireddi commented on PIG-2582:
------------------------------------------

Thanks Bill.
                
> Store size in bytes (not mbytes) in ResourceStatistics
> ------------------------------------------------------
>
>                 Key: PIG-2582
>                 URL: https://issues.apache.org/jira/browse/PIG-2582
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Travis Crawford
>            Assignee: Prashant Kommireddi
>            Priority: Minor
>         Attachments: PIG-2582_1.patch, PIG-2582_2.patch, PIG-2582.patch
>
>
> In [ResourceStatistics.java|http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/ResourceStatistics.java?view=markup] we see mBytes is public, and has a public getter/setter.
> {code}
> 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	    }
> {code}
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIG-2582) Store size in bytes (not mbytes) in ResourceStatistics

Posted by "Prashant Kommireddi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13486410#comment-13486410 ] 

Prashant Kommireddi commented on PIG-2582:
------------------------------------------

Also, there is a common theme of returning the object "return this;" on all setters. I don't think this should exist, but we should probably tackle that in the next release to make sure we are fine with the existing changes at first.

                
> Store size in bytes (not mbytes) in ResourceStatistics
> ------------------------------------------------------
>
>                 Key: PIG-2582
>                 URL: https://issues.apache.org/jira/browse/PIG-2582
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Travis Crawford
>            Assignee: Prashant Kommireddi
>            Priority: Minor
>         Attachments: PIG-2582.patch
>
>
> In [ResourceStatistics.java|http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/ResourceStatistics.java?view=markup] we see mBytes is public, and has a public getter/setter.
> {code}
> 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	    }
> {code}
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIG-2582) Store size in bytes (not mbytes) in ResourceStatistics

Posted by "Prasanth J (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13481572#comment-13481572 ] 

Prasanth J commented on PIG-2582:
---------------------------------

Hi Prashant

Looks like some of the class member variables are still public. Is there any reason to leave it public? 
                
> Store size in bytes (not mbytes) in ResourceStatistics
> ------------------------------------------------------
>
>                 Key: PIG-2582
>                 URL: https://issues.apache.org/jira/browse/PIG-2582
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Travis Crawford
>            Assignee: Prashant Kommireddi
>            Priority: Minor
>         Attachments: PIG-2582.patch
>
>
> In [ResourceStatistics.java|http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/ResourceStatistics.java?view=markup] we see mBytes is public, and has a public getter/setter.
> {code}
> 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	    }
> {code}
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIG-2582) Store size in bytes (not mbytes) in ResourceStatistics

Posted by "Prasanth J (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13479478#comment-13479478 ] 

Prasanth J commented on PIG-2582:
---------------------------------

I am using ResourceStatistics to store intermediate stats in PIG-2831. I am not using getmBytes() method but I use getAvgRecordSize() for storing and returning average record size in bytes. 
                
> Store size in bytes (not mbytes) in ResourceStatistics
> ------------------------------------------------------
>
>                 Key: PIG-2582
>                 URL: https://issues.apache.org/jira/browse/PIG-2582
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Travis Crawford
>            Assignee: Prashant Kommireddi
>            Priority: Minor
>         Attachments: PIG-2582.patch
>
>
> In [ResourceStatistics.java|http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/ResourceStatistics.java?view=markup] we see mBytes is public, and has a public getter/setter.
> {code}
> 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	    }
> {code}
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIG-2582) Store size in bytes (not mbytes) in ResourceStatistics

Posted by "Prashant Kommireddi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13479236#comment-13479236 ] 

Prashant Kommireddi commented on PIG-2582:
------------------------------------------

Should methods like getAvgRecordSize() be returning size in bytes? Its not called from within the project, but not sure if such a change would be acceptable to users.
                
> Store size in bytes (not mbytes) in ResourceStatistics
> ------------------------------------------------------
>
>                 Key: PIG-2582
>                 URL: https://issues.apache.org/jira/browse/PIG-2582
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Travis Crawford
>            Priority: Minor
>
> In [ResourceStatistics.java|http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/ResourceStatistics.java?view=markup] we see mBytes is public, and has a public getter/setter.
> {code}
> 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	    }
> {code}
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIG-2582) Store size in bytes (not mbytes) in ResourceStatistics

Posted by "Travis Crawford (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13479191#comment-13479191 ] 

Travis Crawford commented on PIG-2582:
--------------------------------------

Sounds good!
                
> Store size in bytes (not mbytes) in ResourceStatistics
> ------------------------------------------------------
>
>                 Key: PIG-2582
>                 URL: https://issues.apache.org/jira/browse/PIG-2582
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Travis Crawford
>            Priority: Minor
>
> In [ResourceStatistics.java|http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/ResourceStatistics.java?view=markup] we see mBytes is public, and has a public getter/setter.
> {code}
> 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	    }
> {code}
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIG-2582) Store size in bytes (not mbytes) in ResourceStatistics

Posted by "Prashant Kommireddi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13486561#comment-13486561 ] 

Prashant Kommireddi commented on PIG-2582:
------------------------------------------

:)

If we are ok with abusing this setter for now, we need to definitely open a JIRA to completely get rid of the deprecated method in 0.12.
                
> Store size in bytes (not mbytes) in ResourceStatistics
> ------------------------------------------------------
>
>                 Key: PIG-2582
>                 URL: https://issues.apache.org/jira/browse/PIG-2582
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Travis Crawford
>            Assignee: Prashant Kommireddi
>            Priority: Minor
>         Attachments: PIG-2582_1.patch, PIG-2582.patch
>
>
> In [ResourceStatistics.java|http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/ResourceStatistics.java?view=markup] we see mBytes is public, and has a public getter/setter.
> {code}
> 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	    }
> {code}
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (PIG-2582) Store size in bytes (not mbytes) in ResourceStatistics

Posted by "Prashant Kommireddi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2582?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Prashant Kommireddi updated PIG-2582:
-------------------------------------

    Attachment: PIG-2582_2.patch

Making member variables private, and eliminating mBytes. Reviewers, please take a look.
                
> Store size in bytes (not mbytes) in ResourceStatistics
> ------------------------------------------------------
>
>                 Key: PIG-2582
>                 URL: https://issues.apache.org/jira/browse/PIG-2582
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Travis Crawford
>            Assignee: Prashant Kommireddi
>            Priority: Minor
>         Attachments: PIG-2582_1.patch, PIG-2582_2.patch, PIG-2582.patch
>
>
> In [ResourceStatistics.java|http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/ResourceStatistics.java?view=markup] we see mBytes is public, and has a public getter/setter.
> {code}
> 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	    }
> {code}
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIG-2582) Store size in bytes (not mbytes) in ResourceStatistics

Posted by "Prashant Kommireddi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13479488#comment-13479488 ] 

Prashant Kommireddi commented on PIG-2582:
------------------------------------------

Hi Prasanth, I looked at PIG-2831. The current impl of getAvgRecordSize in trunk returns size in MB. That is not what you want?
Also, it might be better to access the values from getters instead of directly accessing them. That will allow us to clean-up the class further in future. Those members should really be private.
                
> Store size in bytes (not mbytes) in ResourceStatistics
> ------------------------------------------------------
>
>                 Key: PIG-2582
>                 URL: https://issues.apache.org/jira/browse/PIG-2582
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Travis Crawford
>            Assignee: Prashant Kommireddi
>            Priority: Minor
>         Attachments: PIG-2582.patch
>
>
> In [ResourceStatistics.java|http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/ResourceStatistics.java?view=markup] we see mBytes is public, and has a public getter/setter.
> {code}
> 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	    }
> {code}
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIG-2582) Store size in bytes (not mbytes) in ResourceStatistics

Posted by "Prashant Kommireddi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13481261#comment-13481261 ] 

Prashant Kommireddi commented on PIG-2582:
------------------------------------------

Hi [~traviscrawford], can you please review the patch when you get a chance?
                
> Store size in bytes (not mbytes) in ResourceStatistics
> ------------------------------------------------------
>
>                 Key: PIG-2582
>                 URL: https://issues.apache.org/jira/browse/PIG-2582
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Travis Crawford
>            Assignee: Prashant Kommireddi
>            Priority: Minor
>         Attachments: PIG-2582.patch
>
>
> In [ResourceStatistics.java|http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/ResourceStatistics.java?view=markup] we see mBytes is public, and has a public getter/setter.
> {code}
> 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	    }
> {code}
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIG-2582) Store size in bytes (not mbytes) in ResourceStatistics

Posted by "Prasanth J (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13479506#comment-13479506 ] 

Prasanth J commented on PIG-2582:
---------------------------------

I am not using setmBytes() or mBytes at all. So as per the implementation logic, only if mBytes!=null and numRecords!=null it will return the size in MB else it will return whatever it contains which in my case works fine. I also din't see any places using this. Please let me know if there is going to be any changes to the APIs, so that I will modify the patch accordingly. 
                
> Store size in bytes (not mbytes) in ResourceStatistics
> ------------------------------------------------------
>
>                 Key: PIG-2582
>                 URL: https://issues.apache.org/jira/browse/PIG-2582
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Travis Crawford
>            Assignee: Prashant Kommireddi
>            Priority: Minor
>         Attachments: PIG-2582.patch
>
>
> In [ResourceStatistics.java|http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/ResourceStatistics.java?view=markup] we see mBytes is public, and has a public getter/setter.
> {code}
> 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	    }
> {code}
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIG-2582) Store size in bytes (not mbytes) in ResourceStatistics

Posted by "Jonathan Coveney (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13486396#comment-13486396 ] 

Jonathan Coveney commented on PIG-2582:
---------------------------------------

Given it is unstable, I say just go ahead with the plan to make it private, and have the deprecated getter/setter
                
> Store size in bytes (not mbytes) in ResourceStatistics
> ------------------------------------------------------
>
>                 Key: PIG-2582
>                 URL: https://issues.apache.org/jira/browse/PIG-2582
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Travis Crawford
>            Assignee: Prashant Kommireddi
>            Priority: Minor
>         Attachments: PIG-2582.patch
>
>
> In [ResourceStatistics.java|http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/ResourceStatistics.java?view=markup] we see mBytes is public, and has a public getter/setter.
> {code}
> 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	    }
> {code}
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIG-2582) Store size in bytes (not mbytes) in ResourceStatistics

Posted by "Bill Graham (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13489488#comment-13489488 ] 

Bill Graham commented on PIG-2582:
----------------------------------

+1 LGTM. I can commit after the weekend unless anyone else has comments.
                
> Store size in bytes (not mbytes) in ResourceStatistics
> ------------------------------------------------------
>
>                 Key: PIG-2582
>                 URL: https://issues.apache.org/jira/browse/PIG-2582
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Travis Crawford
>            Assignee: Prashant Kommireddi
>            Priority: Minor
>         Attachments: PIG-2582_1.patch, PIG-2582_2.patch, PIG-2582.patch
>
>
> In [ResourceStatistics.java|http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/ResourceStatistics.java?view=markup] we see mBytes is public, and has a public getter/setter.
> {code}
> 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	    }
> {code}
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIG-2582) Store size in bytes (not mbytes) in ResourceStatistics

Posted by "Travis Crawford (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13479102#comment-13479102 ] 

Travis Crawford commented on PIG-2582:
--------------------------------------

Hey [~prkommireddi], this came up while working on PIG-2573. Basically it felt a bit janky to round the size to MB rather than just keep the size in bytes. Feel free to close if the consensus is to keep it as-is.
                
> Store size in bytes (not mbytes) in ResourceStatistics
> ------------------------------------------------------
>
>                 Key: PIG-2582
>                 URL: https://issues.apache.org/jira/browse/PIG-2582
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Travis Crawford
>            Priority: Minor
>
> In [ResourceStatistics.java|http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/ResourceStatistics.java?view=markup] we see mBytes is public, and has a public getter/setter.
> {code}
> 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	    }
> {code}
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIG-2582) Store size in bytes (not mbytes) in ResourceStatistics

Posted by "Bill Graham (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13481590#comment-13481590 ] 

Bill Graham commented on PIG-2582:
----------------------------------

I didn't notice the Unstable annotation. I'm ok changing scope if others agree.
                
> Store size in bytes (not mbytes) in ResourceStatistics
> ------------------------------------------------------
>
>                 Key: PIG-2582
>                 URL: https://issues.apache.org/jira/browse/PIG-2582
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Travis Crawford
>            Assignee: Prashant Kommireddi
>            Priority: Minor
>         Attachments: PIG-2582.patch
>
>
> In [ResourceStatistics.java|http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/ResourceStatistics.java?view=markup] we see mBytes is public, and has a public getter/setter.
> {code}
> 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	    }
> {code}
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (PIG-2582) Store size in bytes (not mbytes) in ResourceStatistics

Posted by "Prashant Kommireddi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2582?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Prashant Kommireddi updated PIG-2582:
-------------------------------------

    Attachment: PIG-2582_1.patch

Making instance variables private. The setter on mBytes is being made deprecated, however getter can be thought of as a convenience method going forward and the implementation changed once we get rid of "mBytes" variable in the next iteration. We cannot *safely* get rid of mBytes until the setter is completely taken out of this class.
                
> Store size in bytes (not mbytes) in ResourceStatistics
> ------------------------------------------------------
>
>                 Key: PIG-2582
>                 URL: https://issues.apache.org/jira/browse/PIG-2582
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Travis Crawford
>            Assignee: Prashant Kommireddi
>            Priority: Minor
>         Attachments: PIG-2582_1.patch, PIG-2582.patch
>
>
> In [ResourceStatistics.java|http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/ResourceStatistics.java?view=markup] we see mBytes is public, and has a public getter/setter.
> {code}
> 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	    }
> {code}
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIG-2582) Store size in bytes (not mbytes) in ResourceStatistics

Posted by "Bill Graham (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13481589#comment-13481589 ] 

Bill Graham commented on PIG-2582:
----------------------------------

As much as we'd love to make these members private, we should resist the urge and keep them public for backward compatibility.
                
> Store size in bytes (not mbytes) in ResourceStatistics
> ------------------------------------------------------
>
>                 Key: PIG-2582
>                 URL: https://issues.apache.org/jira/browse/PIG-2582
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Travis Crawford
>            Assignee: Prashant Kommireddi
>            Priority: Minor
>         Attachments: PIG-2582.patch
>
>
> In [ResourceStatistics.java|http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/ResourceStatistics.java?view=markup] we see mBytes is public, and has a public getter/setter.
> {code}
> 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	    }
> {code}
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (PIG-2582) Store size in bytes (not mbytes) in ResourceStatistics

Posted by "Bill Graham (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2582?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bill Graham resolved PIG-2582.
------------------------------

      Resolution: Fixed
    Release Note: Committed, thanks Prashant!
    
> Store size in bytes (not mbytes) in ResourceStatistics
> ------------------------------------------------------
>
>                 Key: PIG-2582
>                 URL: https://issues.apache.org/jira/browse/PIG-2582
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Travis Crawford
>            Assignee: Prashant Kommireddi
>            Priority: Minor
>             Fix For: 0.12
>
>         Attachments: PIG-2582_1.patch, PIG-2582_2.patch, PIG-2582.patch
>
>
> In [ResourceStatistics.java|http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/ResourceStatistics.java?view=markup] we see mBytes is public, and has a public getter/setter.
> {code}
> 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	    }
> {code}
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIG-2582) Store size in bytes (not mbytes) in ResourceStatistics

Posted by "Prashant Kommireddi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13479181#comment-13479181 ] 

Prashant Kommireddi commented on PIG-2582:
------------------------------------------

I agree on storing size in bytes, just wanted to make sure I understand all the reasons you had in mind. It wouldn't be a huge change to make it happen, but changing the scope might be tricky if someone is using it outside of the Pig project. What do you think about marking the setter "setmBytes(Long)" deprecated and creating a new setter for bytes? To start with, we can atleast have Pig refer to byte-based methods.
                
> Store size in bytes (not mbytes) in ResourceStatistics
> ------------------------------------------------------
>
>                 Key: PIG-2582
>                 URL: https://issues.apache.org/jira/browse/PIG-2582
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Travis Crawford
>            Priority: Minor
>
> In [ResourceStatistics.java|http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/ResourceStatistics.java?view=markup] we see mBytes is public, and has a public getter/setter.
> {code}
> 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	    }
> {code}
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIG-2582) Store size in bytes (not mbytes) in ResourceStatistics

Posted by "Rohini Palaniswamy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13485449#comment-13485449 ] 

Rohini Palaniswamy commented on PIG-2582:
-----------------------------------------

Agree with Bill. It would be good to make them private. Also the getters and setters were already available and the interface is marked unstable. We can wait another week to see if anyone disagrees, else we can go ahead with a patch that makes the member variables private but retains the getter/setter for mBytes marked deprecated.

setmBytes also needs to set the bytes. If we are making the variables private we can remove mbytes variable altogether and only retain bytes.
                
> Store size in bytes (not mbytes) in ResourceStatistics
> ------------------------------------------------------
>
>                 Key: PIG-2582
>                 URL: https://issues.apache.org/jira/browse/PIG-2582
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Travis Crawford
>            Assignee: Prashant Kommireddi
>            Priority: Minor
>         Attachments: PIG-2582.patch
>
>
> In [ResourceStatistics.java|http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/ResourceStatistics.java?view=markup] we see mBytes is public, and has a public getter/setter.
> {code}
> 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	    }
> {code}
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIG-2582) Store size in bytes (not mbytes) in ResourceStatistics

Posted by "Jonathan Coveney (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13486552#comment-13486552 ] 

Jonathan Coveney commented on PIG-2582:
---------------------------------------

Couldn't it just set realBytes = mBytes * 1024 * 1024 ? There would be no loss of precision. And if they happened to do getMBytes we just divided (in this case, we can in fact even just do shifts).
                
> Store size in bytes (not mbytes) in ResourceStatistics
> ------------------------------------------------------
>
>                 Key: PIG-2582
>                 URL: https://issues.apache.org/jira/browse/PIG-2582
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Travis Crawford
>            Assignee: Prashant Kommireddi
>            Priority: Minor
>         Attachments: PIG-2582_1.patch, PIG-2582.patch
>
>
> In [ResourceStatistics.java|http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/ResourceStatistics.java?view=markup] we see mBytes is public, and has a public getter/setter.
> {code}
> 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	    }
> {code}
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIG-2582) Store size in bytes (not mbytes) in ResourceStatistics

Posted by "Prasanth J (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13488091#comment-13488091 ] 

Prasanth J commented on PIG-2582:
---------------------------------

Once this is committed.. i will fix PIG-2831 to reflect the change..
                
> Store size in bytes (not mbytes) in ResourceStatistics
> ------------------------------------------------------
>
>                 Key: PIG-2582
>                 URL: https://issues.apache.org/jira/browse/PIG-2582
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Travis Crawford
>            Assignee: Prashant Kommireddi
>            Priority: Minor
>         Attachments: PIG-2582_1.patch, PIG-2582_2.patch, PIG-2582.patch
>
>
> In [ResourceStatistics.java|http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/ResourceStatistics.java?view=markup] we see mBytes is public, and has a public getter/setter.
> {code}
> 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	    }
> {code}
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIG-2582) Store size in bytes (not mbytes) in ResourceStatistics

Posted by "Prashant Kommireddi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13478755#comment-13478755 ] 

Prashant Kommireddi commented on PIG-2582:
------------------------------------------

Hi Travis, trying to understand the goal here. Seems like ResourceStatistics has a method getSizeInBytes(), what would be the advantage of storing size in bytes and instead have getmBytes() do the reverse calculation? Is it for clarity and conforming with the norm? 
                
> Store size in bytes (not mbytes) in ResourceStatistics
> ------------------------------------------------------
>
>                 Key: PIG-2582
>                 URL: https://issues.apache.org/jira/browse/PIG-2582
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Travis Crawford
>            Priority: Minor
>
> In [ResourceStatistics.java|http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/ResourceStatistics.java?view=markup] we see mBytes is public, and has a public getter/setter.
> {code}
> 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	    }
> {code}
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIG-2582) Store size in bytes (not mbytes) in ResourceStatistics

Posted by "Jonathan Coveney (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13481569#comment-13481569 ] 

Jonathan Coveney commented on PIG-2582:
---------------------------------------

Thanks for handling this, ya'll. I'll +1 and commit, pending this making Travis happy.
                
> Store size in bytes (not mbytes) in ResourceStatistics
> ------------------------------------------------------
>
>                 Key: PIG-2582
>                 URL: https://issues.apache.org/jira/browse/PIG-2582
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Travis Crawford
>            Assignee: Prashant Kommireddi
>            Priority: Minor
>         Attachments: PIG-2582.patch
>
>
> In [ResourceStatistics.java|http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/ResourceStatistics.java?view=markup] we see mBytes is public, and has a public getter/setter.
> {code}
> 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	    }
> {code}
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (PIG-2582) Store size in bytes (not mbytes) in ResourceStatistics

Posted by "Prashant Kommireddi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2582?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Prashant Kommireddi updated PIG-2582:
-------------------------------------

    Attachment: PIG-2582.patch
    
> Store size in bytes (not mbytes) in ResourceStatistics
> ------------------------------------------------------
>
>                 Key: PIG-2582
>                 URL: https://issues.apache.org/jira/browse/PIG-2582
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Travis Crawford
>            Priority: Minor
>         Attachments: PIG-2582.patch
>
>
> In [ResourceStatistics.java|http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/ResourceStatistics.java?view=markup] we see mBytes is public, and has a public getter/setter.
> {code}
> 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	    }
> {code}
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIG-2582) Store size in bytes (not mbytes) in ResourceStatistics

Posted by "Prashant Kommireddi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13481588#comment-13481588 ] 

Prashant Kommireddi commented on PIG-2582:
------------------------------------------

Hey Prasanth, the reason is that we don't want to break backward compatibility in case these member variables are accessed directly and not through getters. There are no such references from within the Pig project, but I'm being wary of any users who use this from outside of it.

The interface stability is marked Unstable on this, so I am ok if all decide its cool to change the scope of these variables :) 
                
> Store size in bytes (not mbytes) in ResourceStatistics
> ------------------------------------------------------
>
>                 Key: PIG-2582
>                 URL: https://issues.apache.org/jira/browse/PIG-2582
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Travis Crawford
>            Assignee: Prashant Kommireddi
>            Priority: Minor
>         Attachments: PIG-2582.patch
>
>
> In [ResourceStatistics.java|http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/ResourceStatistics.java?view=markup] we see mBytes is public, and has a public getter/setter.
> {code}
> 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	    }
> {code}
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIG-2582) Store size in bytes (not mbytes) in ResourceStatistics

Posted by "Prashant Kommireddi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13486543#comment-13486543 ] 

Prashant Kommireddi commented on PIG-2582:
------------------------------------------

What would we have the deprecated mBytes setter set the value on?
                
> Store size in bytes (not mbytes) in ResourceStatistics
> ------------------------------------------------------
>
>                 Key: PIG-2582
>                 URL: https://issues.apache.org/jira/browse/PIG-2582
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Travis Crawford
>            Assignee: Prashant Kommireddi
>            Priority: Minor
>         Attachments: PIG-2582_1.patch, PIG-2582.patch
>
>
> In [ResourceStatistics.java|http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/ResourceStatistics.java?view=markup] we see mBytes is public, and has a public getter/setter.
> {code}
> 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	    }
> {code}
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIG-2582) Store size in bytes (not mbytes) in ResourceStatistics

Posted by "Jonathan Coveney (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13486529#comment-13486529 ] 

Jonathan Coveney commented on PIG-2582:
---------------------------------------

As long as the instance variables are private, then how come we can't get rid of the mBytes variable?
                
> Store size in bytes (not mbytes) in ResourceStatistics
> ------------------------------------------------------
>
>                 Key: PIG-2582
>                 URL: https://issues.apache.org/jira/browse/PIG-2582
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Travis Crawford
>            Assignee: Prashant Kommireddi
>            Priority: Minor
>         Attachments: PIG-2582_1.patch, PIG-2582.patch
>
>
> In [ResourceStatistics.java|http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/ResourceStatistics.java?view=markup] we see mBytes is public, and has a public getter/setter.
> {code}
> 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	    }
> {code}
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira