[
https://issues.apache.org/jira/browse/BEAM-1870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15955404#comment-15955404
]
Ismaël Mejía commented on BEAM-1870:
------------------------------------
I agree about removing protobuf from the public API, so removing the dependency
on ByteString both in BigtableIO and HBaseIO (both use it for the Write).
Moving to ByteBuffer has two possible issues:
1. ByteBuffers are not immutable, but well, since we are using it just to read
the whole thing at the end, we can guarantee immutability via:
https://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html#asReadOnlyBuffer()
2. ByteBuffer does not carry only the bytes but the position, so we need to
consider the entire buffer always independently of the fact that the user can
leave it in a wrong position.
I think we can cover both, only missing things would be missing methods to
implement correctly both ByteKey/ByteKeyRangeTracker. Do you think we would be
covered for this Dan? And would you agree to move BigtableIO too?
> ByteKey / ByteKeyRangeTracker should not use ByteString on public API surface
> -----------------------------------------------------------------------------
>
> Key: BEAM-1870
> URL: https://issues.apache.org/jira/browse/BEAM-1870
> Project: Beam
> Issue Type: Improvement
> Components: sdk-java-core
> Reporter: Daniel Halperin
> Assignee: Ismaël Mejía
> Fix For: First stable release
>
>
> We don't want these Google Protocol Buffer dependencies on the public API. We
> should replace the use of {{ByteString}} with something in the core Java
> libraries.
> What's the open source standard here? I guess Avro uses {{ByteBuffer}} for
> wrapping {{byte[]}} ?
> [~iemejia] -- tentatively assigned to you as you brought this up.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)