-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ISSUE-3380][linkis-engineplugin-elasticsearch]errorcode code optimiz…
…ation (#3531)
1 parent
4455d58
commit aaee556
Showing
6 changed files
with
87 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
## elasticsearch errorcode | ||
|
||
| module name(模块名) | error code(错误码) | describe(描述) |enumeration name(枚举)| Exception Class(类名)| | ||
| -------- | -------- | ----- |-----|-----| | ||
|elasticsearch |70112|cluster is blank!(集群是空白的!)|CLUSTER_IS_BLANK|EasticsearchErrorCodeSummary| | ||
|elasticsearch |70113|EsEngineExecutor convert response fail, response content is empty.(EsEngineExecutor 转换响应失败,响应内容为空.)|RESPONSE_FAIL_IS_EMPTY|EasticsearchErrorCodeSummary| | ||
|
||
|
68 changes: 68 additions & 0 deletions
68
.../org/apache/linkis/engineplugin/elasticsearch/errorcode/EasticsearchErrorCodeSummary.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/* | ||
* 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.linkis.engineplugin.elasticsearch.errorcode; | ||
|
||
public enum EasticsearchErrorCodeSummary { | ||
CLUSTER_IS_BLANK(70112, "cluster is blank!(集群是空白的!)", "cluster is blank!(集群是空白的!)"), | ||
RESPONSE_FAIL_IS_EMPTY( | ||
70113, | ||
"EsEngineExecutor convert response fail, response content is empty.(EsEngineExecutor 转换响应失败,响应内容为空.)", | ||
"EsEngineExecutor convert response fail, response content is empty.(EsEngineExecutor 转换响应失败,响应内容为空.)"); | ||
|
||
/** (errorCode)错误码 */ | ||
private int errorCode; | ||
/** (errorDesc)错误描述 */ | ||
private String errorDesc; | ||
/** Possible reasons for the error(错误可能出现的原因) */ | ||
private String comment; | ||
|
||
EasticsearchErrorCodeSummary(int errorCode, String errorDesc, String comment) { | ||
this.errorCode = errorCode; | ||
this.errorDesc = errorDesc; | ||
this.comment = comment; | ||
} | ||
|
||
public int getErrorCode() { | ||
return errorCode; | ||
} | ||
|
||
public void setErrorCode(int errorCode) { | ||
this.errorCode = errorCode; | ||
} | ||
|
||
public String getErrorDesc() { | ||
return errorDesc; | ||
} | ||
|
||
public void setErrorDesc(String errorDesc) { | ||
this.errorDesc = errorDesc; | ||
} | ||
|
||
public String getComment() { | ||
return comment; | ||
} | ||
|
||
public void setComment(String comment) { | ||
this.comment = comment; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "errorCode: " + this.errorCode + ", errorDesc:" + this.errorDesc; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters