Exemplo n.º 1
0
 /// <summary>
 /// Create a cluster containing just the local machine.
 /// </summary>
 /// <param name="conf">Configuration for the local machine.</param>
 public HdfsClusterStatus(ClusterConfiguration conf)
     : base(conf)
 {
     if (!(conf is HdfsClusterConfiguration))
         throw new ArgumentException("Expected an HdfsClusterConfiguration, got a " + conf.GetType());
     this.config = conf as HdfsClusterConfiguration;
     // make a fake call to initialize the cluster on the foreground thread
     // HDFS does not work if initialized on the background thread.
     Uri uri = DfsFile.UriFromPath(this.config.JobsFolderUri, "");
     this.config.DfsClient.IsFileExists(uri); // ignore result
     this.yarnClient = new NativeYarnClient(this.config.StatusNode, this.config.StatusNodePort, new HdfsClient(this.config.UserName));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Create a cluster containing just the local machine.
 /// </summary>
 /// <param name="conf">Configuration for the local machine.</param>
 public WebHdfsClusterStatus(ClusterConfiguration conf)
     : base(conf)
 {
     if (!(conf is WebHdfsClusterConfiguration))
         throw new ArgumentException("Expected a WebHdfsClusterConfiguration, got a " + conf.GetType());
     this.config = conf as WebHdfsClusterConfiguration;
     this.yarnClient = new NativeYarnClient(this.config.StatusNode, this.config.StatusNodePort, new HdfsClient(this.config.UserName));
 }
Exemplo n.º 3
0
 /// <summary>
 /// Create a cluster containing just the local machine.
 /// </summary>
 /// <param name="config">Configuration for the local machine.</param>
 protected DfsClusterStatus(ClusterConfiguration config)
     : base(config)
 {
     if (!(config is DfsClusterConfiguration))
         throw new ArgumentException("Expected a DfsClusterConfiguration, got a " + config.GetType());
 }
Exemplo n.º 4
0
 /// <summary>
 /// Create a cluster containing just the local machine.
 /// </summary>
 /// <param name="config">Configuration for the local machine.</param>
 public AzureDfsClusterStatus(ClusterConfiguration config)
     : base(config)
 {
     if (!(config is AzureDfsClusterConfiguration))
         throw new ArgumentException("Expected a AzureDfsClusterConfiguration, got a " + config.GetType());
     this.config = config as AzureDfsClusterConfiguration;
 }
Exemplo n.º 5
0
 /// <summary>
 /// Create a cluster containing just the local machine.
 /// </summary>
 /// <param name="config">Configuration for the local machine.</param>
 public YarnEmulatedClusterStatus(ClusterConfiguration config)
     : base(config)
 {
     if (!(config is LocalEmulator))
         throw new ArgumentException("Expected a LocalMachineConfiguration, got a " + config.GetType());
     this.config = config as LocalEmulator;
 }