You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@beam.apache.org by Sam Rohde <sr...@google.com> on 2018/10/17 18:25:03 UTC

Is portable.DirectGroupByKey supposed to be private?

Hi I'm working on deduplicating code from when the portable worker code was
donated to the project. I found that the portable DirectGroupByKey is
private and its inner classes. Is this by design? If so, why? If not, then
I'm going to change it to be public.

Regards,
Sam

Re: Is portable.DirectGroupByKey supposed to be private?

Posted by Lukasz Cwik <lc...@google.com>.
I believe Thomas copied a large portion of the DirectRunner codebase when
he started developing the ULR.

Package public/private is an important distinction to make and we should
attempt to minimize the number of things which are public to prevent users
from taking dependencies on the code.

I would focus your deduplication efforts on classes within the worker that
exist outside the worker and leave duplicates in the codebase that are
elsewhere.

On Wed, Oct 17, 2018 at 11:30 AM Sam Rohde <sr...@google.com> wrote:

> Example:
> org.apache.beam.runners.direct.portable.DirectGroupByKey is not declared
> public (so it's private by default). Meaning that it ca't be used in
> the org.apache.beam.runners.direct package.
>
> On Wed, Oct 17, 2018 at 11:25 AM Sam Rohde <sr...@google.com> wrote:
>
>> Hi I'm working on deduplicating code from when the portable worker code
>> was donated to the project. I found that the portable DirectGroupByKey is
>> private and its inner classes. Is this by design? If so, why? If not, then
>> I'm going to change it to be public.
>>
>> Regards,
>> Sam
>>
>

Re: Is portable.DirectGroupByKey supposed to be private?

Posted by Sam Rohde <sr...@google.com>.
Example:
org.apache.beam.runners.direct.portable.DirectGroupByKey is not declared
public (so it's private by default). Meaning that it ca't be used in
the org.apache.beam.runners.direct package.

On Wed, Oct 17, 2018 at 11:25 AM Sam Rohde <sr...@google.com> wrote:

> Hi I'm working on deduplicating code from when the portable worker code
> was donated to the project. I found that the portable DirectGroupByKey is
> private and its inner classes. Is this by design? If so, why? If not, then
> I'm going to change it to be public.
>
> Regards,
> Sam
>