[jira] [Created] (TUBEMQ-232) TubeBroker#register2Master, reconnect and wait
viviel created TUBEMQ-232: - Summary: TubeBroker#register2Master, reconnect and wait Key: TUBEMQ-232 URL: https://issues.apache.org/jira/browse/TUBEMQ-232 Project: Apache TubeMQ Issue Type: Improvement Components: Broker Reporter: viviel Assignee: viviel If the broker fails to register with the master, a total of 5 reconnections will be attempted. But I think we should pause the thread for a period of time every time the connection fails to be reconnected {code:java} for (int i; i < reconnectionTimes; i++) { try { tryConnect(); } catch (Throwable e) { try { TimeUnit.MILLISECONDS.sleep(200); } catch (InterruptedException ignored) { //ignore interrupted } } }{code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Closed] (TUBEMQ-228) Fixed: Exception used
[ https://issues.apache.org/jira/browse/TUBEMQ-228?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] viviel closed TUBEMQ-228. - Resolution: Not A Problem > Fixed: Exception used > - > > Key: TUBEMQ-228 > URL: https://issues.apache.org/jira/browse/TUBEMQ-228 > Project: Apache TubeMQ > Issue Type: Improvement >Reporter: viviel >Assignee: viviel >Priority: Low > Fix For: 0.5.0 > > > Fix exception use > {code:java} > Exception -> IllegalArgumentException > {code} > Example > {code:java} > if (TStringUtils.isBlank(strTimeVal)) { > throw new Exception(strValName + " value is null or blank of " > + ruleType + " limit rule!"); > } > change to > if (TStringUtils.isBlank(strTimeVal)) { > throw new IllegalArgumentException(strValName + " value is null or blank > of " > + ruleType + " limit rule!"); > }{code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (TUBEMQ-228) Fixed: Exception used
[ https://issues.apache.org/jira/browse/TUBEMQ-228?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] viviel updated TUBEMQ-228: -- Description: Fix exception use {code:java} Exception -> IllegalArgumentException {code} Example {code:java} if (TStringUtils.isBlank(strTimeVal)) { throw new Exception(strValName + " value is null or blank of " + ruleType + " limit rule!"); } change to if (TStringUtils.isBlank(strTimeVal)) { throw new IllegalArgumentException(strValName + " value is null or blank of " + ruleType + " limit rule!"); }{code} was: Fixe exception used {code:java} Exception -> IllegalArgumentException {code} Example {code:java} if (TStringUtils.isBlank(strTimeVal)) { throw new Exception(strValName + " value is null or blank of " + ruleType + " limit rule!"); } change to if (TStringUtils.isBlank(strTimeVal)) { throw new IllegalArgumentException(strValName + " value is null or blank of " + ruleType + " limit rule!"); }{code} > Fixed: Exception used > - > > Key: TUBEMQ-228 > URL: https://issues.apache.org/jira/browse/TUBEMQ-228 > Project: Apache TubeMQ > Issue Type: Improvement >Reporter: viviel >Assignee: viviel >Priority: Low > Fix For: 0.5.0 > > > Fix exception use > {code:java} > Exception -> IllegalArgumentException > {code} > Example > {code:java} > if (TStringUtils.isBlank(strTimeVal)) { > throw new Exception(strValName + " value is null or blank of " > + ruleType + " limit rule!"); > } > change to > if (TStringUtils.isBlank(strTimeVal)) { > throw new IllegalArgumentException(strValName + " value is null or blank > of " > + ruleType + " limit rule!"); > }{code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (TUBEMQ-228) Fixed: Exception used
viviel created TUBEMQ-228: - Summary: Fixed: Exception used Key: TUBEMQ-228 URL: https://issues.apache.org/jira/browse/TUBEMQ-228 Project: Apache TubeMQ Issue Type: Improvement Reporter: viviel Assignee: viviel Fix For: 0.5.0 Fixe exception used {code:java} Exception -> IllegalArgumentException {code} Example {code:java} if (TStringUtils.isBlank(strTimeVal)) { throw new Exception(strValName + " value is null or blank of " + ruleType + " limit rule!"); } change to if (TStringUtils.isBlank(strTimeVal)) { throw new IllegalArgumentException(strValName + " value is null or blank of " + ruleType + " limit rule!"); }{code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Closed] (TUBEMQ-224) Fixed: Unnecessary conversion to string inspection for server module
[ https://issues.apache.org/jira/browse/TUBEMQ-224?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] viviel closed TUBEMQ-224. - > Fixed: Unnecessary conversion to string inspection for server module > > > Key: TUBEMQ-224 > URL: https://issues.apache.org/jira/browse/TUBEMQ-224 > Project: Apache TubeMQ > Issue Type: Improvement > Components: Server >Reporter: viviel >Assignee: viviel >Priority: Low > Labels: pull-request-available > Fix For: 0.5.0 > > > Fixed unnecessary method calls such as String.valueOf () > for exmple: > {code:java} > String.valueOf(inputTopicName).trim(); > change to > inputTopicName.trim(); > {code} > {code:java} > String.valueOf(inputConsumerId).trim(); > change to > inputConsumerId.trim(); > {code} > etc.. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Resolved] (TUBEMQ-224) Fixed: Unnecessary conversion to string inspection for server module
[ https://issues.apache.org/jira/browse/TUBEMQ-224?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] viviel resolved TUBEMQ-224. --- Resolution: Fixed > Fixed: Unnecessary conversion to string inspection for server module > > > Key: TUBEMQ-224 > URL: https://issues.apache.org/jira/browse/TUBEMQ-224 > Project: Apache TubeMQ > Issue Type: Improvement > Components: Server >Reporter: viviel >Assignee: viviel >Priority: Low > Labels: pull-request-available > Fix For: 0.5.0 > > > Fixed unnecessary method calls such as String.valueOf () > for exmple: > {code:java} > String.valueOf(inputTopicName).trim(); > change to > inputTopicName.trim(); > {code} > {code:java} > String.valueOf(inputConsumerId).trim(); > change to > inputConsumerId.trim(); > {code} > etc.. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (TUBEMQ-224) Fixed: Unnecessary conversion to string inspection for server module
viviel created TUBEMQ-224: - Summary: Fixed: Unnecessary conversion to string inspection for server module Key: TUBEMQ-224 URL: https://issues.apache.org/jira/browse/TUBEMQ-224 Project: Apache TubeMQ Issue Type: Improvement Components: Server Reporter: viviel Assignee: viviel Fix For: 0.5.0 Fixed unnecessary method calls such as String.valueOf () for exmple: {code:java} String.valueOf(inputTopicName).trim(); change to inputTopicName.trim(); {code} {code:java} String.valueOf(inputConsumerId).trim(); change to inputConsumerId.trim(); {code} etc.. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (TUBEMQ-213) Optimize code & Minor changes
viviel created TUBEMQ-213: - Summary: Optimize code & Minor changes Key: TUBEMQ-213 URL: https://issues.apache.org/jira/browse/TUBEMQ-213 Project: Apache TubeMQ Issue Type: Improvement Reporter: viviel Assignee: viviel Fix For: 0.5.0 Optimize code {code:java} List messageList = new ArrayList<>(); if (transferedMessageList == null || transferedMessageList.isEmpty()) { return messageList; } change to if (transferedMessageList == null || transferedMessageList.isEmpty()) { return new ArrayList<>(); } List messageList = new ArrayList<>(transferedMessageList.size()); {code} {code:java} for (int i; i < 0; i++) {} change to for (Object o; objects) {} {code} {code:java} String.valueOf(consumerGroup).trim(); change to consumerGroup.trim(); {code} etc.. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (TUBEMQ-203) Upgrade Protocol Buffer component version
[ https://issues.apache.org/jira/browse/TUBEMQ-203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17126326#comment-17126326 ] viviel commented on TUBEMQ-203: --- Oh, I'm sorry for the misunderstanding, [~gosonzhang],[~gxcheng]. I will cancel the assign first, investigate the relevant technology and then confirm whether I want to assign it > Upgrade Protocol Buffer component version > - > > Key: TUBEMQ-203 > URL: https://issues.apache.org/jira/browse/TUBEMQ-203 > Project: Apache TubeMQ > Issue Type: Improvement >Reporter: Guocheng Zhang >Priority: Major > Labels: pull-request-available > > Through analysis and investigation, Protocol Buffer is better in multilingual > interaction, which can save a lot of code work. The PB version of TubeMQ is > too old, and only uses the PB message codec function, so there are not many > restrictions on upgrading the PB version. > In order to avoid Conflict with the PB of the environment using TubeMQ SDK > business, it is necessary to shade the TubeMQ's PB through maven-shade-plugin > Is anyone interested in it? -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Assigned] (TUBEMQ-203) Upgrade Protocol Buffer component version
[ https://issues.apache.org/jira/browse/TUBEMQ-203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] viviel reassigned TUBEMQ-203: - Assignee: (was: viviel) > Upgrade Protocol Buffer component version > - > > Key: TUBEMQ-203 > URL: https://issues.apache.org/jira/browse/TUBEMQ-203 > Project: Apache TubeMQ > Issue Type: Improvement >Reporter: Guocheng Zhang >Priority: Major > Labels: pull-request-available > > Through analysis and investigation, Protocol Buffer is better in multilingual > interaction, which can save a lot of code work. The PB version of TubeMQ is > too old, and only uses the PB message codec function, so there are not many > restrictions on upgrading the PB version. > In order to avoid Conflict with the PB of the environment using TubeMQ SDK > business, it is necessary to shade the TubeMQ's PB through maven-shade-plugin > Is anyone interested in it? -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Assigned] (TUBEMQ-203) Upgrade Protocol Buffer component version
[ https://issues.apache.org/jira/browse/TUBEMQ-203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] viviel reassigned TUBEMQ-203: - Assignee: viviel > Upgrade Protocol Buffer component version > - > > Key: TUBEMQ-203 > URL: https://issues.apache.org/jira/browse/TUBEMQ-203 > Project: Apache TubeMQ > Issue Type: Improvement >Reporter: Guocheng Zhang >Assignee: viviel >Priority: Major > > Through analysis and investigation, Protocol Buffer is better in multilingual > interaction, which can save a lot of code work. The PB version of TubeMQ is > too old, and only uses the PB message codec function, so there are not many > restrictions on upgrading the PB version. > In order to avoid Conflict with the PB of the environment using TubeMQ SDK > business, it is necessary to shade the TubeMQ's PB through maven-shade-plugin > Is anyone interested in it? -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (TUBEMQ-203) Upgrade Protocol Buffer component version
[ https://issues.apache.org/jira/browse/TUBEMQ-203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17125693#comment-17125693 ] viviel commented on TUBEMQ-203: --- I think I can try it > Upgrade Protocol Buffer component version > - > > Key: TUBEMQ-203 > URL: https://issues.apache.org/jira/browse/TUBEMQ-203 > Project: Apache TubeMQ > Issue Type: Improvement >Reporter: Guocheng Zhang >Priority: Major > > Through analysis and investigation, Protocol Buffer is better in multilingual > interaction, which can save a lot of code work. The PB version of TubeMQ is > too old, and only uses the PB message codec function, so there are not many > restrictions on upgrading the PB version. > In order to avoid Conflict with the PB of the environment using TubeMQ SDK > business, it is necessary to shade the TubeMQ's PB through maven-shade-plugin > Is anyone interested in it? -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Resolved] (TUBEMQ-179) Optimize doc for tubemq-website: localhost IP & ConsumePosition
[ https://issues.apache.org/jira/browse/TUBEMQ-179?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] viviel resolved TUBEMQ-179. --- Resolution: Fixed > Optimize doc for tubemq-website: localhost IP & ConsumePosition > --- > > Key: TUBEMQ-179 > URL: https://issues.apache.org/jira/browse/TUBEMQ-179 > Project: Apache TubeMQ > Issue Type: Improvement > Components: website >Reporter: viviel >Assignee: viviel >Priority: Minor > Labels: pull-request-available > Fix For: 0.5.0 > > > Producer Example & Consumer Example > 1. Remove the localhost IP parameter > 2. Modify ConsumeModel to generic ConsumePosition -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Closed] (TUBEMQ-179) Optimize doc for tubemq-website: localhost IP & ConsumePosition
[ https://issues.apache.org/jira/browse/TUBEMQ-179?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] viviel closed TUBEMQ-179. - > Optimize doc for tubemq-website: localhost IP & ConsumePosition > --- > > Key: TUBEMQ-179 > URL: https://issues.apache.org/jira/browse/TUBEMQ-179 > Project: Apache TubeMQ > Issue Type: Improvement > Components: website >Reporter: viviel >Assignee: viviel >Priority: Minor > Labels: pull-request-available > Fix For: 0.5.0 > > > Producer Example & Consumer Example > 1. Remove the localhost IP parameter > 2. Modify ConsumeModel to generic ConsumePosition -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (TUBEMQ-179) Optimize doc for tubemq-website: localhost IP & ConsumePosition
viviel created TUBEMQ-179: - Summary: Optimize doc for tubemq-website: localhost IP & ConsumePosition Key: TUBEMQ-179 URL: https://issues.apache.org/jira/browse/TUBEMQ-179 Project: Apache TubeMQ Issue Type: Improvement Components: website Reporter: viviel Assignee: viviel Fix For: 0.5.0 Producer Example & Consumer Example 1. Remove the localhost IP parameter 2. Modify ConsumeModel to generic ConsumePosition -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Resolved] (TUBEMQ-168) Example module: remove localhost IP configuration parameters
[ https://issues.apache.org/jira/browse/TUBEMQ-168?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] viviel resolved TUBEMQ-168. --- Resolution: Fixed > Example module: remove localhost IP configuration parameters > > > Key: TUBEMQ-168 > URL: https://issues.apache.org/jira/browse/TUBEMQ-168 > Project: Apache TubeMQ > Issue Type: Improvement >Reporter: viviel >Assignee: viviel >Priority: Minor > Labels: pull-request-available > Fix For: 0.5.0 > > > Remove the localhost IP parameter of the sample code and use the new > configuration class constructor > Such as: > {code:java} > TubeClientConfig clientConfig = new TubeClientConfig (localHost, > masterHostAndPort);{code} > Change to: > {code:java} > TubeClientConfig clientConfig = new TubeClientConfig > (masterHostAndPort);{code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Closed] (TUBEMQ-168) Example module: remove localhost IP configuration parameters
[ https://issues.apache.org/jira/browse/TUBEMQ-168?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] viviel closed TUBEMQ-168. - > Example module: remove localhost IP configuration parameters > > > Key: TUBEMQ-168 > URL: https://issues.apache.org/jira/browse/TUBEMQ-168 > Project: Apache TubeMQ > Issue Type: Improvement >Reporter: viviel >Assignee: viviel >Priority: Minor > Labels: pull-request-available > Fix For: 0.5.0 > > > Remove the localhost IP parameter of the sample code and use the new > configuration class constructor > Such as: > {code:java} > TubeClientConfig clientConfig = new TubeClientConfig (localHost, > masterHostAndPort);{code} > Change to: > {code:java} > TubeClientConfig clientConfig = new TubeClientConfig > (masterHostAndPort);{code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (TUBEMQ-168) Example module: remove localhost IP configuration parameters
viviel created TUBEMQ-168: - Summary: Example module: remove localhost IP configuration parameters Key: TUBEMQ-168 URL: https://issues.apache.org/jira/browse/TUBEMQ-168 Project: Apache TubeMQ Issue Type: Improvement Reporter: viviel Assignee: viviel Fix For: 0.5.0 Remove the localhost IP parameter of the sample code and use the new configuration class constructor Such as: {code:java} TubeClientConfig clientConfig = new TubeClientConfig (localHost, masterHostAndPort);{code} Change to: {code:java} TubeClientConfig clientConfig = new TubeClientConfig (masterHostAndPort);{code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Closed] (TUBEMQ-161) About code templates
[ https://issues.apache.org/jira/browse/TUBEMQ-161?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] viviel closed TUBEMQ-161. - Resolution: Not A Problem > About code templates > > > Key: TUBEMQ-161 > URL: https://issues.apache.org/jira/browse/TUBEMQ-161 > Project: Apache TubeMQ > Issue Type: Improvement >Reporter: viviel >Priority: Low > > At present, there is no unified coding standard for the project, and the code > template should be configured for the IDE and the code style should be > unified. > Commonly used IDE can be listed under the remark -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (TUBEMQ-161) About code templates
[ https://issues.apache.org/jira/browse/TUBEMQ-161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17120461#comment-17120461 ] viviel commented on TUBEMQ-161: --- Okay, then I will closed this question > About code templates > > > Key: TUBEMQ-161 > URL: https://issues.apache.org/jira/browse/TUBEMQ-161 > Project: Apache TubeMQ > Issue Type: Improvement >Reporter: viviel >Priority: Low > > At present, there is no unified coding standard for the project, and the code > template should be configured for the IDE and the code style should be > unified. > Commonly used IDE can be listed under the remark -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (TUBEMQ-161) About code templates
[ https://issues.apache.org/jira/browse/TUBEMQ-161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17120232#comment-17120232 ] viviel commented on TUBEMQ-161: --- The reason for considering this is that sometimes the IDE's format code function is used. If the two people's IDE code style configuration is different, it is easy to format others' modifications. So just throw this question to see if there is any good solution If we don't recommend ide's formatting code function and use checkstyle completely, then this question is useless. > About code templates > > > Key: TUBEMQ-161 > URL: https://issues.apache.org/jira/browse/TUBEMQ-161 > Project: Apache TubeMQ > Issue Type: Improvement >Reporter: viviel >Priority: Low > > At present, there is no unified coding standard for the project, and the code > template should be configured for the IDE and the code style should be > unified. > Commonly used IDE can be listed under the remark -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Reopened] (TUBEMQ-104) Substitute Chinese comments with English - core module
[ https://issues.apache.org/jira/browse/TUBEMQ-104?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] viviel reopened TUBEMQ-104: --- > Substitute Chinese comments with English - core module > -- > > Key: TUBEMQ-104 > URL: https://issues.apache.org/jira/browse/TUBEMQ-104 > Project: Apache TubeMQ > Issue Type: Sub-task >Reporter: Guo Jiwei >Assignee: viviel >Priority: Normal > > Substitute the Chinese comments with English -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Resolved] (TUBEMQ-141) Remove the requirement to provide localHostIP
[ https://issues.apache.org/jira/browse/TUBEMQ-141?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] viviel resolved TUBEMQ-141. --- Resolution: Done > Remove the requirement to provide localHostIP > - > > Key: TUBEMQ-141 > URL: https://issues.apache.org/jira/browse/TUBEMQ-141 > Project: Apache TubeMQ > Issue Type: Improvement >Reporter: Guocheng Zhang >Assignee: viviel >Priority: Major > Labels: pull-request-available > Fix For: 0.5.0 > > Attachments: image-2020-05-21-20-54-37-013.png > > > The initial requirement to provide localHostIP during initialization is > because we have multiple network cards and multiple IPs in our environment. > The initial implementation is to find the first IP from the specified > NetworkInterface and report it, but It is found that sometimes the specified > NetworkInterface is not configured with IP, so, we consider the user is > required to provide a local IP: > !image-2020-05-21-20-54-37-013.png! > After a period of use, the user feedback the API is cumbersome to use. The > best way is to provide a configurable NetworkInterface API, so if the IP is > not found, we can change the NetworkInterface. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (TUBEMQ-161) About code templates
[ https://issues.apache.org/jira/browse/TUBEMQ-161?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] viviel updated TUBEMQ-161: -- Description: At present, there is no unified coding standard for the project, and the code template should be configured for the IDE and the code style should be unified. Commonly used IDE can be listed under the remark was: At present, there is no unified coding standard for the project, and the code template should be configured for the IDE and the code style should be unified. Commonly used IDE can be listed under the reply > About code templates > > > Key: TUBEMQ-161 > URL: https://issues.apache.org/jira/browse/TUBEMQ-161 > Project: Apache TubeMQ > Issue Type: Improvement >Reporter: viviel >Priority: Low > > At present, there is no unified coding standard for the project, and the code > template should be configured for the IDE and the code style should be > unified. > Commonly used IDE can be listed under the remark -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (TUBEMQ-161) About code templates
[ https://issues.apache.org/jira/browse/TUBEMQ-161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17118558#comment-17118558 ] viviel commented on TUBEMQ-161: --- idea eclipse > About code templates > > > Key: TUBEMQ-161 > URL: https://issues.apache.org/jira/browse/TUBEMQ-161 > Project: Apache TubeMQ > Issue Type: Improvement >Reporter: viviel >Priority: Low > > At present, there is no unified coding standard for the project, and the code > template should be configured for the IDE and the code style should be > unified. > Commonly used IDE can be listed under the remark -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (TUBEMQ-161) About code templates
[ https://issues.apache.org/jira/browse/TUBEMQ-161?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] viviel updated TUBEMQ-161: -- Description: At present, there is no unified coding standard for the project, and the code template should be configured for the IDE and the code style should be unified. Commonly used IDE can be listed under the reply was:At present, there is no unified coding standard for the project, and the code template should be configured for the IDE and the code style should be unified. > About code templates > > > Key: TUBEMQ-161 > URL: https://issues.apache.org/jira/browse/TUBEMQ-161 > Project: Apache TubeMQ > Issue Type: Improvement >Reporter: viviel >Priority: Low > > At present, there is no unified coding standard for the project, and the code > template should be configured for the IDE and the code style should be > unified. > Commonly used IDE can be listed under the reply -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (TUBEMQ-161) About code templates
viviel created TUBEMQ-161: - Summary: About code templates Key: TUBEMQ-161 URL: https://issues.apache.org/jira/browse/TUBEMQ-161 Project: Apache TubeMQ Issue Type: Improvement Reporter: viviel At present, there is no unified coding standard for the project, and the code template should be configured for the IDE and the code style should be unified. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (TUBEMQ-141) Remove the requirement to provide localHostIP
[ https://issues.apache.org/jira/browse/TUBEMQ-141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17117543#comment-17117543 ] viviel commented on TUBEMQ-141: --- After discussion, the final process for obtaining IP is roughly as follows: 1. Get all network interfaces 2. Filter out the docker0 interface, non-up interface 3. Traverse the address of a legal network interface 4. Exclude LoopbackAddress, 127.0 network segment address, and IPV6 address 5. Obtain the final legal IPV4 address 6. If you can't get it in the fifth step, call InetAddress.getLocalHost () to get it, otherwise throw the exception information to the user About the transformation of TubeClientConfig and ConsumerConfig: 1. The old construction method is marked as deprecated 2. Add a new construction method without localhost parameter > Remove the requirement to provide localHostIP > - > > Key: TUBEMQ-141 > URL: https://issues.apache.org/jira/browse/TUBEMQ-141 > Project: Apache TubeMQ > Issue Type: Improvement >Reporter: Guocheng Zhang >Assignee: viviel >Priority: Major > Labels: pull-request-available > Fix For: 0.5.0 > > Attachments: image-2020-05-21-20-54-37-013.png > > > The initial requirement to provide localHostIP during initialization is > because we have multiple network cards and multiple IPs in our environment. > The initial implementation is to find the first IP from the specified > NetworkInterface and report it, but It is found that sometimes the specified > NetworkInterface is not configured with IP, so, we consider the user is > required to provide a local IP: > !image-2020-05-21-20-54-37-013.png! > After a period of use, the user feedback the API is cumbersome to use. The > best way is to provide a configurable NetworkInterface API, so if the IP is > not found, we can change the NetworkInterface. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Comment Edited] (TUBEMQ-141) Remove the requirement to provide localHostIP
[ https://issues.apache.org/jira/browse/TUBEMQ-141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17115881#comment-17115881 ] viviel edited comment on TUBEMQ-141 at 5/25/20, 9:37 AM: - Get the IP feature for the specified network interface name: It is not easy to get in the construction method of TubeClientConfig. So, I provide a tool method to get IP through the network interface. {code:java} AddressUtils.getIPV4AddressByNetworkInterfaceName() {code} was (Author: viviel): Get the IP feature for the specified network interface name: It is not easy to get in the construction method of TubeClientConfig. So, I provide a tool method to get IP through the network interface. {code:java} AddressUtils.getIPV4AddressByNetworkInterfaceName () {code} > Remove the requirement to provide localHostIP > - > > Key: TUBEMQ-141 > URL: https://issues.apache.org/jira/browse/TUBEMQ-141 > Project: Apache TubeMQ > Issue Type: Improvement >Reporter: Guocheng Zhang >Assignee: viviel >Priority: Major > Labels: pull-request-available > Fix For: 0.5.0 > > Attachments: image-2020-05-21-20-54-37-013.png > > > The initial requirement to provide localHostIP during initialization is > because we have multiple network cards and multiple IPs in our environment. > The initial implementation is to find the first IP from the specified > NetworkInterface and report it, but It is found that sometimes the specified > NetworkInterface is not configured with IP, so, we consider the user is > required to provide a local IP: > !image-2020-05-21-20-54-37-013.png! > After a period of use, the user feedback the API is cumbersome to use. The > best way is to provide a configurable NetworkInterface API, so if the IP is > not found, we can change the NetworkInterface. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (TUBEMQ-141) Remove the requirement to provide localHostIP
[ https://issues.apache.org/jira/browse/TUBEMQ-141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17115881#comment-17115881 ] viviel commented on TUBEMQ-141: --- Get the IP feature for the specified network interface name: It is not easy to get in the construction method of TubeClientConfig. So, I provide a tool method to get IP through the network interface. {code:java} AddressUtils.getIPV4AddressByNetworkInterfaceName () {code} > Remove the requirement to provide localHostIP > - > > Key: TUBEMQ-141 > URL: https://issues.apache.org/jira/browse/TUBEMQ-141 > Project: Apache TubeMQ > Issue Type: Improvement >Reporter: Guocheng Zhang >Assignee: viviel >Priority: Major > Labels: pull-request-available > Fix For: 0.5.0 > > Attachments: image-2020-05-21-20-54-37-013.png > > > The initial requirement to provide localHostIP during initialization is > because we have multiple network cards and multiple IPs in our environment. > The initial implementation is to find the first IP from the specified > NetworkInterface and report it, but It is found that sometimes the specified > NetworkInterface is not configured with IP, so, we consider the user is > required to provide a local IP: > !image-2020-05-21-20-54-37-013.png! > After a period of use, the user feedback the API is cumbersome to use. The > best way is to provide a configurable NetworkInterface API, so if the IP is > not found, we can change the NetworkInterface. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Closed] (TUBEMQ-154) Modify the wrong comment & Minor changes for example module
[ https://issues.apache.org/jira/browse/TUBEMQ-154?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] viviel closed TUBEMQ-154. - > Modify the wrong comment & Minor changes for example module > --- > > Key: TUBEMQ-154 > URL: https://issues.apache.org/jira/browse/TUBEMQ-154 > Project: Apache TubeMQ > Issue Type: Improvement >Reporter: viviel >Assignee: viviel >Priority: Low > Labels: pull-request-available > Fix For: 0.5.0 > > > 1. Modify the wrong comment > {code:java} > /** > * Send message synchronous. More efficient and recommended. > */ > public void sendMessageAsync() {} > {code} > change to > {code:java} > /** > * Send message asynchronous. More efficient and recommended. > */ > public void sendMessageAsync() {} > {code} > 2. Optimize variable naming -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (TUBEMQ-141) Remove the requirement to provide localHostIP
[ https://issues.apache.org/jira/browse/TUBEMQ-141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17114490#comment-17114490 ] viviel commented on TUBEMQ-141: --- Ok i will take this part into account > Remove the requirement to provide localHostIP > - > > Key: TUBEMQ-141 > URL: https://issues.apache.org/jira/browse/TUBEMQ-141 > Project: Apache TubeMQ > Issue Type: Improvement >Reporter: Guocheng Zhang >Assignee: viviel >Priority: Major > Fix For: 0.5.0 > > Attachments: image-2020-05-21-20-54-37-013.png > > > The initial requirement to provide localHostIP during initialization is > because we have multiple network cards and multiple IPs in our environment. > The initial implementation is to find the first IP from the specified > NetworkInterface and report it, but It is found that sometimes the specified > NetworkInterface is not configured with IP, so, we consider the user is > required to provide a local IP: > !image-2020-05-21-20-54-37-013.png! > After a period of use, the user feedback the API is cumbersome to use. The > best way is to provide a configurable NetworkInterface API, so if the IP is > not found, we can change the NetworkInterface. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Resolved] (TUBEMQ-154) Modify the wrong comment & Minor changes for example module
[ https://issues.apache.org/jira/browse/TUBEMQ-154?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] viviel resolved TUBEMQ-154. --- Resolution: Fixed > Modify the wrong comment & Minor changes for example module > --- > > Key: TUBEMQ-154 > URL: https://issues.apache.org/jira/browse/TUBEMQ-154 > Project: Apache TubeMQ > Issue Type: Improvement >Reporter: viviel >Assignee: viviel >Priority: Low > Labels: pull-request-available > Fix For: 0.5.0 > > > 1. Modify the wrong comment > {code:java} > /** > * Send message synchronous. More efficient and recommended. > */ > public void sendMessageAsync() {} > {code} > change to > {code:java} > /** > * Send message asynchronous. More efficient and recommended. > */ > public void sendMessageAsync() {} > {code} > 2. Optimize variable naming -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (TUBEMQ-154) Modify the wrong comment & Minor changes for example module
viviel created TUBEMQ-154: - Summary: Modify the wrong comment & Minor changes for example module Key: TUBEMQ-154 URL: https://issues.apache.org/jira/browse/TUBEMQ-154 Project: Apache TubeMQ Issue Type: Improvement Reporter: viviel Assignee: viviel Fix For: 0.5.0 1. Modify the wrong comment {code:java} /** * Send message synchronous. More efficient and recommended. */ public void sendMessageAsync() {} {code} change to {code:java} /** * Send message asynchronous. More efficient and recommended. */ public void sendMessageAsync() {} {code} 2. Optimize variable naming -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (TUBEMQ-141) Remove the requirement to provide localHostIP
[ https://issues.apache.org/jira/browse/TUBEMQ-141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17113975#comment-17113975 ] viviel commented on TUBEMQ-141: --- I sorted out the general process. After referring to the previous tboy's comments and viewing the source code of other related projects, I found that the general idea is similar 1. Obtain all local Network interface information 2. Traverse the IP information bound to each Network interface 3. Exclude the loopback address and some private addresses If none can be obtained, an exception will be thrown and handed over to the user for processing In addition, two TubeClientConfig constructors will be overloaded to be compatible with the original logic If there is no problem, I will follow this process to achieve > Remove the requirement to provide localHostIP > - > > Key: TUBEMQ-141 > URL: https://issues.apache.org/jira/browse/TUBEMQ-141 > Project: Apache TubeMQ > Issue Type: Improvement >Reporter: Guocheng Zhang >Assignee: viviel >Priority: Major > Fix For: 0.5.0 > > Attachments: image-2020-05-21-20-54-37-013.png > > > The initial requirement to provide localHostIP during initialization is > because we have multiple network cards and multiple IPs in our environment. > The initial implementation is to find the first IP from the specified > NetworkInterface and report it, but It is found that sometimes the specified > NetworkInterface is not configured with IP, so, we consider the user is > required to provide a local IP: > !image-2020-05-21-20-54-37-013.png! > After a period of use, the user feedback the API is cumbersome to use. The > best way is to provide a configurable NetworkInterface API, so if the IP is > not found, we can change the NetworkInterface. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (TUBEMQ-138) Optimize core module test case code
[ https://issues.apache.org/jira/browse/TUBEMQ-138?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] viviel updated TUBEMQ-138: -- Fix Version/s: 0.5.0 > Optimize core module test case code > --- > > Key: TUBEMQ-138 > URL: https://issues.apache.org/jira/browse/TUBEMQ-138 > Project: Apache TubeMQ > Issue Type: Improvement >Reporter: viviel >Assignee: viviel >Priority: Low > Labels: pull-request-available > Fix For: 0.5.0 > > > 1. Optimize the use of assertions > 2. Fix possible null pointer exception > {code:java} > SSLEngine sslEngine = null; > try { > // create engine > sslEngine = TSSLEngineUtil.createSSLEngine(keyStorePath, trustStorePath, > keyStorePassword, trustStorePassword, true, false); > } catch (Throwable e) { > e.printStackTrace(); > } > // If the above code is a field, it may cause the object sslEngine is null > boolean needClientAuth = sslEngine.getNeedClientAuth(); > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Closed] (TUBEMQ-108) About maven jdk version configuration problem
[ https://issues.apache.org/jira/browse/TUBEMQ-108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] viviel closed TUBEMQ-108. - > About maven jdk version configuration problem > - > > Key: TUBEMQ-108 > URL: https://issues.apache.org/jira/browse/TUBEMQ-108 > Project: Apache TubeMQ > Issue Type: Improvement >Reporter: viviel >Assignee: viviel >Priority: Minor > Fix For: 0.5.0 > > > hi: > [~gosonzhang], [~technoboy] > I found some problems with the current maven jdk version configuration. For > the 1.8 syntax, it can be compiled, but there will be problems during runtime. > for example: > The core module uses the syntax of 1.8. If you refer to the method that is > only available in 1.8, it can be compiled. However, because the server is > configured with the syntax of 1.7, when the server is running on jdk1.7, it > will caused method not found errors because it depends on the core module. > In response to this problem, please ask [~gosonzhang] to determine the > specific jdk running version of the server and client module, so as to make > corresponding adjustments to the maven configuration. When the syntax is > wrong, you can find and solve the problem in time during compilation -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Closed] (TUBEMQ-127) Fixed a bug & minor changes
[ https://issues.apache.org/jira/browse/TUBEMQ-127?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] viviel closed TUBEMQ-127. - > Fixed a bug & minor changes > --- > > Key: TUBEMQ-127 > URL: https://issues.apache.org/jira/browse/TUBEMQ-127 > Project: Apache TubeMQ > Issue Type: Improvement >Reporter: viviel >Assignee: viviel >Priority: Low > Labels: pull-request-available > Fix For: 0.5.0 > > > 1. Fixed a bug > Syntax error > {code:java} > map.keySet().iterator(); (1.8 syntax) -> new > ArrayList<>(map.keySet()).iterator(); > {code} > 2. Minor changes > {code:java} > if (curToken != null && curToken == usedToken) { > return true; > } > change to > return curToken != null && curToken == usedToken; > {code} > {code:java} > if (isReged == null) { > return true; > } > change to > return isReged == null; > {code} > {code:java} > List partKeys = new ArrayList<>(); > partKeys.addAll(partitionUsedMap.keySet()); > change to > List partKeys = new ArrayList<>(partitionUsedMap.keySet()); > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Closed] (TUBEMQ-102) Fix question [TUBEMQ-101] [Optimize code]
[ https://issues.apache.org/jira/browse/TUBEMQ-102?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] viviel closed TUBEMQ-102. - > Fix question [TUBEMQ-101] [Optimize code] > - > > Key: TUBEMQ-102 > URL: https://issues.apache.org/jira/browse/TUBEMQ-102 > Project: Apache TubeMQ > Issue Type: Bug >Reporter: viviel >Assignee: viviel >Priority: Major > Labels: pull-request-available > Fix For: 0.5.0 > > > Because the core module uses jdk1.7, this code cannot use 'putIfAbsent' > {code:java} > addrMap4Failover.putIfAbsent(tmpNodeAddrInfo.getHostPortStr(), > tmpNodeAddrInfo); > {code} > We should use the original > {code:java} > if (addrMap4Failover.get(tmpNodeAddrInfo.getHostPortStr()) == null) { > addrMap4Failover.put(tmpNodeAddrInfo.getHostPortStr(), tmpNodeAddrInfo); > } > {code} > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (TUBEMQ-141) Remove the requirement to provide localHostIP
[ https://issues.apache.org/jira/browse/TUBEMQ-141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17113698#comment-17113698 ] viviel commented on TUBEMQ-141: --- There is a question here, do you need to consider the IPv6 address when obtaining the address? > Remove the requirement to provide localHostIP > - > > Key: TUBEMQ-141 > URL: https://issues.apache.org/jira/browse/TUBEMQ-141 > Project: Apache TubeMQ > Issue Type: Improvement >Reporter: Guocheng Zhang >Assignee: viviel >Priority: Major > Fix For: 0.5.0 > > Attachments: image-2020-05-21-20-54-37-013.png > > > The initial requirement to provide localHostIP during initialization is > because we have multiple network cards and multiple IPs in our environment. > The initial implementation is to find the first IP from the specified > NetworkInterface and report it, but It is found that sometimes the specified > NetworkInterface is not configured with IP, so, we consider the user is > required to provide a local IP: > !image-2020-05-21-20-54-37-013.png! > After a period of use, the user feedback the API is cumbersome to use. The > best way is to provide a configurable NetworkInterface API, so if the IP is > not found, we can change the NetworkInterface. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Assigned] (TUBEMQ-141) Remove the requirement to provide localHostIP
[ https://issues.apache.org/jira/browse/TUBEMQ-141?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] viviel reassigned TUBEMQ-141: - Assignee: viviel > Remove the requirement to provide localHostIP > - > > Key: TUBEMQ-141 > URL: https://issues.apache.org/jira/browse/TUBEMQ-141 > Project: Apache TubeMQ > Issue Type: Improvement >Reporter: Guocheng Zhang >Assignee: viviel >Priority: Major > Attachments: image-2020-05-21-20-54-37-013.png > > > The initial requirement to provide localHostIP during initialization is > because we have multiple network cards and multiple IPs in our environment. > The initial implementation is to find the first IP from the specified > NetworkInterface and report it, but It is found that sometimes the specified > NetworkInterface is not configured with IP, so, we consider the user is > required to provide a local IP: > !image-2020-05-21-20-54-37-013.png! > After a period of use, the user feedback the API is cumbersome to use. The > best way is to provide a configurable NetworkInterface API, so if the IP is > not found, we can change the NetworkInterface. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (TUBEMQ-141) Remove the requirement to provide localHostIP
[ https://issues.apache.org/jira/browse/TUBEMQ-141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17113227#comment-17113227 ] viviel commented on TUBEMQ-141: --- I think I can try to solve this problem > Remove the requirement to provide localHostIP > - > > Key: TUBEMQ-141 > URL: https://issues.apache.org/jira/browse/TUBEMQ-141 > Project: Apache TubeMQ > Issue Type: Improvement >Reporter: Guocheng Zhang >Priority: Major > Attachments: image-2020-05-21-20-54-37-013.png > > > The initial requirement to provide localHostIP during initialization is > because we have multiple network cards and multiple IPs in our environment. > The initial implementation is to find the first IP from the specified > NetworkInterface and report it, but It is found that sometimes the specified > NetworkInterface is not configured with IP, so, we consider the user is > required to provide a local IP: > !image-2020-05-21-20-54-37-013.png! > After a period of use, the user feedback the API is cumbersome to use. The > best way is to provide a configurable NetworkInterface API, so if the IP is > not found, we can change the NetworkInterface. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Comment Edited] (TUBEMQ-139) a bug in the equals method of the TubeClientConfig class
[ https://issues.apache.org/jira/browse/TUBEMQ-139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17112738#comment-17112738 ] viviel edited comment on TUBEMQ-139 at 5/21/20, 2:48 AM: - I think there are two places that can be optimized: 1. Use the equals generation tool that comes with idea to generate, which can reduce the probability of errors. 2. Override hashCode method. was (Author: viviel): I think there are two places that can be optimized: 1. Use the equals generation tool that comes with idea to generate, which can reduce the probability of errors. 2. Override hashCode method. If there is no problem, I can change it according to the two points above. > a bug in the equals method of the TubeClientConfig class > > > Key: TUBEMQ-139 > URL: https://issues.apache.org/jira/browse/TUBEMQ-139 > Project: Apache TubeMQ > Issue Type: Bug >Reporter: Guocheng Zhang >Assignee: Guocheng Zhang >Priority: Major > Labels: pull-request-available > Fix For: 0.5.0 > > Attachments: image-2020-05-21-10-27-25-938.png, > image-2020-05-21-10-28-10-332.png > > > There is a bug in the equals method of the TubeClientConfig class: > !image-2020-05-21-10-27-25-938.png! > it should be: > !image-2020-05-21-10-28-10-332.png! -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (TUBEMQ-139) a bug in the equals method of the TubeClientConfig class
[ https://issues.apache.org/jira/browse/TUBEMQ-139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17112738#comment-17112738 ] viviel commented on TUBEMQ-139: --- I think there are two places that can be optimized: 1. Use the equals generation tool that comes with idea to generate, which can reduce the probability of errors. 2. Override hashCode method. If there is no problem, I can change it according to the two points above. > a bug in the equals method of the TubeClientConfig class > > > Key: TUBEMQ-139 > URL: https://issues.apache.org/jira/browse/TUBEMQ-139 > Project: Apache TubeMQ > Issue Type: Bug >Reporter: Guocheng Zhang >Assignee: Guocheng Zhang >Priority: Major > Labels: pull-request-available > Fix For: 0.5.0 > > Attachments: image-2020-05-21-10-27-25-938.png, > image-2020-05-21-10-28-10-332.png > > > There is a bug in the equals method of the TubeClientConfig class: > !image-2020-05-21-10-27-25-938.png! > it should be: > !image-2020-05-21-10-28-10-332.png! -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (TUBEMQ-138) Optimize core module test case code
viviel created TUBEMQ-138: - Summary: Optimize core module test case code Key: TUBEMQ-138 URL: https://issues.apache.org/jira/browse/TUBEMQ-138 Project: Apache TubeMQ Issue Type: Improvement Reporter: viviel Assignee: viviel 1. Optimize the use of assertions 2. Fix possible null pointer exception {code:java} SSLEngine sslEngine = null; try { // create engine sslEngine = TSSLEngineUtil.createSSLEngine(keyStorePath, trustStorePath, keyStorePassword, trustStorePassword, true, false); } catch (Throwable e) { e.printStackTrace(); } // If the above code is a field, it may cause the object sslEngine is null boolean needClientAuth = sslEngine.getNeedClientAuth(); {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Assigned] (TUBEMQ-127) Fixed a bug & minor changes
[ https://issues.apache.org/jira/browse/TUBEMQ-127?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] viviel reassigned TUBEMQ-127: - Assignee: viviel > Fixed a bug & minor changes > --- > > Key: TUBEMQ-127 > URL: https://issues.apache.org/jira/browse/TUBEMQ-127 > Project: Apache TubeMQ > Issue Type: Improvement >Reporter: viviel >Assignee: viviel >Priority: Low > Labels: pull-request-available > > 1. Fixed a bug > Syntax error > {code:java} > map.keySet().iterator(); (1.8 syntax) -> new > ArrayList<>(map.keySet()).iterator(); > {code} > 2. Minor changes > {code:java} > if (curToken != null && curToken == usedToken) { > return true; > } > change to > return curToken != null && curToken == usedToken; > {code} > {code:java} > if (isReged == null) { > return true; > } > change to > return isReged == null; > {code} > {code:java} > List partKeys = new ArrayList<>(); > partKeys.addAll(partitionUsedMap.keySet()); > change to > List partKeys = new ArrayList<>(partitionUsedMap.keySet()); > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (TUBEMQ-127) Fixed a bug & minor changes
viviel created TUBEMQ-127: - Summary: Fixed a bug & minor changes Key: TUBEMQ-127 URL: https://issues.apache.org/jira/browse/TUBEMQ-127 Project: Apache TubeMQ Issue Type: Improvement Reporter: viviel 1. Fixed a bug Syntax error {code:java} map.keySet().iterator(); (1.8 syntax) -> new ArrayList<>(map.keySet()).iterator(); {code} 2. Minor changes {code:java} if (curToken != null && curToken == usedToken) { return true; } change to return curToken != null && curToken == usedToken; {code} {code:java} if (isReged == null) { return true; } change to return isReged == null; {code} {code:java} List partKeys = new ArrayList<>(); partKeys.addAll(partitionUsedMap.keySet()); change to List partKeys = new ArrayList<>(partitionUsedMap.keySet()); {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Resolved] (TUBEMQ-108) About maven jdk version configuration problem
[ https://issues.apache.org/jira/browse/TUBEMQ-108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] viviel resolved TUBEMQ-108. --- Resolution: Fixed > About maven jdk version configuration problem > - > > Key: TUBEMQ-108 > URL: https://issues.apache.org/jira/browse/TUBEMQ-108 > Project: Apache TubeMQ > Issue Type: Improvement >Reporter: viviel >Assignee: viviel >Priority: Minor > > hi: > [~gosonzhang], [~technoboy] > I found some problems with the current maven jdk version configuration. For > the 1.8 syntax, it can be compiled, but there will be problems during runtime. > for example: > The core module uses the syntax of 1.8. If you refer to the method that is > only available in 1.8, it can be compiled. However, because the server is > configured with the syntax of 1.7, when the server is running on jdk1.7, it > will caused method not found errors because it depends on the core module. > In response to this problem, please ask [~gosonzhang] to determine the > specific jdk running version of the server and client module, so as to make > corresponding adjustments to the maven configuration. When the syntax is > wrong, you can find and solve the problem in time during compilation -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (TUBEMQ-121) Fix compilation alarm
[ https://issues.apache.org/jira/browse/TUBEMQ-121?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17108088#comment-17108088 ] viviel commented on TUBEMQ-121: --- I think we can solve this problem by specifying the version in the maven jdk configuration Specific plan: The jdk version of the parent tube project is set to 1.7, so that the default jdk version of all child modules is 1.7. After that, we separately specified the jdk version of the server module as 1.8, so that these problems can be discovered and solved during the development stage > Fix compilation alarm > - > > Key: TUBEMQ-121 > URL: https://issues.apache.org/jira/browse/TUBEMQ-121 > Project: Apache TubeMQ > Issue Type: Bug >Affects Versions: 0.5.0 >Reporter: Guocheng Zhang >Assignee: Guocheng Zhang >Priority: Major > Labels: easyfix, pull-request-available > Fix For: 0.5.0 > > Attachments: image-2020-05-15-14-57-51-043.png > > > When I compile the main code, some errors are as follows: > !image-2020-05-15-14-57-51-043.png! > There are some points to note when setting up TubeMQ: compile client and core > need to use 1.7 environment, and compile server need to use 1.8 environment. > The main consideration is that the user environment may be 1.7. I will > mention PR to fix it. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Assigned] (TUBEMQ-108) About maven jdk version configuration problem
[ https://issues.apache.org/jira/browse/TUBEMQ-108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] viviel reassigned TUBEMQ-108: - Assignee: viviel > About maven jdk version configuration problem > - > > Key: TUBEMQ-108 > URL: https://issues.apache.org/jira/browse/TUBEMQ-108 > Project: Apache TubeMQ > Issue Type: Improvement >Reporter: viviel >Assignee: viviel >Priority: Minor > > hi: > [~gosonzhang], [~technoboy] > I found some problems with the current maven jdk version configuration. For > the 1.8 syntax, it can be compiled, but there will be problems during runtime. > for example: > The core module uses the syntax of 1.8. If you refer to the method that is > only available in 1.8, it can be compiled. However, because the server is > configured with the syntax of 1.7, when the server is running on jdk1.7, it > will caused method not found errors because it depends on the core module. > In response to this problem, please ask [~gosonzhang] to determine the > specific jdk running version of the server and client module, so as to make > corresponding adjustments to the maven configuration. When the syntax is > wrong, you can find and solve the problem in time during compilation -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (TUBEMQ-108) About maven jdk version configuration problem
viviel created TUBEMQ-108: - Summary: About maven jdk version configuration problem Key: TUBEMQ-108 URL: https://issues.apache.org/jira/browse/TUBEMQ-108 Project: Apache TubeMQ Issue Type: Improvement Reporter: viviel hi: [~gosonzhang], [~technoboy] I found some problems with the current maven jdk version configuration. For the 1.8 syntax, it can be compiled, but there will be problems during runtime. for example: The core module uses the syntax of 1.8. If you refer to the method that is only available in 1.8, it can be compiled. However, because the server is configured with the syntax of 1.7, when the server is running on jdk1.7, it will caused method not found errors because it depends on the core module. In response to this problem, please ask [~gosonzhang] to determine the specific jdk running version of the server and client module, so as to make corresponding adjustments to the maven configuration. When the syntax is wrong, you can find and solve the problem in time during compilation -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (TUBEMQ-102) Fix question [TUBEMQ-101] [Optimize code]
[ https://issues.apache.org/jira/browse/TUBEMQ-102?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] viviel updated TUBEMQ-102: -- Summary: Fix question [TUBEMQ-101] [Optimize code] (was: Fix question 101 [Optimize code]) > Fix question [TUBEMQ-101] [Optimize code] > - > > Key: TUBEMQ-102 > URL: https://issues.apache.org/jira/browse/TUBEMQ-102 > Project: Apache TubeMQ > Issue Type: Bug >Reporter: viviel >Assignee: viviel >Priority: Major > Labels: pull-request-available > > Because the core module uses jdk1.7, this code cannot use 'putIfAbsent' > {code:java} > addrMap4Failover.putIfAbsent(tmpNodeAddrInfo.getHostPortStr(), > tmpNodeAddrInfo); > {code} > We should use the original > {code:java} > if (addrMap4Failover.get(tmpNodeAddrInfo.getHostPortStr()) == null) { > addrMap4Failover.put(tmpNodeAddrInfo.getHostPortStr(), tmpNodeAddrInfo); > } > {code} > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (TUBEMQ-102) Fix question 101 [Optimize code]
viviel created TUBEMQ-102: - Summary: Fix question 101 [Optimize code] Key: TUBEMQ-102 URL: https://issues.apache.org/jira/browse/TUBEMQ-102 Project: Apache TubeMQ Issue Type: Bug Reporter: viviel Assignee: viviel Because the core module uses jdk1.7, this code cannot use 'putIfAbsent' {code:java} addrMap4Failover.putIfAbsent(tmpNodeAddrInfo.getHostPortStr(), tmpNodeAddrInfo); {code} We should use the original {code:java} if (addrMap4Failover.get(tmpNodeAddrInfo.getHostPortStr()) == null) { addrMap4Failover.put(tmpNodeAddrInfo.getHostPortStr(), tmpNodeAddrInfo); } {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (TUBEMQ-101) Optimize code & Fix type
viviel created TUBEMQ-101: - Summary: Optimize code & Fix type Key: TUBEMQ-101 URL: https://issues.apache.org/jira/browse/TUBEMQ-101 Project: Apache TubeMQ Issue Type: Improvement Reporter: viviel Assignee: viviel 1. Optimize code {code:java} if (addrMap4Failover.get(tmpNodeAddrInfo.getHostPortStr()) == null) { addrMap4Failover.put(tmpNodeAddrInfo.getHostPortStr(), tmpNodeAddrInfo); } {code} Change to {code:java} addrMap4Failover.putIfAbsent(tmpNodeAddrInfo.getHostPortStr(), tmpNodeAddrInfo); {code} 2. Fix type getParameteres -> getParameters datestring -> dateString setunFlushDataHold -> setUnflushDataHold getunFlushDataHold -> getUnflushDataHold Because I do n’t know whether it will affect other components, such as log parsing, etc., I did not change it here {code:java} .append(",\"unFlushDataHold\":").append(getUnflushDataHold()) {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (TUBEMQ-98) Fix typo & Simplify 'instanceof' judgment
[ https://issues.apache.org/jira/browse/TUBEMQ-98?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17105017#comment-17105017 ] viviel commented on TUBEMQ-98: -- OK > Fix typo & Simplify 'instanceof' judgment > - > > Key: TUBEMQ-98 > URL: https://issues.apache.org/jira/browse/TUBEMQ-98 > Project: Apache TubeMQ > Issue Type: Improvement >Reporter: viviel >Assignee: viviel >Priority: Low > Labels: pull-request-available > > 1. Fix type > ared -> area > partionStr -> partitionStr > getPartitonByKey -> getPartitionByKey > 2. Simplify 'instanceof' judgment > This code > {code:java} > if (e instanceof IOException || e instanceof Exception) { > // > } > {code} > It can be replaced by the following code > {code:java} > if (e instanceof Exception) { > // > } > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (TUBEMQ-98) Fix typo & Simplify 'instanceof' judgment
viviel created TUBEMQ-98: Summary: Fix typo & Simplify 'instanceof' judgment Key: TUBEMQ-98 URL: https://issues.apache.org/jira/browse/TUBEMQ-98 Project: Apache TubeMQ Issue Type: Improvement Reporter: viviel Assignee: viviel 1. Fix type ared -> area partionStr -> partitionStr getPartitonByKey -> getPartitionByKey 2. Simplify 'instanceof' judgment This code {code:java} if (e instanceof IOException || e instanceof Exception) { // } {code} It can be replaced by the following code {code:java} if (e instanceof Exception) { // } {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (TUBEMQ-94) Substitute the parameterized type for core module
[ https://issues.apache.org/jira/browse/TUBEMQ-94?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17104016#comment-17104016 ] viviel commented on TUBEMQ-94: -- thinks:D > Substitute the parameterized type for core module > - > > Key: TUBEMQ-94 > URL: https://issues.apache.org/jira/browse/TUBEMQ-94 > Project: Apache TubeMQ > Issue Type: Improvement >Reporter: Guo Jiwei >Assignee: viviel >Priority: Low > Labels: pull-request-available > Attachments: image-2020-05-11-10-29-28-044.png > > > 1. Destination > Checkout the whole classes, and find out the fields that need to be > substituted. > After that, make sure it compiles successfully。 > {code:java} > mvn clean package -DskipTests > {code} > 2. Reminder >We should only substitute the parameterized type , for other issues, > please talk or resolve in other threads. > 3. Reference > https://lists.apache.org/x/thread.html/rbcc8adf5ae15b7ffa9fe2c9838627a5f69b27a289ec0594038b1738e@%3Cdev.tubemq.apache.org%3E > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Assigned] (TUBEMQ-91) replace explicit type with <>
[ https://issues.apache.org/jira/browse/TUBEMQ-91?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] viviel reassigned TUBEMQ-91: Assignee: viviel > replace explicit type with <> > - > > Key: TUBEMQ-91 > URL: https://issues.apache.org/jira/browse/TUBEMQ-91 > Project: Apache TubeMQ > Issue Type: Improvement >Reporter: viviel >Assignee: viviel >Priority: Low > Labels: pull-request-available > > replace explicit type with <> > example: List list = new ArrayList(); -> List list = > new ArrayList<>(); > scope of influence: > package: org.apache.tubemq.client.consumer -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (TUBEMQ-91) replace explicit type with <>
viviel created TUBEMQ-91: Summary: replace explicit type with <> Key: TUBEMQ-91 URL: https://issues.apache.org/jira/browse/TUBEMQ-91 Project: Apache TubeMQ Issue Type: Improvement Reporter: viviel replace explicit type with <> example: List list = new ArrayList(); -> List list = new ArrayList<>(); scope of influence: package: org.apache.tubemq.client.consumer -- This message was sent by Atlassian Jira (v8.3.4#803005)