You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apex.apache.org by Akshay Gore <ak...@datatorrent.com> on 2016/07/11 10:32:04 UTC
How to specify affinity rules from application properties file
Hi,
I am trying to explore affinity feature in Apex. For this, I am using
pi-demo application from apex-malhar. As per the affinity document
<https://github.com/apache/apex-core/blob/master/docs/application_development.md>,
I have updated the demo application's properties file as follows:
<property>
<name>dt.application.AffinityRulesSampleApplication.attr.AFFINITY_RULES_SET</name>
<value>
{
"affinityRules": [
{
"operatorsList": [
"rand",
"picalc"
],
"locality": "NODE_LOCAL",
"type": "AFFINITY",
"relaxLocality": false
}
]
}
</value>
</property>
After launching the demo application, I don't see containers for operator
"rand" and "picalc" on the same node. Although it's working fine when I set
the rule from application code. Can anyone please help me here?
Thanks,
Akshay
Re: How to specify affinity rules from application properties file
Posted by Akshay Gore <ak...@datatorrent.com>.
There was a typo in the application name because of which the property was
not applying properly.
On Tue, Jul 12, 2016 at 10:33 AM, Munagala Ramanath <ra...@datatorrent.com>
wrote:
> Could you share how you resolved the issue ?
>
> Ram
>
> On Mon, Jul 11, 2016 at 9:59 PM, Akshay Gore <ak...@datatorrent.com>
> wrote:
>
> > Thank you Pradeep for the response. I have already resolved the issue.
> >
> > Regards,
> > Akshay
> >
> > On Tue, Jul 12, 2016 at 10:10 AM, Pradeep Kumbhar <
> pradeep@datatorrent.com
> > >
> > wrote:
> >
> > > Should
> > > "dt.application.AffinityRulesSampleApplication.attr.AFFINITY_RULES_SET"
> > > be
> > > "dt.application.PiDemo.attr.AFFINITY_RULES_SET" ?
> > > or it's just an example.
> > >
> > >
> > > On Mon, Jul 11, 2016 at 4:02 PM, Akshay Gore <ak...@datatorrent.com>
> > > wrote:
> > >
> > > > Hi,
> > > >
> > > > I am trying to explore affinity feature in Apex. For this, I am using
> > > > pi-demo application from apex-malhar. As per the affinity document
> > > > <
> > > >
> > >
> >
> https://github.com/apache/apex-core/blob/master/docs/application_development.md
> > > > >,
> > > > I have updated the demo application's properties file as follows:
> > > >
> > > > <property>
> > > >
> > > >
> > >
> >
> <name>dt.application.AffinityRulesSampleApplication.attr.AFFINITY_RULES_SET</name>
> > > > <value>
> > > > {
> > > > "affinityRules": [
> > > > {
> > > > "operatorsList": [
> > > > "rand",
> > > > "picalc"
> > > > ],
> > > > "locality":
> > > > "NODE_LOCAL",
> > > > "type":
> "AFFINITY",
> > > > "relaxLocality":
> > false
> > > > }
> > > > ]
> > > > }
> > > > </value>
> > > > </property>
> > > >
> > > > After launching the demo application, I don't see containers for
> > operator
> > > > "rand" and "picalc" on the same node. Although it's working fine
> when I
> > > set
> > > > the rule from application code. Can anyone please help me here?
> > > >
> > > > Thanks,
> > > > Akshay
> > > >
> > >
> > >
> > >
> > > --
> > > *regards,*
> > > *~pradeep*
> > >
> >
>
Re: How to specify affinity rules from application properties file
Posted by Munagala Ramanath <ra...@datatorrent.com>.
Could you share how you resolved the issue ?
Ram
On Mon, Jul 11, 2016 at 9:59 PM, Akshay Gore <ak...@datatorrent.com> wrote:
> Thank you Pradeep for the response. I have already resolved the issue.
>
> Regards,
> Akshay
>
> On Tue, Jul 12, 2016 at 10:10 AM, Pradeep Kumbhar <pradeep@datatorrent.com
> >
> wrote:
>
> > Should
> > "dt.application.AffinityRulesSampleApplication.attr.AFFINITY_RULES_SET"
> > be
> > "dt.application.PiDemo.attr.AFFINITY_RULES_SET" ?
> > or it's just an example.
> >
> >
> > On Mon, Jul 11, 2016 at 4:02 PM, Akshay Gore <ak...@datatorrent.com>
> > wrote:
> >
> > > Hi,
> > >
> > > I am trying to explore affinity feature in Apex. For this, I am using
> > > pi-demo application from apex-malhar. As per the affinity document
> > > <
> > >
> >
> https://github.com/apache/apex-core/blob/master/docs/application_development.md
> > > >,
> > > I have updated the demo application's properties file as follows:
> > >
> > > <property>
> > >
> > >
> >
> <name>dt.application.AffinityRulesSampleApplication.attr.AFFINITY_RULES_SET</name>
> > > <value>
> > > {
> > > "affinityRules": [
> > > {
> > > "operatorsList": [
> > > "rand",
> > > "picalc"
> > > ],
> > > "locality":
> > > "NODE_LOCAL",
> > > "type": "AFFINITY",
> > > "relaxLocality":
> false
> > > }
> > > ]
> > > }
> > > </value>
> > > </property>
> > >
> > > After launching the demo application, I don't see containers for
> operator
> > > "rand" and "picalc" on the same node. Although it's working fine when I
> > set
> > > the rule from application code. Can anyone please help me here?
> > >
> > > Thanks,
> > > Akshay
> > >
> >
> >
> >
> > --
> > *regards,*
> > *~pradeep*
> >
>
Re: How to specify affinity rules from application properties file
Posted by Akshay Gore <ak...@datatorrent.com>.
Thank you Pradeep for the response. I have already resolved the issue.
Regards,
Akshay
On Tue, Jul 12, 2016 at 10:10 AM, Pradeep Kumbhar <pr...@datatorrent.com>
wrote:
> Should
> "dt.application.AffinityRulesSampleApplication.attr.AFFINITY_RULES_SET"
> be
> "dt.application.PiDemo.attr.AFFINITY_RULES_SET" ?
> or it's just an example.
>
>
> On Mon, Jul 11, 2016 at 4:02 PM, Akshay Gore <ak...@datatorrent.com>
> wrote:
>
> > Hi,
> >
> > I am trying to explore affinity feature in Apex. For this, I am using
> > pi-demo application from apex-malhar. As per the affinity document
> > <
> >
> https://github.com/apache/apex-core/blob/master/docs/application_development.md
> > >,
> > I have updated the demo application's properties file as follows:
> >
> > <property>
> >
> >
> <name>dt.application.AffinityRulesSampleApplication.attr.AFFINITY_RULES_SET</name>
> > <value>
> > {
> > "affinityRules": [
> > {
> > "operatorsList": [
> > "rand",
> > "picalc"
> > ],
> > "locality":
> > "NODE_LOCAL",
> > "type": "AFFINITY",
> > "relaxLocality": false
> > }
> > ]
> > }
> > </value>
> > </property>
> >
> > After launching the demo application, I don't see containers for operator
> > "rand" and "picalc" on the same node. Although it's working fine when I
> set
> > the rule from application code. Can anyone please help me here?
> >
> > Thanks,
> > Akshay
> >
>
>
>
> --
> *regards,*
> *~pradeep*
>
Re: How to specify affinity rules from application properties file
Posted by Pradeep Kumbhar <pr...@datatorrent.com>.
Should
"dt.application.AffinityRulesSampleApplication.attr.AFFINITY_RULES_SET"
be
"dt.application.PiDemo.attr.AFFINITY_RULES_SET" ?
or it's just an example.
On Mon, Jul 11, 2016 at 4:02 PM, Akshay Gore <ak...@datatorrent.com> wrote:
> Hi,
>
> I am trying to explore affinity feature in Apex. For this, I am using
> pi-demo application from apex-malhar. As per the affinity document
> <
> https://github.com/apache/apex-core/blob/master/docs/application_development.md
> >,
> I have updated the demo application's properties file as follows:
>
> <property>
>
> <name>dt.application.AffinityRulesSampleApplication.attr.AFFINITY_RULES_SET</name>
> <value>
> {
> "affinityRules": [
> {
> "operatorsList": [
> "rand",
> "picalc"
> ],
> "locality":
> "NODE_LOCAL",
> "type": "AFFINITY",
> "relaxLocality": false
> }
> ]
> }
> </value>
> </property>
>
> After launching the demo application, I don't see containers for operator
> "rand" and "picalc" on the same node. Although it's working fine when I set
> the rule from application code. Can anyone please help me here?
>
> Thanks,
> Akshay
>
--
*regards,*
*~pradeep*