This commit is contained in:
Zoltan Haindrich 2024-05-28 15:07:09 +00:00
parent 9ae80f05de
commit b20ee99371
3 changed files with 5 additions and 7 deletions

View File

@ -47,8 +47,6 @@ import static org.junit.Assert.assertNotEquals;
public class Launcher public class Launcher
{ {
public static final String URI_PREFIX = "druidtest://";
public static final String DEFAULT_URI = URI_PREFIX + "/";
static final SqlTestFrameworkConfigStore CONFIG_STORE = new SqlTestFrameworkConfigStore(); static final SqlTestFrameworkConfigStore CONFIG_STORE = new SqlTestFrameworkConfigStore();
private static Logger log = new Logger(Launcher.class); private static Logger log = new Logger(Launcher.class);

View File

@ -40,7 +40,7 @@ public class QuidemRecorder implements AutoCloseable, DruidHook
} }
@Override @Override
public <T> void dispatch1(HookKey<T> key, T object) public <T> void invoke(HookKey<T> key, T object)
{ {
if (DruidHook.SQL.equals(key)) { if (DruidHook.SQL.equals(key)) {
printStream.print(object); printStream.print(object);

View File

@ -58,7 +58,7 @@ public interface DruidHook
if (getClass() != obj.getClass()) { if (getClass() != obj.getClass()) {
return false; return false;
} }
HookKey other = (HookKey) obj; HookKey<?> other = (HookKey<?>) obj;
return Objects.equals(label, other.label) && Objects.equals(type, other.type); return Objects.equals(label, other.label) && Objects.equals(type, other.type);
} }
@ -67,7 +67,7 @@ public interface DruidHook
public static final HookKey<RelNode> DRUID_PLAN = new HookKey<>("druidPlan", RelNode.class); public static final HookKey<RelNode> DRUID_PLAN = new HookKey<>("druidPlan", RelNode.class);
public static final HookKey<String> SQL = new HookKey<>("sql", String.class); public static final HookKey<String> SQL = new HookKey<>("sql", String.class);
<T> void dispatch1(HookKey<T> key, T object); <T> void invoke(HookKey<T> key, T object);
static Map<HookKey<?>, List<DruidHook>> GLOBAL = new HashMap<>(); static Map<HookKey<?>, List<DruidHook>> GLOBAL = new HashMap<>();
@ -99,7 +99,7 @@ public interface DruidHook
List<DruidHook> hooks = GLOBAL.get(key); List<DruidHook> hooks = GLOBAL.get(key);
if (hooks != null) { if (hooks != null) {
for (DruidHook hook : hooks) { for (DruidHook hook : hooks) {
hook.dispatch1(key, object); hook.invoke(key, object);
} }
} }
} }