Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add profile name to TransportChannel #10483

Closed
jaymode opened this issue Apr 8, 2015 · 1 comment · Fixed by #11261
Closed

add profile name to TransportChannel #10483

jaymode opened this issue Apr 8, 2015 · 1 comment · Fixed by #11261

Comments

@jaymode
Copy link
Member

jaymode commented Apr 8, 2015

The NettyTransportChannel has a profile name, which is the name of the profile that the channel belongs to. These profiles allow for binding to multiple addresses and/or ports.

After #10350 there is a new TransportChannel implementation, DirectResponseChannel, used in the netty transport, which does not have the profile information. This implementation should provide a profile name to make it easier to deal with logic based on profiles in the netty transport. The name could be something like __local__.

Adding the getProfileName method to the TransportChannel interface may make sense here as other transport implementations may implement the profile concept and those that don't can just return a default name.

@bleskes
Copy link
Contributor

bleskes commented Apr 8, 2015

One more note that whether we use __local__ or something else, we need to make sure we don’t allow people to use that name when configuring profiles in their settings (transport.profiles.*). It also seems we use .client in one place. .local then perhaps?

On 08 Apr 2015, at 14:56, Jay Modi notifications@github.com wrote:

The NettyTransportChannel has a profile name, which is the name of the profile that the channel belongs to. These profiles allow for binding to multiple addresses and/or ports.

After #10350 there is a new TransportChannel implementation, DirectResponseChannel, used in the netty transport, which does not have the profile information. This implementation should provide a profile name to make it easier to deal with logic based on profiles in the netty transport. The name could be something like local.

Adding the getProfileName method to the TransportChannel interface may make sense here as other transport implementations may implement the profile concept and those that don't can just return a default name.


Reply to this email directly or view it on GitHub.

@jaymode jaymode self-assigned this May 19, 2015
jaymode added a commit to jaymode/elasticsearch that referenced this issue May 20, 2015
Today, only the NettyTransportChannel implements the getProfileName method
and the other channel implementations do not. The profile name is useful for some
plugins to perform custom actions based on the name. Rather than checking the
type of the channel, it makes sense to always expose the profile name.

For DirectResponseChannels we use a name that cannot be used in the settings
to define another profile with that name. For LocalTransportChannel we use the
same name as the default profile.

Closes elastic#10483
jaymode added a commit to jaymode/elasticsearch that referenced this issue May 21, 2015
Today, only the NettyTransportChannel implements the getProfileName method
and the other channel implementations do not. The profile name is useful for some
plugins to perform custom actions based on the name. Rather than checking the
type of the channel, it makes sense to always expose the profile name.

For DirectResponseChannels we use a name that cannot be used in the settings
to define another profile with that name. For LocalTransportChannel we use the
same name as the default profile.

Closes elastic#10483
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants