spring-projects/spring-xd — pull request #1169 by ilayaperumalg (2014-09-02 16:35:57+00:00)
Title: XD Cluster view

- Add expanded field values in `ModuleMetadata`
- ModuleMetadata will now have:
- Unit (Stream/Job) name
- Module name (module label + index)
- Module type
- Unit deployment status
- Update `ModuleMetadataResource` with the changes
- Add a method in `ModuleMetadataController` to update the
deployment status for each stream/job module by referring
to stream/job repositories
- Fix `runtime modules` command and add the above fields in the result
- Fix the tests

Re-add moduleId

Add `deploymentStatus` to ModuleMetadata
- Previously it was updated with `ModuleMetadataResource`

Update deploymentStatus in findAllByContainerId(String containerId)

Add javadoc

XD-2092 Enhance container domain object

- Add `RuntimeContainer` that extends `Container` and also has:
- DeploymentSize
- DeployedModules
- Add `RuntimeContainerRepository` that provides RuntimeContainers
- Change `/runtime/containers` REST endpoint to return the
`RuntimeContainer` objects
- Update resource assembler and domain object to use `RuntimeContainer`
- Update tests

XD-2097 Shutdown containers from admin

- Enable `shutdown` endpoint for containers
- Keep the `mangementContextPath` the same for both admin/container
- ContainerRegistrar stores the container's port as container attribute
- If the container uses local port `0` then the port is known only when
the `EmbeddedServletContainer` is initialized
- Add `update` method in `ContainerRepository` to update the container data
- Update container data (attributes) along with container port info
- Add REST endpoint that shuts down container by `containerId`
- Get container host and port from container attributes
- Use `RestTemplate` to send `POST` request to shutdown the container
- Throw `NoSuchContainerException` if container is not found
- Add test

Handle error scenarios
- During `containerRepository.update` if the container path doesn't exist,
throw `NoSuchContainerException`
- Add tests for `containerRepository.update` scenarios
- Check `zkConnection` before calling `containerRepository.update`
- Throw `ContainerShutdownException` when the response to shutdown container
results in exception

Use the management port
- Use container server's `management` server port to access shutdown
endpoint.
- Handle the `EmbeddedServletContainerInitializedEvent` when the event
comes out of management server's servlet container. The namespace for this
context is set to `management`. Hence using that to distinguish the event
- Make sure the management port is always updated when the above
event is processed.
- Update the container attributes with mangement port (if used)
before registering with ZK on the `ZKContainerConnectionListener`s
onResume() and onConnect events

XD cluster view

XD-2095 WebUI: Support stream deployment props

- Add support to specify deployment properties when deploying
stream
- Add a form that accepts text box for `deployment properties`
and submit `deploy` action

XD Cluster view fixes - WIP

Access Jolokia endpoints for msg rate