Skip to content

Commit

Permalink
Rename Pregelsphere to Spargel
Browse files Browse the repository at this point in the history
  • Loading branch information
uce authored and StephanEwen committed Dec 7, 2013
1 parent 6a18692 commit 696c8fe
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 37 deletions.
6 changes: 2 additions & 4 deletions stratosphere-addons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,9 @@
<modules>
<module>pact-array-datamodel</module>
<!-- To come here: hbase-simple, jdbc, sequenceFile, avro -->
<module>stratosphere-jdbc</module>
<module>pregelsphere</module>
<module>stratosphere-jdbc</module>
<module>spargel</module>
</modules>



<!-- See main pom.xml for explanation of profiles -->
<profiles>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<relativePath>..</relativePath>
</parent>

<artifactId>pregelsphere</artifactId>
<name>pregelsphere</name>
<artifactId>spargel</artifactId>
<name>spargel</name>

<packaging>jar</packaging>

Expand All @@ -28,5 +28,4 @@
<version>${project.version}</version>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* specific language governing permissions and limitations under the License.
*
**********************************************************************************************************************/
package eu.stratosphere.pact.vertexcentric;
package eu.stratosphere.spargel.java;


import eu.stratosphere.pact.common.type.Key;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* specific language governing permissions and limitations under the License.
*
**********************************************************************************************************************/
package eu.stratosphere.pact.vertexcentric;
package eu.stratosphere.spargel.java;

import java.io.Serializable;
import java.util.Iterator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* specific language governing permissions and limitations under the License.
*
**********************************************************************************************************************/
package eu.stratosphere.pact.vertexcentric;
package eu.stratosphere.spargel.java;

import java.io.IOException;
import java.util.Iterator;
Expand All @@ -29,10 +29,10 @@
import eu.stratosphere.pact.common.util.ReflectionUtil;
import eu.stratosphere.pact.generic.contract.Contract;
import eu.stratosphere.pact.generic.contract.WorksetIteration;
import eu.stratosphere.pact.vertexcentric.util.MessageIterator;
import eu.stratosphere.spargel.java.util.MessageIterator;


