beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ismaël Mejía (JIRA) <>
Subject [jira] [Commented] (BEAM-1870) ByteKey / ByteKeyRangeTracker should not use ByteString on public API surface
Date Tue, 04 Apr 2017 16:49:41 GMT


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:

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:
>             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

View raw message