ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Siddharth Wagle (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (AMBARI-4033) Define the RequestSchedule API endpoint
Date Thu, 09 Jan 2014 21:25:50 GMT

     [ https://issues.apache.org/jira/browse/AMBARI-4033?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Siddharth Wagle resolved AMBARI-4033.
-------------------------------------

    Resolution: Fixed

Patch committed with AMBARI-4034, commit hash
5dcea3726e53eea4243510da156a9c8f145f51ef

> Define the RequestSchedule API endpoint
> ---------------------------------------
>
>                 Key: AMBARI-4033
>                 URL: https://issues.apache.org/jira/browse/AMBARI-4033
>             Project: Ambari
>          Issue Type: Task
>          Components: controller
>    Affects Versions: 1.5.0
>            Reporter: Siddharth Wagle
>            Assignee: Siddharth Wagle
>             Fix For: 1.5.0
>
>
> *API specification*
> _POST_
> Post on a request schedule resource creates a template for executing a request or a batch
of requests to be executed at the specified time.
> POST /api/v1/clusters/c1/request_schedule
> {code}
> [
>    {
>       "request_schedule": {
>          "request_context": "Restart Task trackers at 30 past midnight everyday.",
>          "target": {
>             "type": "ACTION / COMMAND",
>             "name": "RESTART / REBALANCE / ...",
>             "service_name": "MAPREDUCE",
>             "component_name": "TASKTRACKER"
>          },
>          "batches": [
>             {
>                "hosts": [
>                   {
>                      "host_name": "host1"
>                   },
>                   {
>                      "host_name": "host2"
>                   }
>                ]
>             },
>             {
>                "batch_settings": {
>                   "batch_requests_by_host": "true",
>                   "batch_host_count": "1",
>                   "batch_seperation_in_minutes": "15",
>                   "task_failure_tolerance" : "3",
>                   "filter_predicate": "stale_configs=true"
>                }
>             }
>          ],
>          "schedule": {
>             "minutes": "30",
>             "hours": "0",
>             "days_of_month": "*",
>             "month": "*",
>             "day_of_week": "*",
>             "year": "*",
>             "startTime": "",
>             "endTime": "2013-11-18T14:29:29-08:00"
>          }
>       }
>    }
> ]
> 201 Created
> {
>    "resources": [
>       {
>          "href": "http://<ambari-server>:8080/api/v1/clusters/c1/request_execution/2",
>          "request_schedule": {
>             "id": 2
>          }
>       }
>    ]
> }
> {code}
> _GET_
> Get request on a request schedule returns the complete definition along with requests
if any or last 10 requests or all requests based on the query parameter for batch requests.
> Everything that was posted plus the list of request objects associated with this schedule.
> GET   /api/v1/clusters/c1/request_schedule/25?fields=*
> {code}
> "requests": [
>             {
>                "href": "http://<ambari-server>:8080/api/v1/clusters/c1/requests/2",
>                "Requests": {
>                   "cluster_name": "c1",
>                   "id": 1
>                }
>             },
>             {
>                "href": "http://<ambari-server>:8080/api/v1/clusters/c1/requests/2",
>                "Requests": {
>                   "cluster_name": "c1",
>                   "id": 2
>                }
>             }
>          ]
> {code}
> _DELETE_
> Delete on a request schedule does not delete the currently executing requests.
> DELETE   /api/v1/clusters/c1/request_execution/2
> 200 OK



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message