Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-3590

storage plugin config API doesn't log exceptions or yield any useful error

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.7.0
    • Future
    • Storage - Other
    • None
    • Linux

    Description

      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:

      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
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            jbarefoot Joseph Barefoot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: