I want to create a service that starts and stops my hdfs that is associated to my spark cluster.
service descripton:
[Unit]
Description=Hdfs service
[Service]
Type=simple
WorkingDirectory=/home/hduser
ExecStart=/opt/hadoop-2.6.4/sbin/start-service-hdfs.sh
ExecStop=/opt/hadoop-2.6.4/sbin/stop-service-hdfs.sh
[Install]
WantedBy=multi-user.target
The problem I m facing is when i start the service, it starts but it stops just after sometime its been started.
Can anyone tell me what exactly the issue could be??
Thanks in advance!