{
"records": [
{
"value": {"prop": "value"},
"key": "key"
}
]
}
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
{ | |
"name": "core-xx5-core-items", | |
"connector": { | |
"state": "RUNNING", | |
"worker_id": "10.35.1.9:8088" | |
}, | |
"tasks": [ | |
{ | |
"id": 0, | |
"state": "RUNNING", |
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
#!/bin/sh | |
bb -e '(import java.util.UUID)(str (UUID/randomUUID))' |
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
./bin/kafka-topics.sh --zookeeper localhost:2181 --list | grep my_pattern | while read topic; do ./bin/kafka-topics.sh --zookeeper localhost:2181 --delete --topic $topic; done |
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
# HELP kafka_connect_connector_state_running is the connector running? | |
# TYPE kafka_connect_connector_state_running gauge | |
kafka_connect_connector_state_running{connector="CONNECTOR_20200417105809",state="paused",worker="connect:8088"} 0 | |
# HELP kafka_connect_connector_tasks_state the state of tasks. 0-failed, 1-running, 2-unassigned, 3-paused | |
# TYPE kafka_connect_connector_tasks_state gauge | |
kafka_connect_connector_tasks_state{connector="CONNECTOR_20200417105809",id="0",state="paused",worker_id="connect:8088"} 3 | |
kafka_connect_connector_tasks_state{connector="CONNECTOR_20200417105809",id="1",state="paused",worker_id="connect:8088"} 3 | |
kafka_connect_connector_tasks_state{connector="CONNECTOR_20200417105809",id="10",state="paused",worker_id="connect:8088"} 3 | |
kafka_connect_connector_tasks_state{connector="CONNECTOR_20200417105809",id="11",state="paused",worker_id="connect:8088"} 3 | |
kafka_connect_connector_tasks_state{connector="CONNECTOR_20200417105809",id="12",state="paused",worker_id="connect:8088"} 3 |
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
(defn resp->map [resp] | |
(let [lines (str/split resp #"\r\n") | |
status (Integer/parseInt (second (str/split (first lines) #" "))) | |
headers (reduce (fn [acc header-line] | |
(let [[k v] (str/split header-line #":" 2)] | |
(assoc acc (str/lower-case k) (str/trim v)))) | |
{} | |
(remove str/blank? (drop-last (rest lines))))] | |
{:body (last lines) | |
:status status |
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
Util_sun_misc_Signal.ensureInitialized: CSunMiscSignal.create() failed. errno: 38 Function not implemented | |
Fatal error: Util_sun_misc_Signal.ensureInitialized: CSunMiscSignal.open() failed. | |
JavaFrameAnchor dump: | |
No anchors | |
TopFrame info: | |
TotalFrameSize in CodeInfoTable 32 | |
VMThreads info: | |
VMThread 0000000003042750 STATUS_IN_JAVA (safepoints disabled) java.lang.Thread@0x264fa98 | |
VM Thread State for current thread 0000000003042750: | |
0 (8 bytes): com.oracle.svm.jni.JNIThreadLocalEnvironment.jniFunctions = (bytes) |
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
#!/usr/bin/env bash | |
"exec" "clojure" "-Sdeps" "{:deps {org.clojure/tools.namespace {:mvn/version \"0.3.1\"}}}" "$0" "$@" | |
"USAGE: ./compile.clj" | |
(require | |
'[clojure.edn :as edn] | |
'[clojure.java.io :as io] | |
'[clojure.string :as str] |
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
stack exec duckling-example-exe |
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
; When you don't want to add logging library and you want to `(log/spy )` to work | |
```clojure | |
(let [r (.getLogger (LogManager/getLogManager) "")] | |
(.setLevel r Level/FINE) | |
(doseq [h (.getHandlers r)] | |
(.setLevel h Level/FINE))) | |
=> nil | |
(log/spy :debug (+ 1 1)) | |
Oct 13, 2019 3:23:06 PM clojure.tools.logging$eval1251$fn__1254 invoke |