README.md 4.8 KB
Newer Older
1 2 3
# ozone


K
ktzoumas 已提交
4
This is the source code repository of the Stratosphere research project. See www.stratosphere.eu for project details, publications, etc
5

K
ktzoumas 已提交
6
ozone is the codename of the latest Stratosphere distribution.
R
Robert Metzger 已提交
7

K
ktzoumas 已提交
8 9 10


Build Status: [![Build Status](https://travis-ci.org/dimalabs/ozone.png)](https://travis-ci.org/dimalabs/ozone)
11 12

## Getting Started
K
ktzoumas 已提交
13
Below are three short tutorials that guide you through the first steps: Building, running and developing.
14 15 16

###  Build From Source

K
ktzoumas 已提交
17
This tutorial shows how to build Stratosphere on your own system. Please open a bug report if you have any troubles!
18 19 20 21 22 23 24 25 26 27 28 29 30

#### Requirements
* Unix-like environment (We use Linux, Mac OS X, it should run with cygwin)
* git
* maven
* Java 6 or 7

.

	git clone https://github.com/dimalabs/ozone.git
	cd ozone
	mvn -DskipTests clean package # this will take up to 5 minutes

K
ktzoumas 已提交
31 32
Stratosphere is now installed in `stratosphere-dist/target`
If you’re a Debian/Ubuntu user, you’ll find a .deb package. We will continue with the generic case.
33 34 35 36 37 38 39

	cd stratosphere-dist/target/stratosphere-dist-0.2-ozone-bin/stratosphere-0.2-ozone/

Note: The directory structure here looks like the contents of the official release distribution.

### Run your first program

K
ktzoumas 已提交
40 41
We will run a simple “Word Count” example. 
The easiest way to start Stratosphere on your local machine is so-called "local-mode":
42 43 44 45 46 47 48 49 50 51 52

	./bin/start-local.sh

Get some test data:

	 wget -O hamlet.txt http://www.gutenberg.org/cache/epub/1787/pg1787.txt

Start the job:

	/bin/pact-client.sh run --jarfile ./examples/pact/pact-examples-0.2-ozone-WordCount.jar --arguments 1 file://`pwd`/hamlet.txt file://`pwd`/wordcount-result.txt

K
ktzoumas 已提交
53
You will find a file called `wordcount-result.txt` in your current directory.
54

K
ktzoumas 已提交
55 56
#### Alternative Method: Use the PACT web interface
(And get a nice execution plan overview for free!)
57 58 59 60 61 62 63

	./bin/start-local.sh
	./bin/pact-webfrontend.sh start

Get some test data:
	 wget -O ~/hamlet.txt http://www.gutenberg.org/cache/epub/1787/pg1787.txt

K
ktzoumas 已提交
64
* Point your browser to to http://localhost:8080/launch.html. Upload the WordCount.jar using the upload form in the lower right box. The jar is located in `./examples/pact/pact-examples-0.2-ozone-WordCount.jar`.
65 66 67 68 69 70 71 72
* Select the WordCount jar from the list of available jars (upper left).
* Enter the argument line in the lower-left box: `1 file://<path to>/hamlet.txt file://<wherever you want the>/wordcount-result.txt`

* Hit “Run Job”


### Eclipse Setup and Debugging

K
ktzoumas 已提交
73
To contribute back to the project or develop your own jobs for Stratosphere, you need a working development environment. We use Eclipse and IntelliJ for development. Here we focus on Eclipse.
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118

Import the Stratosphere source code using Maven's Import tool:
  * Select "Import" from the "File"-menu.
  * Expand "Maven" node, select "Existing Maven Projects", and click "next" button
  * Select the root directory by clicking on the "Browse" button and navigate to the top folder of the cloned Stratosphere Git repository.
  * Ensure that all projects are selected and click the "Finish" button.

Create a new Eclipse Project that requires Stratosphere in its Build Path!

Use this skeleton as an entry point for your own Jobs: It allows you to hit the “Run as” -> “Java Application” feature of Eclipse. (You have to stop the application manually, because only one instance can run at a time)

```java
public class Tutorial implements PlanAssembler, PlanAssemblerDescription {

	public static void execute(Plan toExecute) throws Exception {
		LocalExecutor executor = new LocalExecutor();
		executor.start();
		long runtime = executor.executePlan(toExecute);
		System.out.println("runtime:  " + runtime);
		executor.stop();
	}

	@Override
	public Plan getPlan(String... args) {
		// your Plan goes here
	}

	@Override
	public String getDescription() {
		return "Usage: …. "; // TODO
	}

	public static void main(String[] args) throws Exception {
		Tutorial tut = new Tutorial();
		Plan toExecute = tut.getPlan( /* Arguments */);
		execute(toExecute);
	}
}

```

## Support
Don’t hesitate to ask!
We have a mailing list for our users: https://lists.tu-berlin.de/mailman/listinfo/stratosphere-dev

K
ktzoumas 已提交
119
Open an issue on github, if you need our hel:p https://github.com/dimalabs/ozone/issues/new
120 121 122 123 124 125 126 127

## Documentation


## Fork and Contribute

This is an active open-source project. We are always open to people who want to use the system or contribute to it. 

K
ktzoumas 已提交
128
The development community lives on github and our mailing list: https://lists.tu-berlin.de/mailman/listinfo/stratosphere-dev (But we prefer github)
129 130 131 132 133 134 135

We use the github Pull Request system for the development of Stratosphere. Just open a request if you want to contribute.

### What to contribute
* Bug reports
* Bug fixes
* Documentation
K
ktzoumas 已提交
136 137
* Tools that ease the use and development of Stratosphere
* Well-written Stratosphere jobs
138 139


K
ktzoumas 已提交
140
Let us know if you have created a system that uses Stratosphere, so that we can link to you.
141 142 143 144 145 146 147