-
Basic Kafka CLI Tools/Commands
Kafka provides list of CLI and UI based utilities those are useful while managing/debugging/monitoring various Kafka entities like: – Cluster Broker Producer Consumer Topics Partition Payload CLI Tools zookeeper-server-start.bat Start Zookeeper kafka-server-start.bat Start Multiple Kafka Server kafka-console-producer.bat kafka-console-consumer.bat kafka-topics.bat Create Topic’s Update Partitions Listing Listing Partitions Which are not in-sync with leader Listing Partitions Which…
-
We need a tree where anytime we should be able to travel from leaf node to root or root node to leaf, as well as well it’s should also support basis tree traversing like PRE, POST ,INORDER, LVEVL ORDER. So question is what data structure should we use to store tree or make such tree?
Answer: – We can store such tree in HashMap with key-value pair and each. Where key and value are TreeNode. And each TreeNode is having actual data as payload member and as well as it is also maintaining association details with parent and child nodes.
-
How to add new code or new method to the existing java class without even extending or implementing it.
There might be use case where sometime we want to access private members or do some processing with existing members or changes some component configuration while initialize an object. Solution: – Write an Anonymous class with new method having your all required statements. Then add return statement with “this” in the end of the method…
-
Draw a line/path between two div/dom component in React using basic sgv
Below example illustrate a basic drawing of path or line between two different html div by not using any 3rd party library. in the tutorial we have only use pure SVG(Scalable Vector Graphics) concept to draw path between two different html dom. In this example we have total 10 different ports and there are three…