Esempio n. 1
0
        public virtual void TearDown()
        {
            if (cluster.IsClusterUp())
            {
                cluster.Shutdown();
            }
            FilePath data_dir = new FilePath(cluster.GetDataDirectory());

            if (data_dir.Exists() && !FileUtil.FullyDelete(data_dir))
            {
                throw new IOException("Could not delete hdfs directory in tearDown '" + data_dir
                                      + "'");
            }
        }
Esempio n. 2
0
 private void SleepForever()
 {
     while (true)
     {
         try
         {
             Sharpen.Thread.Sleep(SleepIntervalMs);
             if (!dfs.IsClusterUp())
             {
                 Log.Info("Cluster is no longer up, exiting");
                 return;
             }
         }
         catch (Exception)
         {
         }
     }
 }