You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@apex.apache.org by Tushar Gosavi <tu...@datatorrent.com> on 2016/09/13 10:17:38 UTC

Optional output ports.

Hi All,

I have an input operator with one output port without any annotation.
When I launch the application using just this operator I get
ValidationException "At least one output port must be connected".  By
default connecting output ports are optional, or is it mandatory to
connect at least one output port of an operator, if there are no
annotation on them.

Regards.
- Tushar.

Re: Optional output ports.

Posted by Chinmay Kolhatkar <ch...@datatorrent.com>.
Hi Tushar,

By default, connecting output ports are optional when annotation is not
provided.
https://github.com/apache/apex-core/blob/master/api/src/main/java/com/datatorrent/api/annotation/OutputPortFieldAnnotation.java

-Chinmay.


On Tue, Sep 13, 2016 at 3:47 PM, Tushar Gosavi <tu...@datatorrent.com>
wrote:

> Hi All,
>
> I have an input operator with one output port without any annotation.
> When I launch the application using just this operator I get
> ValidationException "At least one output port must be connected".  By
> default connecting output ports are optional, or is it mandatory to
> connect at least one output port of an operator, if there are no
> annotation on them.
>
> Regards.
> - Tushar.
>

Re: Optional output ports.

Posted by "McCullough, Alex" <Al...@capitalone.com>.
Will do

From: Thomas Weise <th...@gmail.com>
Reply-To: "users@apex.apache.org" <us...@apex.apache.org>
Date: Tuesday, September 13, 2016 at 11:58 AM
To: "users@apex.apache.org" <us...@apex.apache.org>
Subject: Re: Optional output ports.

