You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@solr.apache.org by Jason Gerlowski <ge...@gmail.com> on 2021/12/06 11:50:51 UTC

Core-Admin "INVOKE" action/subcommand

Hey all,

The /admin/cores API has an "INVOKE" subcommand.  It takes in one or
more names of classes that implement an interface called 'Invocable'.
For each provided classname, the API loads the class and calls an
'invoke' method, if present.  As best as I can tell from the git
history, it was introduced by SOLR-6220 "Replica placement strategy
for SolrCloud", but I don't understand how that feature worked well
enough to understand how it might've been used for that purpose.

Does anyone know what the purpose of this API is, and whether it's
used for anything today?  In terms of whether it's still used, there
are two test methods that make sure it spits out 400's when arguments
are missing, but otherwise I don't see any tests for it. (All other
tests pass when I delete the INVOKE code, for what it's worth.)  And
it's not mentioned anywhere in the ref-guide as far as I can tell.

Anyway, anyone have context on what this API did or does?

Best,

Jason

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


Re: Core-Admin "INVOKE" action/subcommand

Posted by Noble Paul <no...@gmail.com>.
The invoke API should be removed as it is not used anymore

--thanks

On Tue, Dec 7, 2021 at 12:34 AM Jason Gerlowski <ge...@gmail.com>
wrote:

> Ah, ok.  Do you know if it's still used by the overseer in some capacity?
>
> I expected it would be an internal API, and undocumented as such.  But
> as far as I can tell it's dead-functionality currently.  The "invoked"
> classes have to implement an "Invocable" interface.  At the time the
> API was introduced there was an "ImplicitSnitch" class that fit the
> bill, snitches are gone in 9.0, and there are no "Invocable"
> implementations in Solr today, unless I'm missing something?
>
> If Solr doesn't provide any "Invocable" implementations and the API
> wasn't written as some way to support custom code/plugins, then maybe
> it can be removed?
>
> Jason
>
> On Mon, Dec 6, 2021 at 6:59 AM Noble Paul <no...@gmail.com> wrote:
> >
> > It's an internal API and not advertised. IIRC , it's used by overseer to
> invoke some functionality on nodes, but the API on the node itself is
> undocumented (we do not expect users to know or use them)
> >
> > On Mon, Dec 6, 2021, 10:51 PM Jason Gerlowski <ge...@gmail.com>
> wrote:
> >>
> >> Hey all,
> >>
> >> The /admin/cores API has an "INVOKE" subcommand.  It takes in one or
> >> more names of classes that implement an interface called 'Invocable'.
> >> For each provided classname, the API loads the class and calls an
> >> 'invoke' method, if present.  As best as I can tell from the git
> >> history, it was introduced by SOLR-6220 "Replica placement strategy
> >> for SolrCloud", but I don't understand how that feature worked well
> >> enough to understand how it might've been used for that purpose.
> >>
> >> Does anyone know what the purpose of this API is, and whether it's
> >> used for anything today?  In terms of whether it's still used, there
> >> are two test methods that make sure it spits out 400's when arguments
> >> are missing, but otherwise I don't see any tests for it. (All other
> >> tests pass when I delete the INVOKE code, for what it's worth.)  And
> >> it's not mentioned anywhere in the ref-guide as far as I can tell.
> >>
> >> Anyway, anyone have context on what this API did or does?
> >>
> >> Best,
> >>
> >> Jason
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
> >> For additional commands, e-mail: dev-help@solr.apache.org
> >>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
> For additional commands, e-mail: dev-help@solr.apache.org
>
>

-- 
-----------------------------------------------------
Noble Paul

Re: Core-Admin "INVOKE" action/subcommand

Posted by Jason Gerlowski <ge...@gmail.com>.
Ah, ok.  Do you know if it's still used by the overseer in some capacity?

I expected it would be an internal API, and undocumented as such.  But
as far as I can tell it's dead-functionality currently.  The "invoked"
classes have to implement an "Invocable" interface.  At the time the
API was introduced there was an "ImplicitSnitch" class that fit the
bill, snitches are gone in 9.0, and there are no "Invocable"
implementations in Solr today, unless I'm missing something?

If Solr doesn't provide any "Invocable" implementations and the API
wasn't written as some way to support custom code/plugins, then maybe
it can be removed?

Jason

On Mon, Dec 6, 2021 at 6:59 AM Noble Paul <no...@gmail.com> wrote:
>
> It's an internal API and not advertised. IIRC , it's used by overseer to invoke some functionality on nodes, but the API on the node itself is undocumented (we do not expect users to know or use them)
>
> On Mon, Dec 6, 2021, 10:51 PM Jason Gerlowski <ge...@gmail.com> wrote:
>>
>> Hey all,
>>
>> The /admin/cores API has an "INVOKE" subcommand.  It takes in one or
>> more names of classes that implement an interface called 'Invocable'.
>> For each provided classname, the API loads the class and calls an
>> 'invoke' method, if present.  As best as I can tell from the git
>> history, it was introduced by SOLR-6220 "Replica placement strategy
>> for SolrCloud", but I don't understand how that feature worked well
>> enough to understand how it might've been used for that purpose.
>>
>> Does anyone know what the purpose of this API is, and whether it's
>> used for anything today?  In terms of whether it's still used, there
>> are two test methods that make sure it spits out 400's when arguments
>> are missing, but otherwise I don't see any tests for it. (All other
>> tests pass when I delete the INVOKE code, for what it's worth.)  And
>> it's not mentioned anywhere in the ref-guide as far as I can tell.
>>
>> Anyway, anyone have context on what this API did or does?
>>
>> Best,
>>
>> Jason
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
>> For additional commands, e-mail: dev-help@solr.apache.org
>>

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


Re: Core-Admin "INVOKE" action/subcommand

Posted by Noble Paul <no...@gmail.com>.
It's an internal API and not advertised. IIRC , it's used by overseer to
invoke some functionality on nodes, but the API on the node itself is
undocumented (we do not expect users to know or use them)

On Mon, Dec 6, 2021, 10:51 PM Jason Gerlowski <ge...@gmail.com> wrote:

> Hey all,
>
> The /admin/cores API has an "INVOKE" subcommand.  It takes in one or
> more names of classes that implement an interface called 'Invocable'.
> For each provided classname, the API loads the class and calls an
> 'invoke' method, if present.  As best as I can tell from the git
> history, it was introduced by SOLR-6220 "Replica placement strategy
> for SolrCloud", but I don't understand how that feature worked well
> enough to understand how it might've been used for that purpose.
>
> Does anyone know what the purpose of this API is, and whether it's
> used for anything today?  In terms of whether it's still used, there
> are two test methods that make sure it spits out 400's when arguments
> are missing, but otherwise I don't see any tests for it. (All other
> tests pass when I delete the INVOKE code, for what it's worth.)  And
> it's not mentioned anywhere in the ref-guide as far as I can tell.
>
> Anyway, anyone have context on what this API did or does?
>
> Best,
>
> Jason
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
> For additional commands, e-mail: dev-help@solr.apache.org
>
>