From the following graph code which code snippet will return the no of flight routes

0 votes
From the following graph code ,which code snippet will return the no.of flight routes?

sc.parallelize (Array(1L, ("SFO")), (2L, ("ORD")), (3L,("DFW"))))

val routes =sc.parallelize

(Array(Edge(1L,2L,1800),Edge(2L,3L,800),Edge(3L,1L,1400)))

val nowhere = "nowhere"

val graph = Graph(airports,routes,nowhere)

a)val numroutes = graph.numVertices

b)val numroutes = graph.numEdges

c)val numroutes = graph.nowhere

d)val numroutes = graph routes
Nov 24, 2020 in Apache Spark by ritu
• 980 points
55 views

1 answer to this question.

0 votes

Hey, @Ritu,

I am getting error in your code.

answered Nov 25, 2020 by Gitika
• 65,870 points

Related Questions In Apache Spark

0 votes
2 answers

5)Using which one of the given choices will you create an RDD with specific partitioning?

Hi, @Ritu, option b for you, as Hash Partitioning ...READ MORE

answered Nov 23, 2020 in Apache Spark by Gitika
• 65,870 points
120 views
0 votes
1 answer

7)From Schema RDD, data can be cache by which one of the given choices?

Hi, @Ritu, According to the official documentation of Spark 1.2, ...READ MORE

answered Nov 23, 2020 in Apache Spark by Gitika
• 65,870 points
93 views
0 votes
1 answer

which one of the following commands is used to see the structure of the Dataframe?

Hi @Ritu If you want to see the ...READ MORE

answered Nov 25, 2020 in Apache Spark by Gitika
• 65,870 points
96 views
0 votes
1 answer

What is the output of the following code?

After executing your code, there is an ...READ MORE

answered Nov 25, 2020 in Apache Spark by Gitika
• 65,870 points
55 views
0 votes
0 answers

What is the output of the following code?

What is the output of the following ...READ MORE

Nov 24, 2020 in Apache Spark by Edureka
• 200 points

closed Nov 25, 2020 by MD 40 views
0 votes
1 answer
0 votes
1 answer