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] [Created] (AMBARI-4033) Define the RequestSchedule API endpoint
Date Tue, 10 Dec 2013 17:54:07 GMT
Siddharth Wagle created AMBARI-4033:
---------------------------------------

             Summary: 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

[
   {
      "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
         }
      }
   ]
}





--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

Mime
View raw message