Couldn't this just be made as an apply on an RDD of ADAMRecords? It seems preferable to stick with the apply convention.