This repository has been archived by the owner on Jan 23, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2d2e80b
commit 470b9b4
Showing
5 changed files
with
72 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,41 @@ | ||
# Ambrose Cascading Support | ||
|
||
## Implementation | ||
## Implementation | ||
|
||
Cascading integrates with Ambrose via the ```AmbroseCascadingNotificationListener``` class. Cascading starts an | ||
embedded [Jetty](http://jetty.codehaus.org/jetty/) server that exposes job information to the Ambrose Web server. | ||
For more information on Cascading see [Cascading Getting Started]([http://www.cascading.org/documentation/). | ||
Ambrose integrates with Cascading via Cascading's `FlowListener` and `FlowStepListener` | ||
interfaces. The | ||
[`AmbroseCascadingNotifier`](https://github.com/twitter/ambrose/blob/master/cascading/src/main/java/com/twitter/ambrose/cascading/AmbroseCascadingNotifier.java) | ||
implements both of these interfaces, and passes Cascading flow events on to an Ambrose | ||
[`StatsWriteService`](https://github.com/twitter/ambrose/blob/master/common/src/main/java/com/twitter/ambrose/service/StatsWriteService.java). For | ||
more information on Cascading see [Cascading Getting | ||
Started]([http://www.cascading.org/documentation/). | ||
|
||
To run Ambrose with a Cascading program add the following code at the end of Cascading main: | ||
The | ||
[`EmbeddedAmbroseCascadingNotifier`](https://github.com/twitter/ambrose/blob/master/cascading/src/main/java/com/twitter/ambrose/cascading/EmbeddedAmbroseCascadingNotifier.java), | ||
which extends `AmbroseCascadingNotifier`, records flow state in memory, and starts an embedded | ||
[Jetty](http://www.eclipse.org/jetty/) web server that hosts the Ambrose web application. | ||
|
||
To use the `EmbeddedAmbroseCascadingNotifier` in your Cascading program, add the following code at | ||
the end of Cascading main: | ||
|
||
``` | ||
// creates the embedded cascading listener before tfidfFlow.complete(); | ||
EmbeddedAmbroseCascadingProgressNotificationListener server = new EmbeddedAmbroseCascadingProgressNotificationListener(); | ||
// creates the embedded cascading notifier before tfidfFlow.complete(); | ||
EmbeddedAmbroseCascadingNotifier server = new EmbeddedAmbroseCascadingNotifier(); | ||
``` | ||
|
||
Then, add the listeners to the Flow: | ||
Then, add the listeners to your Flow: | ||
|
||
``` | ||
tfidfFlow.addListener(server); | ||
tfidfFlow.addStepListener(server); | ||
tfidfFlow.complete(); | ||
flow.addListener(server); | ||
flow.addStepListener(server); | ||
flow.complete(); | ||
``` | ||
|
||
Note: ```tfidfFlow``` is the Flow of the Cascading example | ||
[cascading for the impatient part 5](http://www.cascading.org/2012/07/31/cascading-for-the-impatient-part-5/). | ||
When your Cascading program executes, the embedded Jetty web server will (by default) bind to | ||
localhost port 8080, allowing you to browse to http://localhost:8080/ to see the Ambrose web | ||
application and its visualization of workflow state. | ||
|
||
## Authors | ||
|
||
* [Ahmed Mohsen](https://github.com/Ahmed--Mohsen) ([@Ahmed__Mohsen](https://twitter.com/Ahmed__Mohsen)) | ||
* [Ahmed Eshra](https://github.com/engeshra) ([@engeshra](https://twitter.com/engeshra)) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Ambrose Scalding Support | ||
|
||
## Usage | ||
|
||
To enable the embedded Ambrose server in your Scalding job, add the | ||
[`AmbroseAdapter`](https://github.com/twitter/ambrose/blob/master/scalding/src/main/scala/com/twitter/ambrose/scalding/AmbroseAdapter.scala) | ||
trait to it. Then, while the job is running, browse to http://localhost:8080/. See | ||
[`EmbeddedAmbroseCascadingNotifier`](https://github.com/twitter/ambrose/blob/master/cascading/src/main/java/com/twitter/ambrose/cascading/EmbeddedAmbroseCascadingNotifier.java) | ||
for details on configuring the port, etc. | ||
|
||
## Authors | ||
|
||
* [twdima](https://github.com/twdima) ([@dimatkach69](https://twitter.com/dimatkach69)) |