{
  "id": "hdfs",
  "cpus": 0.5,
  "mem": 512,
  "disk": 100,
  "instances": 1,
  "cmd": "{{#hdfs/custom-config}}echo {{hdfs/custom-config}} | base64 --decode > mesos-site.xml && {{/hdfs/custom-config}}cd hdfs-mesos* && if [ -e '../mesos-site.xml' ]; then cp -f ../mesos-site.xml ./etc/hadoop/; fi && ./bin/hdfs-mesos",
  "uris": {{{hdfs/scheduler-uris}}},
  "healthChecks": [
    {
      "protocol": "COMMAND",
      "command": { "value": "hadoop fs -ls hdfs://hdfs/ && hadoop fs -mkdir hdfs://hdfs/hdfs-framework-healthcheck && mkdir hdfs-framework-healthcheck && echo \"this is a test\" > hdfs-framework-healthcheck/test1.txt && hadoop fs -put hdfs-framework-healthcheck/test1.txt hdfs://hdfs/hdfs-framework-healthcheck && hadoop fs -get hdfs://hdfs/hdfs-framework-healthcheck/test1.txt hdfs-framework-healthcheck/test2.txt && rm -rf hdfs-framework-healthcheck && hadoop fs -rm -r -f hdfs://hdfs/hdfs-framework-healthcheck" },
      "gracePeriodSeconds": 300,
      "intervalSeconds": 60,
      "timeoutSeconds": 20,
      "maxConsecutiveFailures": 3
    }
  ]
}

{
  "id": "hdfs",
  "cpus": 0.5,
  "mem": 512,
  "disk": 100,
  "instances": 1,
  "cmd": "{{#hdfs/custom-config}}echo {{hdfs/custom-config}} | base64 --decode > mesos-site.xml && {{/hdfs/custom-config}}cd hdfs-mesos* && if [ -e '../mesos-site.xml' ]; then cp -f ../mesos-site.xml ./etc/hadoop/; fi && ./bin/hdfs-mesos",
  "uris": {{{hdfs/scheduler-uris}}},
  "healthChecks": [
    {
      "protocol": "COMMAND",
      "command": { "value": "hadoop fs -ls hdfs://hdfs/ && rm -rf hdfs-framework-healthcheck && hadoop fs -rm -r -f hdfs://hdfs/hdfs-framework-healthcheck && hadoop fs -mkdir hdfs://hdfs/hdfs-framework-healthcheck && mkdir hdfs-framework-healthcheck && echo \"this is a test\" > hdfs-framework-healthcheck/test1.txt && hadoop fs -put hdfs-framework-healthcheck/test1.txt hdfs://hdfs/hdfs-framework-healthcheck && hadoop fs -get hdfs://hdfs/hdfs-framework-healthcheck/test1.txt hdfs-framework-healthcheck/test2.txt && rm -rf hdfs-framework-healthcheck && hadoop fs -rm -r -f hdfs://hdfs/hdfs-framework-healthcheck" },
      "gracePeriodSeconds": 300,
      "intervalSeconds": 60,
      "timeoutSeconds": 20,
      "maxConsecutiveFailures": 3
    }
  ]
}

Update health check command to remove old files initially in case of error condition
Update health check command to remove old files initially in case of error condition
