[
https://issues.apache.org/jira/browse/SOLR-6736?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15004979#comment-15004979
]
Anshum Gupta commented on SOLR-6736:
------------------------------------
Thanks for the patch Varun.
It would also be good to leave room for allowing/disallowing/checking certain
properties in the config file itself, even if that requires some sort of
parsing e.g. remoteStreaming etc. to make sure that the files don't contain
undesirable settings. Just to be clear, I'm not saying we hard-code this in
there, but leave room for either configuration or extension.
Also, in addition to what Greg mentioned, here are a few more minor suggestions:
* the use of final keyword isn't required here:
{code}
final String ENABLE_CONFIGSET_UPLOAD = "configs.upload";
final String ENABLE_CONFIGSET_UPLOAD_DEFAULT = "false";
{code}
* In ConfigSetsHandler, the error code shouldn't be UNAUTHORIZED as no other
user/credentials would be allowed to do this. Perhaps a FORBIDDEN or
BAD_REQUEST would serve this better?
{code}
throw new SolrException(SolrException.ErrorCode.UNAUTHORIZED,
"Uploads are not enabled. Please set the system property \""
+ ConfigSetParams.ENABLE_CONFIGSET_UPLOAD + "\" to true");
{code}
* With 'Exception' there, you should remove everything else from
ConfigSetsHandler here:
{code}
private void hanldeConfigUploadRequest(SolrQueryRequest req,
SolrQueryResponse rsp) throws IOException,
KeeperException, InterruptedException, Exception {
{code}
* Very small and trivial but there are a few unwanted imports.
> A collections-like request handler to manage solr configurations on zookeeper
> -----------------------------------------------------------------------------
>
> Key: SOLR-6736
> URL: https://issues.apache.org/jira/browse/SOLR-6736
> Project: Solr
> Issue Type: New Feature
> Components: SolrCloud
> Reporter: Varun Rajput
> Assignee: Anshum Gupta
> Attachments: SOLR-6736-newapi.patch, SOLR-6736-newapi.patch,
> SOLR-6736.patch, SOLR-6736.patch, SOLR-6736.patch, SOLR-6736.patch,
> SOLR-6736.patch, SOLR-6736.patch, SOLR-6736.patch, SOLR-6736.patch,
> newzkconf.zip, test_private.pem, test_pub.der, zkconfighandler.zip,
> zkconfighandler.zip
>
>
> Managing Solr configuration files on zookeeper becomes cumbersome while using
> solr in cloud mode, especially while trying out changes in the
> configurations.
> It will be great if there is a request handler that can provide an API to
> manage the configurations similar to the collections handler that would allow
> actions like uploading new configurations, linking them to a collection,
> deleting configurations, etc.
> example :
> {code}
> #use the following command to upload a new configset called mynewconf. This
> will fail if there is alredy a conf called 'mynewconf'. The file could be a
> jar , zip or a tar file which contains all the files for the this conf.
> curl -X POST -H 'Content-Type: application/octet-stream' --data-binary
> @testconf.zip
> http://localhost:8983/solr/admin/configs/mynewconf?sig=<the-signature>
> {code}
> A GET to http://localhost:8983/solr/admin/configs will give a list of configs
> available
> A GET to http://localhost:8983/solr/admin/configs/mynewconf would give the
> list of files in mynewconf
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]