apex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Yan <da...@datatorrent.com>
Subject Re: is possible to use attributes/variable in application's properties file
Date Sat, 09 Jan 2016 00:46:28 GMT
If the Gateway is compiled with the Apex with the change, then yes.

On Fri, Jan 8, 2016 at 4:41 PM, Bright Chen <bright@datatorrent.com> wrote:

> Hi David,
> In you PR.
> If I launch the application from dtManager UI instead of dtcli, will the
> attributes still got populated?
>
> Thanks
> Bright
>
> > On Jan 8, 2016, at 4:26 PM, David Yan <david@datatorrent.com> wrote:
> >
> > Bright,
> >
> > This actually does not work in the current devel-3 branch.  I have
> opened a
> > PR to fix this:
> >
> > https://github.com/apache/incubator-apex-core/pull/201
> >
> > and the corresponding JIRA is:
> >
> > https://issues.apache.org/jira/browse/APEXCORE-303
> >
> > Before this gets merged, you can pull from my fork and branch to proceed.
> >
> > David
> >
> > On Fri, Jan 8, 2016 at 12:44 PM, David Yan <david@datatorrent.com>
> wrote:
> >
> >> You can try this:
> >>
> >> Put this in the properties file:
> >>
> >> <property>
> >>    <name>dt.application.TelecomDemoV2.operator.
> >> CDRGeoQueryResult.topic</name>
> >>    <value>CDRGeoQueryResult-${dt.attr.APPLICATION_NAME}</value>
> >> </property>
> >>
> >> Then launch your application in dtcli with -D
> >> dt.attr.APPLICATION_NAME=xyz, or launch using REST API with
> >> dt.attr.APPLICATION_NAME set in the POST payload.
> >>
> >> David
> >>
> >> On Fri, Jan 8, 2016 at 12:28 PM, Bright Chen <bright@datatorrent.com>
> >> wrote:
> >>
> >>> Hi,
> >>> is possible to use attributes/variable in application's properties
> file?
> >>>
> >>> For example the configuration of TelecomDemo which configure the topic
> >>> for dimension query result as following:
> >>> <property>
> >>>
> >>>
> <name>dt.application.TelecomDemoV2.operator.CDRGeoQueryResult.topic</name>
> >>>    <value>CDRGeoQueryResult</value>
> >>> </property>
> >>>
> >>> Could I change it to some like following
> >>> <property>
> >>>
> >>>
> <name>dt.application.TelecomDemoV2.operator.CDRGeoQueryResult.topic</name>
> >>>    <value>CDRGeoQueryResult-${appName}</value>
> >>> </property>
> >>>
> >>> And I expected result is that there are two instances( say one name is
> >>> “TelecomDemoV2”, another is “TelecomDemoV21”) of this application
run
> in
> >>> same gateway,
> >>> And they will use different topics "CDRGeoQueryResult-TelecomDemoV2”
> and
> >>> "CDRGeoQueryResult-TelecomDemoV21”
> >>>
> >>> thanks
> >>> Bright
> >>
> >>
> >>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message