[jira] [Updated] (SOLR-10628) Less verbose output from bin/solr create

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[jira] [Updated] (SOLR-10628) Less verbose output from bin/solr create

JIRA jira@apache.org

     [ https://issues.apache.org/jira/browse/SOLR-10628?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jason Gerlowski updated SOLR-10628:
-----------------------------------
    Attachment: SOLR-10628.patch

Patch demonstrating how this could be done.  Tests/precommit pass.

*Notes*
- When Solr starts up, it looks at the {{solr.log.level}} system property, and overrides the configured log-level based on that.  This patch adds similar logic to {{SolrCLI}} (but based on a "verbose" flag instead of {{solr.log.level}}).  I did the log-level overriding in this patch the same way Solr does it on startup: via a direct call to the "forbidden" LogManager log4j class (which then requires a SuppressForbidden annotation).  This might be OK, since it lines up with precedent elsewhere.  But it might be nice to find a better way to override the log level.  Happy to receive some direction on that.  See [StartupLoggingUtils|https://github.com/apache/lucene-solr/blob/e2521b2a8baabdaf43b92192588f51e042d21e97/solr/core/src/java/org/apache/solr/servlet/StartupLoggingUtils.java#L86] for more context

> Less verbose output from bin/solr create
> ----------------------------------------
>
>                 Key: SOLR-10628
>                 URL: https://issues.apache.org/jira/browse/SOLR-10628
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public)
>            Reporter: Jan Høydahl
>            Assignee: Jan Høydahl
>         Attachments: SOLR-10628.patch
>
>
> Creating a collection with {{bin/solr create}} today is too verbose:
> {noformat}
> $ bin/solr create -c foo
> Connecting to ZooKeeper at localhost:9983 ...
> INFO  - 2017-05-08 09:06:54.409; org.apache.solr.client.solrj.impl.ZkClientClusterStateProvider; Cluster at localhost:9983 ready
> Uploading /Users/janhoy/git/lucene-solr/solr/server/solr/configsets/data_driven_schema_configs/conf for config foo to ZooKeeper at localhost:9983
> Creating new collection 'foo' using command:
> http://localhost:8983/solr/admin/collections?action=CREATE&name=foo&numShards=1&replicationFactor=1&maxShardsPerNode=1&collection.configName=foo
> {
>   "responseHeader":{
>     "status":0,
>     "QTime":4178},
>   "success":{"192.168.127.248:8983_solr":{
>       "responseHeader":{
>         "status":0,
>         "QTime":2959},
>       "core":"foo_shard1_replica1"}}}
> {noformat}
> A normal user don't need all this info. Propose to move all the details to verbose mode ({{-V)}} and let the default be the following instead:
> {noformat}
> $ bin/solr create -c foo
> Connecting to ZooKeeper at localhost:9983 ...
> Created collection 'foo' with 1 shard(s), 1 replica(s) using config-set 'data_driven_schema_configs'
> {noformat}
> Error messages must of course still be verbose.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...