fix serde problem in CCC and better defaults for jetty threads

This commit is contained in:
fjy 2013-11-18 13:14:18 -08:00
parent 60dbdcebac
commit c5361cc100
3 changed files with 4 additions and 4 deletions

View File

@ -42,6 +42,7 @@ import com.metamx.emitter.EmittingLogger;
import io.druid.client.cache.Cache;
import io.druid.client.selector.QueryableDruidServer;
import io.druid.client.selector.ServerSelector;
import io.druid.guice.annotations.Smile;
import io.druid.query.BySegmentResultValueClass;
import io.druid.query.CacheStrategy;
import io.druid.query.Query;
@ -86,7 +87,7 @@ public class CachingClusteredClient<T> implements QueryRunner<T>
QueryToolChestWarehouse warehouse,
TimelineServerView serverView,
Cache cache,
ObjectMapper objectMapper
@Smile ObjectMapper objectMapper
)
{
this.warehouse = warehouse;
@ -276,7 +277,7 @@ public class CachingClusteredClient<T> implements QueryRunner<T>
}
return objectMapper.readValues(
objectMapper.getJsonFactory().createJsonParser(cachedResult),
objectMapper.getFactory().createParser(cachedResult),
cacheObjectClazz
);
}

View File

@ -161,7 +161,6 @@ public class JettyServerModule extends JerseyServletModule
connector.setPort(node.getPort());
connector.setMaxIdleTime(Ints.checkedCast(config.getMaxIdleTime().toStandardDuration().getMillis()));
connector.setStatsOn(true);
connector.setAcceptors(config.getNumThreads());
server.setConnectors(new Connector[]{connector});

View File

@ -31,7 +31,7 @@ public class ServerConfig
{
@JsonProperty
@Min(1)
private int numThreads = 10;
private int numThreads = Runtime.getRuntime().availableProcessors() * 2;
@JsonProperty
@NotNull