public class VertexCentricIteration {
public class SpargelIteration {

private static final String DEFAULT_NAME = "<unnamed vertex-centric iteration>";

Expand All @@ -50,16 +50,16 @@ public class VertexCentricIteration {
// ----------------------------------------------------------------------------------

public <VertexKey extends Key, VertexValue extends Value, Message extends Value, EdgeValue extends Value>
VertexCentricIteration(MessagingFunction<VertexKey, VertexValue, Message, EdgeValue> mf,
VertexUpdateFunction<VertexKey, VertexValue, Message> uf)
SpargelIteration(MessagingFunction<VertexKey, VertexValue, Message, EdgeValue> mf,
VertexUpdateFunction<VertexKey, VertexValue, Message> uf)
{
this(mf, uf, DEFAULT_NAME);
}

public <VertexKey extends Key, VertexValue extends Value, Message extends Value, EdgeValue extends Value>
VertexCentricIteration(MessagingFunction<VertexKey, VertexValue, Message, EdgeValue> mf,
VertexUpdateFunction<VertexKey, VertexValue, Message> uf,
String name)
SpargelIteration(MessagingFunction<VertexKey, VertexValue, Message, EdgeValue> mf,
VertexUpdateFunction<VertexKey, VertexValue, Message> uf,
String name)
{
// get the types
this.vertexKey = ReflectionUtil.getTemplateType1(mf.getClass());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* specific language governing permissions and limitations under the License.
*
**********************************************************************************************************************/
package eu.stratosphere.pact.vertexcentric;
package eu.stratosphere.spargel.java;

import java.io.Serializable;
import java.util.Iterator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
**********************************************************************************************************************/

package eu.stratosphere.pact.vertexcentric.examples.cc;
package eu.stratosphere.spargel.java.examples.connectedcomponents;

import eu.stratosphere.pact.common.io.TextInputFormat;
import eu.stratosphere.pact.common.type.PactRecord;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
**********************************************************************************************************************/

package eu.stratosphere.pact.vertexcentric.examples.cc;
package eu.stratosphere.spargel.java.examples.connectedcomponents;

import eu.stratosphere.pact.common.io.TextInputFormat;
import eu.stratosphere.pact.common.type.PactRecord;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* specific language governing permissions and limitations under the License.
*
**********************************************************************************************************************/
package eu.stratosphere.pact.vertexcentric.examples.cc;
package eu.stratosphere.spargel.java.examples.connectedcomponents;

import java.util.Iterator;

Expand All @@ -25,24 +25,23 @@
import eu.stratosphere.pact.common.plan.PlanAssemblerDescription;
import eu.stratosphere.pact.common.type.base.PactLong;
import eu.stratosphere.pact.common.type.base.PactNull;
import eu.stratosphere.pact.vertexcentric.MessagingFunction;
import eu.stratosphere.pact.vertexcentric.VertexCentricIteration;
import eu.stratosphere.pact.vertexcentric.VertexUpdateFunction;
import eu.stratosphere.spargel.java.MessagingFunction;
import eu.stratosphere.spargel.java.SpargelIteration;
import eu.stratosphere.spargel.java.VertexUpdateFunction;


public class VertexCentricCC implements PlanAssembler, PlanAssemblerDescription {
public class SpargelConnectedComponents implements PlanAssembler, PlanAssemblerDescription {

public static void main(String[] args) throws Exception {
LocalExecutor.execute(new VertexCentricCC(), args);
LocalExecutor.execute(new SpargelConnectedComponents(), args);
}

@Override
public Plan getPlan(String... args) {
final int dop = args.length > 0 ? Integer.parseInt(args[0]) : 1;
final String verticesPath = args.length > 1 ? args[1] : "file:https:///data/demodata/cc/vertices";
final String edgesPath = args.length > 2 ? args[2] : "file:https:///data/demodata/cc/edges";
final String resultPath = args.length > 3 ? args[3] : "file:https:///tmp";
final int maxIterations = args.length > 4 ? Integer.parseInt(args[4]) : 10;
final String verticesPath = args.length > 1 ? args[1] : "";
final String edgesPath = args.length > 2 ? args[2] : "";
final String resultPath = args.length > 3 ? args[3] : "";
final int maxIterations = args.length > 4 ? Integer.parseInt(args[4]) : 1;

FileDataSource initialVertices = new FileDataSource(DuplicateLongInputFormat.class, verticesPath, "Vertices");
FileDataSource edges = new FileDataSource(LongLongInputFormat.class, edgesPath, "Edges");
Expand All @@ -54,13 +53,13 @@ public Plan getPlan(String... args) {
.field(PactLong.class, 0)
.field(PactLong.class, 1);

VertexCentricIteration iteration = new VertexCentricIteration(
new CCMessager(), new CCUpdater(), "Connected Components Iteration.");
SpargelIteration iteration = new SpargelIteration(
new CCMessager(), new CCUpdater(), "Connected Components (Spargel API)");
iteration.setVertexInput(initialVertices);
iteration.setEdgesInput(edges);
iteration.setNumberOfIterations(maxIterations);
result.setInput(iteration.getOutput());

Plan p = new Plan(result);
p.setDefaultParallelism(dop);
return p;
Expand Down Expand Up @@ -92,12 +91,12 @@ public static final class CCMessager extends MessagingFunction<PactLong, PactLon
@Override
public void sendMessages(PactLong vertexId, PactLong componentId) {
sendMessageToAllTargets(componentId);
}
}

}

@Override
public String getDescription() {
return "<dop> <vertices> <edges> <result> <maxIterations>";
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* specific language governing permissions and limitations under the License.
*
**********************************************************************************************************************/
package eu.stratosphere.pact.vertexcentric.util;
package eu.stratosphere.spargel.java.util;

import java.util.Iterator;

Expand Down

0 comments on commit 696c8fe

Please sign in to comment.