Blog Archives
1 … 10 11 12 13 14 15 16 17 18 … 23

15: Python multithreading tutorial

In Python, multithreading is primarily used for I/O-bound tasks like downloading files or querying databases. Due to the Global Interpreter Lock (i.e. GIL), Python threads cannot run in true parallel for CPU-heavy tasks instead, they take turns, which is known as concurrency.

Outputs:

GIL GIL is a lock...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


15: Q109 – Q113 Spark RDD partitioning and “mapPartitions” interview questions & answers

Q109. What is the difference between “map” and “mapPartitions” transformations in Spark? A109. The method map converts each element of the source RDD into a single element of the result RDD by applying a function. The method mapPartitions converts each partition of the source RDD into multiple elements of the...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


15: Q88 – Q92 Scala Functors Interview Q&As

This extends Category Theory With Scala Interview Q&As. Q88. What do you understand by the terms functors, monads, and applicatives ? A88. Functors, Monads, and Applicatives are concepts or patterns that abstract complexities in computations, and are NOT traits or classes. … Read more ›...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


15+ Amazon EC2 instances interview Q&As

Q01. What is an Amazon EC2 Service? A01. EC2 stands for Elastic Cloud Computing that provides resizable (i.e. scalable) computing capacity in the cloud. You can use Amazon EC2 to launch as many virtual servers as you need. In EC2 you can configure security and networking as well as manage...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


15+ AWS Services overview interview Q&As

Below questions are based on the above diagram, and extends AWS Q&As on VPC, Subnets, Availability Zones, VPN, Route tables, NACLs & Security Groups: Q1. What is the difference between CloudWatch & CloudTrail? A1. Both provide logging capabilities. … Read more ›...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


15+ SQL optimisation interview questions & answers with scenarios

1) Select fields instead of using SELECT *. The “*” is used as a short hand to query all available data from a table. If a table has many fields and rows, this takes database resources by querying a lot of unnecessary data. … Read more ›...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


15B: Scala Functors Interview Q&As by example

Prerequisite: Scala values, proper types, first order types & higher kinded types. Q. Is it possible to further abstract the below code?

Output:

A. Why have different timesByTwoXXX functions for each container type like List, … Read more ›...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


16: 50+ SQL scenarios based interview Q&As on joins to reconcile source & target tables

In SQL often we need to merge records from a source table to a target table. The source table could be a staging table where the source system sent new & updated records to be reconciled with the a target table. Let’s look at an example as to how to...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


16: Coding Scala Way – Scala concurrency styles

This extends Scala concurrency & closure vs function definition. This post looks at Scala concurrency styles – blocking & non-blocking. onComplete – non-blocking

Output:

onSuccess – non-blocking The above “onComplete” call is highly nested. “ … Read more ›...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


16: PySpark to read JSON files Interview Q&As with tutorials

Q51: How will you read the below JSON file employee.json into a Pyspark Dataframe?

A51: Here is the PySpark code with schema to read the above JSON file. read_json_spark.py: Read with a static schema

Run As:

Outputs

Explode the array Q52: How will you explode the...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


16: Python multithreading producer/consumer & semaphores tutorial

Producer/Consumer in Python The Consumer and Producer threads run indefinitely while checking the status of the queue. The Producer thread is responsible for putting items into the queue if it is not full while the Consumer thread consumes items if there are any. You need to know the following three...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


16: Q114 – Q115 CAP theorem interview Q&As

Q114. What does CAP stand for in CAP theorem? A114. In a distributed system having two or more nodes, and maintaining two or more copies of your data for fault tolerance, the CAP theorem can be depicted & explained as below: Consistency – … Read more ›...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


16: Q93 – Q98 Scala monads interview Q&As

This extends Scala Functors Interview Q&As. You need to remember the following.

Where T & R are raw types like String, Int, Employee, etc, and C is a container or wrapper type like List, Option, Future, List, etc. So, T =R could be a type abstraction for Int =Int,...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


1 … 10 11 12 13 14 15 16 17 18 … 23

300+ Java Interview Questions - FAQs

Tutorials on Java & Big Data