updated code for Hortonworks HDP 2.1
updated code for Hortonworks HDP 2.1