You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ambari.apache.org by Satyanarayana Jampa <sj...@innominds.com> on 2015/07/07 16:44:37 UTC

custom service - client unique_id property

Just wondering, if there is a way to generate a unique_id in the property file for each node, for an custom client service.

I mean:
I have a custom client service component. I am looking for a way to generate a unique_id in the client property file, for each node it gets installed.

Thanks,
Satya.


Re: custom service - client unique_id property

Posted by Sumit Mohanty <sm...@hortonworks.com>.
In your stack script you can use ---


hostname = config["hostname"]?


IP, you can get locally.

________________________________
From: Satyanarayana Jampa <sj...@innominds.com>
Sent: Tuesday, July 07, 2015 9:53 PM
To: Alejandro Fernandez; user@ambari.apache.org
Subject: RE: custom service - client unique_id property

Will give It a try, let me know how can I get the hostname or IP.

From: Alejandro Fernandez [mailto:afernandez@hortonworks.com]
Sent: 08 July 2015 01:07
To: user@ambari.apache.org; Satyanarayana Jampa
Subject: Re: custom service - client unique_id property

Can you use the hostname or IP?

From: Sumit Mohanty <sm...@hortonworks.com>>
Reply-To: "user@ambari.apache.org<ma...@ambari.apache.org>" <us...@ambari.apache.org>>
Date: Tuesday, July 7, 2015 at 12:05 PM
To: "user@ambari.apache.org<ma...@ambari.apache.org>" <us...@ambari.apache.org>>
Subject: Re: custom service - client unique_id property


?The assumption is that all operations are idempotent. So moving to install() will not help.

You could store it locally on each host and access as reference when called again. This is not elegant but its all I can think of right now.

________________________________
From: Satyanarayana Jampa <sj...@innominds.com>>
Sent: Tuesday, July 07, 2015 10:55 AM
To: user@ambari.apache.org<ma...@ambari.apache.org>
Subject: RE: custom service - client unique_id property

Yes, true.... So, I am looking at a better option for handling the same.
Or this should be handled immediately after install process. (install method)

From: Sumit Mohanty [mailto:smohanty@hortonworks.com]
Sent: 07 July 2015 23:16
To: user@ambari.apache.org<ma...@ambari.apache.org>; user@ambari.apache.org<ma...@ambari.apache.org>
Subject: RE: custom service - client unique_id property

I think the id will be regenerated every time the config will be refreshed. That may be an issue.
Sent from Outlook<http://taps.io/outlookmobile>


On Tue, Jul 7, 2015 at 10:40 AM -0700, "Satyanarayana Jampa" <sj...@innominds.com>> wrote:
I am using the template as below:

node.properties.j2
node.environment={{node_environment}}
node.id={% uuid.uuid4() %}
node.data-dir={{node_datadir}}

I want to have a unique ID in this property file per each node respectively. Remaiing properties will be populated from the config params defined.
Any thoughts on this?

From: Sumit Mohanty [mailto:smohanty@hortonworks.com]
Sent: 07 July 2015 22:24
To: user@ambari.apache.org<ma...@ambari.apache.org>
Subject: Re: custom service - client unique_id property


Specifically do you need to add a GUID to the config file - or just using hostname or IP may be enough.



Look at ZK stack definition @ https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_server.py?



It has some logic to create unique ID.

________________________________
From: Satyanarayana Jampa <sj...@innominds.com>>
Sent: Tuesday, July 07, 2015 7:44 AM
To: user@ambari.apache.org<ma...@ambari.apache.org>
Subject: custom service - client unique_id property

Just wondering, if there is a way to generate a unique_id in the property file for each node, for an custom client service.

I mean:
I have a custom client service component. I am looking for a way to generate a unique_id in the client property file, for each node it gets installed.

Thanks,
Satya.


RE: custom service - client unique_id property

Posted by Satyanarayana Jampa <sj...@innominds.com>.
Will give It a try, let me know how can I get the hostname or IP.

From: Alejandro Fernandez [mailto:afernandez@hortonworks.com]
Sent: 08 July 2015 01:07
To: user@ambari.apache.org; Satyanarayana Jampa
Subject: Re: custom service - client unique_id property

Can you use the hostname or IP?

