[WIP][SPARK-1477]: Add the lifecycle interface