use of io.confluent.ksql.cli.console.JLineTerminal in project ksql by confluentinc.
the class Ksql method main.
public static void main(String[] args) throws IOException {
final Options options = args.length == 0 ? Options.parse("http://localhost:8088") : Options.parse(args);
if (options == null) {
System.exit(-1);
}
final Properties properties = loadProperties(options.getConfigFile());
final KsqlRestClient restClient = new KsqlRestClient(options.getServer(), properties);
options.getUserNameAndPassword().ifPresent(creds -> restClient.setupAuthenticationCredentials(creds.left, creds.right));
final KsqlVersionCheckerAgent versionChecker = new KsqlVersionCheckerAgent();
versionChecker.start(KsqlModuleType.REMOTE_CLI, properties);
try (final Cli cli = new Cli(options.getStreamedQueryRowLimit(), options.getStreamedQueryTimeoutMs(), restClient, new JLineTerminal(options.getOutputFormat(), restClient))) {
cli.runInteractively();
}
}
Aggregations