You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@solr.apache.org by Gus Heck <gu...@gmail.com> on 2022/03/11 20:44:18 UTC

Names of several things

I'm digging around trying to create some custom monitoring stuff, and
realizing that the names of things (in 8.6 at least, thats what the client
is running) are kind of all over the place.


   1. Replica.getName() = core_node# - This is a pretty much useless string
   that doesn't correspond to much else and is only unique within a collection
   and easily duplicated across collections
   2. Replica.getCore().getName() = collection_shard#_replica_n# - This
   gets a name that includes the collection an shard name and therefore is not
   duplicated within a cluster (but could be duplicated across separate
   clusters. It's vaguely strange that the legacy "core" name is more aware of
   cluster location that the cloud focused replica name.
   3. Replica.getNodeName() = machine.domain.foo.local:####_solr - Good
   that it includes a port number, can have more than one solr on a machine.
   Not sure why we waste an extra 5 chars on '_solr' but whatever.
   4. CoreContainer.getNodeConfig().getNodeName() = machine.domain.foo.local
   - bad, because it doesn't include a port, and thus could be duplicated
   within a cluster

Thoughts?

-Gus

-- 
http://www.needhamsoftware.com (work)
http://www.the111shift.com (play)

Re: Names of several things

Posted by Gus Heck <gu...@gmail.com>.
Oops mistake there typing from memory: Replica doesn't actually have a ref
to the core, but it does have getCoreName().

On Fri, Mar 11, 2022 at 3:44 PM Gus Heck <gu...@gmail.com> wrote:

> I'm digging around trying to create some custom monitoring stuff, and
> realizing that the names of things (in 8.6 at least, thats what the client
> is running) are kind of all over the place.
>
>
>    1. Replica.getName() = core_node# - This is a pretty much useless
>    string that doesn't correspond to much else and is only unique within a
>    collection and easily duplicated across collections
>    2. Replica.getCore().getName() = collection_shard#_replica_n# - This
>    gets a name that includes the collection an shard name and therefore is not
>    duplicated within a cluster (but could be duplicated across separate
>    clusters. It's vaguely strange that the legacy "core" name is more aware of
>    cluster location that the cloud focused replica name.
>    3. Replica.getNodeName() = machine.domain.foo.local:####_solr - Good
>    that it includes a port number, can have more than one solr on a machine.
>    Not sure why we waste an extra 5 chars on '_solr' but whatever.
>    4. CoreContainer.getNodeConfig().getNodeName() =
>    machine.domain.foo.local - bad, because it doesn't include a port, and
>    thus could be duplicated within a cluster
>
> Thoughts?
>
> -Gus
>
> --
> http://www.needhamsoftware.com (work)
> http://www.the111shift.com (play)
>


-- 
http://www.needhamsoftware.com (work)
http://www.the111shift.com (play)

Re: Names of several things

Posted by Shawn Heisey <ap...@elyograg.org>.
On 3/11/22 13:44, Gus Heck wrote:
> Replica.getNodeName() = machine.domain.foo.local:####_solr - Good that 
> it includes a port number, can have more than one solr on a machine. 
> Not sure why we waste an extra 5 chars on '_solr' but whatever.

For this specific one, I think it is recording something acknowledging 
the "/solr" path for the URL.  I think we now expect this to be 
hardcoded to /solr these days since we don't distribute a WAR anymore, 
so maybe that part is not needed.

I'm all for coming up with a convention for naming these disparate 
pieces and sticking to it.

Thanks,
Shawn


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
For additional commands, e-mail: dev-help@solr.apache.org