lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ishan Chattopadhyaya <ichattopadhy...@gmail.com>
Subject Re: bin/solr arg parsing duplication
Date Mon, 07 Aug 2017 15:40:23 GMT
There's https://issues.apache.org/jira/browse/SOLR-7871 which has some
relevant discussion in these painpoints.
Frankly, working with solr.cmd has been one of the toughest things I've had
to deal with in last few months (thanks to my inability to work with
Windows script).

On Mon, Aug 7, 2017 at 10:19 AM, Anshum Gupta <anshum@anshumgupta.net>
wrote:

> Hi Jason,
>
> The history behind the scripts is that they were simpler, and were done to
> make things easier for end users. Not sure if you have worked with the
> 'bootstrap' part of the command that predated these scripts, but the
> intention was to move away from those.
>
> There was an intention to move the code that can be moved to Java, and do
> the heavy lifting there, considering that would also mean reduplication of
> code between the *nix, and the windows scripts but due to lack of
> bandwidth, that was never done.
>
> It'd be great to get a patch on the same and have this move out of the bin
> scripts altogether. Feel free to create a JIRA and start working on it.
>
> In case someone else more to add, please do.
>
> Anshum
>
> On Sun, Aug 6, 2017 at 7:43 PM Jason Gerlowski <gerlowskija@gmail.com>
> wrote:
>
>> I noticed recently that arg validation/parsing/help-text for the
>> "create", "delete", "auth", "zk", etc. commands makes up a huge chunk
>> of the (bin/solr) scripts.  (Some 600 lines by a quick count!)
>>
>> This is a shame, since that logic is duplicated across two
>> platform-specific scripts.
>>
>> I'm not familiar with the history of these scripts; is there a reason
>> this logic lives here?  I know that some args must be examined before
>> we enter Java-land ("--verbose", JVM args, come to mind).  But is
>> there a reason the other arguments are parsed/examined there as well?
>>
>> If there's not, moving that logic to Java would gain us a few things:
>>
>> - removes duplication
>> - makes test-writing for this logic possible
>> - Java-logic is more accessible/readable to some than bash/Windows-shell.
>>
>> Is there anything I'm missing about this logic living in the bin
>> scripts?  I'm happy to create a JIRA and do the leg-work for the
>> change if this is something we're interested in.  Just wanted to ask
>> around before starting, due to my lack of background.
>>
>> Thanks for clarification, if anyone has any to offer.
>>
>> Best,
>>
>> Jason
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: dev-help@lucene.apache.org
>>
>>

Mime
View raw message