You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kylin.apache.org by pengjianhua <pe...@zte.com.cn> on 2017/11/24 11:59:20 UTC

Review Request 64060: KYLIN-3058 We should limit the integer type ID for "Kafka Setting" in "Streaming Cluster" page

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/64060/
-----------------------------------------------------------

Review request for kylin, Dayue Gao, Dong Li, hongbin ma, and Wang Xiaoyu.


Bugs: KYLIN-3058
    https://issues.apache.org/jira/browse/KYLIN-3058


Repository: kylin


Description
-------

When you create or edit one streaming table, then set a non-integer type ID for "Kafka Setting" in "Streaming Cluster" page, at last save it, you will find an error message page will pop up.
1. Create a streaming table, then set a non-integer type ID to save, such as "23a", you will get the error message page;
2. Edit a streaming table, then modify a non-integer type ID to save, such as "23a", you will also get another error message page;
In order to find out the cause of the problem, I analyze the Kylin server log, then I find the error, as follow:

Kylin server log
2017-11-24 18:46:07,413 ERROR [http-bio-7070-exec-14] controller.StreamingController:280 : The data KafkaConfig definition is invalid.
com.fasterxml.jackson.databind.exc.InvalidFormatException: Can not construct instance of int from String value '23a': not a valid Integer value
at [Source: {"uuid":"261e36cd-599e-4306-93b2-add0291de588","last_modified":1511520352482,"version":"2.3.0.20500","name":"DEFAULT.STREAMING_TABLE","clusters":[{"uuid":null,"last_modified":0,"version":"2.3.0.20500","brokers":[
Unknown macro: {"id"}
],"newBroker":{"id":"23a","host":"1","port":1}}],"topic":"kafka topic","timeout":60000,"parserName":"org.apache.kylin.source.kafka.TimedJsonStreamParser","timestampField":null,"margin":0,"parserProperties":"tsColName=datetime"};
Then I find the server code, it also show the ID must be integer, as follow:

public class BrokerConfig implements Serializable{

    @JsonProperty("id")
    private int id;
    
It means the parameter ID isn't allowed for non-integer types, so we should solve it at the web page.


Diffs
-----

  webapp/app/partials/cubeDesigner/streamingConfig.html 5dc9788 


Diff: https://reviews.apache.org/r/64060/diff/1/


Testing
-------


Thanks,

pengjianhua


Re: Review Request 64060: KYLIN-3058 We should limit the integer type ID for "Kafka Setting" in "Streaming Cluster" page

Posted by pengjianhua <pe...@zte.com.cn>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/64060/
-----------------------------------------------------------

(Updated 十一月 28, 2017, 4:49 a.m.)


Review request for kylin, Dayue Gao, Dong Li, hongbin ma, and Wang Xiaoyu.


Changes
-------

I have checked the all web pages, and find the other input limition issues.
Then I repaired them, and update the patch, please check it, thanks!


Bugs: KYLIN-3058
    https://issues.apache.org/jira/browse/KYLIN-3058


Repository: kylin


Description
-------

When you create or edit one streaming table, then set a non-integer type ID for "Kafka Setting" in "Streaming Cluster" page, at last save it, you will find an error message page will pop up.
1. Create a streaming table, then set a non-integer type ID to save, such as "23a", you will get the error message page;
2. Edit a streaming table, then modify a non-integer type ID to save, such as "23a", you will also get another error message page;
In order to find out the cause of the problem, I analyze the Kylin server log, then I find the error, as follow:

Kylin server log
2017-11-24 18:46:07,413 ERROR [http-bio-7070-exec-14] controller.StreamingController:280 : The data KafkaConfig definition is invalid.
com.fasterxml.jackson.databind.exc.InvalidFormatException: Can not construct instance of int from String value '23a': not a valid Integer value
at [Source: {"uuid":"261e36cd-599e-4306-93b2-add0291de588","last_modified":1511520352482,"version":"2.3.0.20500","name":"DEFAULT.STREAMING_TABLE","clusters":[{"uuid":null,"last_modified":0,"version":"2.3.0.20500","brokers":[
Unknown macro: {"id"}
],"newBroker":{"id":"23a","host":"1","port":1}}],"topic":"kafka topic","timeout":60000,"parserName":"org.apache.kylin.source.kafka.TimedJsonStreamParser","timestampField":null,"margin":0,"parserProperties":"tsColName=datetime"};
Then I find the server code, it also show the ID must be integer, as follow:

public class BrokerConfig implements Serializable{

    @JsonProperty("id")
    private int id;
    
It means the parameter ID isn't allowed for non-integer types, so we should solve it at the web page.


Diffs (updated)
-----

  webapp/app/partials/cubeDesigner/advanced_settings.html 5d53075 
  webapp/app/partials/cubeDesigner/measures.html aa7a096 
  webapp/app/partials/cubeDesigner/streamingConfig.html 5dc9788 


Diff: https://reviews.apache.org/r/64060/diff/3/

Changes: https://reviews.apache.org/r/64060/diff/2-3/


Testing
-------


Thanks,

pengjianhua


Re: Review Request 64060: KYLIN-3058 We should limit the integer type ID for "Kafka Setting" in "Streaming Cluster" page

Posted by pengjianhua <pe...@zte.com.cn>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/64060/
-----------------------------------------------------------

(Updated 十一月 25, 2017, 3:23 p.m.)


Review request for kylin, Dayue Gao, Dong Li, hongbin ma, and Wang Xiaoyu.


Changes
-------

The parameter ID and Port are both not allowed for non-integer types, so we should solve them at the web page.


Bugs: KYLIN-3058
    https://issues.apache.org/jira/browse/KYLIN-3058


Repository: kylin


Description
-------

When you create or edit one streaming table, then set a non-integer type ID for "Kafka Setting" in "Streaming Cluster" page, at last save it, you will find an error message page will pop up.
1. Create a streaming table, then set a non-integer type ID to save, such as "23a", you will get the error message page;
2. Edit a streaming table, then modify a non-integer type ID to save, such as "23a", you will also get another error message page;
In order to find out the cause of the problem, I analyze the Kylin server log, then I find the error, as follow:

Kylin server log
2017-11-24 18:46:07,413 ERROR [http-bio-7070-exec-14] controller.StreamingController:280 : The data KafkaConfig definition is invalid.
com.fasterxml.jackson.databind.exc.InvalidFormatException: Can not construct instance of int from String value '23a': not a valid Integer value
at [Source: {"uuid":"261e36cd-599e-4306-93b2-add0291de588","last_modified":1511520352482,"version":"2.3.0.20500","name":"DEFAULT.STREAMING_TABLE","clusters":[{"uuid":null,"last_modified":0,"version":"2.3.0.20500","brokers":[
Unknown macro: {"id"}
],"newBroker":{"id":"23a","host":"1","port":1}}],"topic":"kafka topic","timeout":60000,"parserName":"org.apache.kylin.source.kafka.TimedJsonStreamParser","timestampField":null,"margin":0,"parserProperties":"tsColName=datetime"};
Then I find the server code, it also show the ID must be integer, as follow:

public class BrokerConfig implements Serializable{

    @JsonProperty("id")
    private int id;
    
It means the parameter ID isn't allowed for non-integer types, so we should solve it at the web page.


Diffs (updated)
-----

  webapp/app/partials/cubeDesigner/streamingConfig.html 5dc9788 


Diff: https://reviews.apache.org/r/64060/diff/2/

Changes: https://reviews.apache.org/r/64060/diff/1-2/


Testing
-------


Thanks,

pengjianhua