Export (0) Print
Expand All

NodeHistoryPropertyIds Class

Defines the node history properties that you can retrieve when calling the IScheduler.OpenNodeHistoryEnumerator method.


Namespace: Microsoft.Hpc.Scheduler.Properties
Assembly: Microsoft.Hpc.Scheduler.Properties (in Microsoft.Hpc.Scheduler.Properties.dll)

'Usage
Dim instance As NodeHistoryPropertyIds

[SerializableAttribute] 
public class NodeHistoryPropertyIds
/** @attribute SerializableAttribute() */ 
public class NodeHistoryPropertyIds
SerializableAttribute 
public class NodeHistoryPropertyIds

The following example shows how to use the property identifiers with a rowset enumerator to retrieve all the properties for a node history event.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Hpc.Scheduler;
using Microsoft.Hpc.Scheduler.Properties;

namespace AccessNodeHistoryIds
{
    class Program
    {
        static void Main(string[] args)
        {
            IScheduler scheduler = new Scheduler();
            ISchedulerRowEnumerator rows = null;
            IPropertyIdCollection properties = new PropertyIdCollection();
            IFilterCollection filters = scheduler.CreateFilterCollection();
            bool firstRow = true;

            scheduler.Connect("localhost");

            properties.Add(NodeHistoryPropertyIds.EventTime);
            properties.Add(NodeHistoryPropertyIds.Id);
            properties.Add(NodeHistoryPropertyIds.NodeEvent);
            properties.Add(NodeHistoryPropertyIds.NodeGuid);
            properties.Add(NodeHistoryPropertyIds.NodeId);
            properties.Add(NodeHistoryPropertyIds.NodeName);

            filters.Add(FilterOperator.Equal, NodeHistoryPropertyIds.NodeName, "<nodenamegoeshere>");

            using (rows = scheduler.OpenNodeHistoryEnumerator(properties, filters, null))
            {
                foreach (PropertyRow row in rows)
                {
                    if (firstRow)
                    {
                        firstRow = false;
                        Console.WriteLine("NodeName: " + (string)row[NodeHistoryPropertyIds.NodeName].Value);
                        Console.WriteLine("NodeId: " + (int)row[NodeHistoryPropertyIds.NodeId].Value);
                        Console.WriteLine("NodeGuid: " + (Guid)row[NodeHistoryPropertyIds.NodeGuid].Value);
                        Console.WriteLine("Id: " + (int)row[NodeHistoryPropertyIds.Id].Value);
                        Console.WriteLine();
                    }

                    Console.Write("NodeEvent: " + (NodeEvent)row[NodeHistoryPropertyIds.NodeEvent].Value);
                    Console.WriteLine(" @ " + (DateTime)row[NodeHistoryPropertyIds.EventTime].Value);
                }
            }
        }
    }
}

System.Object
  Microsoft.Hpc.Scheduler.Properties.NodeHistoryPropertyIds

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

Windows XP, Windows Vista, Windows 7, Windows 8, Windows Server 2003, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012

Target Platforms

Windows XP, Windows Vista, Windows 7, Windows 8, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, with HPC Pack Client Utilities




Build Date:

2013-04-22

Community Additions

ADD
Show:
© 2014 Microsoft