Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

emr to dataproc

I have a job deployed in AWS EMR and I use ec2-metadata library to fetch the vm instance_id and the host_id. 
now I want to move the job to dataproc I want to perform the same activity.
how can I do it. what is the alternative for the same?
how to draft the pyspark script for the same?
what are the other thing to be followed to get the job working on dataproc?

2 0 179