Repository: hadoop
Updated Branches:
  refs/heads/trunk 823bb5dda -> a0c0b793c


YARN-8814. Yarn Service Upgrade: Update the swagger definition.
           Contributed by Chandni Singh


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/a0c0b793
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/a0c0b793
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/a0c0b793

Branch: refs/heads/trunk
Commit: a0c0b793c30244eea734784915ebba1c096ff612
Parents: 823bb5d
Author: Eric Yang <[email protected]>
Authored: Tue Oct 23 19:04:58 2018 -0400
Committer: Eric Yang <[email protected]>
Committed: Tue Oct 23 19:04:58 2018 -0400

----------------------------------------------------------------------
 ...RN-Simplified-V1-API-Layer-For-Services.yaml | 111 +++++++++++++++++--
 1 file changed, 100 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/a0c0b793/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-api/src/main/resources/definition/YARN-Simplified-V1-API-Layer-For-Services.yaml
----------------------------------------------------------------------
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-api/src/main/resources/definition/YARN-Simplified-V1-API-Layer-For-Services.yaml
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-api/src/main/resources/definition/YARN-Simplified-V1-API-Layer-For-Services.yaml
index 6b1daba..01243fd 100644
--- 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-api/src/main/resources/definition/YARN-Simplified-V1-API-Layer-For-Services.yaml
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-api/src/main/resources/definition/YARN-Simplified-V1-API-Layer-For-Services.yaml
@@ -162,9 +162,9 @@ paths:
           description: Unexpected error
           schema:
             $ref: '#/definitions/ServiceStatus'
-  /app/v1/services/{service_name}/components/{component_name}:
+  /app/v1/services/{service_name}/components:
     put:
-      summary: Flex a component's number of instances.
+      summary: Upgrade multiple components.
       description: Set a component's desired number of instanes
       parameters:
         - name: service_name
@@ -172,6 +172,31 @@ paths:
           description: Service name
           required: true
           type: string
+        - name: components
+          in: body
+          description: Components to be upgraded with state set to UPGRADING
+          required: true
+          schema:
+            type: array
+            items:
+              $ref: '#/definitions/Component'
+      responses:
+        200:
+          description: Upgrading components.
+        404:
+          description: Service does not exist
+        default:
+          description: Unexpected error
+  /app/v1/services/{service_name}/components/{component_name}:
+    put:
+      summary: Flex a component's number of instances or upgrade all the 
instances of the component.
+      description: Set a component's desired number of instanes or upgrade the 
component.
+      parameters:
+        - name: service_name
+          in: path
+          description: Service name
+          required: true
+          type: string
         - name: component_name
           in: path
           description: Component name
@@ -179,7 +204,7 @@ paths:
           type: string
         - name: Component
           in: body
-          description: The definition of a component which contains the 
updated number of instances.
+          description: For flex, the definition of a component which contains 
the updated number of instances with state set to FLEXING. For upgrade, 
component definition with state set to UPGRADING.
           required: true
           schema:
             $ref: '#/definitions/Component'
@@ -213,8 +238,7 @@ paths:
         - name: containerState
           in: query
           description: Container state. Multiple values are allowed.
-          schema:
-            $ref: '#/definitions/ContainerState'
+          type: string
       responses:
         200:
           description: Component instances.
@@ -226,7 +250,63 @@ paths:
           description: Service does not exist
         default:
           description: Unexpected error
+    put:
+      summary: Upgrade multiple component instances.
+      description: Upgrades multiple component instances
+      parameters:
+        - name: service_name
+          in: path
+          description: Service name
+          required: true
           type: string
+        - name: component instances
+          in: body
+          description: Component instances with state set to UPGRADING
+          required: true
+          schema:
+            type: array
+            items:
+              $ref: '#/definitions/Container'
+      responses:
+        200:
+          description: Upgrading component instance
+        404:
+          description: Service does not exist
+        default:
+          description: Unexpected error
+  
/app/v1/services/{service_name}/components/{component_name}/component-instances/{component_instance_name}:
+    put:
+      summary: Upgrade a single component instance.
+      description: Upgrades a single component instance
+      parameters:
+        - name: service_name
+          in: path
+          description: Service name
+          required: true
+          type: string
+        - name: component_name
+          in: path
+          description: Component name
+          required: true
+          type: string
+        - name: component_instance_name
+          in: path
+          description: Component instance name
+          required: true
+          type: string
+        - name: component instance
+          in: body
+          description: Component instance with state UPGRADING
+          required: true
+          schema:
+            $ref: '#/definitions/Container'
+      responses:
+        200:
+          description: Upgrading component instance
+        404:
+          description: Service does not exist
+        default:
+          description: Unexpected error
 definitions:
   Service:
     description: a service resource has the following attributes.
@@ -586,6 +666,10 @@ definitions:
           - FAILED
           - FLEX
           - UPGRADING
+          - UPGRADING_AUTO_FINALIZE
+          - EXPRESS_UPGRADING
+          - SUCCEEDED
+          - CANCEL_UPGRADING
   ContainerState:
     description: The current state of the container of a service.
     properties:
@@ -593,9 +677,14 @@ definitions:
         type: string
         description: enum of the state of the container
         enum:
-          - INIT
-          - STARTED
+          - RUNNING_BUT_UNREADY
           - READY
+          - STOPPED
+          - NEEDS_UPGRADE
+          - UPGRADING
+          - SUCCEEDED
+          - FAILED
+          - FAILED_UPGRADE
   ComponentState:
     description: The state of the component
     properties:
@@ -603,10 +692,12 @@ definitions:
         type: string
         description: enum of the state of the component
         enum:
-          - INIT
           - FLEXING
           - STABLE
+          - NEEDS_UPGRADE
           - UPGRADING
+          - SUCCEEDED
+          - FAILED
   ServiceStatus:
     description: The current status of a submitted service, returned as a 
response to the GET API.
     properties:
@@ -641,6 +732,4 @@ definitions:
         type: array
         description: Containers of the component.
         items:
-          $ref: '#/definitions/Container'
-
-
+          $ref: '#/definitions/Container'
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to