Instead of jconsole you can use jmxterm to discover and watch metrics. This is useful if you don't have X11 or need a more lightweight solution.
wget https://github.com/jiaqi/jmxterm/releases/download/v1.0.0/jmxterm-1.0.0-uber.jar
###################################### | |
''' | |
Patch inner function call to S3 | |
''' | |
###################################### | |
###################################### | |
### file python/test/my_class.py | |
###################################### |
import java.nio.charset.StandardCharsets | |
import java.util.Properties | |
import org.apache.kafka.common.TopicPartition | |
import org.apache.kafka.common.serialization.{Serdes, StringDeserializer} | |
import org.apache.kafka.common.serialization.Serdes.StringSerde | |
import org.apache.kafka.streams.scala.StreamsBuilder | |
import scala.collection.immutable |
YAML - Anchors, References, Extend | |
YAML is pretty cool for config files. I don't think it should be used 'on the wire' - I suppose you could, but it's more for people than machines. | |
Most of YAML can be converted into JSON, and I would say most applications use it that way. | |
Basics | |
--- | |
foo: bar | |
baz: | |
- "thing1" |
#!/usr/bin/env bash | |
DIRNAME="$( dirname "${BASH_SOURCE[0]}" )" | |
$DIRNAME/my-subscript.sh |
// logging | |
libraryDependencies += "com.typesafe.scala-logging" %% "scala-logging" % "3.9.0" | |
libraryDependencies += "org.slf4j" % "slf4j-log4j12" % "1.7.25" |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
labels: | |
app: ${MY_APPLICATION} | |
name: ${MY_APPLICATION} | |
name: ${MY_APPLICATION} | |
spec: | |
type: ${MY_APPLICATION_SERVICE_PORT_TYPE} |
// USED FOR LOCAL TESTING USING CONFLUENT PLATFORM | |
val sr = new CachedSchemaRegistryClient ("http://localhost:8081",100) | |
sr.register("getFullCustParaSession_1-key",webtrekkSid.SCHEMA$) | |
sr.register("getFullCustParaSession_1-value",getFullCustParaSession_1.SCHEMA$) | |
sr.register("getFullForms-key",webtrekkSid.SCHEMA$) | |
sr.register("getFullForms-value",getFullForms.SCHEMA$) | |
val subs = sr.getAllSubjects | |
subs.forEach(println(_)) |
import com.amazonaws.auth.profile.ProfileCredentialsProvider | |
import com.amazonaws.regions.Regions | |
import com.amazonaws.services.dynamodbv2.AmazonDynamoDBClientBuilder | |
object myDynamoDBTest extends App { | |
val pcp: ProfileCredentialsProvider = new ProfileCredentialsProvider("myProfileName") | |
val client = AmazonDynamoDBClientBuilder.standard().withCredentials(pcp).withRegion(Regions.EU_CENTRAL_1).build() | |
val table_names = client.listTables().getTableNames |
Place src/main/resources/application.conf
with some props:
kafka-consumer-config {
bootstrap-servers = ["localhost:9092"]
group-id = "kafka-consumer-example"
topic = "my-example-topic"
key-deserializer = "org.apache.kafka.common.serialization.StringDeserializer"