mirror of https://github.com/apache/druid.git
fix injection problems with server select strategies
This commit is contained in:
parent
dcab7efa1b
commit
e7da1bb9ce
|
@ -1,8 +1,9 @@
|
|||
package io.druid.client.selector;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JacksonInject;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.google.api.client.util.Maps;
|
||||
import com.google.common.primitives.Ints;
|
||||
import com.google.inject.Inject;
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.Map;
|
||||
|
@ -13,10 +14,10 @@ public class CustomTierSelectorStrategy extends AbstractTierSelectorStrategy
|
|||
{
|
||||
private final Comparator<Integer> comparator;
|
||||
|
||||
@Inject
|
||||
@JsonCreator
|
||||
public CustomTierSelectorStrategy(
|
||||
ServerSelectorStrategy serverSelectorStrategy,
|
||||
CustomTierSelectorStrategyConfig config
|
||||
@JacksonInject ServerSelectorStrategy serverSelectorStrategy,
|
||||
@JacksonInject CustomTierSelectorStrategyConfig config
|
||||
)
|
||||
{
|
||||
super(serverSelectorStrategy);
|
||||
|
|
|
@ -19,8 +19,9 @@
|
|||
|
||||
package io.druid.client.selector;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JacksonInject;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.google.common.primitives.Ints;
|
||||
import com.google.inject.Inject;
|
||||
|
||||
import java.util.Comparator;
|
||||
|
||||
|
@ -37,8 +38,8 @@ public class HighestPriorityTierSelectorStrategy extends AbstractTierSelectorStr
|
|||
}
|
||||
};
|
||||
|
||||
@Inject
|
||||
public HighestPriorityTierSelectorStrategy(ServerSelectorStrategy serverSelectorStrategy)
|
||||
@JsonCreator
|
||||
public HighestPriorityTierSelectorStrategy(@JacksonInject ServerSelectorStrategy serverSelectorStrategy)
|
||||
{
|
||||
super(serverSelectorStrategy);
|
||||
}
|
||||
|
|
|
@ -19,8 +19,9 @@
|
|||
|
||||
package io.druid.client.selector;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JacksonInject;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.google.common.primitives.Ints;
|
||||
import com.google.inject.Inject;
|
||||
|
||||
import java.util.Comparator;
|
||||
|
||||
|
@ -37,8 +38,8 @@ public class LowestPriorityTierSelectorStrategy extends AbstractTierSelectorStra
|
|||
}
|
||||
};
|
||||
|
||||
@Inject
|
||||
public LowestPriorityTierSelectorStrategy(ServerSelectorStrategy serverSelectorStrategy)
|
||||
@JsonCreator
|
||||
public LowestPriorityTierSelectorStrategy(@JacksonInject ServerSelectorStrategy serverSelectorStrategy)
|
||||
{
|
||||
super(serverSelectorStrategy);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue