Assignment 1 Quiz 3 CSE5BDC T5 2023
8 Questions
6 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

Given a Scala list called numbers initialised with integer values, what does the following line of Scala code do? numbers.map(_ / 2.0).reduce(_ * _)

  • Divides each value in the numbers list by 2.0 and then computes the product of each pair of values in the numbers list.
  • Divides each value in the numbers list by 2.0 and then computes the product of all the values in the numbers list. (correct)
  • Computes the product of all the values in the numbers list and then divides it by 2.0.
  • Divides each value in the numbers list by 2.0 and then computes the sum of all the values in the numbers list.
  • Suppose you are given any list of numbers - for example, List(1, 3, 3, 4, 2, 5, 9, 6, 1) - and you are asked to return the highest even number. Which of the following set of functions best solves the problem?

  • reduce, max
  • reduce, map, max
  • filter, reduce, max (correct)
  • filter, map
  • How does Apache Spark achieve fault tolerance?

  • Saves all state information to disk every hour.
  • Records each update immediately onto HDFS.
  • Writes the transformed RDD to disk after every transformation.
  • Uses lineage to record all transformations that have been performed and replay the necessary transformations. (correct)
  • Which of the following Yarn managers is responsible for keeping track of all the tasks for big data processing jobs?

    <p>The application master</p> Signup and view all the answers

    Consider the following Scala code: val cost = 29.19. Which of the following statements is false?

    <p>You can assign cost to a different value but the new value must be of type Double</p> Signup and view all the answers

    Which one of the following components of Storm is responsible for performing the computing?

    <p>Bolts</p> Signup and view all the answers

    Which of the following tasks should NOT be done using Storm?

    <p>Allowing millions of people to update their bank accounts at the same time.</p> Signup and view all the answers

    Which of the following are NOT contributing reasons for MapReduce to be so bad for processing graph algorithms?

    <p>MapReduce cannot perform the necessary computation required by graph algorithms.</p> Signup and view all the answers

    More Like This

    Scala Programming Quiz
    10 questions

    Scala Programming Quiz

    MiraculousWisdom3936 avatar
    MiraculousWisdom3936
    Scala Programming Language Features Quiz
    12 questions
    Use Quizgecko on...
    Browser
    Browser