java.lang.illegalstateexception:未找到群集检查-c路径

xfb7svmp  于 2021-06-03  发布在  Hadoop
关注(0)|答案(2)|浏览(385)

我在命令行使用以下命令使用mahout kmeans算法对数据进行聚类

mahout kmeans -i /vect_out/tfidf-vectors/ -c /out_canopy -o /out_kmeans -dm   
org.apache.mahout.common.distance.SquaredEuclideanDistanceMeasure -cd 1.0 -x 20 -cl

其中/out\u canopy是包含使用mahout canopy clustering创建的集群的目录,其中包含 clusters-0 目录,它本身包含一个名为 _logs 和一个名为 part-r-00000 但它一直报告以下错误

java.lang.IllegalStateException: No clusters found. Check your -c path.
at org.apache.mahout.clustering.kmeans.KMeansMapper.setup
sycxhyv7

sycxhyv71#

这是一个特别令人烦恼的问题。

1. Swallow IllegalStateExceptions thrown by removeShutdownHook in FileSystem. The javadoc states:

    public boolean removeShutdownHook(Thread hook)
    Throws:
    IllegalStateException - If the virtual machine is already in the process of shutting down 

So if we are getting this exception, it MEANS we are already in the process of shutdown, so we CANNOT, try what we may, removeShutdownHook. If Runtime had a method Runtime.isShutdownInProgress(), we could have checked for it before the removeShutdownHook call. As it stands, there is no such method. In my opinion, this would be a good patch regardless of the needs for this JIRA.

2. Not send SIGTERMs from the NM to the MR-AM in the first place. Rather we should expose a mechanism for the NM to politely tell the AM its no longer needed and should shutdown asap. Even after this, if an admin were to kill the MRAppMaster with a SIGTERM, the JobHistory would be lost defeating the purpose of 3614
vcudknz3

vcudknz32#

你确定吗 /out_canopy 是目录吗?你试过:

file /out_canopy

好像有个打字错误,你只想写 out_canopy 或者类似的。。。

相关问题