You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@drill.apache.org by David Tucker <dt...@maprtech.com> on 2015/01/14 06:58:24 UTC
Strange error when trying to use REST interface to configure a storage plug-in
Has anyone seen the error
Error 415 Unsupported Media Type
when trying to use the REST interface to create a new plug-in ?
— David
DETAILS
The json file describing the plug-in is :
{
"name" : "mdb",
"config" : {
"type" : "hbase",
"config" : {
"hbase.table.namespace.mappings" : "*:/tables"
},
"size.calculator.enabled" : false,
"enabled" : true
}
}
This is an exact copy of a working plug-in of a different name.
I try to insert the plug-in with the command
curl -X POST -H "ContentType: application/json” \
--upload-file mdb.json \
http://localhost:8047/storage/mdb.json
The full response is
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Error 415 Unsupported Media Type</title>
</head>
<body><h2>HTTP ERROR 415</h2>
<p>Problem accessing /storage/mdb.json. Reason:
<pre> Unsupported Media Type</pre></p><hr><i><small>Powered by Jetty://</small></i><hr/>
</body>
</html>
Re: Strange error when trying to use REST interface to configure a storage plug-in
Posted by David Tucker <dt...@maprtech.com>.
Right on the money, Mr. Bates !
It was the incorrect “-H ContentType:” argument. Correcting to “-H Content-Type:” resolved the issue.
— David
On Jan 14, 2015, at 5:03 AM, Jim Bates <jb...@maprtech.com> wrote:
> what does the trace of the post look like?. Also, is there suposed to be a
> - in your ContentType? It could be putting in the Content-Type header in
> additiin to the one you specified.
> On Jan 14, 2015 12:00 AM, "David Tucker" <dt...@maprtech.com> wrote:
>
>> Has anyone seen the error
>> Error 415 Unsupported Media Type
>> when trying to use the REST interface to create a new plug-in ?
>>
>> — David
>>
>>
>> DETAILS
>>
>> The json file describing the plug-in is :
>> {
>> "name" : "mdb",
>> "config" : {
>> "type" : "hbase",
>> "config" : {
>> "hbase.table.namespace.mappings" : "*:/tables"
>> },
>> "size.calculator.enabled" : false,
>> "enabled" : true
>> }
>> }
>>
>> This is an exact copy of a working plug-in of a different name.
>>
>> I try to insert the plug-in with the command
>>
>> curl -X POST -H "ContentType: application/json” \
>> --upload-file mdb.json \
>> http://localhost:8047/storage/mdb.json
>>
>> The full response is
>> <html>
>> <head>
>> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
>> <title>Error 415 Unsupported Media Type</title>
>> </head>
>> <body><h2>HTTP ERROR 415</h2>
>> <p>Problem accessing /storage/mdb.json. Reason:
>> <pre> Unsupported Media Type</pre></p><hr><i><small>Powered by
>> Jetty://</small></i><hr/>
>>
>> </body>
>> </html>
>>
>>
Re: Strange error when trying to use REST interface to configure a
storage plug-in
Posted by Jim Bates <jb...@maprtech.com>.
what does the trace of the post look like?. Also, is there suposed to be a
- in your ContentType? It could be putting in the Content-Type header in
additiin to the one you specified.
On Jan 14, 2015 12:00 AM, "David Tucker" <dt...@maprtech.com> wrote:
> Has anyone seen the error
> Error 415 Unsupported Media Type
> when trying to use the REST interface to create a new plug-in ?
>
> — David
>
>
> DETAILS
>
> The json file describing the plug-in is :
> {
> "name" : "mdb",
> "config" : {
> "type" : "hbase",
> "config" : {
> "hbase.table.namespace.mappings" : "*:/tables"
> },
> "size.calculator.enabled" : false,
> "enabled" : true
> }
> }
>
> This is an exact copy of a working plug-in of a different name.
>
> I try to insert the plug-in with the command
>
> curl -X POST -H "ContentType: application/json” \
> --upload-file mdb.json \
> http://localhost:8047/storage/mdb.json
>
> The full response is
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
> <title>Error 415 Unsupported Media Type</title>
> </head>
> <body><h2>HTTP ERROR 415</h2>
> <p>Problem accessing /storage/mdb.json. Reason:
> <pre> Unsupported Media Type</pre></p><hr><i><small>Powered by
> Jetty://</small></i><hr/>
>
> </body>
> </html>
>
>