Microsoft HPC Scheduler 未连接

发布于 2024-10-03 12:49:53 字数 498 浏览 0 评论 0原文

我有这段代码:

static void Main(string[] args)
        {
            Microsoft.Hpc.Scheduler.Scheduler scheduler = 
                new Microsoft.Hpc.Scheduler.Scheduler();

            Console.Write(scheduler.ClusterParameters + "\n" +
                scheduler.EnvironmentVariables + "\n");

        }

这正在生成异常。创建调度程序对象后,属性 ClusterParameters 和 EnvironmentVariables 出现异常。

例外情况是“Microsoft.Hpc.Scheduler.SchedulerException - 操作失败,因为您未连接到调度程序”

有什么想法吗?

I have this code:

static void Main(string[] args)
        {
            Microsoft.Hpc.Scheduler.Scheduler scheduler = 
                new Microsoft.Hpc.Scheduler.Scheduler();

            Console.Write(scheduler.ClusterParameters + "\n" +
                scheduler.EnvironmentVariables + "\n");

        }

This is generating an exception. After the scheduler object is created, the properties ClusterParameters and EnvironmentVariables are holding exceptions.

The exception is, "Microsoft.Hpc.Scheduler.SchedulerException - The operation failed because you are not connected to the scheduler"

Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

太傻旳人生 2024-10-10 12:49:53

文档建议您不直接使用 Scheduler 类。请执行此操作:

IScheduler scheduler = new Scheduler();

完成此操作后,您必须 连接以便能够使用属性。这就是为什么你会得到这个例外。

创建此实例后
接口,调用IScheduler.Connect
连接到集群的方法。你
然后可以创建和安排作业,运行
命令和检索信息
关于集群中的节点。

The docs suggest you do not use the Scheduler class directly. Do this instead:

IScheduler scheduler = new Scheduler();

Once you've done this you would have to Connect to be able to use the properties. That's why you get that exception.

After creating an instance of this
interface, call the IScheduler.Connect
method to connect to a cluster. You
can then create and schedule jobs, run
commands, and retrieve information
about nodes in the cluster.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文