Ejemplo n.º 1
0
 /// <summary>
 /// Releases all resources used by the HpcLinqContext.
 /// </summary>
 public void Dispose()
 {
     _configuration = null;
     if (_runtime != null)
     {
         _runtime.Dispose();
         _runtime = null;
     }
     if (_dscService != null)
     {
         _dscService.Close();
         _dscService = null;
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the HpcLinqConfiguration class.
        /// </summary>
        /// <param name="configuration">Configuration information.</param>
        /// <remarks>
        /// Connections will be opened to DSC and HPC Server using configuration.HeadNode.
        /// The connections will be opened regardless of whether DSC is used and/or whether
        /// configuration.LocalDebug is true
        /// </remarks>
        public HpcLinqContext(HpcLinqConfiguration configuration)
        {
            // Verify that the head node is set
            if (configuration.HeadNode == null)
            {
                throw new DryadLinqException(HpcLinqErrorCode.ClusterNameMustBeSpecified,
                                             SR.ClusterNameMustBeSpecified);
            }

            _configuration   = configuration.MakeImmutableCopy();
            _runtime         = new HpcQueryRuntime(_configuration.HeadNode);
            _dscService      = new DscService(_configuration.HeadNode);
            _hdfsServiceNode = _configuration.HdfsNameNode;
        }