Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CONNECTOR] Add hdfs server, hdfsFileSystem and tests #1447

Merged
merged 10 commits into from
Jan 30, 2023

Conversation

Haser0305
Copy link
Collaborator

#1391
當前方式是透過 hadoop.minicluster 創建本地端的 hdfs ,也順便寫了 hdfs 版的 sink task 測試來看看是否可以正確執行。

@Haser0305
Copy link
Collaborator Author

Haser0305 commented Jan 19, 2023

這邊想要請教一下關於之前 build failed 的事情

我發現如果在 module it 的 dependency 之中加入 hadoop-common,就會導致 ExporterTest > testRunWithDefaultConfigs()PerfSourceTest > testDefaultConfig() 無法通過測試,而結果是 ignored,好像是因為 SERVICE.workerUrl() 所導致的

有測試過單純加入 dependency 並無增減任何程式碼也會導致此錯誤,所以在想會不會是這兩邊有衝突到。
謝謝

@chia7712
Copy link
Contributor

有測試過單純加入 dependency 並無增減任何程式碼也會導致此錯誤,所以在想會不會是這兩邊有衝突到。

應該是有相依性的衝突,例如 hadoop 仰賴 A 函式庫的0.1版、kafka worker 仰賴 A 函式庫的0.2版,這導致做整合測試的時候會出問題,可以試著用 ./gradlew it:dependencies 查看一下是否有出現互相覆蓋的函式庫,如果有的話則看一下版本之間是不是落差很大

@Haser0305
Copy link
Collaborator Author

Haser0305 commented Jan 20, 2023

現在是在 hadoop-common 上設定 transitive 為 false ,在本機跑沒有問題,但不太確定這樣設計妥不妥當。
以下是觀察到 connect-runtimehadoop-common 之中有衝突的項目

connect-runtime
| ch.qos.reload4j:reload4j:1.2.19 -> 1.2.22
| ch.qos.reload4j:reload4j:1.2.19 -> 1.2.22
| jakarta.activation:jakarta.activation-api:1.2.1 -> 1.2.2
| ch.qos.reload4j:reload4j:1.2.19 -> 1.2.22
| org.javassist:javassist:3.25.0-GA -> 3.26.0-GA
| org.apache.commons:commons-lang3:3.8.1 -> 3.12.0

hadoop-common
|    +--- commons-cli:commons-cli:1.2 -> 1.4
|    |    \--- commons-codec:commons-codec:1.11 -> 1.15
|    +--- commons-io:commons-io:2.8.0 -> 2.11.0
|    +--- jakarta.activation:jakarta.activation-api:1.2.1 -> 1.2.2
|    +--- org.eclipse.jetty:jetty-server:9.4.43.v20210629 -> 9.4.48.v20220622 (*)
|    +--- org.eclipse.jetty:jetty-util:9.4.43.v20210629 -> 9.4.48.v20220622
|    +--- org.eclipse.jetty:jetty-servlet:9.4.43.v20210629 -> 9.4.48.v20220622 (*)
|    |    |    \--- org.eclipse.jetty:jetty-util:9.4.43.v20210629 -> 9.4.48.v20220622
|    |    \--- org.eclipse.jetty:jetty-servlet:9.4.43.v20210629 -> 9.4.48.v20220622 (*)
|    |    |    \--- javax.xml.bind:jaxb-api:2.2.2 -> 2.3.0
|    |    +--- org.codehaus.jackson:jackson-core-asl:1.9.2 -> 1.9.13
|    |    +--- org.codehaus.jackson:jackson-mapper-asl:1.9.2 -> 1.9.13
|    |    |    +--- org.codehaus.jackson:jackson-core-asl:1.9.2 -> 1.9.13
|    |    |    \--- org.codehaus.jackson:jackson-mapper-asl:1.9.2 -> 1.9.13 (*)
|    |    |    +--- org.codehaus.jackson:jackson-core-asl:1.9.2 -> 1.9.13
|    |    |    \--- org.codehaus.jackson:jackson-mapper-asl:1.9.2 -> 1.9.13 (*)
|    +--- commons-logging:commons-logging:1.1.3 -> 1.2
|    |    \--- org.apache.commons:commons-lang3:3.7 -> 3.12.0
|    |    +--- com.thoughtworks.paranamer:paranamer:2.3 -> 2.8
|    |    +--- org.xerial.snappy:snappy-java:1.0.5 -> 1.1.8.4
|    |    +--- org.apache.commons:commons-compress:1.4.1 -> 1.21
|    |    \--- org.slf4j:slf4j-api:1.6.4 -> 1.7.36
|    +--- com.google.protobuf:protobuf-java:2.5.0 -> 3.19.4
|    |    +--- org.apache.zookeeper:zookeeper:3.5.6 -> 3.8.0 (*)
|    |    |    |    |    \--- org.slf4j:slf4j-api:1.7.25 -> 1.7.36
|    |    |    |    |         \--- org.slf4j:slf4j-api:1.7.25 -> 1.7.36
|    |    |    |    |    \--- commons-io:commons-io:2.5 -> 2.11.0
|    |    |    |         \--- com.nimbusds:nimbus-jose-jwt:3.10 -> 9.8.1 (*)
|    +--- org.apache.zookeeper:zookeeper:3.5.6 -> 3.8.0 (*)
|    +--- com.fasterxml.jackson.core:jackson-databind:2.12.7 -> 2.13.3 (*)
|    |    \--- org.codehaus.woodstox:stax2-api:4.2 -> 4.2.1
|    \--- org.xerial.snappy:snappy-java:1.1.8.2 -> 1.1.8.4

@chia7712
Copy link
Contributor

@Haser0305 這是一個很好的練習,我給你一些線索,你試著查查看

首先,我們可以用指令列出明確的 error stack

 ./gradlew clean connector:test --tests ExporterTest --info

--info 可以秀出更多資訊

接著你可以看到大概是哪個套件出現問題,然後用該套件去 hadoop and kafka 下去找,看看是不是有明顯的版本落差(例如1版和2版)

@Haser0305 Haser0305 merged commit 2f1ef60 into opensource4you:main Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants