You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "zhangshenghang (via GitHub)" <gi...@apache.org> on 2024/08/22 12:42:27 UTC

[PR] [Improve] influxdb exception print [seatunnel]

zhangshenghang opened a new pull request, #7465:
URL: https://github.com/apache/seatunnel/pull/7465

   
   
   ### Purpose of this pull request
   
   
   ![image](https://github.com/user-attachments/assets/85c536f8-cba0-4d77-b16b-55f5754eacbd)
   
   My influxDB version is 1.3.7. When using SeaTunnel, an error message is displayed: Get column index of query result exception. There is no error message about incorrect version. The exception of the supported version range should be returned to the customer to facilitate troubleshooting.
   
   ### How was this patch tested?
   
   Runs locally and on servers
   
   
   
   ### Check list
   
   * [ ] If any new Jar binary package adding in your PR, please add License Notice according
     [New License Guide](https://github.com/apache/seatunnel/blob/dev/docs/en/contribution/new-license.md)
   * [ ] If necessary, please update the documentation to describe the new feature. https://github.com/apache/seatunnel/tree/dev/docs
   * [ ] If you are contributing the connector code, please check that the following files are updated:
     1. Update [plugin-mapping.properties](https://github.com/apache/seatunnel/blob/dev/plugin-mapping.properties) and add new connector information in it
     2. Update the pom file of [seatunnel-dist](https://github.com/apache/seatunnel/blob/dev/seatunnel-dist/pom.xml)
     3. Add ci label in [label-scope-conf](https://github.com/apache/seatunnel/blob/dev/.github/workflows/labeler/label-scope-conf.yml)
     4. Add e2e testcase in [seatunnel-e2e](https://github.com/apache/seatunnel/tree/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/)
     5. Update connector [plugin_config](https://github.com/apache/seatunnel/blob/dev/config/plugin_config)
   * [ ] Update the [`release-note`](https://github.com/apache/seatunnel/blob/dev/release-note.md).


-- 
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-unsubscribe@seatunnel.apache.org

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


Re: [PR] [Improve] influxdb exception print [seatunnel]

Posted by "Hisoka-X (via GitHub)" <gi...@apache.org>.
Hisoka-X commented on PR #7465:
URL: https://github.com/apache/seatunnel/pull/7465#issuecomment-2306094550

   Could you help to fix https://github.com/apache/seatunnel/blob/d928e8b11337710da82c06fb97aa135d5365fc33/seatunnel-connectors-v2/connector-cassandra/src/main/java/org/apache/seatunnel/connectors/seatunnel/cassandra/sink/CassandraSink.java#L110
   and 
   https://github.com/apache/seatunnel/blob/d928e8b11337710da82c06fb97aa135d5365fc33/seatunnel-connectors-v2/connector-clickhouse/src/main/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/source/ClickhouseSource.java#L149
   too?


-- 
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-unsubscribe@seatunnel.apache.org

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


Re: [PR] [Improve] Improve some connectors prepare check error message [seatunnel]

Posted by "zhangshenghang (via GitHub)" <gi...@apache.org>.
zhangshenghang commented on PR #7465:
URL: https://github.com/apache/seatunnel/pull/7465#issuecomment-2306104217

   > Could you help to fix
   > 
   > https://github.com/apache/seatunnel/blob/d928e8b11337710da82c06fb97aa135d5365fc33/seatunnel-connectors-v2/connector-cassandra/src/main/java/org/apache/seatunnel/connectors/seatunnel/cassandra/sink/CassandraSink.java#L110
   > 
   > 
   > and
   > https://github.com/apache/seatunnel/blob/d928e8b11337710da82c06fb97aa135d5365fc33/seatunnel-connectors-v2/connector-clickhouse/src/main/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/source/ClickhouseSource.java#L149
   > 
   > 
   > too?
   
   Modified. Cassandra is modified to 
   ```java
   throw new CassandraConnectorException(
   SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED,
   String.format(
   "PluginName: %s, PluginType: %s, Message: %s %s",
   getPluginName(),
   PluginType.SINK,
   checkResult.getMsg(),
   ExceptionUtils.getMessage(e))); 
   ```
   because checkResult is an externally spliced ​​object.


-- 
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-unsubscribe@seatunnel.apache.org

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


Re: [PR] [Improve] Improve some connectors prepare check error message [seatunnel]

Posted by "Hisoka-X (via GitHub)" <gi...@apache.org>.
Hisoka-X commented on code in PR #7465:
URL: https://github.com/apache/seatunnel/pull/7465#discussion_r1728194816


##########
seatunnel-connectors-v2/connector-cassandra/src/main/java/org/apache/seatunnel/connectors/seatunnel/cassandra/sink/CassandraSink.java:
##########
@@ -106,8 +107,11 @@ public void prepare(Config pluginConfig) throws PrepareFailException {
             throw new CassandraConnectorException(
                     SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED,
                     String.format(
-                            "PluginName: %s, PluginType: %s, Message: %s",
-                            getPluginName(), PluginType.SINK, checkResult.getMsg()));
+                            "PluginName: %s, PluginType: %s, Message: %s %s",
+                            getPluginName(),
+                            PluginType.SINK,
+                            checkResult.getMsg(),
+                            ExceptionUtils.getMessage(e)));

Review Comment:
   ```suggestion
                               "PluginName: %s, PluginType: %s, Message: %s",
                               getPluginName(),
                               PluginType.SINK,
                               ExceptionUtils.getMessage(e)));
   ```



##########
seatunnel-connectors-v2/connector-cassandra/src/main/java/org/apache/seatunnel/connectors/seatunnel/cassandra/sink/CassandraSink.java:
##########
@@ -106,8 +107,11 @@ public void prepare(Config pluginConfig) throws PrepareFailException {
             throw new CassandraConnectorException(
                     SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED,
                     String.format(
-                            "PluginName: %s, PluginType: %s, Message: %s",
-                            getPluginName(), PluginType.SINK, checkResult.getMsg()));
+                            "PluginName: %s, PluginType: %s, Message: %s %s",
+                            getPluginName(),
+                            PluginType.SINK,
+                            checkResult.getMsg(),
+                            ExceptionUtils.getMessage(e)));

Review Comment:
   checkResult useless in here. Because if checkResult is failed, it never reach here.



-- 
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-unsubscribe@seatunnel.apache.org

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


Re: [PR] [Improve] influxdb exception print [seatunnel]

Posted by "Hisoka-X (via GitHub)" <gi...@apache.org>.
Hisoka-X commented on PR #7465:
URL: https://github.com/apache/seatunnel/pull/7465#issuecomment-2304589652

   Before this PR, can we get the version error message from cause by block of `InfluxdbConnectorException`? I checked the code, the answer is yes if I don't miss anything.


-- 
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-unsubscribe@seatunnel.apache.org

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


Re: [PR] [Improve] Improve some connectors prepare check error message [seatunnel]

Posted by "wuchunfu (via GitHub)" <gi...@apache.org>.
wuchunfu merged PR #7465:
URL: https://github.com/apache/seatunnel/pull/7465


-- 
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-unsubscribe@seatunnel.apache.org

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


Re: [PR] [Improve] influxdb exception print [seatunnel]

Posted by "zhangshenghang (via GitHub)" <gi...@apache.org>.
zhangshenghang commented on code in PR #7465:
URL: https://github.com/apache/seatunnel/pull/7465#discussion_r1728173838


##########
seatunnel-connectors-v2/connector-influxdb/src/main/java/org/apache/seatunnel/connectors/seatunnel/influxdb/source/InfluxDBSource.java:
##########
@@ -94,8 +94,8 @@ public void prepare(Config config) throws PrepareFailException {
             throw new InfluxdbConnectorException(
                     SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED,
                     String.format(
-                            "PluginName: %s, PluginType: %s, Message: %s",
-                            getPluginName(), PluginType.SOURCE, e));
+                            "PluginName: %s, PluginType: %s, Message: %s %s",
+                            getPluginName(), PluginType.SOURCE, e, e.getCause().getMessage()));

Review Comment:
   Thanks for the advice



-- 
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-unsubscribe@seatunnel.apache.org

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


Re: [PR] [Improve] influxdb exception print [seatunnel]

Posted by "Hisoka-X (via GitHub)" <gi...@apache.org>.
Hisoka-X commented on code in PR #7465:
URL: https://github.com/apache/seatunnel/pull/7465#discussion_r1728164633


##########
seatunnel-connectors-v2/connector-influxdb/src/main/java/org/apache/seatunnel/connectors/seatunnel/influxdb/source/InfluxDBSource.java:
##########
@@ -94,8 +94,8 @@ public void prepare(Config config) throws PrepareFailException {
             throw new InfluxdbConnectorException(
                     SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED,
                     String.format(
-                            "PluginName: %s, PluginType: %s, Message: %s",
-                            getPluginName(), PluginType.SOURCE, e));
+                            "PluginName: %s, PluginType: %s, Message: %s %s",
+                            getPluginName(), PluginType.SOURCE, e, e.getCause().getMessage()));

Review Comment:
   ```suggestion
                               getPluginName(), PluginType.SOURCE, ExceptionUtils.getMessage(e)));
   ```



-- 
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-unsubscribe@seatunnel.apache.org

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