       }
     }
     req = http.request(opts, (response) ->
+      hasEnded = false
       # response.statusCode
       # response.headers
       # response.statusCode

        socket.on 'timeout', -> req.abort()

    req.on 'error', (e) ->
      return if callbacked
      callback(e)
      callbacked = true
      return

    req.write(queryBuffer.toString('utf-8'))


module.exports = ({host, port, timeout}) ->
  return ({context, query}, callback) ->
    path = '/druid/v2/'
    if query.queryType is 'heatmap'
      # Druid is f-ed
