Skip to content

Instantly share code, notes, and snippets.

View arkadius's full-sized avatar

Arek Burdach arkadius

View GitHub Profile
import akka.actor.{Actor, ActorSystem, Props, Stash}
import scala.concurrent._
object AsyncRestart extends App {
val system = ActorSystem()
val actor = system.actorOf(Props(new AsyncRestartActor))
Sentiment: {
"docSentiment": {
"score": -0.222224,
"type": "negative"
},
"language": "english",
"totalTransactions": 1
}
Entities: {
"entities": [
#!/bin/bash
host=$1
password=`awk "/#Password/ && inhost { print \\\$2 } /Host/ { inhost=0 } /Host $host/ { inhost=1 }" ~/.ssh/config`
if [[ -z "$password" ]]; then
/usr/bin/ssh $*
else
sshpass -p $password /usr/bin/ssh $*
fi
CREATE CATALOG nessie_catalog WITH (
'type'='iceberg',
'catalog-impl'='org.apache.iceberg.nessie.NessieCatalog',
'io-impl'='org.apache.iceberg.aws.s3.S3FileIO',
'uri'='http://nessie:19120/api/v2',
'warehouse' = 's3://warehouse',
's3.endpoint'='http://minio:9000'
);
batch {
deploymentConfig: {
type: "flinkStreaming"
restUrl: ${FLINK_REST_URL}
}
modelConfig: {
classPath: [
"model/defaultModel.jar", "components/flink/flinkBase.jar", "components/flink-table/",
"model/flinkExecutor.jar", "flink-dropwizard-metrics-deps/", "components/flink/extra/"
]
minio:
image: minio/minio:RELEASE.2024-06-26T01-06-18Z
hostname: minio
networks:
- nussknacker-iceberg-net
environment:
MINIO_ROOT_USER: admin
MINIO_ROOT_PASSWORD: password
MINIO_DOMAIN: minio
MINIO_REGION_NAME: us-east-1
nussknacker_minio_data:
name: nussknacker_minio_data
networks:
- nussknacker-iceberg-net
networks:
nussknacker-iceberg-net:
postgres-setup:
image: postgres:16.4
depends_on:
postgres:
condition: service_healthy
networks:
- nussknacker-iceberg-net
environment:
PGHOST: "postgres"
PGDATABASE: "nu-db"