GitHub user kennknowles opened a pull request:
https://github.com/apache/beam/pull/1990
[BEAM-1347,BEAM-1348] Use strings for ids in Fn API
Be sure to do all of the following to help us incorporate your contribution
quickly and easily:
- [x] Make sure the PR title is formatted like:
`[BEAM-<Jira issue #>] Description of pull request`
- [x] Make sure tests pass via `mvn clean verify`. (Even better, enable
Travis-CI on your fork and ensure the whole test matrix passes).
- [x] Replace `<Jira issue #>` in the title with the actual Jira issue
number, if there is one.
- [x] If this contribution is large, please file an Apache
[Individual Contributor License
Agreement](https://www.apache.org/licenses/icla.txt).
---
Currently the Fn API uses 64 bit integers pervasively for identifiers. This
is acceptable for performance-sensitive locations if it is known that
performance is improved.
The Runner API uses strings for identifiers, which is consistent with proto
best practices for extensibility and usability. And in the Runner API these two
factors trump performance, since it has negligibly low throughput requirements.
Since the Fn API must transition to `FunctionSpec` and `Coder` from the
Runner API (largely the same, but more fleshed out) and we desire to also share
`GraphNode`, I have done the brain-dead automated thing to convert the
identifiers to strings.
In the Runner API many of these identifiers disappear anyhow, but
conflating the unification of the APIs with this conversion got a bit out of
hand, so I'd like to do this first.
I would like feedback from those more familiar with the harness about where
this is known to be a performance bottleneck.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/kennknowles/beam fn-api-string-ids
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/beam/pull/1990.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1990
----
commit 54c1a9e1583e99a01167cbf605043e3139798870
Author: Kenneth Knowles <[email protected]>
Date: 2017-02-13T06:23:32Z
Use strings for ids in Fn API
----
---
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 does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---