0
0
Hadoopdata~10 mins

Container allocation in Hadoop - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to allocate a container in Hadoop YARN.

Hadoop
container = nmClient.allocateContainer([1])
Drag options to blanks, or click blank then click option'
AnodeManager
Bcontainer
CcontainerRequest
Dresource
Attempts:
3 left
💡 Hint
Common Mistakes
Using the container object instead of the request.
Passing the node manager instead of the request.
2fill in blank
medium

Complete the code to specify the memory size for the container request.

Hadoop
resource.setMemory([1])
Drag options to blanks, or click blank then click option'
Amemory
B1024
CcontainerMemory
D2048
Attempts:
3 left
💡 Hint
Common Mistakes
Passing a variable name instead of a number.
Using too large or too small values without context.
3fill in blank
hard

Fix the error in the code to request a container with the correct resource capability.

Hadoop
containerRequest = new ContainerRequest([1], null, null, 1)
Drag options to blanks, or click blank then click option'
Amemory
Bcontainer
CnodeManager
Dresource
Attempts:
3 left
💡 Hint
Common Mistakes
Passing the container object instead of resource.
Using node manager or memory variable incorrectly.
4fill in blank
hard

Fill both blanks to create a resource with 2048 MB memory and 2 virtual cores.

Hadoop
resource = Resource.newInstance([1], [2])
Drag options to blanks, or click blank then click option'
A2048
B2
C1024
D1
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping memory and cores values.
Using incorrect units for memory.
5fill in blank
hard

Fill all three blanks to create a container request with resource, null nodes, and priority 5.

Hadoop
containerRequest = new ContainerRequest([1], [2], null, [3])
Drag options to blanks, or click blank then click option'
Aresource
Bnull
C5
Dpriority
Attempts:
3 left
💡 Hint
Common Mistakes
Passing priority as a variable instead of a number.
Using non-null nodes when any node is acceptable.