Skip to content

Commit

Permalink
[Feature-#1787]Support hadoop 3 compilation and packaging
Browse files Browse the repository at this point in the history
[Feature-#1787]Support hadoop 3 compilation and packaging

[Feature-#1787]Support hadoop 3 compilation and packaging
  • Loading branch information
libailin authored and lihongwei committed Aug 15, 2023
1 parent 74c1591 commit a6f8970
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 11 deletions.
9 changes: 5 additions & 4 deletions chunjun-connectors/chunjun-connector-binlog/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,11 @@
<artifactId>canal.parse</artifactId>
<version>${canal.version}</version>
<exclusions>
<exclusion>
<artifactId>commons-lang</artifactId>
<groupId>commons-lang</groupId>
</exclusion>
<!-- 为了适配hadoop 3, 解决 java.lang.ClassNotFoundException: org.apache.commons.lang.exception.NestableRuntimeException -->
<!-- <exclusion>-->
<!-- <artifactId>commons-lang</artifactId>-->
<!-- <groupId>commons-lang</groupId>-->
<!-- </exclusion>-->
<exclusion>
<artifactId>logback-classic</artifactId>
<groupId>ch.qos.logback</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import com.dtstack.chunjun.connector.jdbc.sink.JdbcSinkFactory;
import com.dtstack.chunjun.connector.postgresql.dialect.PostgresqlDialect;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;

import static com.dtstack.chunjun.connector.greenplum.sink.GreenplumOutputFormat.INSERT_SQL_MODE_TYPE;

Expand Down
18 changes: 18 additions & 0 deletions chunjun-connectors/chunjun-connector-hdfs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,14 @@
<artifactId>hadoop-yarn-server-resourcemanager</artifactId>
<groupId>org.apache.hadoop</groupId>
</exclusion>
<exclusion>
<artifactId>hadoop-auth</artifactId>
<groupId>org.apache.hadoop</groupId>
</exclusion>
<exclusion>
<artifactId>hadoop-common</artifactId>
<groupId>org.apache.hadoop</groupId>
</exclusion>
</exclusions>
</dependency>

Expand Down Expand Up @@ -205,6 +213,10 @@
<artifactId>parquet-hadoop-bundle</artifactId>
<groupId>com.twitter</groupId>
</exclusion>
<exclusion>
<artifactId>hadoop-common</artifactId>
<groupId>org.apache.hadoop</groupId>
</exclusion>
</exclusions>
</dependency>

Expand Down Expand Up @@ -250,6 +262,12 @@
</excludes>
</filter>
</filters>
<relocations>
<relocation>
<pattern>com.google.common</pattern>
<shadedPattern>com.dtstack.chunjun.connector.hdfs.com.google.common</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
Expand Down
4 changes: 4 additions & 0 deletions chunjun-connectors/chunjun-connector-hive/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,10 @@
<pattern>com.google.protobuf</pattern>
<shadedPattern>com.dtstack.chunjun.connector.hive.com.google.protobuf</shadedPattern>
</relocation>
<relocation>
<pattern>com.google.common</pattern>
<shadedPattern>com.dtstack.chunjun.connector.hive.com.google.common</shadedPattern>
</relocation>
</relocations>
<transformers>
<transformer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ public static List<String> getTablePrimaryKey(TableIdentify tableIdentify, Conne
List<String> indexList = new LinkedList<>();
while (rs.next()) {
String index = rs.getString(4);
if (org.apache.commons.lang.StringUtils.isNotBlank(index)) indexList.add(index);
if (StringUtils.isNotBlank(index)) indexList.add(index);
}
return indexList;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
import com.dtstack.chunjun.config.CommonConfig;

import com.amazonaws.regions.Regions;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Getter;
import lombok.Setter;
import org.codehaus.jackson.annotate.JsonIgnoreProperties;

import java.io.Serializable;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

import lombok.Data;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;
import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

import cn.hutool.core.date.LocalDateTimeUtil;
import com.alibaba.fastjson.JSON;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.math.NumberUtils;

import java.math.BigDecimal;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import org.apache.flink.core.memory.DataInputView;
import org.apache.flink.core.memory.DataOutputView;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;

import java.io.IOException;

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
<maven-source-plugin.version>3.0.1</maven-source-plugin.version>
<maven-javadoc-plugin.version>2.9.1</maven-javadoc-plugin.version>
<maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
<maven-scala-plugin.version>4.8.1</maven-scala-plugin.version>
<maven-scala-plugin.version>3.2.2</maven-scala-plugin.version>
<maven-compiler-plugin.version>3.10.1</maven-compiler-plugin.version>
<maven-pmd-plugin.version>3.8</maven-pmd-plugin.version>
<maven-assembly-plugin.version>3.3.0</maven-assembly-plugin.version>
Expand Down

0 comments on commit a6f8970

Please sign in to comment.