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 25, 2020 in Apache Spark by ritu
• 960 points
983 views

1 answer to this question.

0 votes

Hey, @Ritu,

I am getting error in your code.

answered Nov 25, 2020 by Gitika
• 65,770 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,770 points
4,313 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,770 points
1,962 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,770 points
2,407 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,770 points
953 views
0 votes
0 answers

What is the output of the following code?

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

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

closed Nov 26, 2020 by MD 775 views
0 votes
1 answer
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP