Hi Devdatta, the “not enough direct memory” is likely because you didn’t set correct JVM parameters for direct memory. THe actual error message will tell you exactly what is not set correctly and how to fix it.
In terms of issues with your query, have you had a chance to read http://druid.io/docs/latest/design/index.html about rollup? Also see http://druid.io/docs/latest/ingestion/faq.html around seemingly incorrect event values. Hint: your aggregator is wrong.