본문 바로가기

OpenSource(Bigdata&distribution&Network)/Spark

spark + Hbase 연동에러 해결건.

이클립스에서 개발테스트중에 발생한 오류 ( 실행하면 SparkConf쪽에서 바로 오류가 난다.)

사실 저 매쏘드를 찾아보려고 jar을 다뒤져보고 역컴파일하다가 짜증나서 폭팔함;;


Exception in thread "main" java.lang.NoSuchMethodError: scala.Predef$.$conforms()Lscala/Predef$$less$colon$less;

at org.apache.spark.util.Utils$.getSystemProperties(Utils.scala:1546)

at org.apache.spark.SparkConf.<init>(SparkConf.scala:59)

at spark1.test1.main(test1.java:20)


해결책 : 버전을 잘 마춰준다 ㅋㅋ

참고 : spark-1.6.1 , scala-library 2.10.4버전 사용 

maven 버전은 아래처럼 마춰서 사용. 



에러 날때 사용한 버전

<dependency>

  <groupId>org.apache.spark</groupId>

  <artifactId>spark-core_2.11</artifactId>

  <version>1.6.1</version>

  </dependency>

  <dependency>

  <groupId>org.apache.spark</groupId>

  <artifactId>spark-sql_2.11</artifactId>

  <version>1.6.1</version>

  </dependency>

  <dependency>

  <groupId>org.apache.spark</groupId>

  <artifactId>spark-streaming_2.11</artifactId>

  <version>1.6.1</version>

  </dependency>

  <dependency>

  <groupId>org.apache.spark</groupId>

  <artifactId>spark-mllib_2.11</artifactId>

  <version>1.6.1</version>

   </dependency>


이걸사용하고나니 없어짐 

 <dependency>

  <groupId>org.apache.spark</groupId>

  <artifactId>spark-core_2.10</artifactId>

  <version>1.6.1</version>

  </dependency>

  <dependency>

  <groupId>org.apache.spark</groupId>

  <artifactId>spark-sql_2.10</artifactId>

  <version>1.6.1</version>

  </dependency>

  <dependency>

  <groupId>org.apache.spark</groupId>

  <artifactId>spark-streaming_2.10</artifactId>

  <version>1.6.1</version>

  </dependency>

  <dependency>

  <groupId>org.apache.spark</groupId>

  <artifactId>spark-mllib_2.10</artifactId>

  <version>1.6.1</version>

  </dependency>