README.md 6.9 KB
Newer Older
R
Robert Metzger 已提交
1
# Stratosphere - "Ozone" Distribution
2

R
Robert Metzger 已提交
3
Big Data looks tiny from Stratosphere.
4 5

## Getting Started
K
ktzoumas 已提交
6
Below are three short tutorials that guide you through the first steps: Building, running and developing.
7 8 9

###  Build From Source

K
ktzoumas 已提交
10
This tutorial shows how to build Stratosphere on your own system. Please open a bug report if you have any troubles!
11 12

#### Requirements
R
Robert Metzger 已提交
13
* Unix-like environment (We use Linux, Mac OS X, Cygwin)
14 15 16 17
* git
* maven
* Java 6 or 7

R
Robert Metzger 已提交
18
```
19
git clone https://github.com/stratosphere/stratosphere.git
R
Robert Metzger 已提交
20 21 22
cd ozone
mvn -DskipTests clean package # this will take up to 5 minutes
```
23

K
ktzoumas 已提交
24 25
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.
26

R
Robert Metzger 已提交
27
	cd stratosphere-dist/target/stratosphere-dist-0.4-ozone-SNAPSHOT-bin/stratosphere-0.4-ozone-SNAPSHOT/
28

29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
The directory structure here looks like the contents of the official release distribution.

#### Build for different Hadoop Versions
This section is for advanced users that want to build Stratosphere for a different Hadoop version, for example for Hadoop Yarn support.

We use the profile activation via properties (-D).

##### Build hadoop v1 (default)
Build the default (currently hadoop 1.2.1)
```mvn clean package```

Build for a specific hadoop v1 version
```mvn -Dhadoop-one.version=1.1.2 clean package```

##### Build hadoop v2 (yarn)

Build the yarn using the default version defined in the pom
```mvn -Dhadoop.profile=2 clean package```

Build for a specific hadoop v1 version
```mvn -Dhadoop.profile=2 -Dhadoop-two.version=2.1.0-beta clean package```

It is necessary to generate separate POMs if you want to deploy to your local repository (`mvn install`) or somewhere else.
We have a script in `/tools` that generates POMs for the profiles. Use 
```mvn -f pom.hadoop2.xml clean install -DskipTests```
to put a POM file with the right dependencies into your local repository.

56 57 58

### Run your first program

K
ktzoumas 已提交
59 60
We will run a simple “Word Count” example. 
The easiest way to start Stratosphere on your local machine is so-called "local-mode":
61 62 63 64 65 66 67 68 69

	./bin/start-local.sh

Get some test data:

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

Start the job:

R
Robert Metzger 已提交
70
	./bin/pact-client.sh run --jarfile ./examples/pact/pact-examples-0.4-ozone-SNAPSHOT-WordCount.jar --arguments 1 file://`pwd`/hamlet.txt file://`pwd`/wordcount-result.txt
71

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

K
ktzoumas 已提交
74 75
#### Alternative Method: Use the PACT web interface
(And get a nice execution plan overview for free!)
76 77 78 79 80 81 82

	./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 已提交
83
* 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`.
84 85 86 87 88 89 90 91
* 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 已提交
92
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.
93

A
Aljoscha Krettek 已提交
94 95 96 97 98 99 100
If you want to work on the scala code you will need the following plugins:
  * scala-ide: http://download.scala-ide.org/sdk/e38/scala210/stable/site
  * m2eclipse-scala: http://alchim31.free.fr/m2e-scala/update-site
  * build-helper-maven-plugin: https://repository.sonatype.org/content/repositories/forge-sites/m2e-extras/0.15.0/N/0.15.0.201206251206/

When you don't have the plugins your project will have build errors, you can just close the scala projects and ignore them.

101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
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!

144
[Open an issue](https://github.com/stratosphere/stratosphere/issues/new) on Github, if you found a bug or need any help.
R
Robert Metzger 已提交
145
We also have a [mailing list](https://groups.google.com/d/forum/stratosphere-dev) for both users and developers.
146

R
Robert Metzger 已提交
147
Some of our colleagues are also in the #dima irc channel on freenode.
148 149 150

## Documentation

151
There is our (old) [official Wiki](https://stratosphere.eu/wiki/doku).
152
We are in the progress of migrating it to the [GitHub Wiki](https://github.com/stratosphere/stratosphere/wiki/_pages)
153

154
Please make edits to the Wiki if you find inconsistencies or [Open an issue](https://github.com/stratosphere/stratosphere/issues/new) 
155

156 157 158 159

## 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. 
R
Robert Metzger 已提交
160
Contact us if you are looking for implementation tasks that fit your skills.
161

R
Robert Metzger 已提交
162
We use the GitHub Pull Request system for the development of Stratosphere. Just open a request if you want to contribute.
163 164 165 166 167

### What to contribute
* Bug reports
* Bug fixes
* Documentation
K
ktzoumas 已提交
168 169
* Tools that ease the use and development of Stratosphere
* Well-written Stratosphere jobs
170 171


K
ktzoumas 已提交
172
Let us know if you have created a system that uses Stratosphere, so that we can link to you.
173

R
Robert Metzger 已提交
174
## About
175

R
Robert Metzger 已提交
176 177 178 179 180
[Stratosphere](www.stratosphere.eu) is a DFG-founded research project. Ozone is the codename of the latest Stratosphere distribution. 
We combine cutting edge research outcomes with a stable and usable codebase.
Decisions are not made behind closed doors. We discuss all changes and plans on our Mailinglists and on GitHub.


181
Build Status: [![Build Status](https://travis-ci.org/stratosphere/stratosphere.png)](https://travis-ci.org/stratosphere/stratosphere)
182 183 184 185 186