Posts

Showing posts from 2018

Kafka Producer JAVA code

Image
In the last post What is Apache Kafka , we discuss Kafka producer, Topics and Consumers. In this post, I am going to provide JAVA code for writing Kafka Producer and explain how it works. In this code, we are going to send data from CSV row by row to Kafka Topics for further consumption by Kafka Consumer . In this way, we can generate the continuous streams of Data. 1. First, you need to create a Kafka Topic. You can either do it from the console or do programmatically. Please go through the basic Quickstart from  Apache Kafka Website  and create Topics, send basic message from producer and consume it at consumer. Once, you have created Topic, its time to write Kafka Producer, which will send data to Topic. For creating Procuder we need to configure it some parameters. Lets, look at the configurations required for creating producer 1. List of Kafka Brokers 2. Serializer used for sending data to Kafka 3. Acknowledge from Kafka that messages are properly received.

What is Apache Kafka?

Image
Kafka is a fast, scalable, durable, and fault-tolerant publish-subscribe messaging system that sends messages between applications, processes, and servers. It is composed of three important components called producer (which acts as Sender), Topics (topic or category of messages), and Consumer (which acts as a Reciever) . Kafka aims to provide high-throughput, low latency for real-time data feeds. It is widely used for real-time streams analytics, ingestion data into Spark, Complex Event Processing, Log aggregation, etc. Before understanding Kafka Architecture, lets first understand what Kafka Broker is Kafka Broker: As Kafka is a distributed framework, Kafka's cluster consists of different servers called Brokers running Kafka. Producers publish the message to Kafka Topics within this Broker and consumer consumes this message from Topics. Kafka Architecture: Kafka Architecture is comprised of mainly 3 components Kafka Producer Kafka Topics Kafka Consumer

5 JAVA Technical Interview Questions

In this post, I am going to discuss the top 5 JAVA interview technical questions that are frequently asked in the technical interview of big IT companies that are looking for JAVA developers. 1.  What is Method Overriding in JAVA? One of the most common technical interview questions 1. Method overriding is used to enable sub-class to use same Method name, same number, and type of arguments and same return type of super-class 2. It is run-time polymorphism 3. The methods must have the same signature. Example: class Book { void run(){ System.out.println(“Book is issued”); } Class MathBook extends Book{ void run() { System.out.prinltn(“MathBook is issued to Maths Student”); } public static void main( String args[]) { Book b=new MathBook(); b.run(); } } 2. What are Threads in JAVA? How to create Threads? Again very important IT interview question A thread is an independent and isolated path of execution in a single program. Many threads

5 Python Technical Interview Questions

Python is the most widely used programming language nowadays and it is one of the favorite languages among developers. Also, with the latest growth in Big data, Data Science, and Machine Learning, python is most popular in the Big Data community. So, companies working with Big Data expect knowledge of python, and concepts of python are frequently asked in interviews.  In this post, I will share the technical questions interview experience and  top 5 basic python technical questions which are frequently asked in many technical interview. 1. Describe Memory Management in Python It is one of the most common IT interview questions. Memory management in Python involves a private heap containing objects and data structures. The management of this private heap is handled by the Python memory manager. Python memory management also deals with various dynamic storage aspects like sharing, segmentation, and pre-allocation. The programmer doesn't have access to private heap storage and t

Kotlin vs Java

Recently, you might have come across a word Kotlin, so in this post, I am going to share about Kotlin and how it is different from JAVA? What is Kotlin? Kotlin is statically typed programming language developed by JetBrains that runs on Java Virtual Machine. It can also be compiled to JavaScript source code. Kotlin is expressive, concise and powerful as it combines object-oriented Programming and functional programming features. It is focused on interoperability, safety and tooling support. Lately, it is really popular within the Android community and most of the developers are switching towards Kotlin. The reason being that Kotlin reduces the lines of code and make it more convenient process for the developers. Let's look at the few important differences between Kotlin and Java Kotlin vs Java : Function Types: Kotlin has the ability to pass the function as a parameter to other functions without resorting to single abstract methods like callable, runnable etc, unlik

Big Data Interview questions

Recently, with the advent of various sensors, the amount of data which is getting collected is getting enormous. The data is expanding in terms of volume and with the rise in the volume of the data, it is becoming difficult to handle such data. There are a sudden growth and demand for Data Engineers in the industry during the last five years, and it will keep on growing. During this demand, the industry is in need of good Big Data Engineers and many companies are looking for Data Engineer and Data scientists post. Check out  How to prepare for Data Engineer Interviews  if you are appearing for Data Engineer Interviews. In this article, I will give 10 important basic Big data questions for freshers asked in the interviews nowadays. Also, checkout  Top 25 Data Engineer Questions frequently asked in the Data Engineering Interviews. 1. What is Big Data? Can you give real-life example to explain big data? Big Data is a collection of large and complex datasets that are difficult to