Skip to content

Commit

Permalink
Add main method to Kudu query runner
Browse files Browse the repository at this point in the history
  • Loading branch information
ebyhr committed Feb 23, 2022
1 parent dd0b5dc commit 46c3c5b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
6 changes: 6 additions & 0 deletions plugin/trino-kudu/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@
<artifactId>log</artifactId>
</dependency>

<dependency>
<groupId>io.airlift</groupId>
<artifactId>log-manager</artifactId>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>io.airlift</groupId>
<artifactId>units</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.net.HostAndPort;
import io.airlift.log.Logger;
import io.airlift.log.Logging;
import io.trino.Session;
import io.trino.plugin.tpch.TpchPlugin;
import io.trino.testing.DistributedQueryRunner;
Expand Down Expand Up @@ -152,4 +154,19 @@ public static Session createSession(String schema)
.setSchema(schema)
.build();
}

public static void main(String[] args)
throws Exception
{
Logging.initialize();
DistributedQueryRunner queryRunner = (DistributedQueryRunner) createKuduQueryRunnerTpch(
new TestingKuduServer(),
Optional.empty(),
ImmutableMap.of(),
ImmutableMap.of("http-server.http.port", "8080"),
TpchTable.getTables());
Logger log = Logger.get(KuduQueryRunnerFactory.class);
log.info("======== SERVER STARTED ========");
log.info("\n====\n%s\n====", queryRunner.getCoordinator().getBaseUrl());
}
}

0 comments on commit 46c3c5b

Please sign in to comment.