Alex, can you create a JIRA (https://issues.apache.org/jira/browse/APEXCORE/)?

On Tue, Sep 13, 2016 at 8:52 AM, McCullough, Alex <Al...@capitalone.com>> wrote:
I think it’s a little confusing too that the default value for the optional attribute on the output ports is true, but there is a requirement implemented by the validator that negates this unless you explicitly set it to on all your output ports (to the default no less).

[cid:image001.png@01D20DB7.BC940840]

Thanks,
Alex

From: Thomas Weise <th...@apache.org>>
Reply-To: "users@apex.apache.org<ma...@apex.apache.org>" <us...@apex.apache.org>>
Date: Tuesday, September 13, 2016 at 11:10 AM
To: "users@apex.apache.org<ma...@apex.apache.org>" <us...@apex.apache.org>>
Subject: Re: Optional output ports.

That's right, if there are multiple output ports, the validation demands that at least one is connected.

I actually think this validation is incorrect. It should be up to the application developer to decide how the output of an operator is consumed.

It is similar to the return value of a function, you don't force the user to assign or use it?

Thomas


On Tue, Sep 13, 2016 at 7:29 AM, Munagala Ramanath <ra...@datatorrent.com>> wrote:
Yes, if you have ports at least one must be connected if there are no annotations on them.

The code is in LogicalPlan.validate() -- checkout the allPortsOptional variable.

Ram

On Tue, Sep 13, 2016 at 3:17 AM, Tushar Gosavi <tu...@datatorrent.com>> wrote:
Hi All,

I have an input operator with one output port without any annotation.
When I launch the application using just this operator I get
ValidationException "At least one output port must be connected".  By
default connecting output ports are optional, or is it mandatory to
connect at least one output port of an operator, if there are no
annotation on them.

Regards.
- Tushar.



________________________________

The information contained in this e-mail is confidential and/or proprietary to Capital One and/or its affiliates and may only be used solely in performance of work or services for Capital One. The information transmitted herewith is intended only for use by the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.

________________________________________________________

The information contained in this e-mail is confidential and/or proprietary to Capital One and/or its affiliates and may only be used solely in performance of work or services for Capital One. The information transmitted herewith is intended only for use by the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.

Re: Optional output ports.

Posted by Thomas Weise <th...@gmail.com>.
Thanks!

On Tue, Sep 13, 2016 at 9:20 AM, McCullough, Alex <
Alex.McCullough@capitalone.com> wrote:

> Created…. https://issues.apache.org/jira/browse/APEXCORE-528
>
>
>
> Not sure if I was or wasn’t supposed to fill out some of the options, but
> took a stab at it.
>
>
>
> Thanks,
>
> Alex
>
>
>
> *From: *Thomas Weise <th...@gmail.com>
> *Reply-To: *"users@apex.apache.org" <us...@apex.apache.org>
> *Date: *Tuesday, September 13, 2016 at 11:58 AM
>
> *To: *"users@apex.apache.org" <us...@apex.apache.org>
> *Subject: *Re: Optional output ports.
>
>
>
> Alex, can you create a JIRA (https://issues.apache.org/
> jira/browse/APEXCORE/)?
>
>
>
> On Tue, Sep 13, 2016 at 8:52 AM, McCullough, Alex <
> Alex.McCullough@capitalone.com> wrote:
>
> I think it’s a little confusing too that the default value for the
> optional attribute on the output ports is true, but there is a requirement
> implemented by the validator that negates this unless you explicitly set it
> to on all your output ports (to the default no less).
>
>
>
>
>
> Thanks,
>
> Alex
>
>
>
> *From: *Thomas Weise <th...@apache.org>
> *Reply-To: *"users@apex.apache.org" <us...@apex.apache.org>
> *Date: *Tuesday, September 13, 2016 at 11:10 AM
> *To: *"users@apex.apache.org" <us...@apex.apache.org>
> *Subject: *Re: Optional output ports.
>
>
>
> That's right, if there are multiple output ports, the validation demands
> that at least one is connected.
>
>
>
> I actually think this validation is incorrect. It should be up to the
> application developer to decide how the output of an operator is consumed.
>
>
>
> It is similar to the return value of a function, you don't force the user
> to assign or use it?
>
>
>
> Thomas
>
>
>
>
>
> On Tue, Sep 13, 2016 at 7:29 AM, Munagala Ramanath <ra...@datatorrent.com>
> wrote:
>
> Yes, if you have ports at least one must be connected if there are no
> annotations on them.
>
>
>
> The code is in LogicalPlan.validate() -- checkout the allPortsOptional
> variable.
>
>
>
> Ram
>
>
>
> On Tue, Sep 13, 2016 at 3:17 AM, Tushar Gosavi <tu...@datatorrent.com>
> wrote:
>
> Hi All,
>
> I have an input operator with one output port without any annotation.
> When I launch the application using just this operator I get
> ValidationException "At least one output port must be connected".  By
> default connecting output ports are optional, or is it mandatory to
> connect at least one output port of an operator, if there are no
> annotation on them.
>
> Regards.
> - Tushar.
>
>
>
>
>
>
> ------------------------------
>
> The information contained in this e-mail is confidential and/or
> proprietary to Capital One and/or its affiliates and may only be used
> solely in performance of work or services for Capital One. The information
> transmitted herewith is intended only for use by the individual or entity
> to which it is addressed. If the reader of this message is not the intended
> recipient, you are hereby notified that any review, retransmission,
> dissemination, distribution, copying or other use of, or taking of any
> action in reliance upon this information is strictly prohibited. If you
> have received this communication in error, please contact the sender and
> delete the material from your computer.
>
>
>
> ------------------------------
>
> The information contained in this e-mail is confidential and/or
> proprietary to Capital One and/or its affiliates and may only be used
> solely in performance of work or services for Capital One. The information
> transmitted herewith is intended only for use by the individual or entity
> to which it is addressed. If the reader of this message is not the intended
> recipient, you are hereby notified that any review, retransmission,
> dissemination, distribution, copying or other use of, or taking of any
> action in reliance upon this information is strictly prohibited. If you
> have received this communication in error, please contact the sender and
> delete the material from your computer.
>

Re: Optional output ports.

Posted by "McCullough, Alex" <Al...@capitalone.com>.
Created…. https://issues.apache.org/jira/browse/APEXCORE-528

Not sure if I was or wasn’t supposed to fill out some of the options, but took a stab at it.

Thanks,
Alex

From: Thomas Weise <th...@gmail.com>
Reply-To: "users@apex.apache.org" <us...@apex.apache.org>
Date: Tuesday, September 13, 2016 at 11:58 AM
To: "users@apex.apache.org" <us...@apex.apache.org>
Subject: Re: Optional output ports.

Alex, can you create a JIRA (https://issues.apache.org/jira/browse/APEXCORE/)?

On Tue, Sep 13, 2016 at 8:52 AM, McCullough, Alex <Al...@capitalone.com>> wrote:
I think it’s a little confusing too that the default value for the optional attribute on the output ports is true, but there is a requirement implemented by the validator that negates this unless you explicitly set it to on all your output ports (to the default no less).

[cid:image001.png@01D20DB9.486C65A0]

Thanks,
Alex

From: Thomas Weise <th...@apache.org>>
Reply-To: "users@apex.apache.org<ma...@apex.apache.org>" <us...@apex.apache.org>>
Date: Tuesday, September 13, 2016 at 11:10 AM
To: "users@apex.apache.org<ma...@apex.apache.org>" <us...@apex.apache.org>>
Subject: Re: Optional output ports.

That's right, if there are multiple output ports, the validation demands that at least one is connected.

I actually think this validation is incorrect. It should be up to the application developer to decide how the output of an operator is consumed.

It is similar to the return value of a function, you don't force the user to assign or use it?

Thomas


On Tue, Sep 13, 2016 at 7:29 AM, Munagala Ramanath <ra...@datatorrent.com>> wrote:
Yes, if you have ports at least one must be connected if there are no annotations on them.

The code is in LogicalPlan.validate() -- checkout the allPortsOptional variable.

Ram

On Tue, Sep 13, 2016 at 3:17 AM, Tushar Gosavi <tu...@datatorrent.com>> wrote:
Hi All,

I have an input operator with one output port without any annotation.
When I launch the application using just this operator I get
ValidationException "At least one output port must be connected".  By
default connecting output ports are optional, or is it mandatory to
connect at least one output port of an operator, if there are no
annotation on them.

Regards.
- Tushar.



________________________________

The information contained in this e-mail is confidential and/or proprietary to Capital One and/or its affiliates and may only be used solely in performance of work or services for Capital One. The information transmitted herewith is intended only for use by the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.

________________________________________________________

The information contained in this e-mail is confidential and/or proprietary to Capital One and/or its affiliates and may only be used solely in performance of work or services for Capital One. The information transmitted herewith is intended only for use by the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.

Re: Optional output ports.

Posted by Thomas Weise <th...@gmail.com>.
Alex, can you create a JIRA (https://issues.apache.org/jira/browse/APEXCORE/
)?

On Tue, Sep 13, 2016 at 8:52 AM, McCullough, Alex <
Alex.McCullough@capitalone.com> wrote:

> I think it’s a little confusing too that the default value for the
> optional attribute on the output ports is true, but there is a requirement
> implemented by the validator that negates this unless you explicitly set it
> to on all your output ports (to the default no less).
>
>
>
>
>
> Thanks,
>
> Alex
>
>
>
> *From: *Thomas Weise <th...@apache.org>
> *Reply-To: *"users@apex.apache.org" <us...@apex.apache.org>
> *Date: *Tuesday, September 13, 2016 at 11:10 AM
> *To: *"users@apex.apache.org" <us...@apex.apache.org>
> *Subject: *Re: Optional output ports.
>
>
>
> That's right, if there are multiple output ports, the validation demands
> that at least one is connected.
>
>
>
> I actually think this validation is incorrect. It should be up to the
> application developer to decide how the output of an operator is consumed.
>
>
>
> It is similar to the return value of a function, you don't force the user
> to assign or use it?
>
>
>
> Thomas
>
>
>
>
>
> On Tue, Sep 13, 2016 at 7:29 AM, Munagala Ramanath <ra...@datatorrent.com>
> wrote:
>
> Yes, if you have ports at least one must be connected if there are no
> annotations on them.
>
>
>
> The code is in LogicalPlan.validate() -- checkout the allPortsOptional
> variable.
>
>
>
> Ram
>
>
>
> On Tue, Sep 13, 2016 at 3:17 AM, Tushar Gosavi <tu...@datatorrent.com>
> wrote:
>
> Hi All,
>
> I have an input operator with one output port without any annotation.
> When I launch the application using just this operator I get
> ValidationException "At least one output port must be connected".  By
> default connecting output ports are optional, or is it mandatory to
> connect at least one output port of an operator, if there are no
> annotation on them.
>
> Regards.
> - Tushar.
>
>
>
>
>
> ------------------------------
>
> The information contained in this e-mail is confidential and/or
> proprietary to Capital One and/or its affiliates and may only be used
> solely in performance of work or services for Capital One. The information
> transmitted herewith is intended only for use by the individual or entity
> to which it is addressed. If the reader of this message is not the intended
> recipient, you are hereby notified that any review, retransmission,
> dissemination, distribution, copying or other use of, or taking of any
> action in reliance upon this information is strictly prohibited. If you
> have received this communication in error, please contact the sender and
> delete the material from your computer.
>

Re: Optional output ports.

Posted by "McCullough, Alex" <Al...@capitalone.com>.
I think it’s a little confusing too that the default value for the optional attribute on the output ports is true, but there is a requirement implemented by the validator that negates this unless you explicitly set it to on all your output ports (to the default no less).

[cid:image001.png@01D20DB5.5AFAC030]

Thanks,
Alex

From: Thomas Weise <th...@apache.org>
Reply-To: "users@apex.apache.org" <us...@apex.apache.org>
Date: Tuesday, September 13, 2016 at 11:10 AM
To: "users@apex.apache.org" <us...@apex.apache.org>
Subject: Re: Optional output ports.

That's right, if there are multiple output ports, the validation demands that at least one is connected.

I actually think this validation is incorrect. It should be up to the application developer to decide how the output of an operator is consumed.

It is similar to the return value of a function, you don't force the user to assign or use it?

Thomas


On Tue, Sep 13, 2016 at 7:29 AM, Munagala Ramanath <ra...@datatorrent.com>> wrote:
Yes, if you have ports at least one must be connected if there are no annotations on them.

The code is in LogicalPlan.validate() -- checkout the allPortsOptional variable.

Ram

On Tue, Sep 13, 2016 at 3:17 AM, Tushar Gosavi <tu...@datatorrent.com>> wrote:
Hi All,

I have an input operator with one output port without any annotation.
When I launch the application using just this operator I get
ValidationException "At least one output port must be connected".  By
default connecting output ports are optional, or is it mandatory to
connect at least one output port of an operator, if there are no
annotation on them.

Regards.
- Tushar.


________________________________________________________

The information contained in this e-mail is confidential and/or proprietary to Capital One and/or its affiliates and may only be used solely in performance of work or services for Capital One. The information transmitted herewith is intended only for use by the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.

Re: Optional output ports.

Posted by Thomas Weise <th...@apache.org>.
That's right, if there are multiple output ports, the validation demands
that at least one is connected.

I actually think this validation is incorrect. It should be up to the
application developer to decide how the output of an operator is consumed.

It is similar to the return value of a function, you don't force the user
to assign or use it?

Thomas


On Tue, Sep 13, 2016 at 7:29 AM, Munagala Ramanath <ra...@datatorrent.com>
wrote:

> Yes, if you have ports at least one must be connected if there are no
> annotations on them.
>
> The code is in LogicalPlan.validate() -- checkout the allPortsOptional
> variable.
>
> Ram
>
> On Tue, Sep 13, 2016 at 3:17 AM, Tushar Gosavi <tu...@datatorrent.com>
> wrote:
>
>> Hi All,
>>
>> I have an input operator with one output port without any annotation.
>> When I launch the application using just this operator I get
>> ValidationException "At least one output port must be connected".  By
>> default connecting output ports are optional, or is it mandatory to
>> connect at least one output port of an operator, if there are no
>> annotation on them.
>>
>> Regards.
>> - Tushar.
>>
>
>

Re: Optional output ports.

Posted by Munagala Ramanath <ra...@datatorrent.com>.
Yes, if you have ports at least one must be connected if there are no
annotations on them.

The code is in LogicalPlan.validate() -- checkout the allPortsOptional
variable.

Ram

On Tue, Sep 13, 2016 at 3:17 AM, Tushar Gosavi <tu...@datatorrent.com>
wrote:

> Hi All,
>
> I have an input operator with one output port without any annotation.
> When I launch the application using just this operator I get
> ValidationException "At least one output port must be connected".  By
> default connecting output ports are optional, or is it mandatory to
> connect at least one output port of an operator, if there are no
> annotation on them.
>
> Regards.
> - Tushar.
>