You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Joseph Barefoot (JIRA)" <ji...@apache.org> on 2015/07/31 20:57:05 UTC
[jira] [Created] (DRILL-3590) storage plugin config API doesn't log
exceptions or yield any useful error
Joseph Barefoot created DRILL-3590:
--------------------------------------
Summary: storage plugin config API doesn't log exceptions or yield any useful error
Key: DRILL-3590
URL: https://issues.apache.org/jira/browse/DRILL-3590
Project: Apache Drill
Issue Type: Improvement
Components: Storage - Other
Environment: Linux
Reporter: Joseph Barefoot
Assignee: Jacques Nadeau
Not sure if I have the component right here. This is regarding the REST API for configuring a storage plugin. It's not specific to any particular plugin, rather how you configure any of them. The REST API is critical for automating setup of Drill within a cluster, as such being able to debug it is pretty critical as well.
The problem lies with how the endpoints handle exceptions as you can see here:
https://github.com/apache/drill/blob/9e164662f5296f7048c880c40bc551030fb58cca/exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/StorageResources.java
Every method/endpoint in that class eats the exception, there's really no way to figure out what's going wrong without connecting a debugger (besides just guessing). The generic error return messages in the REST response aren't so bad, but not logging the exception on the server makes life tough for devs like me. Ideally all of the endpoints (not just the one for storage config that tripped me up) would log the exceptions and maybe even return them in the error response as well.
In my particular case, I was configuring Hive and simply had the Metastore port wrong (typo). I imagine that would have been pretty obvious from a nested exception stack trace, if I had been able to see it in the log. Instead I couldn't tell if there was some internal Drill error or what. Here's the curl call I was using, just for reference:
{code}
curl -X POST -H "Content-Type: application/json" -d '
{"name":"hive",
"config":
{
"type": "hive",
"enabled": true,
"configProps": {
"hive.metastore.uris": "thrift://192.168.99.9:9083",
"hive.metastore.sasl.enabled": "false"
}
}
}' http://192.168.99.9:8047/storage/hive.json
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)