Challenge - 5 Problems
YARN Lifecycle Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate1:30remaining
Identify the correct sequence of YARN application lifecycle stages
Which of the following sequences correctly represents the main stages of an application lifecycle in YARN?
Attempts:
2 left
💡 Hint
Think about what happens first when you start a YARN application.
✗ Incorrect
The application lifecycle in YARN starts with submission, then resource allocation by the ResourceManager, followed by execution by NodeManagers, and finally completion.
❓ data_output
intermediate1:00remaining
Determine the final status of a YARN application
Given the following YARN application states: SUBMITTED, ACCEPTED, RUNNING, FINISHED, FAILED, KILLED. What is the final status of an application that completed successfully?
Attempts:
2 left
💡 Hint
Think about what status means the application ended without errors.
✗ Incorrect
FINISHED indicates the application completed successfully without errors.
❓ Predict Output
advanced1:30remaining
Output of YARN application state transitions in logs
What will be the output of the following pseudo-log snippet showing YARN application state transitions?
```
states = ['SUBMITTED', 'ACCEPTED', 'RUNNING', 'FINISHED']
for i, state in enumerate(states):
print(f"State {i+1}: {state}")
```
Hadoop
states = ['SUBMITTED', 'ACCEPTED', 'RUNNING', 'FINISHED'] for i, state in enumerate(states): print(f"State {i+1}: {state}")
Attempts:
2 left
💡 Hint
Remember that enumerate starts counting from 0 by default, but the code adds 1.
✗ Incorrect
The code prints each state with its index starting at 1, so the output matches option C exactly.
🔧 Debug
advanced1:00remaining
Identify the error in YARN application state update code
What error will the following Python code raise when simulating YARN application state updates?
```
states = ['SUBMITTED', 'ACCEPTED', 'RUNNING', 'FINISHED']
for i in range(5):
print(states[i])
```
Hadoop
states = ['SUBMITTED', 'ACCEPTED', 'RUNNING', 'FINISHED'] for i in range(5): print(states[i])
Attempts:
2 left
💡 Hint
Check the length of the list and the range used in the loop.
✗ Incorrect
The list has 4 elements indexed 0 to 3, but the loop tries to access index 4 causing IndexError.
🚀 Application
expert2:00remaining
Calculate total resource usage time for a YARN application
A YARN application requests 4 containers. Each container runs for 10 minutes. The application master runs for 5 minutes before containers start and 3 minutes after all containers finish. What is the total resource usage time in minutes for this application?
Attempts:
2 left
💡 Hint
Add the application master time and the total container time.
✗ Incorrect
Application master runs 5 + 3 = 8 minutes. Containers run 4 * 10 = 40 minutes. Total is 8 + 40 = 48 minutes.