Fixed example frameworks to launch tasks based on offered resources.

Review: https://reviews.apache.org/r/25801
Fixed example frameworks to fail fast on an unexpected status udpate.

Review: https://reviews.apache.org/r/25805