def StartHadoopCluster(self):
    try:
      self.cluster_info = datastore.ClusterInfo(
          name=self.name, project=self.project, prefix=self.prefix,
          zone=self.zone, machinetype=self.machinetype, image=self.image,
          network=self.network, num_workers=self.num_workers,
          custom_command=self.custom_command)
      self.cluster_info.put()
      self._StartMaster()
      self._StartWorkers()
      self._WaitForInstances()
    except ClusterSetUpError, e:
      self.cluster_info.SetStatus('%s: %s' % (
          datastore.ClusterStatus.ERROR, str(e)))
Starts Hadoop cluster on Compute Engine.
dataset/ETHPy150Open GoogleCloudPlatform/Data-Pipeline/app/src/hadoop/hadoop_cluster.py/HadoopCluster.StartHadoopCluster