[ https://issues.apache.org/jira/browse/DRILL-7190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16822315#comment-16822315 ]
Vitalii Diravka edited comment on DRILL-7190 at 4/20/19 9:52 PM: ----------------------------------------------------------------- 1. It is changed, because one more file format for Drill Storage Plugins is added and specifying this is necessary to distinguish file formats. But the old behavior can be preserved and JSON format can be chosen for the URL without file format string. 2. Looks like */storage/\{name}* isn't default way to update/create Storage Plugins. According to [Drill documentation|https://drill.apache.org/docs/rest-api-introduction/#post-storage-name-json] it is POST /storage/\{name}.json. And it wasn't changed and works fine. {code:java} vitalii@vitalii-UX331UN:~$ curl -X POST -H "Content-Type: application/json" -d '{"name":"kudu", "config": {"type": "kudu", "masterAddrsses": "1.2.3.5", "enabled": true}}' http://localhost:8047/storage/kudu.json { "result" : "Success" }{code} But I will add the functionality, which existed earlier in case somebody uses that approach for some reason. 3. It was removed occasionally. I will return this change Additionally I will returned DELETE request, since according [Drill documentation|https://drill.apache.org/docs/rest-api-introduction/#delete-storage-name-json] this is the default way to remove Storage Plugins by REST API. was (Author: vitalii): 1. It is changed, because one more file format for Drill Storage Plugins is added and specifying this is necessary to distinguish file formats. But the old behavior can be preserved and JSON format can be chosen for the URL without file format string. 2. Looks like */storage/\{name}* isn't default way to update/create Storage Plugins. According to [Drill documentation|https://drill.apache.org/docs/rest-api-introduction/#post-storage-name-json] it is POST /storage/\{name}.json. And it wasn't changed and works fine. {code:java} vitalii@vitalii-UX331UN:~$ curl -X POST -H "Content-Type: application/json" -d '{"name":"kudu", "config": {"type": "kudu", "masterAddrsses": "1.2.3.5", "enabled": true}}' http://localhost:8047/storage/kudu.json { "result" : "Success" }{code} But I will add the functionality, which existed earlier in case somebody uses that approach for some reason. 3. It was removed occasionally. I will return this change Additionally I will returned DELETE request, since according [Drill documentation|https://drill.apache.org/docs/rest-api-introduction/#delete-storage-name-json] this is the default way to remove Storage Plugins by REST API. But also improved it by allowing to omit file format in the DELETE request Path. I will let Bridget know to update the doc. > Missing backward compatibility for REST API with DRILL-6562 > ----------------------------------------------------------- > > Key: DRILL-7190 > URL: https://issues.apache.org/jira/browse/DRILL-7190 > Project: Apache Drill > Issue Type: Bug > Components: Web Server > Affects Versions: 1.16.0 > Reporter: Sorabh Hamirwasia > Assignee: Vitalii Diravka > Priority: Blocker > Fix For: 1.16.0 > > > With DRILL-6562 I am seeing additional changes which is not supporting older > requests URL. For example: > 1) Earlier export of plugin config was done for json format by default using > URL: */storage/\{name}/export* and now the new URL is > */storage/\{name}/export/\{format}*. This means the older one is not > supported anymore. Is it intended or should we treat the format as JSON by > default if not provided ? > 2) The POST URL to create and update plugin is changed from > */storage/\{name}* to */storage/create_update* > 3) Once a storage plugin is deleted it is not redirected to */storage* > anymore, which it was in 1.15. Because of this line change: > [https://github.com/apache/drill/commit/5fff1d8bff899e1af551c16f26a58b6b1d033ffb#diff-274673e64e6f54be595a8703753123b0R115] -- This message was sent by Atlassian JIRA (v7.6.3#76005)