-
Notifications
You must be signed in to change notification settings - Fork 521
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
[INLONG-2161][Feature] Manager support getClusterConfig #2182
Conversation
@ImVan, Why are there so many code submissions? From the feature description, this modified code should be very small, is there no rebase when submitting the code? Please rebase the code first, and then submit it, thanks! |
Codecov Report
@@ Coverage Diff @@
## master #2182 +/- ##
============================================
+ Coverage 12.22% 12.55% +0.33%
- Complexity 1154 1201 +47
============================================
Files 413 417 +4
Lines 35243 35735 +492
Branches 5544 5590 +46
============================================
+ Hits 4308 4487 +179
- Misses 30173 30448 +275
- Partials 762 800 +38
Continue to review full report at Codecov.
|
@gosonzhang |
where id = #{id,jdbcType=INTEGER} | ||
</delete> | ||
<insert id="insert" parameterType="org.apache.inlong.manager.dao.entity.TaskIdParamsKafkaEntity"> | ||
insert into task_id_params_kafka (id, parent_name, topic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to sort out the format here
where id = #{id,jdbcType=INTEGER} | ||
</delete> | ||
<insert id="insert" parameterType="org.apache.inlong.manager.dao.entity.TaskIdParamsPulsarEntity"> | ||
insert into task_id_params_pulsar (id, parent_name, topic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
Thx @wardlican , very nice suggestion. The fields "result" and "errCode" has been replaced with "msg" and "code" |
import java.util.Map; | ||
|
||
@Data | ||
@ApiModel("sort cluster config") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid to use lombok plugin for readability. Coder need to add getter/setter code when coder want to find usages. Coder want to check source code, then coder must to install lombok plugin.
@ApiModel("Sort-StandAlone cluster config request") | ||
public class SortStandAloneClusterConfigRequest { | ||
|
||
@ApiModelProperty(value = "cluster name") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
|
||
private String taskName; | ||
|
||
private static final long serialVersionUID = 1L; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
incorrect serialVersionUID
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
static variable is before member variable.
|
||
private String inlongStreamId; | ||
|
||
private static final long serialVersionUID = 1L; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
|
||
private String topic; | ||
|
||
private static final long serialVersionUID = 1L; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
|
||
private String brokerList; | ||
|
||
private static final long serialVersionUID = 1L; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
serialVersionUID can be generated by IDE.
enableUpdateByPrimaryKey="true" | ||
enableDeleteByPrimaryKey="true" enableInsert="true" | ||
enableCountByExample="false" enableDeleteByExample="false" | ||
enableSelectByExample="false" enableUpdateByExample="false"/>--> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Invalid code need to be removed.
} | ||
|
||
// if md5 is the same as last request, return RESP_CODE_NO_UPDATE | ||
String jsonClusterConfig = gson.toJson(clusterConfig); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gson can not sort parameter name, then md5 maybe not be a stable value.
Title Name: [INLONG-2161][Feature] Manager support getClusterConfig
#2161
Motivation
getClusterConfig is the interface that Sort Stand-alone acquire id params and sink params from.
Id params is the params of upstream data store such as the topic of kafka and pulsar which Sort Stand-alone consume from.
While sink params is the dispatch params of Sort Stand-alone Sink, which determine which kafka , pulsar or hive cluster the produced data send to. hence it's something like kafka zklist, brokerlist, pulsar serviceUrl, token..
Here is the example that the config be like.
Modifications
Describe the modifications you've done.
Verifying this change
(Please pick either of the following options)
This change is a trivial rework / code cleanup without any test coverage.
(or)
This change is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)
Documentation