同时由不同的 shell 运行相同的 java 类 [英] run same java class by different shell at the same time

查看:75
本文介绍了同时由不同的 shell 运行相同的 java 类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这可能是一个愚蠢的问题,但我只想确定.我想使用不同的数据集同时从不同的 shell 脚本运行相同的 java 类(weka 文本分类器).我的想法对此有点困惑.该类是否会像多线程一样运行?如果是这种情况,weka 分类器线程安全吗?

It may be a dumb question but i just want to sure. I want to run same java class(weka text classifier) from different shell script at the same time with different data set. My idea is getting little confusing about this. is that class will behave like multi-thread? if this is the case, is weka classifiers thread-safe?

推荐答案

从不同的 shell 运行多个 Weka 分类器实例,将它们作为不同的进程运行.这是安全,并且它们的执行不会相互干扰.确保他们将模型写入不同的位置/文件.

Running multiple instances of Weka classifiers, from different shells, runs them as different processes. This is safe, and their execution would not interfere with each other. Make sure though that they are writing the model to different locations/files.

这篇关于同时由不同的 shell 运行相同的 java 类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