You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-issues@hadoop.apache.org by "Tim Yates (JIRA)" <ji...@apache.org> on 2011/02/15 00:45:57 UTC

[jira] Created: (MAPREDUCE-2325) Mark o.a.h.mapreduce.TaskReport as public?

Mark o.a.h.mapreduce.TaskReport as public?
------------------------------------------

                 Key: MAPREDUCE-2325
                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-2325
             Project: Hadoop Map/Reduce
          Issue Type: Bug
          Components: client
    Affects Versions: 0.21.0
            Reporter: Tim Yates
            Priority: Minor


o.a.h.mapreduce.TaskReport is returned by Job.getTaskReports(TaskType), which is marked as Public/Evolving. TaskReport, however, is marked as Private. This looks like an oversight: The last time it was mentioned in HADOOP-1623, Tom White [suggested|https://issues.apache.org/jira/browse/MAPREDUCE-1623?focusedCommentId=12863494&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12863494] that it should be Public, but all of the patches continued to use Private.

If this _isn't_ supposed to be public, where is the best place to get the list of running tasks (not just completed ones)?

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MAPREDUCE-2325) Mark o.a.h.mapreduce.TaskReport as public?

Posted by "Tim Yates (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAPREDUCE-2325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12996655#comment-12996655 ] 

Tim Yates commented on MAPREDUCE-2325:
--------------------------------------

Oops. Not used to JIRA...

The patch is easy enough, but TIPStatus opens a can of worms. On the one hand, making getCurrentStatus() private modifies the interface of the Public Stable subclass o.a.h.mapred.TaskReport. On the other, making TIPStatus public would expose an o.a.h.mapred class through an o.a.h.mapreduce one.

Some options:
- Move getCurrentStatus() to o.a.h.mapred.TaskReport and remove it from the o.a.h.mapreduce.TaskReport.
- Make a separate o.a.h.mapreduce.TIPStatus enum and convert back and forth from its o.a.h.mapred counterpart.
- Make a completely new status enum.

I'm not sure I like any of these. I would hate to get rid of the status information, but making new enums sounds messy. Other suggestions?

For now, I just make TIPStatus Public Unstable, which is unorthodox, but it led to fewer build errors than making getCurrentStatus() private.

> Mark o.a.h.mapreduce.TaskReport as public?
> ------------------------------------------
>
>                 Key: MAPREDUCE-2325
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-2325
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.21.0
>            Reporter: Tim Yates
>            Priority: Minor
>         Attachments: MAPREDUCE-2325.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> o.a.h.mapreduce.TaskReport is returned by Job.getTaskReports(TaskType), which is marked as Public/Evolving. TaskReport, however, is marked as Private. This looks like an oversight: The last time it was mentioned in HADOOP-1623, Tom White [suggested|https://issues.apache.org/jira/browse/MAPREDUCE-1623?focusedCommentId=12863494&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12863494] that it should be Public, but all of the patches continued to use Private.
> If this _isn't_ supposed to be public, where is the best place to get the list of running tasks (not just completed ones)?

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MAPREDUCE-2325) Mark o.a.h.mapreduce.TaskReport as public?

Posted by "Tom White (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAPREDUCE-2325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12996665#comment-12996665 ] 

Tom White commented on MAPREDUCE-2325:
--------------------------------------

How about doing the first two options together: move getCurrentStatus() to o.a.h.mapred.TaskReport and add a new method getTIPStatus() to o.a.h.mapreduce.TaskReport which returns a new enum o.a.h.mapreduce.TIPStatus.

> Mark o.a.h.mapreduce.TaskReport as public?
> ------------------------------------------
>
>                 Key: MAPREDUCE-2325
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-2325
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.21.0
>            Reporter: Tim Yates
>            Priority: Minor
>         Attachments: MAPREDUCE-2325.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> o.a.h.mapreduce.TaskReport is returned by Job.getTaskReports(TaskType), which is marked as Public/Evolving. TaskReport, however, is marked as Private. This looks like an oversight: The last time it was mentioned in HADOOP-1623, Tom White [suggested|https://issues.apache.org/jira/browse/MAPREDUCE-1623?focusedCommentId=12863494&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12863494] that it should be Public, but all of the patches continued to use Private.
> If this _isn't_ supposed to be public, where is the best place to get the list of running tasks (not just completed ones)?

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MAPREDUCE-2325) Mark o.a.h.mapreduce.TaskReport as public?

Posted by "Tom White (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAPREDUCE-2325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12996149#comment-12996149 ] 

Tom White commented on MAPREDUCE-2325:
--------------------------------------

+1 to making TaskReport Public Evolving. We should then make getCurrentStatus() Private (or TIPStatus Public).

Would you like to provide a patch? 

