[
https://issues.apache.org/jira/browse/FLINK-6382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15989535#comment-15989535
]
ASF GitHub Bot commented on FLINK-6382:
---------------------------------------
Github user greghogan commented on a diff in the pull request:
https://github.com/apache/flink/pull/3779#discussion_r114030564
--- Diff:
flink-libraries/flink-gelly-examples/src/main/java/org/apache/flink/graph/drivers/input/GridGraph.java
---
@@ -82,11 +81,27 @@ public void configure(ParameterTool parameterTool)
throws ProgramParametrization
@Override
public String getIdentity() {
- return getName() + " (" + dimensions + ")";
+ return getTypeName() + " " + getName() + " (" + dimensions +
")";
}
@Override
- public Graph<LongValue, NullValue, NullValue>
create(ExecutionEnvironment env) {
+ protected long vertexCount() {
+ // in Java 8 use Math.multiplyExact(long, long)
--- End diff --
Rather than the current implementation using `BigInteger`, Java 8's
`Math.multiplyExact` detects and throws an exception on overflow. I was noting
for the future when the Flink codebase targets Java 8.
> Support all numeric types for generated graphs in Gelly examples
> ----------------------------------------------------------------
>
> Key: FLINK-6382
> URL: https://issues.apache.org/jira/browse/FLINK-6382
> Project: Flink
> Issue Type: Improvement
> Components: Gelly
> Affects Versions: 1.3.0
> Reporter: Greg Hogan
> Assignee: Greg Hogan
> Priority: Minor
> Fix For: 1.3.0
>
>
> The Gelly examples current support {{IntValue}}, {{LongValue}}, and
> {{StringValue}} for {{RMatGraph}}. Allow transformations and tests for all
> generated graphs for {{ByteValue}}, {{Byte}}, {{ShortValue}}, {{Short}},
> {{CharValue}}, {{Character}}, {{Integer}}, {{Long}}, and {{String}}.
> This is additionally of interest for benchmarking and testing modifications
> to Flink's internal sort.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)