Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

7CCSMBDT

Big Data Technologies

2017

Question One

(a) What are the four types of Big Data analytics?

[2 marks]

(b) Briefly discuss the main difference between the types of Big Data analytics.

[4 marks]

(c) For each of the following analytic tasks, identify its type and provide justification for the type you have identified.

(i) Computing the number of distinct items in a given stream of data comprised of user locations.

(ii) Computing how many friends each user has in

a large social network.

(iii) Deciding whether two reviews, on two different e-

commerce websites, are written by the same user.

(iv) Clustering 100 users of an e-commerce site, based on

their demographics.

[8 marks]

(d) Identify the most appropriate analytic setting for performing each of the tasks in part (c) of Question One. Provide justification for your answers.

[4 marks]

(e) Modify the following Apache Sqoop command to improve its efficiency:

scoop import --connect jdbc:mysql://localhost/hadoop --username U - -password P --table tab1 --columns "column1, column2"

Your answer must exploit two different features of Sqoop and briefly mention the goal of each feature.

[7 marks]


Question Two

(a) Discuss the differences between a combiner and a reducer in MapReduce.

[9 Marks]

(b) Consider the following MapReduce program where the mapper and reducer is as follows:

def mapper(self, _, line):

yield “chars”, len(line)

def reducer(self, key, values):

yield key, f(values)

where f() is a given function.

(i) Provide an example of a function f(), for which a combiner can be used to improve the efficiency of the program. Justify your choice of f() and explain the input and output of the combiner that uses the    function f() you chose.

[6 marks]

(ii) Provide an example of a function f(), for which a combiner should NOT be used to improve the efficiency of the program. Justify your   choice of f().

[4 marks]

(iii) Provide an example that shows why the combiner for the function f() you chose in part (ii) should NOT be used.

[6 marks]


Question Three

(a) Discuss why NoSQL databases are appropriate for dealing with

BigData, by referring to the Big Data characteristics.              [7 marks]

(b) Consider the following large collection of (key, value) pairs:

Key

Value

111

John Smith

324

Sarah Lee

953

<XML> <data> … . </data> </XML>

(i) What are the benefits of managing the collection using a key/value NoSQL database?                                                                     [3 marks]

(ii) An application requires replacing first name with initial, for each value that corresponds to a person’s name. Is a key/value NoSQL      database suitable for supporting the application or not? Justify your

answer.                                                                                    [3 marks]

(iii) Assume that the names in the collection correspond to the users of a social network and that the social network provider wants to write    an application that groups the user together with his/her friends.         Which type of NoSQL database is appropriate for the application?         Justify your answer.

[3 marks]

(c) Discuss the benefits of sharding in MongoDB.

[9 marks]


Question Four

(a) What types of applications are more efficient to perform using Apache Spark, compared to using MapReduce?

[4 marks]

(b) Briefly discuss an example of each type of application you provided in part (a) of Question 4.

[4 marks]

(c) What are accumulators in Apache Spark? Write pyspark shell commands that demonstrate the use of an accumulator.

[6 marks]

(d) Consider an infinite stream of events. Each event is of the form      (t,e), where t denotes the time point in which the event arrives and e denotes the event’s symbol. For example, the stream [(0,a), (1,b)] is  comprised of two events that arrive at time 0 and 1 and are associated with the symbols a and b, respectively. Each event arrives at a time    point in {0, 1, …}. Describe an algorithm that maintains a sample of k  events from the stream (without replacement), so that after seeing N  events from the stream, the probability that an event is in the sample is k/N.

[11 marks]