> Mark o.a.h.mapreduce.TaskReport as public?
> ------------------------------------------
>
>                 Key: MAPREDUCE-2325
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-2325
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.21.0
>            Reporter: Tim Yates
>            Priority: Minor
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> o.a.h.mapreduce.TaskReport is returned by Job.getTaskReports(TaskType), which is marked as Public/Evolving. TaskReport, however, is marked as Private. This looks like an oversight: The last time it was mentioned in HADOOP-1623, Tom White [suggested|https://issues.apache.org/jira/browse/MAPREDUCE-1623?focusedCommentId=12863494&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12863494] that it should be Public, but all of the patches continued to use Private.
> If this _isn't_ supposed to be public, where is the best place to get the list of running tasks (not just completed ones)?

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MAPREDUCE-2325) Mark o.a.h.mapreduce.TaskReport as public?

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

Tim Yates updated MAPREDUCE-2325:
---------------------------------

    Attachment: MAPREDUCE-2325.patch

Makes TaskReport Public Evolving and TIPStatus Public Unstable

> Mark o.a.h.mapreduce.TaskReport as public?
> ------------------------------------------
>
>                 Key: MAPREDUCE-2325
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-2325
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.21.0
>            Reporter: Tim Yates
>            Priority: Minor
>         Attachments: MAPREDUCE-2325.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> o.a.h.mapreduce.TaskReport is returned by Job.getTaskReports(TaskType), which is marked as Public/Evolving. TaskReport, however, is marked as Private. This looks like an oversight: The last time it was mentioned in HADOOP-1623, Tom White [suggested|https://issues.apache.org/jira/browse/MAPREDUCE-1623?focusedCommentId=12863494&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12863494] that it should be Public, but all of the patches continued to use Private.
> If this _isn't_ supposed to be public, where is the best place to get the list of running tasks (not just completed ones)?

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MAPREDUCE-2325) Mark o.a.h.mapreduce.TaskReport as public?

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

Tim Yates updated MAPREDUCE-2325:
---------------------------------

    Attachment: MAPREDUCE-2325.patch

I followed your suggestion, creating a new enum and moving the old method to the old class. A few questions:
- I made both enums Public/Evolving. Is this reasonable?
- I added a standard downgrade() method to o.a.h.mapred.TIPStatus. Because this is an enum and you can't simply upcast to o.a.h.mapreduce.TIPStatus, I also added an upgrade() method:
-- Are there better or more standard alternatives? Have you encountered this problem elsewhere?
-- Is this method in the right place (the old enum, like downgrade)?
-- Should it be a static method (like downgrade), or is an instance method better (like I have now)?

The only code that this change seemed to affect was o.a.h.mapreduce.tools.CLI, which was an easy fix. Everything else built fine on my system, including contrib.

> Mark o.a.h.mapreduce.TaskReport as public?
> ------------------------------------------
>
>                 Key: MAPREDUCE-2325
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-2325
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.21.0
>            Reporter: Tim Yates
>            Priority: Minor
>         Attachments: MAPREDUCE-2325.patch, MAPREDUCE-2325.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> o.a.h.mapreduce.TaskReport is returned by Job.getTaskReports(TaskType), which is marked as Public/Evolving. TaskReport, however, is marked as Private. This looks like an oversight: The last time it was mentioned in HADOOP-1623, Tom White [suggested|https://issues.apache.org/jira/browse/MAPREDUCE-1623?focusedCommentId=12863494&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12863494] that it should be Public, but all of the patches continued to use Private.
> If this _isn't_ supposed to be public, where is the best place to get the list of running tasks (not just completed ones)?

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MAPREDUCE-2325) Mark o.a.h.mapreduce.TaskReport as public?

Posted by "Tom White (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAPREDUCE-2325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12998700#comment-12998700 ] 

Tom White commented on MAPREDUCE-2325:
--------------------------------------

Public/Evolving is fine for the enums. Also, the downgrade/upgrade methods look good (and are consistent with the way a similar thing is done in Counters, for example). I would make these methods package private (or mark them as Private if that's not possible), since they are not a part of the public API.

A couple of nits: the indentation should be 2 spaces (you have 4 in places); and the brace style in the downgrade and upgrade methods is different to the usual style in the rest of the code.

Can you run test patch and the unit tests? Let me know if you need any help doing so (normally Hudson would run this when marked as patch available, but I'm not sure it's running at the moment).



> Mark o.a.h.mapreduce.TaskReport as public?
> ------------------------------------------
>
>                 Key: MAPREDUCE-2325
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-2325
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.21.0
>            Reporter: Tim Yates
>            Priority: Minor
>         Attachments: MAPREDUCE-2325.patch, MAPREDUCE-2325.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> o.a.h.mapreduce.TaskReport is returned by Job.getTaskReports(TaskType), which is marked as Public/Evolving. TaskReport, however, is marked as Private. This looks like an oversight: The last time it was mentioned in HADOOP-1623, Tom White [suggested|https://issues.apache.org/jira/browse/MAPREDUCE-1623?focusedCommentId=12863494&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12863494] that it should be Public, but all of the patches continued to use Private.
> If this _isn't_ supposed to be public, where is the best place to get the list of running tasks (not just completed ones)?

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira