[
https://issues.apache.org/jira/browse/SOLR-3617?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Timothy Potter updated SOLR-3617:
---------------------------------
Attachment: SOLR-3617.patch
Here's an updated patch with the following:
1) bin/solr.cmd
For our Windows users ;-) I did my best to emulate the behavior of the Linux
script (bin/solr). The main difference between the Windows version and the
Linux version is that I don't know how to implement the stop all in the .cmd
version, so currently, the user needs to do: solr stop -p PORT. In the Linux,
if you don't pass the port, it stops all running Solrs, which may be too heavy
handed anyway so easiest might be to fix the Linux version to require the port
too.
In general, I'm not a Windows user so there may be some things in this
implementation that can be done cleaner / easier. Happy to have suggestions on
how to improve it.
2) Added a restart mode, which stops and starts the Solr server again. Thus, if
you re-issue start when a server is running, it complains vs. stop / start as
it did before.
Lastly, I'm still sorting out how to implement the cloud example. Specifically,
I'm wondering if we should walk the user through using prompts and reading from
stdin, that way it's a little more interactive, something like:
$ cd solr-5.0.0/bin
$ ./solr -e cloud
Welcome to the SolrCloud example!
Please enter the number of local nodes you would like to run? [2] <-- default
2
Ok, let's start up 2 Solr nodes for your example SolrCloud cluster.
Enter the port for node1: [8983]
8983
Enter the port for node2: [7574]
7574
Oops! It looks like there is already something running on port 7574, please
choose another port: [7575]
7575
Ok, starting node1 on port 8983 with embedded ZooKeeper listening on
localhost:9983
Now starting node2 on port 7575
Success! Found 2 active nodes in your cluster.
Do you want to create a new collection? Y/n
Y
Collection name? [collection1]
collection1
How many shards? [2]
2
How many replicas per shard? [1]
1
Ok, collection1 created successfully, do you want to index some documents? Y/n
Y
Path to file to index: [example/exampledocs/mem.xml]
<path>
...
We could also just support a -q flag to indicate "quiet" mode and just accept
all defaults from the interactive session. And of course -V will activate a
verbose mode that probably shows more of the commands being run during the
interactive session.
> Consider adding start scripts.
> ------------------------------
>
> Key: SOLR-3617
> URL: https://issues.apache.org/jira/browse/SOLR-3617
> Project: Solr
> Issue Type: New Feature
> Reporter: Mark Miller
> Attachments: SOLR-3617.patch, SOLR-3617.patch
>
>
> I've always found that starting Solr with java -jar start.jar is a little odd
> if you are not a java guy, but I think there are bigger pros than looking
> less odd in shipping some start scripts.
> Not only do you get a cleaner start command:
> sh solr.sh or solr.bat or something
> But you also can do a couple other little nice things:
> * it becomes fairly obvious for a new casual user to see how to start the
> system without reading doc.
> * you can make the working dir the location of the script - this lets you
> call the start script from another dir and still have all the relative dir
> setup work.
> * have an out of the box place to save startup params like -Xmx.
> * we could have multiple start scripts - say solr-dev.sh that logged to the
> console and default to sys default for RAM - and also solr-prod which was
> fully configured for logging, pegged Xms and Xmx at some larger value (1GB?)
> etc.
> You would still of course be able to make the java cmd directly - and that is
> probably what you would do when it's time to run as a service - but these
> could be good starter scripts to get people on the right track and improve
> the initial user experience.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]