Once all the job and datafeeds have been migrated don't write the empty lists in MlMetadata.toXContent otherwise you have this confusing and potentially alarming clusterstate where it looks like no jobs exist
GET /_cluster/state/metadata
ml : {
jobs : [],
datafeeds: []
}