You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by ch...@apache.org on 2022/06/15 04:52:56 UTC
[druid] branch master updated: Support LoadScope for Peons + Access Modifier Updates (#12640)
This is an automated email from the ASF dual-hosted git repository.
cheddar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git
The following commit(s) were added to refs/heads/master by this push:
new 28f2c8e112 Support LoadScope for Peons + Access Modifier Updates (#12640)
28f2c8e112 is described below
commit 28f2c8e1120365bb45ed7531c26150432a935ee2
Author: Rohan Garg <77...@users.noreply.github.com>
AuthorDate: Wed Jun 15 10:22:50 2022 +0530
Support LoadScope for Peons + Access Modifier Updates (#12640)
* Support LoadScope for Peons
* Update access modifiers for GroupByEngineV2
---
.../query/groupby/epinephelinae/GroupByQueryEngineV2.java | 10 +++++-----
services/src/main/java/org/apache/druid/cli/CliPeon.java | 5 ++---
2 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/processing/src/main/java/org/apache/druid/query/groupby/epinephelinae/GroupByQueryEngineV2.java b/processing/src/main/java/org/apache/druid/query/groupby/epinephelinae/GroupByQueryEngineV2.java
index a61a592bb2..55e7533f75 100644
--- a/processing/src/main/java/org/apache/druid/query/groupby/epinephelinae/GroupByQueryEngineV2.java
+++ b/processing/src/main/java/org/apache/druid/query/groupby/epinephelinae/GroupByQueryEngineV2.java
@@ -95,9 +95,9 @@ import java.util.stream.Stream;
*/
public class GroupByQueryEngineV2
{
- private static final GroupByStrategyFactory STRATEGY_FACTORY = new GroupByStrategyFactory();
+ public static final GroupByStrategyFactory STRATEGY_FACTORY = new GroupByStrategyFactory();
- private static GroupByColumnSelectorPlus[] createGroupBySelectorPlus(
+ public static GroupByColumnSelectorPlus[] createGroupBySelectorPlus(
ColumnSelectorPlus<GroupByColumnSelectorStrategy>[] baseSelectorPlus,
int dimensionStart
)
@@ -451,7 +451,7 @@ public class GroupByQueryEngineV2
}
}
- private abstract static class GroupByEngineIterator<KeyType> implements Iterator<ResultRow>, Closeable
+ public abstract static class GroupByEngineIterator<KeyType> implements Iterator<ResultRow>, Closeable
{
protected final GroupByQuery query;
protected final GroupByQueryConfig querySpecificConfig;
@@ -615,13 +615,13 @@ public class GroupByQueryEngineV2
}
}
- private static class HashAggregateIterator extends GroupByEngineIterator<ByteBuffer>
+ public static class HashAggregateIterator extends GroupByEngineIterator<ByteBuffer>
{
private static final Logger LOGGER = new Logger(HashAggregateIterator.class);
private final int[] stack;
private final Object[] valuess;
- private final ByteBuffer keyBuffer;
+ protected final ByteBuffer keyBuffer;
private int stackPointer = Integer.MIN_VALUE;
private boolean currentRowWasPartiallyAggregated = false;
diff --git a/services/src/main/java/org/apache/druid/cli/CliPeon.java b/services/src/main/java/org/apache/druid/cli/CliPeon.java
index f8403b2610..717d036cf6 100644
--- a/services/src/main/java/org/apache/druid/cli/CliPeon.java
+++ b/services/src/main/java/org/apache/druid/cli/CliPeon.java
@@ -26,6 +26,7 @@ import com.github.rvesse.airline.annotations.Option;
import com.github.rvesse.airline.annotations.restrictions.Required;
import com.google.common.base.Throwables;
import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableSet;
import com.google.inject.Binder;
import com.google.inject.Inject;
import com.google.inject.Injector;
@@ -34,7 +35,6 @@ import com.google.inject.Module;
import com.google.inject.Provides;
import com.google.inject.TypeLiteral;
import com.google.inject.multibindings.MapBinder;
-import com.google.inject.multibindings.Multibinder;
import com.google.inject.name.Named;
import com.google.inject.name.Names;
import io.netty.util.SuppressForbidden;
@@ -301,7 +301,7 @@ public class CliPeon extends GuiceRunnable
public void run()
{
try {
- Injector injector = makeInjector();
+ Injector injector = makeInjector(ImmutableSet.of(NodeRole.PEON));
try {
final Lifecycle lifecycle = initLifecycle(injector);
final Thread hook = new Thread(
@@ -419,7 +419,6 @@ public class CliPeon extends GuiceRunnable
.in(LazySingleton.class);
binder.bind(NodeRole.class).annotatedWith(Self.class).toInstance(NodeRole.PEON);
- Multibinder.newSetBinder(binder, NodeRole.class, Self.class).addBinding().toInstance(NodeRole.PEON);
}
static void bindTaskConfigAndClients(Binder binder)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org