create key and value in correct scope for HadoopRdd