You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by bi...@apache.org on 2018/01/08 21:24:57 UTC
hadoop git commit: YARN-7704. Document improvement for registry dns.
Contributed by Jian He
Repository: hadoop
Updated Branches:
refs/heads/trunk 01f3f2167 -> dc54747d7
YARN-7704. Document improvement for registry dns. Contributed by Jian He
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/dc54747d
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/dc54747d
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/dc54747d
Branch: refs/heads/trunk
Commit: dc54747d70fc4dc77767051d0f8f89ccda7ba3c0
Parents: 01f3f21
Author: Billie Rinaldi <bi...@apache.org>
Authored: Mon Jan 8 13:20:17 2018 -0800
Committer: Billie Rinaldi <bi...@apache.org>
Committed: Mon Jan 8 13:20:17 2018 -0800
----------------------------------------------------------------------
...RN-Simplified-V1-API-Layer-For-Services.yaml | 8 +++---
.../src/site/markdown/yarn-service/Examples.md | 4 +--
.../site/markdown/yarn-service/QuickStart.md | 12 ++++----
.../markdown/yarn-service/ServiceDiscovery.md | 9 +++++-
.../markdown/yarn-service/YarnServiceAPI.md | 30 ++++++++++----------
5 files changed, 35 insertions(+), 28 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/dc54747d/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/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-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-api/src/main/resources/definition/YARN-Simplified-V1-API-Layer-For-Services.yaml
index f142f66..99767b3 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/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-api/src/main/resources/definition/YARN-Simplified-V1-API-Layer-For-Services.yaml
@@ -46,7 +46,7 @@ consumes:
produces:
- application/json
paths:
- /ws/v1/services/version:
+ /app/v1/services/version:
get:
summary: Get current version of the API server.
description: Get current version of the API server.
@@ -54,7 +54,7 @@ paths:
200:
description: Successful request
- /ws/v1/services:
+ /app/v1/services:
get:
summary: (TBD) List of services running in the cluster.
description: Get a list of all currently running services (response includes a minimal projection of the service info). For more details do a GET on a specific service name.
@@ -91,7 +91,7 @@ paths:
schema:
$ref: '#/definitions/ServiceStatus'
- /ws/v1/services/{service_name}:
+ /app/v1/services/{service_name}:
put:
summary: Update a service or upgrade the binary version of the components of a running service
description: Update the runtime properties of a service. Currently the following operations are supported - update lifetime, stop/start a service.
@@ -162,7 +162,7 @@ paths:
description: Unexpected error
schema:
$ref: '#/definitions/ServiceStatus'
- /ws/v1/services/{service_name}/components/{component_name}:
+ /app/v1/services/{service_name}/components/{component_name}:
put:
summary: Flex a component's number of instances.
description: Set a component's desired number of instanes
http://git-wip-us.apache.org/repos/asf/hadoop/blob/dc54747d/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/yarn-service/Examples.md
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/yarn-service/Examples.md b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/yarn-service/Examples.md
index 0ddd126..9c5d176 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/yarn-service/Examples.md
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/yarn-service/Examples.md
@@ -111,7 +111,7 @@ The pages should alternately show "Hello from httpd-0!" or "Hello from httpd-1!"
The individual httpd URLs can also be visited, `http://httpd-0.${SERVICE_NAME}.${USER}.${DOMAIN}:8080` and `http://httpd-1.${SERVICE_NAME}.${USER}.${DOMAIN}:8080`.
-If unsure of your hostnames, visit the RM REST endpoint `http://<RM host>:8088/ws/v1/services/httpd-service`.
+If unsure of your hostnames, visit the RM REST endpoint `http://<RM host>:8088/app/v1/services/httpd-service`.
## Apache web server - httpd (without registry DNS)
@@ -157,5 +157,5 @@ yarn app -launch <service-name> httpd-no-dns
```
where `service-name` is optional. If omitted, it uses the name defined in the `Yarnfile`.
-Look up your IPs at the RM REST endpoint `http://<RM host>:8088/ws/v1/services/httpd-service`.
+Look up your IPs at the RM REST endpoint `http://<RM host>:8088/app/v1/services/httpd-service`.
Then visit port 8080 for each IP to view the pages.
http://git-wip-us.apache.org/repos/asf/hadoop/blob/dc54747d/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/yarn-service/QuickStart.md
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/yarn-service/QuickStart.md b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/yarn-service/QuickStart.md
index f13d7d6..2981a9a 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/yarn-service/QuickStart.md
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/yarn-service/QuickStart.md
@@ -127,17 +127,17 @@ Refer to [API doc](YarnServiceAPI.md) for the detailed API specificatiosn.
POST the aforementioned example service definition to the ResourceManager api-server endpoint:
```
-POST http://localhost:8088/ws/v1/services
+POST http://localhost:8088/app/v1/services
```
### Get a service status
```
-GET http://localhost:8088/ws/v1/services/${SERVICE_NAME}
+GET http://localhost:8088/app/v1/services/${SERVICE_NAME}
```
### Flex a component of a service
```
-PUT http://localhost:8088/ws/v1/services/${SERVICE_NAME}/components/${COMPONENT_NAME}
+PUT http://localhost:8088/app/v1/services/${SERVICE_NAME}/components/${COMPONENT_NAME}
```
`PUT` Request body:
```
@@ -158,7 +158,7 @@ For example:
Stopping a service will stop all containers of the service and the ApplicationMaster, but does not delete the state of a service, such as the service root folder on hdfs.
```
-PUT http://localhost:8088/ws/v1/services/${SERVICE_NAME}
+PUT http://localhost:8088/app/v1/services/${SERVICE_NAME}
```
`PUT` Request body:
@@ -173,7 +173,7 @@ PUT http://localhost:8088/ws/v1/services/${SERVICE_NAME}
Restarting a stopped service is easy.
```
-PUT http://localhost:8088/ws/v1/services/${SERVICE_NAME}
+PUT http://localhost:8088/app/v1/services/${SERVICE_NAME}
```
`PUT` Request body:
@@ -186,7 +186,7 @@ PUT http://localhost:8088/ws/v1/services/${SERVICE_NAME}
### Destroy a service
In addition to stopping a service, it also deletes the service root folder on hdfs and the records in YARN Service Registry.
```
-DELETE http://localhost:8088/ws/v1/services/${SERVICE_NAME}
+DELETE http://localhost:8088/app/v1/services/${SERVICE_NAME}
```
## Services UI with YARN UI2 and Timeline Service v2
http://git-wip-us.apache.org/repos/asf/hadoop/blob/dc54747d/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/yarn-service/ServiceDiscovery.md
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/yarn-service/ServiceDiscovery.md b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/yarn-service/ServiceDiscovery.md
index ed56fa3..8542899 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/yarn-service/ServiceDiscovery.md
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/yarn-service/ServiceDiscovery.md
@@ -122,7 +122,7 @@ To configure Registry DNS to serve reverse lookup for `172.17.0.0/24`
<value>172.17.0.0</value>
</property>
```
-## Start the DNS Server
+## Start Registry DNS Server
By default, the DNS server runs on non-privileged port `5353`. Start the server
with:
```
@@ -134,3 +134,10 @@ environment variables `YARN_REGISTRYDNS_SECURE_USER` and
`YARN_REGISTRYDNS_SECURE_EXTRA_OPTS` must be uncommented in the `yarn-env.sh`
file. The DNS server should then be launched as `root` and jsvc will be used to
reduce the privileges of the daemon after the port has been bound.
+
+## Make your cluster use Registry DNS
+You can edit the `/etc/resolv.conf` to make your system use the registry DNS such as below, where `192.168.154.3` is the ip address of your DNS host. It should appear before any nameservers that would return NXDOMAIN for lookups in the domain used by the cluster.
+```
+nameserver 192.168.154.3
+```
+Alternatively, if you have a corporate DNS in your organization, you can configure zone forwarding so that the Registry DNS resolves hostnames for the domain used by the cluster.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/hadoop/blob/dc54747d/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/yarn-service/YarnServiceAPI.md
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/yarn-service/YarnServiceAPI.md b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/yarn-service/YarnServiceAPI.md
index 65d463d..6c38680 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/yarn-service/YarnServiceAPI.md
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/yarn-service/YarnServiceAPI.md
@@ -54,7 +54,7 @@ Schemes: HTTP
## Paths
### Create a service
```
-POST /ws/v1/services
+POST /app/v1/services
```
#### Description
@@ -78,7 +78,7 @@ Create a service. The request JSON is a service object with details required for
### (TBD) List of services running in the cluster.
```
-GET /ws/v1/services
+GET /app/v1/services
```
#### Description
@@ -94,7 +94,7 @@ Get a list of all currently running services (response includes a minimal projec
### Get current version of the API server.
```
-GET /ws/v1/services/version
+GET /app/v1/services/version
```
#### Description
@@ -109,7 +109,7 @@ Get current version of the API server.
### Update a service or upgrade the binary version of the components of a running service
```
-PUT /ws/v1/services/{service_name}
+PUT /app/v1/services/{service_name}
```
#### Description
@@ -133,7 +133,7 @@ Update the runtime properties of a service. Currently the following operations a
### Destroy a service
```
-DELETE /ws/v1/services/{service_name}
+DELETE /app/v1/services/{service_name}
```
#### Description
@@ -156,7 +156,7 @@ Destroy a service and release all resources. This API might have to return JSON
### Get details of a service.
```
-GET /ws/v1/services/{service_name}
+GET /app/v1/services/{service_name}
```
#### Description
@@ -179,7 +179,7 @@ Return the details (including containers) of a running service
### Flex a component's number of instances.
```
-PUT /ws/v1/services/{service_name}/components/{component_name}
+PUT /app/v1/services/{service_name}/components/{component_name}
```
#### Description
@@ -378,7 +378,7 @@ The current status of a submitted service, returned as a response to the GET API
## Examples
### Create a simple single-component service with most attribute values as defaults
-POST URL - http://localhost:8088/ws/v1/services
+POST URL - http://localhost:8088/app/v1/services
##### POST Request JSON
```json
@@ -410,7 +410,7 @@ POST URL - http://localhost:8088/ws/v1/services
```
##### GET Response JSON
-GET URL - http://localhost:8088/ws/v1/services/hello-world
+GET URL - http://localhost:8088/app/v1/services/hello-world
Note, lifetime value of -1 means unlimited lifetime.
@@ -468,7 +468,7 @@ Note, lifetime value of -1 means unlimited lifetime.
```
### Update to modify the lifetime of a service
-PUT URL - http://localhost:8088/ws/v1/services/hello-world
+PUT URL - http://localhost:8088/app/v1/services/hello-world
##### PUT Request JSON
@@ -480,7 +480,7 @@ Note, irrespective of what the current lifetime value is, this update request wi
}
```
### Stop a service
-PUT URL - http://localhost:8088/ws/v1/services/hello-world
+PUT URL - http://localhost:8088/app/v1/services/hello-world
##### PUT Request JSON
```json
@@ -490,7 +490,7 @@ PUT URL - http://localhost:8088/ws/v1/services/hello-world
```
### Start a service
-PUT URL - http://localhost:8088/ws/v1/services/hello-world
+PUT URL - http://localhost:8088/app/v1/services/hello-world
##### PUT Request JSON
```json
@@ -500,7 +500,7 @@ PUT URL - http://localhost:8088/ws/v1/services/hello-world
```
### Update to flex up/down the no of containers (instances) of a component of a service
-PUT URL - http://localhost:8088/ws/v1/services/hello-world/components/hello
+PUT URL - http://localhost:8088/app/v1/services/hello-world/components/hello
##### PUT Request JSON
```json
@@ -511,12 +511,12 @@ PUT URL - http://localhost:8088/ws/v1/services/hello-world/components/hello
```
### Destroy a service
-DELETE URL - http://localhost:8088/ws/v1/services/hello-world
+DELETE URL - http://localhost:8088/app/v1/services/hello-world
***
### Create a complicated service - HBase
-POST URL - http://localhost:8088:/ws/v1/services/hbase-app-1
+POST URL - http://localhost:8088:/app/v1/services/hbase-app-1
##### POST Request JSON
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org