apex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bright Chen <bri...@datatorrent.com>
Subject Re: is possible to use attributes/variable in application's properties file
Date Fri, 08 Jan 2016 22:51:42 GMT
Hi Gaurav,
I thought about this solution.
One concern I think was, the property can be overwrite by dt-site.xml. If user specified the
value of this property, the application should not suppose to change it or the user may surprised.
And the application can’t tell the property value is come from properties.xml or dt-site.xml


> On Jan 8, 2016, at 12:45 PM, Gaurav Gupta <gaurav@datatorrent.com> wrote:
> Bright,
> I don’t think that you can do this currently the way you mentioned. But there are other
ways to do it.
> 1. You can do same thing in populateDag of your Application
> 2. You can get the application name in your Operator setup as follows and append it to
topic name.
> context.getValue(Context.DAGContext.APPLICATION_NAME)
> Thanks
> - Gaurav
>> On 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

View raw message