Search

Showing posts with label SPARK. Show all posts
Showing posts with label SPARK. Show all posts

What is Hive on Spark?



Hive contains significant support for Apache Spark, wherein Hive execution is configured to Spark:
hive> set spark.home=/location/to/sparkHome;
hive> set hive.execution.engine=spark;
Hive on Spark supports Spark on yarn mode by default.

What is the difference between persist() and cache()?



 persist () allows the user to specify the storage level whereas cache () uses the default storage level.

How Spark store the data?


 Spark is a processing engine, there is no storage engine. It can retrieve data from any storage engine like HDFS, S3 and other data resources.

What do you understand by Transformations in Spark?


Transformations are functions applied on RDD, resulting into another RDD. It does not execute until an action occurs. map() and filter() are examples of transformations, where the former applies the function passed to it on each element of RDD and results into another RDD. The filter() creates a new RDD by selecting elements from current RDD that pass function argument.

What do you understand by SchemaRDD?


An RDD that consists of row objects (wrappers around basic string or integer arrays) with schema information about the type of data in each column.

What do you understand by Lazy Evaluation?


Spark is intellectual in the manner in which it operates on data. When you tell Spark to operate on a given dataset, it heeds the instructions and makes a note of it, so that it does not forget – but it does nothing, unless asked for the final result. When a transformation like map () is called on a RDD-the operation is not performed immediately. Transformations in Spark are not evaluated till you perform an action. This helps optimize the overall data processing workflow.