Merge branch 'master' into igalDruid

This commit is contained in:
Igal Levy 2013-11-25 13:00:46 -08:00
commit 9750537d61
5 changed files with 8 additions and 5 deletions

View File

@ -140,7 +140,8 @@ The result looks something like this:
This groupBy query is a bit complicated and we'll return to it later. For the time being, just make sure you are getting some blocks of data back. If you are having problems, make sure you have [curl](http://curl.haxx.se/) installed. Control+C to break out of the client script.
h2. Querying Druid
Querying Druid
--------------
In your favorite editor, create the file:

View File

@ -49,7 +49,7 @@ public class JacksonModule implements Module
public ObjectMapper smileMapper()
{
ObjectMapper retVal = new DefaultObjectMapper(new SmileFactory());
retVal.getJsonFactory().setCodec(retVal);
retVal.getFactory().setCodec(retVal);
return retVal;
}
}

View File

@ -89,7 +89,7 @@ public class DirectDruidClient<T> implements QueryRunner<T>
this.httpClient = httpClient;
this.host = host;
this.isSmile = this.objectMapper.getJsonFactory() instanceof SmileFactory;
this.isSmile = this.objectMapper.getFactory() instanceof SmileFactory;
this.openConnections = new AtomicInteger();
}
@ -269,7 +269,7 @@ public class DirectDruidClient<T> implements QueryRunner<T>
{
if (jp == null) {
try {
jp = objectMapper.getJsonFactory().createJsonParser(future.get());
jp = objectMapper.getFactory().createParser(future.get());
if (jp.nextToken() != JsonToken.START_ARRAY) {
throw new IAE("Next token wasn't a START_ARRAY, was[%s]", jp.getCurrentToken());
} else {
@ -292,7 +292,9 @@ public class DirectDruidClient<T> implements QueryRunner<T>
@Override
public void close() throws IOException
{
jp.close();
if(jp != null) {
jp.close();
}
}
}
}