Skip to content

[BEAM-4276] Surface graph.Fn encoding functions.#5620

Merged
herohde merged 1 commit intoapache:masterfrom
lostluck:codefn
Jun 13, 2018
Merged

[BEAM-4276] Surface graph.Fn encoding functions.#5620
herohde merged 1 commit intoapache:masterfrom
lostluck:codefn

Conversation

@lostluck
Copy link
Contributor

@lostluck lostluck commented Jun 12, 2018

This surfaces encoding functions for the higher level *graph.Fn representations. This permits users to serialize them for other uses, such as prototyping within bundle precombines within a ParDo. Types & functions should still be registered with beam within the binary for deserialization to produce a sensible result.

@lostluck
Copy link
Contributor Author

R: @herohde

Oh that's exciting! gradle's correctly only running the Go Precommit :D

Copy link
Contributor

@herohde herohde left a comment

Choose a reason for hiding this comment

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

Is there a JIRA for what you're trying to do?

}

// EncodeGraphFn encodes a *graph.Fn as a string.
func EncodeGraphFn(u *graph.Fn) (string, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we not using these new helpers anywhere? The PR title suggests we're just making something existing public.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's related to Combiner Lifting, so I've used that jira tag.
Since it can help with writing a bundle level precombine, using existing combineFns, which is what I'm using it for at present, since the beam model/SDK doesn't yet support lifting combines through a CoGroupByKey. That's the root of it anyway. I like thinking of it as enabling the writing of MetaStructs.

The main goal is for me to avoid needing to write my precombine helper one way now and then re-writing later when there is official support for such a thing. If that feature does show up, I can simply use the same CombineFns over again.

Thanks!

@lostluck lostluck changed the title [Go SDK] Surface graph.Fn encoding functions. [BEAM-4276] Surface graph.Fn encoding functions. Jun 12, 2018
@lostluck
Copy link
Contributor Author

R: @herohde PTAL Comments addressed.

@herohde herohde merged commit 79697ed into apache:master Jun 13, 2018
@lostluck lostluck deleted the codefn branch January 23, 2019 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants