Skip to content

[BEAM-3287] Use model pipelines in Go SDK#4213

Merged
kennknowles merged 5 commits intoapache:go-sdkfrom
herohde:translate
Dec 12, 2017
Merged

[BEAM-3287] Use model pipelines in Go SDK#4213
kennknowles merged 5 commits intoapache:go-sdkfrom
herohde:translate

Conversation

@herohde
Copy link
Copy Markdown
Contributor

@herohde herohde commented Dec 5, 2017

  • Replace existing harness bundle translation.
  • Also stage model pipeline for Dataflow.

@herohde
Copy link
Copy Markdown
Contributor Author

herohde commented Dec 5, 2017

R: @wcn3 @lostluck

Copy link
Copy Markdown
Contributor

@lostluck lostluck left a comment

Choose a reason for hiding this comment

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

I clearly have a bunch to say :P. This is as far as I've currently got time for.

}

// Compute the input/output for this scope:
// inputs := U(input)\U(outputs)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

U for "union"? It took me longer than necessary to figure that out. The \ is for intersection?
I'm not sure what the difference is between the singular input and output from the outputs and the inputs, and it seems that we're recomputing them?


// TODO(herohde) 11/6/2017: move some of the configuration into the graph during construction.

// Options
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Options for... ?


// SDK constants

urnDoFn = "urn:beam:dofn:javasdk:0.1" // TODO: use "urn:beam:go:transform:dofn:v1"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Consider commenting under which circumstances the change would be made. It's not clear to a reader why one wouldn't just use this now.

const (
// Model constants

urnImpulse = "urn:beam:transform:impulse:v1" // to appear?
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

rm " // to appear?" It doesn't add anything meaningful to the reader, let alone suggest anything that would need to change if it has or has not been implemented in the model.

Instead link/reference to the appropriate Jira proposal if it's only that far in.
Otherwise it's not worth calling attention to it.

return id
}

var sub []string
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

sub is a list of edges? I don't know what the sub list is for from the context though, substituting? subtraction? sublimation?

Copy link
Copy Markdown
Contributor Author

@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.

Thanks. PTAL

return id
}

var sub []string
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

lostluck wrote:
sub is a list of edges? I don't know what the sub list is for from the context though, substituting? subtraction? sublimation?

Changed to subtransforms.

}

// Compute the input/output for this scope:
// inputs := U(input)\U(outputs)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

lostluck wrote:
U for "union"? It took me longer than necessary to figure that out. The \ is for intersection?
I'm not sure what the difference is between the singular input and output from the outputs and the inputs, and it seems that we're recomputing them?

Updated the comment. We're not recomputing them, just converting them to a map to support the set operations more easily.

const (
// Model constants

urnImpulse = "urn:beam:transform:impulse:v1" // to appear?
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

lostluck wrote:
rm " // to appear?" It doesn't add anything meaningful to the reader, let alone suggest anything that would need to change if it has or has not been implemented in the model.

Instead link/reference to the appropriate Jira proposal if it's only that far in.
Otherwise it's not worth calling attention to it.

Done.


// SDK constants

urnDoFn = "urn:beam:dofn:javasdk:0.1" // TODO: use "urn:beam:go:transform:dofn:v1"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

lostluck wrote:
Consider commenting under which circumstances the change would be made. It's not clear to a reader why one wouldn't just use this now.

Done.


// TODO(herohde) 11/6/2017: move some of the configuration into the graph during construction.

// Options
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

lostluck wrote:
Options for... ?

Done.

return e.id
}

// Name returns a not-necessarily-unique name for the edge.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It's not clear to me as a user of this API what I'm supposed to do with this info.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Know that the name isn't unique, which is a requirement in various contexts. The tree.go code precisely helps make these transform names unique.


// ScopeTree is a convenient representation of the Scope-structure as a tree.
// Each ScopeTree may also be a subtree of another ScopeTree. The tree structure
// must respect the underlying Scope structure, i.e., if Scope 'a' has a parent
Copy link
Copy Markdown
Contributor

@wcn3 wcn3 Dec 11, 2017

Choose a reason for hiding this comment

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

The tree structure respects the underlying... This is describing a property of treeStructure, but the "must respect" makes it sound like it's requirement on the user of this API.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed "must".

@herohde
Copy link
Copy Markdown
Contributor Author

herohde commented Dec 11, 2017

Thanks!

@herohde
Copy link
Copy Markdown
Contributor Author

herohde commented Dec 11, 2017

R: @kennknowles (merge)

@kennknowles
Copy link
Copy Markdown
Member

Great. And the irrelevant Java failure appears to be beam8 rebooting.

@kennknowles kennknowles merged commit 92883b2 into apache:go-sdk Dec 12, 2017
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.

4 participants