Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.

Unit 3 MCQs Using RDD for Creating Applications in Spark and Graph Analytics

INT315 — Cluster Computing 60 questions. Pick an option to check it.

Read the notes Subjective questions

0 of 60 answered 0 right 0 wrong , 60 left

  1. Question 1 of 60 Features of RDD Easy

    What does RDD stand for in Apache Spark?

  2. Question 2 of 60 Features of RDD Easy

    Which property means that an RDD cannot be changed after it is created?

  3. Question 3 of 60 Creating RDDs Easy

    Which Spark method creates an RDD from a local collection?

  4. Question 4 of 60 Creating RDDs Easy

    Which method is commonly used to create an RDD by reading a text file?

  5. Question 5 of 60 RDD functions Easy

    Which RDD function applies a given function to every element?

  6. Question 6 of 60 RDD functions Easy

    Which RDD function keeps only the elements that satisfy a condition?

  7. Question 7 of 60 RDD operations and methods Easy

    Which of the following is an RDD action?

  8. Question 8 of 60 RDD operations and methods Easy

    What is lazy evaluation in Spark?

  9. Question 9 of 60 Invoking the Spark shell Easy

    Which command normally starts the Spark shell for Scala?

  10. Question 10 of 60 Invoking the Spark shell Easy

    Which command normally starts the interactive Spark shell for Python?

  11. Question 11 of 60 Shared variables Easy

    Which shared variable efficiently sends a read-only value to all worker nodes?

  12. Question 12 of 60 Shared variables Easy

    Which Spark shared variable is commonly used to add values across tasks?

  13. Question 13 of 60 Introduction to Spark GraphX Easy

    What type of data is Spark GraphX designed to process?

  14. Question 14 of 60 Introduction to Spark GraphX Easy

    What are the two basic components of a graph in GraphX?

  15. Question 15 of 60 Spark GraphX features Easy

    Which Spark capability can GraphX use for distributed graph processing?

  16. Question 16 of 60 Spark GraphX features Easy

    Which built-in GraphX algorithm ranks important vertices in a graph?

  17. Question 17 of 60 Spark GraphX operations Easy

    Which GraphX operation creates a new graph by changing vertex attributes?

  18. Question 18 of 60 Spark GraphX operations Easy

    Which GraphX operation produces a graph with the direction of every edge reversed?

  19. Question 19 of 60 Feature extraction and transformation Easy

    What is the main purpose of feature extraction in machine learning?

  20. Question 20 of 60 Feature extraction and transformation Easy

    Which Spark ML transformer converts a text document into a vector of token counts?

  21. Question 21 of 60 Features of RDD Medium

    A Spark application applies several transformations to an RDD and then executes an action. Which RDD feature allows Spark to recompute only lost partitions instead of copying all data?

  22. Question 22 of 60 Features of RDD Medium

    Why are RDDs particularly useful for iterative machine-learning algorithms?

  23. Question 23 of 60 Creating RDDs Medium

    Which expression creates an RDD from a local collection in PySpark?

  24. Question 24 of 60 Creating RDDs Medium

    A text file is stored in HDFS at /data/logs.txt. Which PySpark statement creates an RDD whose records normally represent lines from the file?

  25. Question 25 of 60 RDD functions Medium

    Given rdd = sc.parallelize([1, 2, 3, 4]), which expression returns [2, 4, 6, 8] as an RDD?

  26. Question 26 of 60 RDD functions Medium

    An RDD contains sentences, and the goal is to produce one record for every word. Which transformation is most appropriate?

  27. Question 27 of 60 RDD functions Medium

    Given pair RDD records such as ("A", 3) and ("A", 5), which transformation produces the total value for each key?

  28. Question 28 of 60 RDD operations and methods Medium

    What is the result of calling rdd.count() on an RDD containing five records?

  29. Question 29 of 60 RDD operations and methods Medium

    Why does rdd.map(lambda x: x * 2) usually not execute immediately?

  30. Question 30 of 60 RDD operations and methods Medium

    Which method should be used when an RDD will be reused by multiple actions and should remain available in memory when possible?

  31. Question 31 of 60 RDD operations and methods Medium

    A developer wants to inspect all elements of a small RDD on the driver. Which action is appropriate?

  32. Question 32 of 60 Invoking the Spark shell Medium

    Which command starts the Scala-based Spark shell with the Spark context commonly available as sc?

  33. Question 33 of 60 Invoking the Spark shell Medium

    Which command is normally used to start the Python version of the Spark interactive shell?

  34. Question 34 of 60 Shared variables Medium

    A large read-only lookup table is needed by tasks on many executors. Which shared variable avoids sending a separate copy with every task?

  35. Question 35 of 60 Shared variables Medium

    Which shared variable is appropriate for counting invalid records across tasks?

  36. Question 36 of 60 Introduction to Spark GraphX Medium

    In GraphX, a graph is primarily represented as which combination of distributed datasets?

  37. Question 37 of 60 Spark GraphX features Medium

    Which GraphX feature allows graph algorithms to combine graph structure with distributed data processing?

  38. Question 38 of 60 Spark GraphX operations Medium

    Which GraphX operation creates a new graph by retaining only vertices and edges that satisfy a predicate?

  39. Question 39 of 60 Spark GraphX operations Medium

    Which GraphX operation is designed to send messages along edges and aggregate messages at destination vertices?

  40. Question 40 of 60 Feature extraction and transformation Medium

    A dataset contains the categorical values red, blue, and green. Which transformation is commonly used before applying a machine-learning algorithm that requires numeric input?

  41. Question 41 of 60 Features of RDD Hard

    An RDD is persisted using MEMORY_ONLY. After several partitions are cached, an executor holding one cached partition fails. The original data is still available in HDFS. What occurs when an action next requires the lost partition?

  42. Question 42 of 60 Features of RDD Hard

    A pair RDD already has a HashPartitioner named p. Which transformation sequence preserves that partitioner, allowing a subsequent reduceByKey(p, f) to avoid an unnecessary reshuffle?

  43. Question 43 of 60 Creating RDDs Hard

    A directory contains thousands of small UTF-8 files. An application must create an RDD in which each record contains one file's path and its complete contents, rather than one record per line. Which creation method directly provides this representation?

  44. Question 44 of 60 Creating RDDs Hard

    Two ordinary RDDs without partitioners are created as a = sc.parallelize(dataA, 3) and b = sc.parallelize(dataB, 5). What is normally true of a.union(b) before any later repartitioning?

  45. Question 45 of 60 RDD functions Hard

    An RDD has exactly two partitions containing [1, 2] and [3, 4]. What does rdd.aggregate(10)((x, y) => x + y, (x, y) => x + y) return?

  46. Question 46 of 60 RDD functions Hard

    Suppose empty is an RDD with no elements but several empty partitions. Which statement correctly distinguishes empty.fold(0)(_ + _) from empty.reduce(_ + _)?

  47. Question 47 of 60 RDD operations and methods Hard

    Two RDDs have the same total element count and the same number of partitions, but corresponding partitions contain different numbers of elements. What happens when left.zip(right) is evaluated?

  48. Question 48 of 60 RDD operations and methods Hard

    An RDD currently has four partitions. The application executes rdd.coalesce(8, shuffle = false) and, separately, rdd.repartition(8). What partition counts should be expected?

  49. Question 49 of 60 Invoking the Spark shell Hard

    A developer launches spark-shell --master local[2]. Assuming tasks are otherwise runnable and each task uses one CPU, what does the master setting primarily permit?

  50. Question 50 of 60 Invoking the Spark shell Hard

    A Spark shell requires an GB driver heap. Which approach configures this reliably?

  51. Question 51 of 60 Shared variables Hard

    An accumulator is incremented inside a lazy map transformation, and the transformed RDD is evaluated by two separate actions without persistence. Why is the accumulator unsuitable for reporting an exact number of input records?

  52. Question 52 of 60 Shared variables Hard

    A large lookup table is distributed using a broadcast variable. The driver later creates a substantially updated version that future tasks must use. What is the appropriate design?

  53. Question 53 of 60 Introduction to Spark GraphX Hard

    A GraphX graph is constructed with a vertex RDD containing only vertex 1, an edge from vertex 1 to vertex 2, and "unknown" as the default vertex attribute. How is vertex 2 represented?

  54. Question 54 of 60 Introduction to Spark GraphX Hard

    Which information is available directly from each element of a GraphX graph's triplets view?

  55. Question 55 of 60 Spark GraphX features Hard

    A graph contains many parallel edges in both directions between the same pairs of vertices. Which GraphX partition strategy hashes the canonicalized endpoint pair so that direction-reversed edges for a pair are assigned consistently?

  56. Question 56 of 60 Spark GraphX features Hard

    A GraphX subgraph operation receives both a vertex predicate and an edge-triplet predicate. Which statement describes the resulting graph?

  57. Question 57 of 60 Spark GraphX operations Hard

    A graph has weighted edges (1,2,3), (3,2,5), and (2,3,7), where each tuple is (source, destination, weight). aggregateMessages sends each edge's weight only to its destination and merges messages using addition. Which result is produced?

  58. Question 58 of 60 Spark GraphX operations Hard

    An auxiliary RDD[(VertexId, U)] has data for only some graph vertices. Which operation invokes an update function for every graph vertex while representing a missing auxiliary value with None?

  59. Question 59 of 60 Feature extraction and transformation Hard

    A text pipeline applies HashingTF with a small numFeatures value and then fits IDF. Two frequent terms collide into the same hash index. What is the consequence?

  60. Question 60 of 60 Feature extraction and transformation Hard

    A dataset contains million-dimensional vectors with only a few nonzero entries per row. What is the principal risk of applying StandardScaler with withMean = true?

That's unit 3

Answer a few questions and your score shows up here.