From: Sumit Mohanty <sm...@hortonworks.com>>
Reply-To: "user@ambari.apache.org<ma...@ambari.apache.org>" <us...@ambari.apache.org>>
Date: Tuesday, July 7, 2015 at 12:05 PM
To: "user@ambari.apache.org<ma...@ambari.apache.org>" <us...@ambari.apache.org>>
Subject: Re: custom service - client unique_id property


​The assumption is that all operations are idempotent. So moving to install() will not help.

You could store it locally on each host and access as reference when called again. This is not elegant but its all I can think of right now.

________________________________
From: Satyanarayana Jampa <sj...@innominds.com>>
Sent: Tuesday, July 07, 2015 10:55 AM
To: user@ambari.apache.org<ma...@ambari.apache.org>
Subject: RE: custom service - client unique_id property

Yes, true…. So, I am looking at a better option for handling the same.
Or this should be handled immediately after install process. (install method)

From: Sumit Mohanty [mailto:smohanty@hortonworks.com]
Sent: 07 July 2015 23:16
To: user@ambari.apache.org<ma...@ambari.apache.org>; user@ambari.apache.org<ma...@ambari.apache.org>
Subject: RE: custom service - client unique_id property

I think the id will be regenerated every time the config will be refreshed. That may be an issue.
Sent from Outlook<http://taps.io/outlookmobile>


On Tue, Jul 7, 2015 at 10:40 AM -0700, "Satyanarayana Jampa" <sj...@innominds.com>> wrote:
I am using the template as below:

node.properties.j2
node.environment={{node_environment}}
node.id={% uuid.uuid4() %}
node.data-dir={{node_datadir}}

I want to have a unique ID in this property file per each node respectively. Remaiing properties will be populated from the config params defined.
Any thoughts on this?

From: Sumit Mohanty [mailto:smohanty@hortonworks.com]
Sent: 07 July 2015 22:24
To: user@ambari.apache.org<ma...@ambari.apache.org>
Subject: Re: custom service - client unique_id property


Specifically do you need to add a GUID to the config file - or just using hostname or IP may be enough.



Look at ZK stack definition @ https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_server.py​



It has some logic to create unique ID.

________________________________
From: Satyanarayana Jampa <sj...@innominds.com>>
Sent: Tuesday, July 07, 2015 7:44 AM
To: user@ambari.apache.org<ma...@ambari.apache.org>
Subject: custom service - client unique_id property

Just wondering, if there is a way to generate a unique_id in the property file for each node, for an custom client service.

I mean:
I have a custom client service component. I am looking for a way to generate a unique_id in the client property file, for each node it gets installed.

Thanks,
Satya.


Re: custom service - client unique_id property

Posted by Alejandro Fernandez <af...@hortonworks.com>.
Can you use the hostname or IP?

From: Sumit Mohanty <sm...@hortonworks.com>>
Reply-To: "user@ambari.apache.org<ma...@ambari.apache.org>" <us...@ambari.apache.org>>
Date: Tuesday, July 7, 2015 at 12:05 PM
To: "user@ambari.apache.org<ma...@ambari.apache.org>" <us...@ambari.apache.org>>
Subject: Re: custom service - client unique_id property


​The assumption is that all operations are idempotent. So moving to install() will not help.

You could store it locally on each host and access as reference when called again. This is not elegant but its all I can think of right now.

________________________________
From: Satyanarayana Jampa <sj...@innominds.com>>
Sent: Tuesday, July 07, 2015 10:55 AM
To: user@ambari.apache.org<ma...@ambari.apache.org>
Subject: RE: custom service - client unique_id property

Yes, true…. So, I am looking at a better option for handling the same.
Or this should be handled immediately after install process. (install method)

From: Sumit Mohanty [mailto:smohanty@hortonworks.com]
Sent: 07 July 2015 23:16
To: user@ambari.apache.org<ma...@ambari.apache.org>; user@ambari.apache.org<ma...@ambari.apache.org>
Subject: RE: custom service - client unique_id property

I think the id will be regenerated every time the config will be refreshed. That may be an issue.
Sent from Outlook<http://taps.io/outlookmobile>



On Tue, Jul 7, 2015 at 10:40 AM -0700, "Satyanarayana Jampa" <sj...@innominds.com>> wrote:
I am using the template as below:

node.properties.j2
node.environment={{node_environment}}
node.id={% uuid.uuid4() %}
node.data-dir={{node_datadir}}

I want to have a unique ID in this property file per each node respectively. Remaiing properties will be populated from the config params defined.
Any thoughts on this?

From: Sumit Mohanty [mailto:smohanty@hortonworks.com]
Sent: 07 July 2015 22:24
To: user@ambari.apache.org<ma...@ambari.apache.org>
Subject: Re: custom service - client unique_id property


Specifically do you need to add a GUID to the config file - or just using hostname or IP may be enough.



Look at ZK stack definition @ https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_server.py​



It has some logic to create unique ID.

________________________________
From: Satyanarayana Jampa <sj...@innominds.com>>
Sent: Tuesday, July 07, 2015 7:44 AM
To: user@ambari.apache.org<ma...@ambari.apache.org>
Subject: custom service - client unique_id property

Just wondering, if there is a way to generate a unique_id in the property file for each node, for an custom client service.

I mean:
I have a custom client service component. I am looking for a way to generate a unique_id in the client property file, for each node it gets installed.

Thanks,
Satya.


Re: custom service - client unique_id property

Posted by Sumit Mohanty <sm...@hortonworks.com>.
?The assumption is that all operations are idempotent. So moving to install() will not help.

You could store it locally on each host and access as reference when called again. This is not elegant but its all I can think of right now.

________________________________
From: Satyanarayana Jampa <sj...@innominds.com>
Sent: Tuesday, July 07, 2015 10:55 AM
To: user@ambari.apache.org
Subject: RE: custom service - client unique_id property

Yes, true.... So, I am looking at a better option for handling the same.
Or this should be handled immediately after install process. (install method)

From: Sumit Mohanty [mailto:smohanty@hortonworks.com]
Sent: 07 July 2015 23:16
To: user@ambari.apache.org; user@ambari.apache.org
Subject: RE: custom service - client unique_id property

I think the id will be regenerated every time the config will be refreshed. That may be an issue.
Sent from Outlook<http://taps.io/outlookmobile>



On Tue, Jul 7, 2015 at 10:40 AM -0700, "Satyanarayana Jampa" <sj...@innominds.com>> wrote:
I am using the template as below:

node.properties.j2
node.environment={{node_environment}}
node.id={% uuid.uuid4() %}
node.data-dir={{node_datadir}}

I want to have a unique ID in this property file per each node respectively. Remaiing properties will be populated from the config params defined.
Any thoughts on this?

From: Sumit Mohanty [mailto:smohanty@hortonworks.com]
Sent: 07 July 2015 22:24
To: user@ambari.apache.org<ma...@ambari.apache.org>
Subject: Re: custom service - client unique_id property


Specifically do you need to add a GUID to the config file - or just using hostname or IP may be enough.



Look at ZK stack definition @ https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_server.py?



It has some logic to create unique ID.

________________________________
From: Satyanarayana Jampa <sj...@innominds.com>>
Sent: Tuesday, July 07, 2015 7:44 AM
To: user@ambari.apache.org<ma...@ambari.apache.org>
Subject: custom service - client unique_id property

Just wondering, if there is a way to generate a unique_id in the property file for each node, for an custom client service.

I mean:
I have a custom client service component. I am looking for a way to generate a unique_id in the client property file, for each node it gets installed.

Thanks,
Satya.


RE: custom service - client unique_id property

Posted by Satyanarayana Jampa <sj...@innominds.com>.
Yes, true…. So, I am looking at a better option for handling the same.
Or this should be handled immediately after install process. (install method)

From: Sumit Mohanty [mailto:smohanty@hortonworks.com]
Sent: 07 July 2015 23:16
To: user@ambari.apache.org; user@ambari.apache.org
Subject: RE: custom service - client unique_id property

I think the id will be regenerated every time the config will be refreshed. That may be an issue.
Sent from Outlook<http://taps.io/outlookmobile>



On Tue, Jul 7, 2015 at 10:40 AM -0700, "Satyanarayana Jampa" <sj...@innominds.com>> wrote:
I am using the template as below:

node.properties.j2
node.environment={{node_environment}}
node.id={% uuid.uuid4() %}
node.data-dir={{node_datadir}}

I want to have a unique ID in this property file per each node respectively. Remaiing properties will be populated from the config params defined.
Any thoughts on this?

