You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by GitBox <gi...@apache.org> on 2022/10/09 16:36:18 UTC

[GitHub] [incubator-seatunnel] TyrantLucifer opened a new pull request, #3045: [Improve][Core][Exceptiom Management] Add Exception Management API

TyrantLucifer opened a new pull request, #3045:
URL: https://github.com/apache/incubator-seatunnel/pull/3045

   <!--
   
   Thank you for contributing to SeaTunnel! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   ## Contribution Checklist
   
     - Make sure that the pull request corresponds to a [GITHUB issue](https://github.com/apache/incubator-seatunnel/issues).
   
     - Name the pull request in the form "[Feature] [component] Title of the pull request", where *Feature* can be replaced by `Hotfix`, `Bug`, etc.
   
     - Minor fixes should be named following this pattern: `[hotfix] [docs] Fix typo in README.md doc`.
   
   -->
   
   ## Purpose of this pull request
   
   close #3043
   
   <!-- Describe the purpose of this pull request. For example: This pull request adds checkstyle plugin.-->
   
   ## Check list
   
   * [x] Code changed are covered with tests, or it does not need tests for reason:
   * [ ] If any new Jar binary package adding in your PR, please add License Notice according
     [New License Guide](https://github.com/apache/incubator-seatunnel/blob/dev/docs/en/contribution/new-license.md)
   * [ ] If necessary, please update the documentation to describe the new feature. https://github.com/apache/incubator-seatunnel/tree/dev/docs
   


-- 
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


[GitHub] [incubator-seatunnel] TyrantLucifer merged pull request #3045: [Improve][Core][Exceptiom Management] Add Exception Management API & Unified Exception in API Module

Posted by GitBox <gi...@apache.org>.
TyrantLucifer merged PR #3045:
URL: https://github.com/apache/incubator-seatunnel/pull/3045


-- 
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


[GitHub] [incubator-seatunnel] TyrantLucifer commented on pull request #3045: [Improve][Core][Exceptiom Management] Add Exception Management API & Unified Exception in API Module

Posted by GitBox <gi...@apache.org>.
TyrantLucifer commented on PR #3045:
URL: https://github.com/apache/incubator-seatunnel/pull/3045#issuecomment-1277887187

   @ashulin @Hisoka-X @EricJoy2048 @CalvinKirs @hailin0 Please review and give some suggestions. Thx


-- 
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


[GitHub] [incubator-seatunnel] Hisoka-X commented on a diff in pull request #3045: [Improve][Core][Exceptiom Management] Add Exception Management API & Unified Exception in API Module

Posted by GitBox <gi...@apache.org>.
Hisoka-X commented on code in PR #3045:
URL: https://github.com/apache/incubator-seatunnel/pull/3045#discussion_r1017546797


##########
seatunnel-common/src/main/java/org/apache/seatunnel/common/exception/CommonErrorCode.java:
##########
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.common.exception;
+
+public enum CommonErrorCode implements SeaTunnelErrorCode {
+    FILE_OPERATION_FAILED("COMMON-01", "File operation failed, such as (read,list,write,move,copy,sync) etc..."),
+    JSON_OPERATION_FAILED("COMMON-02", "Json covert/parse operation failed"),
+    REFLECT_CLASS_OPERATION_FAILED("COMMON-03", "Reflect class operation failed"),
+    SERIALIZE_OPERATION_FAILED("COMMON-04", "Serialize class operation failed"),
+    UNSUPPORTED_OPERATION("COMMON-05", "Unsupported operation error"),
+    ILLEGAL_ARGUMENT("COMMON-06", "Illegal argument"),
+    UNSUPPORTED_DATA_TYPE("COMMON-07", "Unsupported data type"),
+    SQL_OPERATION_FAILED("COMMON-08", "Sql operation failed, such as (execute,addBatch,close) etc..."),
+    TABLE_SCHEMA_GET_FAILED("COMMON-09", "Get table schema from upstream data failed"),
+    FLUSH_DATA_FAILED("COMMON-10", "Flush data to sink connector failed"),

Review Comment:
   ```suggestion
       FLUSH_DATA_FAILED("COMMON-10", "Flush data from sink connector failed"),
   ```



-- 
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


[GitHub] [incubator-seatunnel] TyrantLucifer commented on a diff in pull request #3045: [Improve][Core][Exceptiom Management] Add Exception Management API

Posted by GitBox <gi...@apache.org>.
TyrantLucifer commented on code in PR #3045:
URL: https://github.com/apache/incubator-seatunnel/pull/3045#discussion_r993061050


##########
seatunnel-common/src/main/java/org/apache/seatunnel/common/exception/CommonErrorCode.java:
##########
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.common.exception;
+
+public enum CommonErrorCode implements SeaTunnelErrorCode {
+    ENUM_ILLEGAL("Common-01", "This enum is not supported by SeaTunnel"),
+    FILE_OPERATION_ERROR("Common-02", "File operation error"),
+    JSON_OPERATION_ERROR("Common-03", "Json covert/parse operation error"),
+    REFLECT_CLASS_OPERATION_ERROR("Common-04", "Reflect class operation error"),
+    SERIALIZE_OPERATION_ERROR("Common-05", "Serialize class operation error"),
+    UNSUPPORTED_OPERATION("Common-06", "Unsupported operation error");

Review Comment:
   Sorry, I didn't aggre with you. SeaTunnel without web it is also a independent project. User can create config file by themselves, if the config file created by users  has some errors such as config option not correctly or this task matched some exceptions how to tip user? Throw the exceptions we defined? What should user do if them not understand these exceptions? I think it's not a good idea. Now the core of our discussion is how to improve the user experience, not whether seatunnel is a web or application project.



-- 
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


[GitHub] [incubator-seatunnel] hailin0 commented on a diff in pull request #3045: [Improve][Core][Exceptiom Management] Add Exception Management API

Posted by GitBox <gi...@apache.org>.
hailin0 commented on code in PR #3045:
URL: https://github.com/apache/incubator-seatunnel/pull/3045#discussion_r993045233


##########
seatunnel-common/src/main/java/org/apache/seatunnel/common/exception/CommonErrorCode.java:
##########
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.common.exception;
+
+public enum CommonErrorCode implements SeaTunnelErrorCode {
+    ENUM_ILLEGAL("Common-01", "This enum is not supported by SeaTunnel"),
+    FILE_OPERATION_ERROR("Common-02", "File operation error"),
+    JSON_OPERATION_ERROR("Common-03", "Json covert/parse operation error"),
+    REFLECT_CLASS_OPERATION_ERROR("Common-04", "Reflect class operation error"),
+    SERIALIZE_OPERATION_ERROR("Common-05", "Serialize class operation error"),
+    UNSUPPORTED_OPERATION("Common-06", "Unsupported operation error");

Review Comment:
   Such a design may be more suitable for client users, e.g. http-server <-> app-client



-- 
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


[GitHub] [incubator-seatunnel] EricJoy2048 commented on pull request #3045: [Improve][Core][Exceptiom Management] Add Exception Management API

Posted by GitBox <gi...@apache.org>.
EricJoy2048 commented on PR #3045:
URL: https://github.com/apache/incubator-seatunnel/pull/3045#issuecomment-1274139646

   > > > I have a different point of view, why don't we directly inherit SeaTunnelException to implement different types of Exception, but use enumeration to determine the Exception type? What is the use of Code for users? And it is impossible to manage all Exception through CommonErrorCode, and some Exceptions will use CommonErrorCode, and some will not be used.
   > > 
   > > 
   > > +1. It's better to use a different implementation.
   > 
   > So if a connector has more than 10 types exceptions, do we need define more than 10 classes to display those? It's not a good option. More More fine-grained exception I want to show what should I do?
   
   That's what I'm worried about.


-- 
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


[GitHub] [incubator-seatunnel] TyrantLucifer commented on a diff in pull request #3045: [Improve][Core][Exceptiom Management] Add Exception Management API

Posted by GitBox <gi...@apache.org>.
TyrantLucifer commented on code in PR #3045:
URL: https://github.com/apache/incubator-seatunnel/pull/3045#discussion_r993053578


##########
seatunnel-common/src/main/java/org/apache/seatunnel/common/exception/CommonErrorCode.java:
##########
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.common.exception;
+
+public enum CommonErrorCode implements SeaTunnelErrorCode {
+    ENUM_ILLEGAL("Common-01", "This enum is not supported by SeaTunnel"),
+    FILE_OPERATION_ERROR("Common-02", "File operation error"),
+    JSON_OPERATION_ERROR("Common-03", "Json covert/parse operation error"),
+    REFLECT_CLASS_OPERATION_ERROR("Common-04", "Reflect class operation error"),
+    SERIALIZE_OPERATION_ERROR("Common-05", "Serialize class operation error"),
+    UNSUPPORTED_OPERATION("Common-06", "Unsupported operation error");

Review Comment:
   > Such a design may be more suitable for client users, e.g. http-server <-> app-client
   
   For some of our users it might base on SeaTunnel to build some config files and pull a SeaTunnel task. Most application scenarios are based on the client side to collect logs, clear code hints help peripheral integration framework to better collect information. In the actual implementation experience, clear code hints help better user experience, this is also our previous experience in the implementation of DataX to the production environment, whether it is web development, or data integration framework, the ultimate goal is to give users a better experience.



-- 
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


[GitHub] [incubator-seatunnel] Hisoka-X commented on pull request #3045: [Improve][Core][Exceptiom Management] Add Exception Management API

Posted by GitBox <gi...@apache.org>.
Hisoka-X commented on PR #3045:
URL: https://github.com/apache/incubator-seatunnel/pull/3045#issuecomment-1272809635

   I have a different point of view, why don't we directly inherit SeaTunnelException to implement different types of Exception, but use enumeration to determine the Exception type? What is the use of Code for users? And it is impossible to manage all Exception through CommonErrorCode, and some Exceptions will use CommonErrorCode, and some will not be used.


-- 
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


[GitHub] [incubator-seatunnel] TyrantLucifer commented on pull request #3045: [Improve][Core][Exceptiom Management] Add Exception Management API

Posted by GitBox <gi...@apache.org>.
TyrantLucifer commented on PR #3045:
URL: https://github.com/apache/incubator-seatunnel/pull/3045#issuecomment-1272814721

   > I have a different point of view, why don't we directly inherit SeaTunnelException to implement different types of Exception, but use enumeration to determine the Exception type? What is the use of Code for users? And it is impossible to manage all Exception through CommonErrorCode, and some Exceptions will use CommonErrorCode, and some will not be used.
   
   Every connector will implement their own codes. Unified exception make error message more clearly. If we directly inherit SeaTunnelException, for all modules    need create more and more exceptions. This is a good practice reference from datax.


-- 
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


[GitHub] [incubator-seatunnel] liugddx commented on pull request #3045: [Improve][Core][Exceptiom Management] Add Exception Management API

Posted by GitBox <gi...@apache.org>.
liugddx commented on PR #3045:
URL: https://github.com/apache/incubator-seatunnel/pull/3045#issuecomment-1274018440

   > Can it be like Flink? All Connector uses `FlinkRuntimeexception` and definition for detailed mistakes.
   
   
   


-- 
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


[GitHub] [incubator-seatunnel] EricJoy2048 commented on pull request #3045: [Improve][Core][Exceptiom Management] Add Exception Management API & Unified Exception in API Module

Posted by GitBox <gi...@apache.org>.
EricJoy2048 commented on PR #3045:
URL: https://github.com/apache/incubator-seatunnel/pull/3045#issuecomment-1285507665

   Hi, all. What is our conclusion? I agree with @TyrantLucifer , The exception handling of `http-server <-> app-client` is also the result of continuous optimization and iteration, and I think their design is very good for user experience. ErrorCode can simple help user to understand what happened in the system.  On the other hand, ErrorCode can reduce randomly defined exceptions. 
   
   Especially when we need to collect error data in the future, ErrorCode can be stored in the error data together with the data. When we display the cause of the error in the web page, the ErrorCode can obtain the details of the exception, which is very helpful for the analysis of error data.


-- 
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


[GitHub] [incubator-seatunnel] EricJoy2048 commented on a diff in pull request #3045: [Improve][Core][Exceptiom Management] Add Exception Management API & Unified Exception in API Module

Posted by GitBox <gi...@apache.org>.
EricJoy2048 commented on code in PR #3045:
URL: https://github.com/apache/incubator-seatunnel/pull/3045#discussion_r1018001722


##########
seatunnel-common/src/main/java/org/apache/seatunnel/common/exception/CommonErrorCode.java:
##########
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.common.exception;
+
+public enum CommonErrorCode implements SeaTunnelErrorCode {
+    FILE_OPERATION_FAILED("COMMON-01", "File operation failed, such as (read,list,write,move,copy,sync) etc..."),
+    JSON_OPERATION_FAILED("COMMON-02", "Json covert/parse operation failed"),
+    REFLECT_CLASS_OPERATION_FAILED("COMMON-03", "Reflect class operation failed"),
+    SERIALIZE_OPERATION_FAILED("COMMON-04", "Serialize class operation failed"),
+    UNSUPPORTED_OPERATION("COMMON-05", "Unsupported operation error"),
+    ILLEGAL_ARGUMENT("COMMON-06", "Illegal argument"),
+    UNSUPPORTED_DATA_TYPE("COMMON-07", "Unsupported data type"),
+    SQL_OPERATION_FAILED("COMMON-08", "Sql operation failed, such as (execute,addBatch,close) etc..."),
+    TABLE_SCHEMA_GET_FAILED("COMMON-09", "Get table schema from upstream data failed"),
+    FLUSH_DATA_FAILED("COMMON-10", "Flush data to sink connector failed"),

Review Comment:
   `FLUSH_DATA_FAILED("COMMON-10", "Flush data to target failed"),` better?



-- 
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


[GitHub] [incubator-seatunnel] liugddx commented on pull request #3045: [Improve][Core][Exceptiom Management] Add Exception Management API

Posted by GitBox <gi...@apache.org>.
liugddx commented on PR #3045:
URL: https://github.com/apache/incubator-seatunnel/pull/3045#issuecomment-1273988981

   > I have a different point of view, why don't we directly inherit SeaTunnelException to implement different types of Exception, but use enumeration to determine the Exception type? What is the use of Code for users? And it is impossible to manage all Exception through CommonErrorCode, and some Exceptions will use CommonErrorCode, and some will not be used.
   
   +1. It's better to use a different implementation.


-- 
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


[GitHub] [incubator-seatunnel] TyrantLucifer commented on pull request #3045: [Improve][Core][Exceptiom Management] Add Exception Management API

Posted by GitBox <gi...@apache.org>.
TyrantLucifer commented on PR #3045:
URL: https://github.com/apache/incubator-seatunnel/pull/3045#issuecomment-1274013387

   > > I have a different point of view, why don't we directly inherit SeaTunnelException to implement different types of Exception, but use enumeration to determine the Exception type? What is the use of Code for users? And it is impossible to manage all Exception through CommonErrorCode, and some Exceptions will use CommonErrorCode, and some will not be used.
   > 
   > +1. It's better to use a different implementation.
   
   So if a connector has more than 10 types exceptions, do we need define more than 10 classes to display those? It's not a good option. More More fine-grained exception I want to show what should I do?


-- 
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


[GitHub] [incubator-seatunnel] TyrantLucifer commented on a diff in pull request #3045: [Improve][Core][Exceptiom Management] Add Exception Management API & Unified Exception in API Module

Posted by GitBox <gi...@apache.org>.
TyrantLucifer commented on code in PR #3045:
URL: https://github.com/apache/incubator-seatunnel/pull/3045#discussion_r1018689983


##########
seatunnel-common/src/main/java/org/apache/seatunnel/common/exception/CommonErrorCode.java:
##########
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.common.exception;
+
+public enum CommonErrorCode implements SeaTunnelErrorCode {
+    FILE_OPERATION_FAILED("COMMON-01", "File operation failed, such as (read,list,write,move,copy,sync) etc..."),
+    JSON_OPERATION_FAILED("COMMON-02", "Json covert/parse operation failed"),
+    REFLECT_CLASS_OPERATION_FAILED("COMMON-03", "Reflect class operation failed"),
+    SERIALIZE_OPERATION_FAILED("COMMON-04", "Serialize class operation failed"),
+    UNSUPPORTED_OPERATION("COMMON-05", "Unsupported operation error"),
+    ILLEGAL_ARGUMENT("COMMON-06", "Illegal argument"),
+    UNSUPPORTED_DATA_TYPE("COMMON-07", "Unsupported data type"),
+    SQL_OPERATION_FAILED("COMMON-08", "Sql operation failed, such as (execute,addBatch,close) etc..."),
+    TABLE_SCHEMA_GET_FAILED("COMMON-09", "Get table schema from upstream data failed"),
+    FLUSH_DATA_FAILED("COMMON-10", "Flush data to sink connector failed"),

Review Comment:
   How about `flush data operation that in sink connector failed`? CC @EricJoy2048 @Hisoka-X 
   
   



-- 
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


[GitHub] [incubator-seatunnel] TyrantLucifer commented on a diff in pull request #3045: [Improve][Core][Exceptiom Management] Add Exception Management API

Posted by GitBox <gi...@apache.org>.
TyrantLucifer commented on code in PR #3045:
URL: https://github.com/apache/incubator-seatunnel/pull/3045#discussion_r993061050


##########
seatunnel-common/src/main/java/org/apache/seatunnel/common/exception/CommonErrorCode.java:
##########
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.common.exception;
+
+public enum CommonErrorCode implements SeaTunnelErrorCode {
+    ENUM_ILLEGAL("Common-01", "This enum is not supported by SeaTunnel"),
+    FILE_OPERATION_ERROR("Common-02", "File operation error"),
+    JSON_OPERATION_ERROR("Common-03", "Json covert/parse operation error"),
+    REFLECT_CLASS_OPERATION_ERROR("Common-04", "Reflect class operation error"),
+    SERIALIZE_OPERATION_ERROR("Common-05", "Serialize class operation error"),
+    UNSUPPORTED_OPERATION("Common-06", "Unsupported operation error");

Review Comment:
   Sorry, I didn't aggre with you. SeaTunnel without web it is also a independent project. User can create config file by themselves, if the config file created by users  has some errors such as config option not correctly or this task matched some exceptions how to tip user? Throw the exceptions we defined? What should user do if them not understand these exceptions? I think it's not a good idea.



-- 
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


[GitHub] [incubator-seatunnel] liugddx commented on a diff in pull request #3045: [Improve][Core][Exceptiom Management] Add Exception Management API

Posted by GitBox <gi...@apache.org>.
liugddx commented on code in PR #3045:
URL: https://github.com/apache/incubator-seatunnel/pull/3045#discussion_r993045924


##########
seatunnel-common/src/main/java/org/apache/seatunnel/common/exception/CommonErrorCode.java:
##########
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.common.exception;
+
+public enum CommonErrorCode implements SeaTunnelErrorCode {
+    ENUM_ILLEGAL("Common-01", "This enum is not supported by SeaTunnel"),
+    FILE_OPERATION_ERROR("Common-02", "File operation error"),
+    JSON_OPERATION_ERROR("Common-03", "Json covert/parse operation error"),
+    REFLECT_CLASS_OPERATION_ERROR("Common-04", "Reflect class operation error"),
+    SERIALIZE_OPERATION_ERROR("Common-05", "Serialize class operation error"),
+    UNSUPPORTED_OPERATION("Common-06", "Unsupported operation error");

Review Comment:
   > Such a design may be more suitable for client users, e.g. http-server <-> app-client
   
   +1



-- 
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


[GitHub] [incubator-seatunnel] liugddx commented on a diff in pull request #3045: [Improve][Core][Exceptiom Management] Add Exception Management API

Posted by GitBox <gi...@apache.org>.
liugddx commented on code in PR #3045:
URL: https://github.com/apache/incubator-seatunnel/pull/3045#discussion_r993056148


##########
seatunnel-common/src/main/java/org/apache/seatunnel/common/exception/CommonErrorCode.java:
##########
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.common.exception;
+
+public enum CommonErrorCode implements SeaTunnelErrorCode {
+    ENUM_ILLEGAL("Common-01", "This enum is not supported by SeaTunnel"),
+    FILE_OPERATION_ERROR("Common-02", "File operation error"),
+    JSON_OPERATION_ERROR("Common-03", "Json covert/parse operation error"),
+    REFLECT_CLASS_OPERATION_ERROR("Common-04", "Reflect class operation error"),
+    SERIALIZE_OPERATION_ERROR("Common-05", "Serialize class operation error"),
+    UNSUPPORTED_OPERATION("Common-06", "Unsupported operation error");

Review Comment:
   > > Such a design may be more suitable for client users, e.g. http-server <-> app-client
   > 
   > For some of our users it might base on SeaTunnel to build some config files and pull a SeaTunnel task. Most application scenarios are based on the client side to collect logs, clear code hints help peripheral integration framework to better collect information. In the actual implementation experience, clear code hints help better user experience, this is also our previous experience in the implementation of DataX to the production environment, whether it is web development, or data integration framework, the ultimate goal is to give users a better experience.
   
   This is more appropriate in the seatunnel web,because there are more error scenarios in the application system.This is my personal opinion.
   
   
   
   



-- 
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