You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@apex.apache.org by Yogi Devendra <yo...@apache.org> on 2016/01/21 15:57:28 UTC
Making inherited operator port optional
I have Operator B extends Operator A.
Operator A is from malhar library.
Operator A declares output port P.
For Operator B; I wish to make port P (inherited from A) as optional
(without changing original operator A source code from malhar).
Is there any way to achieve this?
~ Yogi
Re: Making inherited operator port optional
Posted by Thomas Weise <th...@gmail.com>.
You should be able to override the port.
On Thu, Jan 21, 2016 at 7:18 AM, Munagala Ramanath <ra...@datatorrent.com>
wrote:
> In OutputPortFieldAnnotation.java we have this:
>
> public boolean optional() default true;
>
> So looks like output ports are optional by default. If A annotates the
> port as "optional = true", you're out of luck.
>
> Ram
>
> On Thu, Jan 21, 2016 at 6:57 AM, Yogi Devendra <yo...@apache.org>
> wrote:
>
>> I have Operator B extends Operator A.
>>
>> Operator A is from malhar library.
>> Operator A declares output port P.
>>
>> For Operator B; I wish to make port P (inherited from A) as optional
>> (without changing original operator A source code from malhar).
>>
>> Is there any way to achieve this?
>>
>> ~ Yogi
>>
>
>
Re: Making inherited operator port optional
Posted by Munagala Ramanath <ra...@datatorrent.com>.
In OutputPortFieldAnnotation.java we have this:
public boolean optional() default true;
So looks like output ports are optional by default. If A annotates the port
as "optional = true", you're out of luck.
Ram
On Thu, Jan 21, 2016 at 6:57 AM, Yogi Devendra <yo...@apache.org>
wrote:
> I have Operator B extends Operator A.
>
> Operator A is from malhar library.
> Operator A declares output port P.
>
> For Operator B; I wish to make port P (inherited from A) as optional
> (without changing original operator A source code from malhar).
>
> Is there any way to achieve this?
>
> ~ Yogi
>