안단테 안단테

머하웃 완벽 가이드) - 7장 분산으로 처리하기 본문

IT 기술/BigData

머하웃 완벽 가이드) - 7장 분산으로 처리하기

안단테에 2023. 2. 2. 13:23
728x90
반응형

로컬로 실행하지 않고 분산으로 실행시키려면

 

KMeansDriver 클래스의 run에 맵리듀스 부분이 있으니깐 이 부분을 실행시켜야 된다.

 

public static void run(org.apache.hadoop.conf.Configuration conf,
                       org.apache.hadoop.fs.Path input,
                       org.apache.hadoop.fs.Path clustersIn,
                       org.apache.hadoop.fs.Path output,
                       DistanceMeasure measure,
                       double convergenceDelta,
                       int maxIterations,
                       boolean runClustering,
                       double clusterClassificationThreshold,
                       boolean runSequential)
                throws IOException,
                       InterruptedException,
                       ClassNotFoundException

  

      KMeansDriver.run(conf,

                new Path("clustering/testdata/points"),

                new Path("clustering/testdata/clusters"),

                new Path("clustering/output"),

                0.001,

                10,

                true,

                0,

                false);

 

boolean runSequential 이 부분을 false로 지정해야 분산으로 처리된다..
이거때문에 뭔 고생을 한건지....
728x90
반응형
Comments