提交 38a35c4a 编写于 作者: S StephanEwen

Cleaned up connected components example and tests.

上级 7e3b9122
......@@ -28,7 +28,7 @@ import eu.stratosphere.pact.compiler.plan.candidate.SourcePlanNode;
import eu.stratosphere.pact.compiler.plan.candidate.WorksetIterationPlanNode;
import eu.stratosphere.pact.compiler.plandump.PlanJSONDumpGenerator;
import eu.stratosphere.pact.compiler.plantranslate.NepheleJobGraphGenerator;
import eu.stratosphere.pact.example.iterative.CoGroupConnectedComponents;
import eu.stratosphere.pact.example.connectedcomponents.WorksetConnectedComponentsWithCoGroup;
import eu.stratosphere.pact.runtime.shipping.ShipStrategyType;
import eu.stratosphere.pact.runtime.task.DriverStrategy;
import eu.stratosphere.pact.runtime.task.util.LocalStrategy;
......@@ -36,7 +36,7 @@ import eu.stratosphere.pact.runtime.task.util.LocalStrategy;
/**
*
*/
public class CoGroupConnectedComponentsTest extends CompilerTestBase {
public class WorksetConnectedComponentsCoGroupTest extends CompilerTestBase {
private static final String VERTEX_SOURCE = "Vertices";
......@@ -55,7 +55,7 @@ public class CoGroupConnectedComponentsTest extends CompilerTestBase {
@Test
public void testWorksetConnectedComponents() {
CoGroupConnectedComponents cc = new CoGroupConnectedComponents();
WorksetConnectedComponentsWithCoGroup cc = new WorksetConnectedComponentsWithCoGroup();
Plan plan = cc.getPlan(String.valueOf(DEFAULT_PARALLELISM),
IN_FILE, IN_FILE, OUT_FILE, String.valueOf(100));
......
......@@ -29,7 +29,7 @@ import eu.stratosphere.pact.compiler.plan.candidate.SourcePlanNode;
import eu.stratosphere.pact.compiler.plan.candidate.WorksetIterationPlanNode;
import eu.stratosphere.pact.compiler.plandump.PlanJSONDumpGenerator;
import eu.stratosphere.pact.compiler.plantranslate.NepheleJobGraphGenerator;
import eu.stratosphere.pact.example.iterative.WorksetConnectedComponents;
import eu.stratosphere.pact.example.connectedcomponents.WorksetConnectedComponents;
import eu.stratosphere.pact.runtime.shipping.ShipStrategyType;
import eu.stratosphere.pact.runtime.task.DriverStrategy;
import eu.stratosphere.pact.runtime.task.util.LocalStrategy;
......@@ -37,7 +37,7 @@ import eu.stratosphere.pact.runtime.task.util.LocalStrategy;
/**
*
*/
public class IncrementalConnectedComponentsTest extends CompilerTestBase {
public class WorksetConnectedComponentsTest extends CompilerTestBase {
private static final String VERTEX_SOURCE = "Vertices";
......
......@@ -23,7 +23,7 @@ import org.junit.Test;
import eu.stratosphere.pact.common.plan.Plan;
import eu.stratosphere.pact.compiler.CompilerTestBase;
import eu.stratosphere.pact.compiler.plan.candidate.OptimizedPlan;
import eu.stratosphere.pact.example.iterative.WorksetConnectedComponents;
import eu.stratosphere.pact.example.connectedcomponents.WorksetConnectedComponents;
import eu.stratosphere.pact.example.kmeans.KMeansIterative;
import eu.stratosphere.pact.example.kmeans.KMeansSingleStep;
import eu.stratosphere.pact.example.relational.TPCHQuery3;
......
......@@ -25,7 +25,7 @@ import org.junit.Test;
import eu.stratosphere.pact.common.plan.Plan;
import eu.stratosphere.pact.compiler.PactCompiler;
import eu.stratosphere.pact.compiler.plan.DataSinkNode;
import eu.stratosphere.pact.example.iterative.WorksetConnectedComponents;
import eu.stratosphere.pact.example.connectedcomponents.WorksetConnectedComponents;
import eu.stratosphere.pact.example.kmeans.KMeansIterative;
import eu.stratosphere.pact.example.kmeans.KMeansSingleStep;
import eu.stratosphere.pact.example.relational.TPCHQuery3;
......
......@@ -40,6 +40,28 @@
<version>2.4</version>
<executions>
<!-- Connected Components -->
<execution>
<id>ConnectedComponents</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>ConnectedComponents</classifier>
<archive>
<manifestEntries>
<Pact-Assembler-Class>eu.stratosphere.pact.example.connectedcomponents.WorksetConnectedComponents</Pact-Assembler-Class>
</manifestEntries>
</archive>
<includes>
<include>**/connectedcomponents/*.class</include>
</includes>
</configuration>
</execution>
<!-- DanglingPageRank -->
<execution>
<id>DanglingPageRank</id>
......
......@@ -13,7 +13,7 @@
*
**********************************************************************************************************************/
package eu.stratosphere.pact.example.iterative;
package eu.stratosphere.pact.example.connectedcomponents;
import eu.stratosphere.pact.common.io.TextInputFormat;
import eu.stratosphere.pact.common.type.PactRecord;
......
......@@ -13,7 +13,7 @@
*
**********************************************************************************************************************/
package eu.stratosphere.pact.example.iterative;
package eu.stratosphere.pact.example.connectedcomponents;
import eu.stratosphere.pact.common.io.TextInputFormat;
import eu.stratosphere.pact.common.type.PactRecord;
......
......@@ -13,7 +13,7 @@
*
**********************************************************************************************************************/
package eu.stratosphere.pact.example.iterative;
package eu.stratosphere.pact.example.connectedcomponents;
import java.util.Iterator;
......
......@@ -13,7 +13,7 @@
*
**********************************************************************************************************************/
package eu.stratosphere.pact.example.iterative;
package eu.stratosphere.pact.example.connectedcomponents;
import java.util.Iterator;
......@@ -32,14 +32,14 @@ import eu.stratosphere.pact.common.stubs.StubAnnotation.ConstantFieldsFirst;
import eu.stratosphere.pact.common.stubs.StubAnnotation.ConstantFieldsSecond;
import eu.stratosphere.pact.common.type.PactRecord;
import eu.stratosphere.pact.common.type.base.PactLong;
import eu.stratosphere.pact.example.iterative.DuplicateLongInputFormat;
import eu.stratosphere.pact.example.iterative.LongLongInputFormat;
import eu.stratosphere.pact.example.connectedcomponents.DuplicateLongInputFormat;
import eu.stratosphere.pact.example.connectedcomponents.LongLongInputFormat;
import eu.stratosphere.pact.generic.contract.WorksetIteration;
/**
*
*/
public class CoGroupConnectedComponents implements PlanAssembler, PlanAssemblerDescription {
public class WorksetConnectedComponentsWithCoGroup implements PlanAssembler, PlanAssemblerDescription {
public static final class NeighborWithComponentIDJoin extends MatchStub {
......
......@@ -24,7 +24,7 @@ import org.junit.runners.Parameterized.Parameters;
import eu.stratosphere.nephele.configuration.Configuration;
import eu.stratosphere.pact.common.plan.Plan;
import eu.stratosphere.pact.example.iterative.CoGroupConnectedComponents;
import eu.stratosphere.pact.example.connectedcomponents.WorksetConnectedComponentsWithCoGroup;
import eu.stratosphere.pact.test.iterative.nephele.ConnectedComponentsNepheleITCase;
import eu.stratosphere.pact.test.util.TestBase2;
......@@ -60,7 +60,7 @@ public class CoGroupConnectedComponentsITCase extends TestBase2 {
int maxIterations = config.getInteger("ConnectedComponents#NumIterations", 1);
String[] params = { String.valueOf(dop) , verticesPath, edgesPath, resultPath, String.valueOf(maxIterations) };
CoGroupConnectedComponents cc = new CoGroupConnectedComponents();
WorksetConnectedComponentsWithCoGroup cc = new WorksetConnectedComponentsWithCoGroup();
return cc.getPlan(params);
}
......
......@@ -24,7 +24,7 @@ import org.junit.runners.Parameterized.Parameters;
import eu.stratosphere.nephele.configuration.Configuration;
import eu.stratosphere.pact.common.plan.Plan;
import eu.stratosphere.pact.example.iterative.WorksetConnectedComponents;
import eu.stratosphere.pact.example.connectedcomponents.WorksetConnectedComponents;
import eu.stratosphere.pact.test.iterative.nephele.ConnectedComponentsNepheleITCase;
import eu.stratosphere.pact.test.util.TestBase2;
......
......@@ -43,9 +43,9 @@ import eu.stratosphere.pact.common.stubs.aggregators.LongSumAggregator;
import eu.stratosphere.pact.common.type.PactRecord;
import eu.stratosphere.pact.common.type.base.PactLong;
import eu.stratosphere.pact.common.type.base.parser.DecimalTextLongParser;
import eu.stratosphere.pact.example.iterative.WorksetConnectedComponents.MinimumComponentIDReduce;
import eu.stratosphere.pact.example.iterative.WorksetConnectedComponents.NeighborWithComponentIDJoin;
import eu.stratosphere.pact.example.iterative.WorksetConnectedComponents.UpdateComponentIdMatch;
import eu.stratosphere.pact.example.connectedcomponents.WorksetConnectedComponents.MinimumComponentIDReduce;
import eu.stratosphere.pact.example.connectedcomponents.WorksetConnectedComponents.NeighborWithComponentIDJoin;
import eu.stratosphere.pact.example.connectedcomponents.WorksetConnectedComponents.UpdateComponentIdMatch;
import eu.stratosphere.pact.generic.types.TypeComparatorFactory;
import eu.stratosphere.pact.generic.types.TypePairComparatorFactory;
import eu.stratosphere.pact.generic.types.TypeSerializerFactory;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册