Skip to content

Conversation

@guoxiaolongzte
Copy link

@guoxiaolongzte guoxiaolongzte commented Apr 5, 2017

What changes were proposed in this pull request?

  1. '/applications/[app-id]/stages' in rest api.status should add description '?status=[active|complete|pending|failed] list only stages in the state.'

Now the lack of this description, resulting in the use of this api do not know the use of the status through the brush stage list.

2.'/applications/[app-id]/stages/[stage-id]' in REST API,remove redundant description ‘?status=[active|complete|pending|failed] list only stages in the state.’.
Because only one stage is determined based on stage-id.

code:
@get
def stageList(@QueryParam("status") statuses: JList[StageStatus]): Seq[StageData] = {
val listener = ui.jobProgressListener
val stageAndStatus = AllStagesResource.stagesAndStatus(ui)
val adjStatuses = {
if (statuses.isEmpty()) {
Arrays.asList(StageStatus.values(): _*)
} else {
statuses
}
};

How was this patch tested?

manual tests

Please review http://spark.apache.org/contributing.html before opening a pull request.

@srowen
Copy link
Member

srowen commented Apr 5, 2017

Why didn't you add this to your last PR? What other related changes do you want to make? Making several small closely related PRs is frowned on

@guoxiaolongzte
Copy link
Author

Because I just use this API today to develop, only to find the problem.

@guoxiaolongzte
Copy link
Author

Added one more

2.'/applications/[app-id]/stages/[stage-id]' in REST API,remove redundant description ‘?status=[active|complete|pending|failed] list only stages in the state.’.
Because only one stage is determined based on stage-id.

<td><code>/applications/[app-id]/stages/[stage-id]</code></td>
<td>
A list of all attempts for the given stage.
<br><code>?status=[active|complete|pending|failed]</code> list only stages in the state.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it filtering stages? or attempts? I am not familiar with this but it wasn't obvious that this is redundant. Maybe you have tried this API locally and confirm this doesn't have effect?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is filtering stages.
I have manual test this API locally and confirm this doesn't have effect.

@SparkQA
Copy link

SparkQA commented Apr 7, 2017

Test build #3644 has finished for PR 17534 at commit 0e37fde.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@guoxiaolongzte guoxiaolongzte changed the title [SPARK-20218]'/applications/[app-id]/stages' in REST API,add description. [SPARK-20218][Doc]'/applications/[app-id]/stages' in REST API,add description. Apr 7, 2017
asfgit pushed a commit that referenced this pull request Apr 7, 2017
…ription.

## What changes were proposed in this pull request?

1. '/applications/[app-id]/stages' in rest api.status should add description '?status=[active|complete|pending|failed] list only stages in the state.'

Now the lack of this description, resulting in the use of this api do not know the use of the status through the brush stage list.

2.'/applications/[app-id]/stages/[stage-id]' in REST API,remove redundant description ‘?status=[active|complete|pending|failed] list only stages in the state.’.
Because only one stage is determined based on stage-id.

code:
  GET
  def stageList(QueryParam("status") statuses: JList[StageStatus]): Seq[StageData] = {
    val listener = ui.jobProgressListener
    val stageAndStatus = AllStagesResource.stagesAndStatus(ui)
    val adjStatuses = {
      if (statuses.isEmpty()) {
        Arrays.asList(StageStatus.values(): _*)
      } else {
        statuses
      }
    };

## How was this patch tested?

manual tests

Please review http://spark.apache.org/contributing.html before opening a pull request.

Author: 郭小龙 10207633 <[email protected]>

Closes #17534 from guoxiaolongzte/SPARK-20218.

(cherry picked from commit 9e0893b)
Signed-off-by: Sean Owen <[email protected]>
@srowen
Copy link
Member

srowen commented Apr 7, 2017

Merged to master/2.1

@asfgit asfgit closed this in 9e0893b Apr 7, 2017
@guoxiaolongzte guoxiaolongzte deleted the SPARK-20218 branch June 12, 2017 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants