[SPARK-1477]: Add the lifecycle interface 

Done