file
Category: Uncategorized
Jshell
A REPL type /exit to quit Requires Java 9+, use –class-path to add libraries to jshell to be able to create those objects. /save filename.jsh to save commands in a file for later use /open filename.jsh to open a local file again /vars to display all the variables in scope
Kubernetes Labels
Note that multiple resources are separated by — in YAML manifest files. Each pod is declared in the labels namespace. Each Pod also has a labels mapping that declares a color and a tier label. Values for the color label span red, green, and blue. Values for the tier label span frontend and backend. The first Pod in the file, named red-frontend, also declares an annotations mapping. Use the -L (or –label-columns) kubectl get option to display columns for both labels:
Cisco IOS – SCP Copy
Copy from IOS to jumphost or linux server: Copy the other way, jumphost/linux server to Cisco IOS device:
Spring – @EnableConfigurationProperties Annotation
@EnableConfigurationProperties Annotation is connected to @ConfigurationProperties Every project automagically includes @EnableConfigurationProperties, and @ConfigurationProperties support is implicitly turned on in every application How to Use it This is our configuration class to configure other parts of the application. Now we can “register” our configuration bean using @EnableConfigurationProperties Now we can use AdditionalProperties like any other Spring bean.
Jackson – ObjectMapper
Use this if you want to make json files or read json text strings Class: OrderSerializer id name Problem(s):Want to get json out in a fileNeed to read/create object from json later Steps:(Add maven/grade dependencies)Create pojo to hold the data ie “OrderSerializer”, add jackson databind Create some ObjectMappers that will Map Objects to Json or… Continue reading Jackson – ObjectMapper
Kafka Record/ProducerRecord
https://kafka.apache.org/23/javadoc/org/apache/kafka/clients/producer/ProducerRecord.html Sends data to Kafka for holding/sending to consumers. public class ProducerRecord<K,V> extends Object A key/value pair to be sent to Kafka. This consists of a topic name to which the record is being sent, an optional partition number, and an optional key and value. If a valid partition number is specified that partition will… Continue reading Kafka Record/ProducerRecord
Kafka
Stupid name with a stupid story kevin Broker Single Kafka ServerDesigned to operate in a cluster Cluster Controller elected automagicallyAdmin Duties: Assigns partitions to brokersmonitors for broker failures Partition Owned by a single brokerbroker is then named the leader of the partition Retention Key feature, lasts for 7 days or 1GB
Zookeeper
Fact Sheet: Another apache thing they got, probably should have stopped at the webserver. Used by fucking Kafka install zookeeper then kafka Cluster is called an ensemble wants an Odd # of servers must have a quorum to continue functioning/responding to requests steal this book, don’t give them your real email, are you fucking crazy,… Continue reading Zookeeper
Web Flux – Flux
Flux publishes values