mirror of https://github.com/apache/druid.git
fix serde problem in CCC and better defaults for jetty threads
This commit is contained in:
parent
60dbdcebac
commit
c5361cc100
|
@ -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
|
||||
);
|
||||
}
|
||||
|
|
|
@ -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});
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ public class ServerConfig
|
|||
{
|
||||
@JsonProperty
|
||||
@Min(1)
|
||||
private int numThreads = 10;
|
||||
private int numThreads = Runtime.getRuntime().availableProcessors() * 2;
|
||||
|
||||
@JsonProperty
|
||||
@NotNull
|
||||
|
|
Loading…
Reference in New Issue