[FLINK-1201] [gelly] added licence headers; added gelly to addons pom file; fixed checkstyle errors
Project: http://git-wip-us.apache.org/repos/asf/flink/repo Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/081de39b Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/081de39b Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/081de39b Branch: refs/heads/master Commit: 081de39b4053ea77b777864c966d34740ea36c1d Parents: 09d39ce Author: vasia <vasilikikala...@gmail.com> Authored: Sat Jan 24 23:22:57 2015 +0100 Committer: Stephan Ewen <se...@apache.org> Committed: Wed Feb 11 10:46:16 2015 +0100 ---------------------------------------------------------------------- flink-staging/flink-gelly/pom.xml | 55 + .../main/java/org/apache/flink/graph/Edge.java | 10 +- .../org/apache/flink/graph/EdgeDirection.java | 20 +- .../org/apache/flink/graph/EdgesFunction.java | 20 +- .../graph/EdgesFunctionWithVertexValue.java | 20 +- .../main/java/org/apache/flink/graph/Graph.java | 1239 +++++++++--------- .../org/apache/flink/graph/GraphAlgorithm.java | 25 +- .../apache/flink/graph/NeighborsFunction.java | 20 +- .../graph/NeighborsFunctionWithVertexValue.java | 20 +- .../java/org/apache/flink/graph/Vertex.java | 2 +- .../flink/graph/example/GraphMetrics.java | 41 +- .../graph/example/LabelPropagationExample.java | 113 +- .../flink/graph/example/MusicProfiles.java | 268 ++-- .../flink/graph/example/PageRankExample.java | 148 ++- .../SingleSourceShortestPathsExample.java | 64 +- .../utils/EdgeWithLongIdNullValueParser.java | 23 +- .../flink/graph/example/utils/ExampleUtils.java | 110 +- .../graph/example/utils/MusicProfilesData.java | 20 +- .../flink/graph/library/LabelPropagation.java | 115 +- .../apache/flink/graph/library/PageRank.java | 139 +- .../library/SingleSourceShortestPaths.java | 168 +-- .../org/apache/flink/graph/package-info.java | 4 - .../flink/graph/spargel/MessageIterator.java | 2 +- .../flink/graph/spargel/MessagingFunction.java | 5 +- .../graph/spargel/VertexCentricIteration.java | 11 +- .../graph/spargel/VertexUpdateFunction.java | 5 +- .../flink/graph/utils/EdgeToTuple3Map.java | 23 +- .../apache/flink/graph/utils/GraphUtils.java | 59 +- .../flink/graph/utils/Tuple2ToVertexMap.java | 23 +- .../flink/graph/utils/Tuple3ToEdgeMap.java | 23 +- .../flink/graph/utils/VertexToTuple2Map.java | 23 +- .../flink/graph/validation/GraphValidator.java | 32 +- .../validation/InvalidVertexIdsValidator.java | 126 +- .../apache/flink/graph/test/TestDegrees.java | 52 +- .../flink/graph/test/TestFromCollection.java | 34 +- .../flink/graph/test/TestGraphCreation.java | 38 +- .../graph/test/TestGraphCreationWithMapper.java | 32 +- .../flink/graph/test/TestGraphMutations.java | 41 +- .../flink/graph/test/TestGraphOperations.java | 45 +- .../apache/flink/graph/test/TestGraphUtils.java | 35 +- .../flink/graph/test/TestJoinWithEdges.java | 52 +- .../flink/graph/test/TestJoinWithVertices.java | 35 +- .../apache/flink/graph/test/TestMapEdges.java | 47 +- .../flink/graph/test/TestMapVertices.java | 47 +- .../org/apache/flink/graph/test/TestPGA.java | 122 -- .../graph/test/TestReduceOnEdgesMethods.java | 38 +- .../graph/test/TestReduceOnNeighborMethods.java | 38 +- .../TestVertexCentricConnectedComponents.java | 14 +- .../flink/graph/test/TestWeaklyConnected.java | 29 +- flink-staging/pom.xml | 1 + 50 files changed, 2182 insertions(+), 1494 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flink/blob/081de39b/flink-staging/flink-gelly/pom.xml ---------------------------------------------------------------------- diff --git a/flink-staging/flink-gelly/pom.xml b/flink-staging/flink-gelly/pom.xml new file mode 100644 index 0000000..af1fcb4 --- /dev/null +++ b/flink-staging/flink-gelly/pom.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.flink</groupId> + <artifactId>flink-staging</artifactId> + <version>0.9-SNAPSHOT</version> + <relativePath>..</relativePath> + </parent> + + <artifactId>flink-gelly</artifactId> + <name>flink-gelly</name> + + <packaging>jar</packaging> + + <dependencies> + <dependency> + <groupId>org.apache.flink</groupId> + <artifactId>flink-java</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.flink</groupId> + <artifactId>flink-clients</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.flink</groupId> + <artifactId>flink-test-utils</artifactId> + <version>${project.version}</version> + <scope>test</scope> + </dependency> + </dependencies> +</project> http://git-wip-us.apache.org/repos/asf/flink/blob/081de39b/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/Edge.java ---------------------------------------------------------------------- diff --git a/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/Edge.java b/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/Edge.java index 085d1af..40909b3 100644 --- a/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/Edge.java +++ b/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/Edge.java @@ -16,12 +16,20 @@ * limitations under the License. */ -package flink.graphs; +package org.apache.flink.graph; import java.io.Serializable; import org.apache.flink.api.java.tuple.Tuple3; +/** + * An Edge represents a link between two {@link Vertex vertices}, + * the source and the target and can carry an attached value. + * For edges with no value, use {@link org.apache.flink.types.NullValue} as the value type. + * + * @param <K> the key type for the sources and target vertices + * @param <V> the edge value type + */ public class Edge<K extends Comparable<K> & Serializable, V extends Serializable> extends Tuple3<K, K, V>{ http://git-wip-us.apache.org/repos/asf/flink/blob/081de39b/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/EdgeDirection.java ---------------------------------------------------------------------- diff --git a/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/EdgeDirection.java b/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/EdgeDirection.java index 5aa1615..7af547f 100644 --- a/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/EdgeDirection.java +++ b/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/EdgeDirection.java @@ -1,4 +1,22 @@ -package flink.graphs; +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.flink.graph; public enum EdgeDirection { IN, http://git-wip-us.apache.org/repos/asf/flink/blob/081de39b/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/EdgesFunction.java ---------------------------------------------------------------------- diff --git a/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/EdgesFunction.java b/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/EdgesFunction.java index 11b30fd..46c418d 100644 --- a/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/EdgesFunction.java +++ b/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/EdgesFunction.java @@ -1,4 +1,22 @@ -package flink.graphs; +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.flink.graph; import java.io.Serializable; http://git-wip-us.apache.org/repos/asf/flink/blob/081de39b/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/EdgesFunctionWithVertexValue.java ---------------------------------------------------------------------- diff --git a/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/EdgesFunctionWithVertexValue.java b/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/EdgesFunctionWithVertexValue.java index d50be0a..1b4cd88 100644 --- a/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/EdgesFunctionWithVertexValue.java +++ b/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/EdgesFunctionWithVertexValue.java @@ -1,4 +1,22 @@ -package flink.graphs; +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.flink.graph; import java.io.Serializable;