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;
|
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.api.client.util.Maps;
|
||||||
import com.google.common.primitives.Ints;
|
import com.google.common.primitives.Ints;
|
||||||
import com.google.inject.Inject;
|
|
||||||
|
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -13,10 +14,10 @@ public class CustomTierSelectorStrategy extends AbstractTierSelectorStrategy
|
||||||
{
|
{
|
||||||
private final Comparator<Integer> comparator;
|
private final Comparator<Integer> comparator;
|
||||||
|
|
||||||
@Inject
|
@JsonCreator
|
||||||
public CustomTierSelectorStrategy(
|
public CustomTierSelectorStrategy(
|
||||||
ServerSelectorStrategy serverSelectorStrategy,
|
@JacksonInject ServerSelectorStrategy serverSelectorStrategy,
|
||||||
CustomTierSelectorStrategyConfig config
|
@JacksonInject CustomTierSelectorStrategyConfig config
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
super(serverSelectorStrategy);
|
super(serverSelectorStrategy);
|
||||||
|
|
|
@ -19,8 +19,9 @@
|
||||||
|
|
||||||
package io.druid.client.selector;
|
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.common.primitives.Ints;
|
||||||
import com.google.inject.Inject;
|
|
||||||
|
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
|
|
||||||
|
@ -37,8 +38,8 @@ public class HighestPriorityTierSelectorStrategy extends AbstractTierSelectorStr
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@Inject
|
@JsonCreator
|
||||||
public HighestPriorityTierSelectorStrategy(ServerSelectorStrategy serverSelectorStrategy)
|
public HighestPriorityTierSelectorStrategy(@JacksonInject ServerSelectorStrategy serverSelectorStrategy)
|
||||||
{
|
{
|
||||||
super(serverSelectorStrategy);
|
super(serverSelectorStrategy);
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,8 +19,9 @@
|
||||||
|
|
||||||
package io.druid.client.selector;
|
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.common.primitives.Ints;
|
||||||
import com.google.inject.Inject;
|
|
||||||
|
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
|
|
||||||
|
@ -37,8 +38,8 @@ public class LowestPriorityTierSelectorStrategy extends AbstractTierSelectorStra
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@Inject
|
@JsonCreator
|
||||||
public LowestPriorityTierSelectorStrategy(ServerSelectorStrategy serverSelectorStrategy)
|
public LowestPriorityTierSelectorStrategy(@JacksonInject ServerSelectorStrategy serverSelectorStrategy)
|
||||||
{
|
{
|
||||||
super(serverSelectorStrategy);
|
super(serverSelectorStrategy);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue