The way it works is slightly different ....

In the appConfig.json you will say
    "site.xyz.port" : "${COMPONENT_NAME.ALLOCATED_PORT}"

This tells Slider that you want the port to be allocated. Once Slider
allocates a port it will modify the in-memory copy of the applied
configuration (e.g. xyz-site.xml) and that configuration is published as a
whole. If you go to the publisher end point then you get the config and
read the allocated port.

All configurations are automatically published.

There is already an ask for supporting the notion of preferred port number
- which basically means that Slider will first try to see if that port
number is available and if it is then it will not allocate a new one. Its
not supported yet.

On that front, I have a question. If you anyway need the ability to query
for ports (in case preferred one is not available) why would you not always
query. *One scenario I can see is where you pretty much know that no other
apps are running + there is a way to ensure that only one instance of a
component is on one host. These are typically also test scenarios. *Do you
have any other specific scenario that would benefit from preferred port?

thanks
Sumit


On Wed, Jul 16, 2014 at 8:51 AM, Rui Zhang <rzh...@vertica.com> wrote:

> One more question, if I understand correctly, I can tell the registry I
> want a port number and it will tell me the port number allocated to me. And
> how can I publish my configurations?
>
> One more thing, can I tell the registry my preferred port numbers?
>
>
> On 07/16/2014 11:28 AM, Rui Zhang wrote:
>
>> Thanks for your explanation.
>>
>> Sure, I will create an issue on JIRA.
>>
>> On 07/16/2014 10:57 AM, Sumit Mohanty wrote:
>>
>>> Slider can allocate unique port for each component instance. There is a
>>> mechanism for an app instance to publish configuration through a
>>> registry.
>>> If I am guessing correctly, each Vertica node is of the same component
>>> type
>>> and currently Slider does not have the ability to advertise different
>>> info
>>> for each instance of the component.
>>>
>>> Incidentally, we identified it as a requirement as any application that
>>> is
>>> essentially a set of peers you will need to know the listen port for all
>>> instances. This is typically mitigated by assigning the same port but to
>>> take full advantage of YARN hosting its best to allow dynamic port
>>> allocation. So we will add the capability soon. Can you open a JIRA and
>>> describe the scenario from your perspective?
>>>
>>> thanks
>>> -Sumit
>>>
>>>
>>> On Wed, Jul 16, 2014 at 7:11 AM, Rui Zhang <rzh...@vertica.com> wrote:
>>>
>>>  My command should set the port number for my application. So if Slider
>>>> allocates the port number for it, I don't need to set it in the python
>>>> script any more, right?
>>>>
>>>> Vertica nodes are peers and can all be connected by clients. The dba
>>>> needs
>>>> to know the port number of every Vertica node.
>>>>
>>>> Thanks.
>>>>
>>>>
>>>> On 07/15/2014 07:44 PM, Sumit Mohanty wrote:
>>>>
>>>>  Slider will allocate different ports for each instance of the role.
>>>>>
>>>>> If there is a need for advertising the port numbers on a per role
>>>>> instance
>>>>> basis then that is not supported - we would like to understand if
>>>>> there is
>>>>> a need such a capability.
>>>>>
>>>>> -Sumit
>>>>>
>>>>>
>>>>> On Tue, Jul 15, 2014 at 12:24 PM, Rui Zhang <rzh...@vertica.com>
>>>>> wrote:
>>>>>
>>>>>   Hi,
>>>>>
>>>>>> If Slider give me containers on the same machine for the same role of
>>>>>> my
>>>>>> application. Is it possible for the python agents in Slider to know
>>>>>> there
>>>>>> are the same roles that are going to be started in the same machine
>>>>>> and
>>>>>> avoid the port conflicts?
>>>>>>
>>>>>> If there are already the same roles running, I can check by catching
>>>>>> the
>>>>>> exception easily. What if multiple same roles are starting
>>>>>> simultaneously?
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> --
>>>>>> Rui Zhang
>>>>>> Software engineer Intern
>>>>>> Vertica, an HP Company
>>>>>> rzh...@vertica.com
>>>>>>
>>>>>>
>>>>>>
>>>>>>  --
>>>> Rui Zhang
>>>> Software engineer Intern
>>>> Vertica, an HP Company
>>>> rzh...@vertica.com
>>>>
>>>>
>>>>
>>
> --
> Rui Zhang
> Software engineer Intern
> Vertica, an HP Company
> rzh...@vertica.com
>
>

-- 
CONFIDENTIALITY NOTICE
NOTICE: This message is intended for the use of the individual or entity to 
which it is addressed and may contain information that is confidential, 
privileged and exempt from disclosure under applicable law. If the reader 
of this message is not the intended recipient, you are hereby notified that 
any printing, copying, dissemination, distribution, disclosure or 
forwarding of this communication is strictly prohibited. If you have 
received this communication in error, please contact the sender immediately 
and delete it from your system. Thank You.

Reply via email to