From: Sumit Mohanty [mailto:smohanty@hortonworks.com]
Sent: 07 July 2015 22:24
To: user@ambari.apache.org<ma...@ambari.apache.org>
Subject: Re: custom service - client unique_id property


Specifically do you need to add a GUID to the config file - or just using hostname or IP may be enough.



Look at ZK stack definition @ https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_server.py​



It has some logic to create unique ID.

________________________________
From: Satyanarayana Jampa <sj...@innominds.com>>
Sent: Tuesday, July 07, 2015 7:44 AM
To: user@ambari.apache.org<ma...@ambari.apache.org>
Subject: custom service - client unique_id property

Just wondering, if there is a way to generate a unique_id in the property file for each node, for an custom client service.

I mean:
I have a custom client service component. I am looking for a way to generate a unique_id in the client property file, for each node it gets installed.

Thanks,
Satya.


RE: custom service - client unique_id property

Posted by Sumit Mohanty <sm...@hortonworks.com>.
I think the id will be regenerated every time the config will be refreshed. That may be an issue.

Sent from Outlook<http://taps.io/outlookmobile>




On Tue, Jul 7, 2015 at 10:40 AM -0700, "Satyanarayana Jampa" <sj...@innominds.com>> wrote:

I am using the template as below:

node.properties.j2
node.environment={{node_environment}}
node.id={% uuid.uuid4() %}
node.data-dir={{node_datadir}}

I want to have a unique ID in this property file per each node respectively. Remaiing properties will be populated from the config params defined.
Any thoughts on this?

From: Sumit Mohanty [mailto:smohanty@hortonworks.com]
Sent: 07 July 2015 22:24
To: user@ambari.apache.org
Subject: Re: custom service - client unique_id property


Specifically do you need to add a GUID to the config file - or just using hostname or IP may be enough.



Look at ZK stack definition @ https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_server.py?



It has some logic to create unique ID.

________________________________
From: Satyanarayana Jampa <sj...@innominds.com>>
Sent: Tuesday, July 07, 2015 7:44 AM
To: user@ambari.apache.org<ma...@ambari.apache.org>
Subject: custom service - client unique_id property

Just wondering, if there is a way to generate a unique_id in the property file for each node, for an custom client service.

I mean:
I have a custom client service component. I am looking for a way to generate a unique_id in the client property file, for each node it gets installed.

Thanks,
Satya.


RE: custom service - client unique_id property

Posted by Satyanarayana Jampa <sj...@innominds.com>.
I am using the template as below:

node.properties.j2
node.environment={{node_environment}}
node.id={% uuid.uuid4() %}
node.data-dir={{node_datadir}}

I want to have a unique ID in this property file per each node respectively. Remaiing properties will be populated from the config params defined.
Any thoughts on this?

From: Sumit Mohanty [mailto:smohanty@hortonworks.com]
Sent: 07 July 2015 22:24
To: user@ambari.apache.org
Subject: Re: custom service - client unique_id property


Specifically do you need to add a GUID to the config file - or just using hostname or IP may be enough.



Look at ZK stack definition @ https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_server.py​



It has some logic to create unique ID.

________________________________
From: Satyanarayana Jampa <sj...@innominds.com>>
Sent: Tuesday, July 07, 2015 7:44 AM
To: user@ambari.apache.org<ma...@ambari.apache.org>
Subject: custom service - client unique_id property

Just wondering, if there is a way to generate a unique_id in the property file for each node, for an custom client service.

I mean:
I have a custom client service component. I am looking for a way to generate a unique_id in the client property file, for each node it gets installed.

Thanks,
Satya.


Re: custom service - client unique_id property

Posted by Sumit Mohanty <sm...@hortonworks.com>.
Specifically do you need to add a GUID to the config file - or just using hostname or IP may be enough.


Look at ZK stack definition @ https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_server.py?


It has some logic to create unique ID.

________________________________
From: Satyanarayana Jampa <sj...@innominds.com>
Sent: Tuesday, July 07, 2015 7:44 AM
To: user@ambari.apache.org
Subject: custom service - client unique_id property

Just wondering, if there is a way to generate a unique_id in the property file for each node, for an custom client service.

I mean:
I have a custom client service component. I am looking for a way to generate a unique_id in the client property file, for each node it gets installed.

Thanks,
Satya.