Re: [PR] [Improve] Remove unused code [seatunnel]

2024-11-28 Thread via GitHub


Hisoka-X merged PR #8167:
URL: https://github.com/apache/seatunnel/pull/8167


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [Improve] Remove unused code [seatunnel]

2024-11-28 Thread via GitHub


dailai commented on code in PR #8167:
URL: https://github.com/apache/seatunnel/pull/8167#discussion_r1862852152


##
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/task/flow/SinkFlowLifeCycle.java:
##
@@ -354,10 +343,5 @@ public void restoreState(List 
actionStateList) throws Except
 } else {
 this.writer = sinkAction.getSink().restoreWriter(writerContext, 
states);
 }
-if (this.writer instanceof SupportResourceShare) {
-resourceManager =
-((SupportResourceShare) 
this.writer).initMultiTableResourceManager(1, 1);
-((SupportResourceShare) 
this.writer).setMultiTableResourceManager(resourceManager, 0);

Review Comment:
   Ok



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [Improve] Remove unused code [seatunnel]

2024-11-28 Thread via GitHub


Hisoka-X commented on code in PR #8167:
URL: https://github.com/apache/seatunnel/pull/8167#discussion_r1862848951


##
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/task/flow/SinkFlowLifeCycle.java:
##
@@ -354,10 +343,5 @@ public void restoreState(List 
actionStateList) throws Except
 } else {
 this.writer = sinkAction.getSink().restoreWriter(writerContext, 
states);
 }
-if (this.writer instanceof SupportResourceShare) {
-resourceManager =
-((SupportResourceShare) 
this.writer).initMultiTableResourceManager(1, 1);
-((SupportResourceShare) 
this.writer).setMultiTableResourceManager(resourceManager, 0);

Review Comment:
   It be trigger in 
https://github.com/apache/seatunnel/blob/dev/seatunnel-api/src/main/java/org/apache/seatunnel/api/sink/multitablesink/MultiTableSinkWriter.java#L117



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [Improve] Remove unused code [seatunnel]

2024-11-28 Thread via GitHub


dailai commented on code in PR #8167:
URL: https://github.com/apache/seatunnel/pull/8167#discussion_r1862844650


##
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/task/flow/SinkFlowLifeCycle.java:
##
@@ -354,10 +343,5 @@ public void restoreState(List 
actionStateList) throws Except
 } else {
 this.writer = sinkAction.getSink().restoreWriter(writerContext, 
states);
 }
-if (this.writer instanceof SupportResourceShare) {
-resourceManager =
-((SupportResourceShare) 
this.writer).initMultiTableResourceManager(1, 1);
-((SupportResourceShare) 
this.writer).setMultiTableResourceManager(resourceManager, 0);

Review Comment:
   This can trigger the method 
org.apache.seatunnel.connectors.seatunnel.jdbc.sink.JdbcSinkWriter#setMultiTableResourceManager
 which is in jdbcsink that can create a SimpleJdbcConnectionPoolProviderProxy.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [Improve] Remove unused code [seatunnel]

2024-11-28 Thread via GitHub


dailai commented on code in PR #8167:
URL: https://github.com/apache/seatunnel/pull/8167#discussion_r1862842411


##
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/task/SinkAggregatedCommitterTask.java:
##
@@ -118,16 +115,7 @@ public void init() throws Exception {
 this.commitInfoSerializer = 
sink.getSink().getCommitInfoSerializer().get();
 this.aggregatedCommitInfoSerializer =
 sink.getSink().getAggregatedCommitInfoSerializer().get();
-if (this.aggregatedCommitter instanceof SupportResourceShare) {
-resourceManager =
-((SupportResourceShare) this.aggregatedCommitter)
-.initMultiTableResourceManager(1, 1);
-}
 aggregatedCommitter.init();
-if (resourceManager != null) {
-((SupportResourceShare) this.aggregatedCommitter)

Review Comment:
   This can trigger the method 
org.apache.seatunnel.connectors.seatunnel.jdbc.sink.JdbcSinkWriter#setMultiTableResourceManager
 which is in jdbcsink that can create a SimpleJdbcConnectionPoolProviderProxy.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [Improve] Remove unused code [seatunnel]

2024-11-28 Thread via GitHub


dailai commented on code in PR #8167:
URL: https://github.com/apache/seatunnel/pull/8167#discussion_r1862842411


##
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/task/SinkAggregatedCommitterTask.java:
##
@@ -118,16 +115,7 @@ public void init() throws Exception {
 this.commitInfoSerializer = 
sink.getSink().getCommitInfoSerializer().get();
 this.aggregatedCommitInfoSerializer =
 sink.getSink().getAggregatedCommitInfoSerializer().get();
-if (this.aggregatedCommitter instanceof SupportResourceShare) {
-resourceManager =
-((SupportResourceShare) this.aggregatedCommitter)
-.initMultiTableResourceManager(1, 1);
-}
 aggregatedCommitter.init();
-if (resourceManager != null) {
-((SupportResourceShare) this.aggregatedCommitter)

Review Comment:
   This can trigger the method 
org.apache.seatunnel.connectors.seatunnel.jdbc.sink.JdbcSinkWriter#setMultiTableResourceManager
 which is in jdbcsink that can create a SimpleJdbcConnectionPoolProviderProxy.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org