java.lang.IllegalStateException: кластеры не найдены. Проверьте путь -c

Я использую следующую команду в командной строке для кластеризации данных с использованием алгоритма 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_canopy — это каталог, содержащий кластеры, созданные с помощью кластеризации навеса Mahout, который содержит каталог clusters-0, который сам содержит каталог с именем _logs и файл с именем part-r-00000

но он продолжает сообщать о следующей ошибке

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

person user1976547    schedule 07.03.2013    source источник


Ответы (2)


вы уверены, что /out_canopy это каталог? Вы пробовали:

file /out_canopy

Вроде опечатка и вы хотели написать только out_canopy или как-то похоже...

person xhudik    schedule 11.03.2013
comment
out_canopy действительно является каталогом. Это то, что hadoop fs -ls / дает drwxr-xr-x - rupinder supergroup 0 2013-03-07 17:11 /out_canopy - person user1976547; 11.03.2013

Это особенно неприятная проблема.

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
person R Palanivel-Tamilnadu India    schedule 05.08.2017