private void btnStartYARN_Click(object sender, EventArgs e) { if (System.Environment.OSVersion.Version.Major == 6 && System.Environment.OSVersion.Version.Minor == 1) { frmYarnError a = new frmYarnError(this); a.ShowDialog(); } else { Cursor.Current = Cursors.WaitCursor; int retval = runDaemons(hadoopPath + "\\sbin\\start-yarn.cmd", ""); Thread.Sleep(10000); // 10 detik if (retval == 0) { labelYARN.Text = "Running"; labelYARN.BackColor = Color.LightGreen; btnStartYARN.Enabled = false; btnStopYARN.Enabled = true; linkLabelYARN.Visible = true; Cursor.Current = Cursors.Default; } } }