Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLINK-6393] [gelly] Add Evenly Graph Generator to Flink Gelly #3788

Closed
wants to merge 6 commits into from

Conversation

fanzhidongyzby
Copy link
Contributor

@fanzhidongyzby fanzhidongyzby commented Apr 27, 2017

Thanks for contributing to Apache Flink. Before you open your pull request, please take the following check list into consideration.
If your changes take all of the items into account, feel free to open your pull request. For more information and/or questions please refer to the How To Contribute guide.
In addition to going through the list, please provide a meaningful description of your changes.

  • General

    • The pull request references the related JIRA issue ("[FLINK-XXX] Jira title text")
    • The pull request addresses only one issue
    • Each commit in the PR has a meaningful commit message (including the JIRA id)
  • Documentation

    • Documentation has been added for new functionality
    • Old documentation affected by the pull request has been updated
    • JavaDoc for public methods has been added
  • Tests & Build

    • Functionality added by the pull request is covered by tests
    • mvn clean verify has been executed successfully locally or a Travis build has passed

Evenly graph means every vertex in the graph has the same degree, so the graph can be treated as evenly due to all the edges in the graph are distributed evenly. when vertex degree is 0, an empty graph will be generated. when vertex degree is vertex count - 1, complete graph will be generated.

The core idea is based on the concept of central symmetry. From the view of any vertex in the graph, the other vertices and edges are the same. So in the intermediate cases, edges are created from one vertex to the opposite vertex(if exists) and vertices on both sides of it.

/**
* Evenly graph means every {@link Vertex} in the {@link Graph} has the same degree.
* when vertex degree is 0, {@link EmptyGraph} will be generated.
* when vertex degree is vertex count - 1, {@link CompleteGraph} will be generated.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vertex count - 1 is confused. Can you change the description more clearly?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vertex count - 1 means the degree of every vertex when evenly graph is complete graph, is this clear?

@gallenvara
Copy link
Contributor

@fanzhidongyzby , thanks for the pr. Just a minor comment, mostly looks good to me.

@greghogan
Copy link
Contributor

@fanzhidongyzby, what do you think about generalizing this to the CirculantGraph? The graph could be initialized with a vertex count and the configured with one or more ranges. Each range would be an offset and a length.

@fanzhidongyzby
Copy link
Contributor Author

@greghogan , I'm preparing to implement CirculantGraph , and rewrite EmptyGraph, CompleteGraph and EvenlyGraph with CirculantGraph, is this ok ?

@greghogan
Copy link
Contributor

@fanzhidongyzby that sounds good except I would leave the EmptyGraph as it is. In addition we'll want to add the new generators as driver inputs in flink-gelly-examples, add to the list of inputs in Runner, and add a test each to EdgeListITCase (run the test to compute the checksum to create the test string).

Also, on the graph name, without a reference to the literature, perhaps this could be something invoking the idea that vertices are connected by length-1 paths to "far" vertices, by length-2 paths to "near" vertices, by length-3 paths to "far" vertices, etc. Something like EchoGraph.

tillrohrmann and others added 5 commits April 30, 2017 17:43
The problem is that we don't wait until the JobManager becomes the leader. Due to this,
the sent RegisterTaskManager messages might get dropped.

This PR fixes the problem by waiting on the completion of the NotifyWhenLeader message.
And also the same bug in WindowOperatorMigrationTest
@fanzhidongyzby
Copy link
Contributor Author

Hi, @greghogan , this pull request was closed unexpectedly by myself, please go to new pull request recreated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants