250+ TOP MCQs on Parallelizing Processing and Load Balancing and Answers

Java Spring Multiple Choice Questions & Answers (MCQs) on “Parallelizing Processing and Load Balancing”.

1. To quickly grid-enable a method on a bean using GridGain.
a) @Gridify
b) @Grid
c) @GridGain
d) None of the mentioned
Answer: a
Clarification: You can use GridGain @Gridify annotation along with some Spring AOP configuration to let GridGain know that it can parallelize the execution of the method across the grid.

2. GridGain provides:-
a) load balancing
b) fault tolerance
c) routing
d) all of the mentioned
Answer: d
Clarification: GridGain provides load balancing as well as fault tolerance and routing out of the box, which you get for free by adding this annotation.

3. To build a parallelized solution for a problem that’s intrinsically better-suited to parallelization or that, for want of resources, needs to be chunked.
a) map
b) reduce
c) all of the mentioned
d) none of the mentioned
Answer: c
Clarification: Use map/reduce to approach the problem concurrently.

4. GridGain works with a GridTask, which specifies how to handle the main unit of work of the interface type:-
a) Grid
b) GridGain
c) GridJob
d) All of the mentioned
View Answer

Answer: c
Clarification: Underneath the hood, GridGain works with a GridTask, which specifies how to handle the main unit of work of the interface type GridJob.

5. When you call the method on the service with the @Gridify annotation pointing to this GridTask implementation, it stops execution of method and loads an instance of this implementation.
a) True
b) False

Answer: a
Clarification: The parameters, as passed to the method with the annotation, are passed to: split(int i, final GridifyArgument gridifyArgument), which is used to dole out GridJob instances.

6. When using GridGain stem mostly from the fact that what you develop on one node can’t always automatically work on another node with no additional configuration.
a) True
b) False
Answer: a
Clarification: The parameters, as passed to the method with the annotation, are passed to: split(int i, final GridifyArgument gridifyArgument), which is used to dole out GridJob instances.

7. GridGain lets you start up nodes using the startup script in the:-
a) etc
b) opt
c) bin
d) all of the mentioned
Answer: c
Clarification: GridGain lets you start up nodes using the startup script in the bin directory of the distribution.

8. To hoist a grid node into existence.
a) GridLoader
b) GridLoad
c) Grid
d) GridGain
Answer: a
Clarification: The GridLoader’s job is to hoist a grid node into existence.

9. When you use the script that comes with the distribution is the class:-
a) GridCommandLine
b) GridCommandLineLoader
c) GridCommand
d) All of the mentioned
Answer: b
Clarification: The one that gets started when you use the script that comes with the distribution is the class GridCommandLineLoader.

10. A GridLoader instance is responsible for many things such as:-
a) GridFactory.start
b) GridFactory.stop
c) All of the mentioned
d) None of the mentioned
Answer: c
Clarification: A GridLoader instance is responsible for many things, not the least of which is correctly calling GridFactory.start and GridFactory.stop.

  250+ TOP MCQs on Refreshing and Defining Beans from Scripts and Answers

11. GridFactory.start can take as its first parameter a:-
a) GridConfiguration object
b) Spring application context
c) All of the mentioned
d) None of the mentioned
Answer: c
Clarification: This GridConfiguration object is what tells GridGain what is unique about a given node and the grid’s topology. By default, it uses $GRIDGAIN HOME/config/default-spring.xml, which, in turn, does things such as load a Grid object and configure user parameters about a specific node.

12. The file which enables you to tell GridGain about which GridTask classes are deployed:-
a) gridgain.xml
b) gridgain.html
c) grid.xml
d) gridify.xml
View Answer

Answer: a
Clarification: gridgain.xml file, which is optional, enables you to tell GridGain about which GridTask classes are deployed.

13. Instances of the ApplicationContext can be injected into the various GridGain class instances (GridTask, GridJob, and so forth) using GridGain:-
a) @Grid
b) @GridGain
c) @Gridify
d) None of the mentioned
View Answer

Answer: d
Clarification: Instances of the ApplicationContext can be injected into the various GridGain class instances (GridTask, GridJob, and so forth) using GridGain @GridSpringApplicationContextResource annotation.

14. This is the default implementation. It is used when you run gridgain.sh or gridgain.bat.
a) org.gridgain.grid.loaders.cmdline.GridCommandLineLoader
b) org.gridgain.grid.loaders.servlet.GridServletLoader
c) org.gridgain.grid.loaders.jboss.GridJbossLoader
d) org.gridgain.grid.loaders.weblogic.GridWeblogicStartup
Answer: a
Clarification: org.gridgain.grid.loaders.cmdline.GridCommandLineLoader This is the default implementation. It is used when you run gridgain.sh or gridgain.bat.

15. This is likely the second most useful implementation. It provides a servlet that bootstraps the GridGain instance inside any web container as a servlet.
a) org.gridgain.grid.loaders.cmdline.GridCommandLineLoader
b) org.gridgain.grid.loaders.servlet.GridServletLoader
c) org.gridgain.grid.loaders.jboss.GridJbossLoader
d) org.gridgain.grid.loaders.weblogic.GridWeblogicStartup

Answer: b
Clarification: org.gridgain.grid.loaders.servlet.GridServletLoader This is likely the second most useful implementation. It provides a servlet that bootstraps the GridGain instance inside any web container as a servlet.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top