Edited MCMC on Spark to return RAM db to the user