+------+----+--------+-------------+--------------------+---------------------+-------------+
|ROWKEY|UUID|TITLE_ID|CHANGE_TYPE |BEFORE |AFTER |CREATED_AT |
+------+----+--------+-------------+--------------------+---------------------+-------------+
|2 |2 |2 |release_date |{SEASON_ID=1, |{SEASON_ID=1, |2021-02-08...|
EPISODE_COUNT=null} EPISODE_COUNT=null}
|null |1 |1 |season_length|{SEASON_ID=1,
EPISODE_COUNT=12} |{SEASON_ID=1, |2021-02-08...|
EPISODE_COUNT=8}
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# no args example | |
$ ./build/graal/hello-world | |
# output | |
Hello world :) | |
# args example | |
$ ./build/graal/hello-world --help | |
# output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# no args example | |
$ ./gradlew run | |
# output | |
> Task :run | |
Hello world :) | |
# args example | |
$ ./gradlew run --args="--help" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugins { | |
// ... | |
id 'com.palantir.graal' version '0.6.0' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
graal { | |
mainClass 'com.mitchseymour.mycli.App' | |
outputName 'mycli' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mitchseymour.mycli; | |
public class App { | |
public String getGreeting() { | |
return "Hello world."; | |
} | |
public static void main(String[] args) { | |
System.out.println(new App().getGreeting()); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Mycli < Formula | |
desc "example CLI" | |
homepage "https://github.com/mitch-seymour/graal-cli-example" | |
url "https://github.com/mitch-seymour/graal-cli-example/releases/download/v0.1.0/mycli-0.1.0.tar.gz" | |
sha256 "f2b530c413c795e8b0bfd5ece9bdd56d14b61846c5281e15bc4b46ee3b49d067" | |
bottle :unneeded | |
def install | |
bin.install "mycli" |
// required for interactive queries (server)
implementation 'io.javalin:javalin:3.12.0'
// required for interactive queries (client)
implementation 'com.squareup.okhttp3:okhttp:4.9.0'
Properties props = new Properties();
props.put(StreamsConfig.APPLICATION_ID_CONFIG, "dev");
props.put(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9092");
KafkaStreams streams = new KafkaStreams(builder.build(), props);
streams.start();
StreamsBuilder builder = new StreamsBuilder();
KStream<byte[], String> stream = builder.stream("patient-events");
stream
.groupByKey()
.reduce(
(value1, value2) -> {
if (value2.equals(PATIENT_CHECKED_OUT)) {
// create a tombstone