Ver código fonte

AMBARI-1388. Document management API

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/trunk@1477148 13f79535-47bb-0310-9956-ffa450edef68
Tom Beerbower 12 anos atrás
pai
commit
0a81ee1b5c

+ 2 - 0
CHANGES.txt

@@ -269,6 +269,8 @@ Trunk (unreleased changes):
 
  IMPROVEMENTS
 
+ AMBARI-1388. Document management API. (tbeerbower)
+
  AMBARI-2030. Make frontend changes to account for the host component status
  UNKNOWN. (yusaku)
 

+ 24 - 0
ambari-server/docs/api/v1/cluster-resources.md

@@ -0,0 +1,24 @@
+<!---
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Cluster Resources
+Cluster resources represent named Hadoop clusters.  Clusters are top level resources.
+
+- [List clusters](clusters.md)
+- [View cluster information](clusters-cluster.md)
+- [Create cluster](create-cluster.md)
+- [Delete cluster](delete-cluster.md)

+ 26 - 0
ambari-server/docs/api/v1/component-resources.md

@@ -0,0 +1,26 @@
+<!---
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Component Resources
+Component resources are the individual components of a service (e.g. HDFS/NameNode and MapReduce/JobTracker).  Components are sub-resources of services.
+ 
+
+- [List service components](components.md)
+- [View component information](components-component.md)
+- [Create component](create-component.md)
+
+

+ 40 - 0
ambari-server/docs/api/v1/create-cluster.md

@@ -0,0 +1,40 @@
+
+<!---
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+Create Cluster
+=====
+
+[Back to Resources](index.md#resources)
+
+Create a cluster named ‘c1’ with the property ‘Clusters/version’ = ‘HDP-1.2.0’.
+
+
+    POST /clusters/c1
+
+**Body**
+
+    {
+      "Clusters": {
+        "version" : "HDP-1.2.0”
+      }
+    }
+
+**Response**
+
+    200 OK
+    

+ 33 - 0
ambari-server/docs/api/v1/create-component.md

@@ -0,0 +1,33 @@
+
+<!---
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+Create Component
+=====
+
+[Back to Resources](index.md#resources)
+
+Create the NAMENODE component.
+
+
+    POST /clusters/c1/services/HDFS/components/NAMENODE
+
+
+**Response**
+
+    200 OK
+    

+ 33 - 0
ambari-server/docs/api/v1/create-host.md

@@ -0,0 +1,33 @@
+
+<!---
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+Create Host
+=====
+
+[Back to Resources](index.md#resources)
+
+Create the host named your.ambari.host.
+
+
+    POST /clusters/c1/hosts/your.ambari.host
+
+
+**Response**
+
+    200 OK
+    

+ 33 - 0
ambari-server/docs/api/v1/create-hostcomponent.md

@@ -0,0 +1,33 @@
+
+<!---
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+Create Host Component
+=====
+
+[Back to Resources](index.md#resources)
+
+Create the NAMENODE host component on your.ambari.host.
+
+
+    POST clusters/c1/hosts/your.ambari.host/host_components/NAMENODE
+
+
+**Response**
+
+    200 OK
+    

+ 33 - 0
ambari-server/docs/api/v1/create-service.md

@@ -0,0 +1,33 @@
+
+<!---
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+Create Service
+=====
+
+[Back to Resources](index.md#resources)
+
+Create the HDFS service.
+
+
+    POST /clusters/c1/services/HDFS
+
+
+**Response**
+
+    200 OK
+    

+ 33 - 0
ambari-server/docs/api/v1/delete-cluster.md

@@ -0,0 +1,33 @@
+
+<!---
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+Delete Cluster
+=====
+
+[Back to Resources](index.md#resources)
+
+Delete a cluster named ‘c1’.
+
+
+    DELETE /clusters/c1
+
+
+**Response**
+
+    200 OK
+    

+ 23 - 0
ambari-server/docs/api/v1/host-component-resources.md

@@ -0,0 +1,23 @@
+<!---
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Host Component Resources
+ 
+
+- [List host components](host-components.md)
+- [View host component information](host-component.md)
+- [Create host component](create-hostcomponent.md)

+ 23 - 0
ambari-server/docs/api/v1/host-resources.md

@@ -0,0 +1,23 @@
+<!---
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Host Resources
+ 
+
+- [List hosts](hosts.md)
+- [View host information](hosts-host.md)
+- [Create host](create-host.md)

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 120
ambari-server/docs/api/v1/index.md


+ 26 - 0
ambari-server/docs/api/v1/service-resources.md

@@ -0,0 +1,26 @@
+<!---
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Service Resources
+Service resources are services of a Hadoop cluster (e.g. HDFS, MapReduce and Ganglia).  Service resources are sub-resources of clusters. 
+
+- [List services](services.md)
+- [View service information](services-service.md)
+- [Create service](create-service.md)
+- [Update services](update-services.md)
+- [Update service](update-service.md)
+

+ 47 - 0
ambari-server/docs/api/v1/update-service.md

@@ -0,0 +1,47 @@
+
+<!---
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+Update Service
+=====
+
+[Back to Resources](index.md#resources)
+
+Start the HDFS service (update the state of the HDFS service to be ‘STARTED’).
+
+
+    PUT /clusters/c1/services/HDFS/
+
+**Body**
+
+    {
+      "ServiceInfo": {
+        "state" : "STARTED”
+      }
+    }
+
+
+**Response**
+
+    202 Accepted
+    {
+      "href" : "http://your.ambari.server/api/v1/clusters/c1/requests/3",
+      "Requests" : {
+        "id" : 3,
+        "status" : "InProgress"
+      } 
+    }

+ 48 - 0
ambari-server/docs/api/v1/update-services.md

@@ -0,0 +1,48 @@
+
+<!---
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+Update Services
+=====
+
+[Back to Resources](index.md#resources)
+
+)Update the state ofall ‘INSTALLED’  servicse to be ‘STARTED’.
+
+
+    PUT/clusters/c1/services?ServiceInfo/state=INSTALLED/
+
+**Body**
+
+    {
+      "ServiceInfo": {
+        "state" : "STARTED”
+      }
+    }
+
+
+**Response**
+
+    202 Accepted
+    {
+      "href" : "http://your.ambari.server/api/v1/clusters/c1/requests/3",
+      "Requests" : {
+        "id" : 3,
+        "status" : "InProgress"
+      } 
+    }
+    

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff