[GitHub] flink pull request: [FLINK-2150][gelly] Added library method for a...

2015-06-22 Thread thvasilo
Github user thvasilo commented on the pull request: https://github.com/apache/flink/pull/801#issuecomment-114132214 Hello, wondering what the status is on this PR --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your pr

[GitHub] flink pull request: [FLINK-2150][gelly] Added library method for a...

2015-06-10 Thread tillrohrmann
Github user tillrohrmann commented on the pull request: https://github.com/apache/flink/pull/801#issuecomment-110656116 +1 as well. On Wed, Jun 10, 2015 at 10:38 AM Fabian Hueske wrote: > +1 for adding both methods in a utility class as suggested in FLINK-2152.

[GitHub] flink pull request: [FLINK-2150][gelly] Added library method for a...

2015-06-10 Thread fhueske
Github user fhueske commented on the pull request: https://github.com/apache/flink/pull/801#issuecomment-110655024 +1 for adding both methods in a utility class as suggested in FLINK-2152. --- If your project is set up for it, you can reply to this email and have your reply appear on

[GitHub] flink pull request: [FLINK-2150][gelly] Added library method for a...

2015-06-10 Thread fhueske
Github user fhueske commented on the pull request: https://github.com/apache/flink/pull/801#issuecomment-110654447 I agree, it makes sense to offer that externally. There is a JIRA for zipWithIndex (FLINK-2152). zipWithUniqueID could be added correspondingly. --- If your project

[GitHub] flink pull request: [FLINK-2150][gelly] Added library method for a...

2015-06-10 Thread tillrohrmann
Github user tillrohrmann commented on the pull request: https://github.com/apache/flink/pull/801#issuecomment-110653949 If I'm not mistaken then something like ``` int log2(long value){ if(value & 0x > 0) { 64 - Integer.numberOfLeadingZeros((int)(v

[GitHub] flink pull request: [FLINK-2150][gelly] Added library method for a...

2015-06-10 Thread andralungu
Github user andralungu commented on the pull request: https://github.com/apache/flink/pull/801#issuecomment-110647258 Hi @tillrohrmann , For the log2 part, you mean something like this: ceil(log2(x)) = 32 - numberOfLeadingZeros(x - 1)? 32 because it's int, in this case it shou

[GitHub] flink pull request: [FLINK-2150][gelly] Added library method for a...

2015-06-10 Thread tillrohrmann
Github user tillrohrmann commented on the pull request: https://github.com/apache/flink/pull/801#issuecomment-110645638 Why only offering this method for Gelly? Can't we generalize the index algorithm for generic types? It could also be useful for the ML library, for example. I'm thin

[GitHub] flink pull request: [FLINK-2150][gelly] Added library method for a...

2015-06-10 Thread tillrohrmann
Github user tillrohrmann commented on a diff in the pull request: https://github.com/apache/flink/pull/801#discussion_r32096127 --- Diff: flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/library/UniqueLabelAssignmentAlgorithm.java --- @@ -0,0 +1,101 @@ +/* +

[GitHub] flink pull request: [FLINK-2150][gelly] Added library method for a...

2015-06-10 Thread tillrohrmann
Github user tillrohrmann commented on a diff in the pull request: https://github.com/apache/flink/pull/801#discussion_r32096112 --- Diff: flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/library/UniqueLabelAssignmentAlgorithm.java --- @@ -0,0 +1,101 @@ +/* +

[GitHub] flink pull request: [FLINK-2150][gelly] Added library method for a...

2015-06-10 Thread andralungu
Github user andralungu commented on the pull request: https://github.com/apache/flink/pull/801#issuecomment-110642404 Ooops! My bad. Fixed the log and the ceil issue in the latest update. --- If your project is set up for it, you can reply to this email and have your reply appear on G

[GitHub] flink pull request: [FLINK-2150][gelly] Added library method for a...

2015-06-09 Thread andralungu
Github user andralungu commented on the pull request: https://github.com/apache/flink/pull/801#issuecomment-110520392 I think I got it! Have a look now :) --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project do

[GitHub] flink pull request: [FLINK-2150][gelly] Added library method for a...

2015-06-09 Thread fhueske
Github user fhueske commented on a diff in the pull request: https://github.com/apache/flink/pull/801#discussion_r32067943 --- Diff: flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/library/UniqueLabelAssignmentAlgorithm.java --- @@ -0,0 +1,92 @@ +/* + * Lice

[GitHub] flink pull request: [FLINK-2150][gelly] Added library method for a...

2015-06-09 Thread fhueske
Github user fhueske commented on a diff in the pull request: https://github.com/apache/flink/pull/801#discussion_r32067705 --- Diff: flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/library/UniqueLabelAssignmentAlgorithm.java --- @@ -0,0 +1,92 @@ +/* + * Lice

[GitHub] flink pull request: [FLINK-2150][gelly] Added library method for a...

2015-06-09 Thread fhueske
Github user fhueske commented on the pull request: https://github.com/apache/flink/pull/801#issuecomment-110511102 If you reserve 2 bytes of a long for the task id you have 6 bytes left for the counter. This gives you 2^16 partitions, with 2^48 elements per partition. You can also use

[GitHub] flink pull request: [FLINK-2150][gelly] Added library method for a...

2015-06-09 Thread andralungu
Github user andralungu commented on the pull request: https://github.com/apache/flink/pull/801#issuecomment-110502315 Hi @fhueske , To tell the truth, I was a bit reserved regarding your approach, so maybe we can discuss it a bit further! :) I updated the PR to contain what I

[GitHub] flink pull request: [FLINK-2150][gelly] Added library method for a...

2015-06-09 Thread fhueske
Github user fhueske commented on the pull request: https://github.com/apache/flink/pull/801#issuecomment-110276236 Hi Andra, you approach basically follows @rmetzger 's suggestion which is necessary if you need sequential IDs. However, it comes at the cost of doing two passes

[GitHub] flink pull request: [FLINK-2150][gelly] Added library method for a...

2015-06-07 Thread andralungu
GitHub user andralungu opened a pull request: https://github.com/apache/flink/pull/801 [FLINK-2150][gelly] Added library method for assigning unique labels to vertices This PR adds a library method that assigns unique labels to vertices. The following facts are used: * a m