当前位置: 首页 > 工具软件 > Google Spark > 使用案例 >

《Spark系列》tried to access methos com.google.common.base.Stopwatch.<init>()V from class org.apache

司马宏茂
2023-12-01
  • 错误提示

tried to access methos com.google.common.base.Stopwatch.()V from class org.apache.hadoop.mapred.FileInputFormat

  • 处理方法

应该是spark依赖低版本的guava,删除原有的guava,导入新的guava

		<dependency>
            <groupId>org.apache.spark</groupId>
            <artifactId>spark-core_2.11</artifactId>
            <version>2.4.5</version>
            
            <exclusions>
                <exclusion>
                    <groupId>com.google.guava</groupId>
                    <artifactId>guava</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>15.0</version>
        </dependency>
 类似资料: