blob: 995fd5bd952f615bccf28b7b358a98e970ca35dd [file] [log] [blame] [view]
---
layout: post
title: 'Stratosphere Version 0.4 Migration Guide'
date: 2014-01-12 19:57:18
categories: news
---
This guide is intended to help users of previous Stratosphere versions to migrate their programs to the new API of v0.4.
Version `0.4-rc1`, `0.4` and all newer versions have the new API. If you want to have the most recent version before the code change, please set the version to `0.4-alpha.3-SNAPSHOT`. (Note that the `0.4-alpha` versions are only available in the snapshot repository).
#### Maven Dependencies
Since we also reorganized the Maven project structure, existing programs need to update the Maven dependencies to `stratosphere-java` (and `stratosphere-clients`, for examples and executors).
The typical set of Maven dependencies for Stratosphere Java programs is:
```diff
<groupId>eu.stratosphere</groupId>
- <artifactId>pact-common</artifactId>
- <version>0.4-SNAPSHOT</version>
+ <artifactId>stratosphere-java</artifactId>
+ <version>0.4</version>
- <artifactId>pact-clients</artifactId>
- <version>0.4-SNAPSHOT</version>
+ <artifactId>stratosphere-clients</artifactId>
+ <version>0.4</version>
```
#### Renamed classes
We renamed many of the most commonly used classes to make their names more intuitive:
<table class="table table-striped">
<thead>
<tr>
<th>Old Name (before <code>0.4</code>)</th>
<th>New Name (<code>0.4</code> and after)</th>
</tr>
</thead>
<tbody>
<tr>
<td>Contract</td>
<td>Operator</td>
</tr>
<tr>
<td>MatchContract</td>
<td>JoinOperator</td>
</tr>
<tr>
<td>[Map, Reduce, ...]Stub</td>
<td>[Map, Reduce, ...]Function</td>
</tr>
<tr>
<td>MatchStub</td>
<td>JoinFunction</td>
</tr>
<tr>
<td>Pact[Integer, Double, ...]</td>
<td>IntValue, DoubleValue, ...</td>
</tr>
<tr>
<td>PactRecord</td>
<td>Record</td>
</tr>
<tr>
<td>PlanAssembler</td>
<td>Program</td>
</tr>
<tr>
<td>PlanAssemblerDescription</td>
<td>ProgramDescription</td>
</tr>
<tr>
<td>RecordOutputFormat</td>
<td>CsvOutputFormat</td>
</tr>
</tbody>
</table>
Package names have been adapted as well.
For a complete overview of the renamings, have a look at [issue #257 on GitHub](https://github.com/stratosphere/stratosphere/issues/257).
We suggest for Eclipse user adjust the programs as follows: Delete all old Stratosphere imports, then rename the the classes (`PactRecord` to `Record` and so on). Finally, use the Organize Imports function (`CTRL+SHIFT+O`) to choose the right imports. The names should be unique so always pick the classes that are in the `eu.stratosphere` package.
Please contact us in the comments below, on the mailing list or on GitHub if you have any issues migrating to the latest Stratosphere release.