[jira] [Commented] (MESOS-3023) Factoring out the pattern for URL generation
[ https://issues.apache.org/jira/browse/MESOS-3023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14651586#comment-14651586 ] Bernd Mathiske commented on MESOS-3023: --- This latest patch first factors out the URL generation, then inserts white space: commit 9c905880abc02e064f0430afab12afa6073549c8 Author: Artem Harutyunyan ar...@mesosphere.io Date: Mon Aug 3 10:22:15 2015 +0200 Factored out the pattern for URL generation in (another) fetcher test. Review: https://reviews.apache.org/r/36946 Factoring out the pattern for URL generation - Key: MESOS-3023 URL: https://issues.apache.org/jira/browse/MESOS-3023 Project: Mesos Issue Type: Task Reporter: Artem Harutyunyan Assignee: Klaus Ma Priority: Minor Labels: beginner, mesosphere, newbie fetcher_test.cpp uses the following code for generating URLs: string url = http://; + net::getHostname(process.self().address.ip).get() + : + stringify(process.self().address.port) + / + process.self().id it would be good to isolate that code in a function, and replace the code above with something like: string url = http://; + endpoint_url(process, uri_test); -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MESOS-3023) Factoring out the pattern for URL generation
[ https://issues.apache.org/jira/browse/MESOS-3023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14647933#comment-14647933 ] Artem Harutyunyan commented on MESOS-3023: -- There is another function where the pattern needs to be applied. https://reviews.apache.org/r/36946/ Factoring out the pattern for URL generation - Key: MESOS-3023 URL: https://issues.apache.org/jira/browse/MESOS-3023 Project: Mesos Issue Type: Task Reporter: Artem Harutyunyan Assignee: Klaus Ma Priority: Minor Labels: beginner, mesosphere, newbie fetcher_test.cpp uses the following code for generating URLs: string url = http://; + net::getHostname(process.self().address.ip).get() + : + stringify(process.self().address.port) + / + process.self().id it would be good to isolate that code in a function, and replace the code above with something like: string url = http://; + endpoint_url(process, uri_test); -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MESOS-3023) Factoring out the pattern for URL generation
[ https://issues.apache.org/jira/browse/MESOS-3023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14648663#comment-14648663 ] Klaus Ma commented on MESOS-3023: - I'd suggest to keep the code for FetcherTest.OSNetUriSpaceTest; because URL should also trim the space of schema, it will make this UT invalid. BTW, should we log an ticket for URL to trim the schema? Factoring out the pattern for URL generation - Key: MESOS-3023 URL: https://issues.apache.org/jira/browse/MESOS-3023 Project: Mesos Issue Type: Task Reporter: Artem Harutyunyan Assignee: Klaus Ma Priority: Minor Labels: beginner, mesosphere, newbie fetcher_test.cpp uses the following code for generating URLs: string url = http://; + net::getHostname(process.self().address.ip).get() + : + stringify(process.self().address.port) + / + process.self().id it would be good to isolate that code in a function, and replace the code above with something like: string url = http://; + endpoint_url(process, uri_test); -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MESOS-3023) Factoring out the pattern for URL generation
[ https://issues.apache.org/jira/browse/MESOS-3023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14633582#comment-14633582 ] Bernd Mathiske commented on MESOS-3023: --- [~klaus1982] I can shepherd if you like. Factoring out the pattern for URL generation - Key: MESOS-3023 URL: https://issues.apache.org/jira/browse/MESOS-3023 Project: Mesos Issue Type: Task Reporter: Artem Harutyunyan Assignee: Klaus Ma Priority: Minor Labels: beginner, mesosphere, newbie fetcher_test.cpp uses the following code for generating URLs: string url = http://; + net::getHostname(process.self().address.ip).get() + : + stringify(process.self().address.port) + / + process.self().id it would be good to isolate that code in a function, and replace the code above with something like: string url = http://; + endpoint_url(process, uri_test); -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MESOS-3023) Factoring out the pattern for URL generation
[ https://issues.apache.org/jira/browse/MESOS-3023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14633705#comment-14633705 ] Klaus Ma commented on MESOS-3023: - Hi [~bernd-mesos], That'll be great if you can help me on this. For now, I've updated the code in https://reviews.apache.org/r/36501/; but because of MESOS-2862, our code should be modified accordingly. Anyway, do you have suggestion to use URL to build testing url. If any comments, please let me know. Thanks Klaus Factoring out the pattern for URL generation - Key: MESOS-3023 URL: https://issues.apache.org/jira/browse/MESOS-3023 Project: Mesos Issue Type: Task Reporter: Artem Harutyunyan Assignee: Klaus Ma Priority: Minor Labels: beginner, mesosphere, newbie fetcher_test.cpp uses the following code for generating URLs: string url = http://; + net::getHostname(process.self().address.ip).get() + : + stringify(process.self().address.port) + / + process.self().id it would be good to isolate that code in a function, and replace the code above with something like: string url = http://; + endpoint_url(process, uri_test); -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MESOS-3023) Factoring out the pattern for URL generation
[ https://issues.apache.org/jira/browse/MESOS-3023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14632520#comment-14632520 ] Klaus Ma commented on MESOS-3023: - [~vi...@twitter.com]/[~bmahler], would you help to shepherd this? Factoring out the pattern for URL generation - Key: MESOS-3023 URL: https://issues.apache.org/jira/browse/MESOS-3023 Project: Mesos Issue Type: Task Reporter: Artem Harutyunyan Assignee: Klaus Ma Priority: Minor Labels: beginner, mesosphere, newbie fetcher_test.cpp uses the following code for generating URLs: string url = http://; + net::getHostname(process.self().address.ip).get() + : + stringify(process.self().address.port) + / + process.self().id it would be good to isolate that code in a function, and replace the code above with something like: string url = http://; + endpoint_url(process, uri_test); -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MESOS-3023) Factoring out the pattern for URL generation
[ https://issues.apache.org/jira/browse/MESOS-3023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14631364#comment-14631364 ] Klaus Ma commented on MESOS-3023: - Hi [~haosdent], I just go through the code, I found we have process::http::URL already for url. And we can get the url string by operator instead of a new function. I updated the code diff by using process::http::URL in UT. Anyway, your comments is very useful to me :). Thanks Klaus Factoring out the pattern for URL generation - Key: MESOS-3023 URL: https://issues.apache.org/jira/browse/MESOS-3023 Project: Mesos Issue Type: Task Reporter: Artem Harutyunyan Assignee: Klaus Ma Priority: Minor Labels: beginner, mesosphere, newbie fetcher_test.cpp uses the following code for generating URLs: string url = http://; + net::getHostname(process.self().address.ip).get() + : + stringify(process.self().address.port) + / + process.self().id it would be good to isolate that code in a function, and replace the code above with something like: string url = http://; + endpoint_url(process, uri_test); -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MESOS-3023) Factoring out the pattern for URL generation
[ https://issues.apache.org/jira/browse/MESOS-3023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14630891#comment-14630891 ] haosdent commented on MESOS-3023: - Hi, [~klaus1982] Thank you for your patch, I also write some new review to it. Maybe you need find a committer to shepherd this. Because a shepherd committer could give you more advice and help you to commit it. :-) And IMHO, if this pattern only use in this one place, do we still need factoring out the pattern? Or waiting some other places also need use this pattern, and generic it at that time? Factoring out the pattern for URL generation - Key: MESOS-3023 URL: https://issues.apache.org/jira/browse/MESOS-3023 Project: Mesos Issue Type: Task Reporter: Artem Harutyunyan Assignee: Klaus Ma Priority: Minor Labels: beginner, mesosphere, newbie fetcher_test.cpp uses the following code for generating URLs: string url = http://; + net::getHostname(process.self().address.ip).get() + : + stringify(process.self().address.port) + / + process.self().id it would be good to isolate that code in a function, and replace the code above with something like: string url = http://; + endpoint_url(process, uri_test); -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MESOS-3023) Factoring out the pattern for URL generation
[ https://issues.apache.org/jira/browse/MESOS-3023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14631537#comment-14631537 ] Marco Massenzio commented on MESOS-3023: Thanks for doing this! I haven't looked at the review, but I'm aware of some conversations about creating a {{URI}} class in {{stout}}. That one could have a static factory method. If this is exactly what you have done (sorry, on a train, not easy to browse around) I'm sure you'll find it easy to get either of [~vinodkone] or @benmahler to shepherd this :) Factoring out the pattern for URL generation - Key: MESOS-3023 URL: https://issues.apache.org/jira/browse/MESOS-3023 Project: Mesos Issue Type: Task Reporter: Artem Harutyunyan Assignee: Klaus Ma Priority: Minor Labels: beginner, mesosphere, newbie fetcher_test.cpp uses the following code for generating URLs: string url = http://; + net::getHostname(process.self().address.ip).get() + : + stringify(process.self().address.port) + / + process.self().id it would be good to isolate that code in a function, and replace the code above with something like: string url = http://; + endpoint_url(process, uri_test); -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MESOS-3023) Factoring out the pattern for URL generation
[ https://issues.apache.org/jira/browse/MESOS-3023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14632241#comment-14632241 ] Klaus Ma commented on MESOS-3023: - hi Macro, this is a code refine of ut code. we already have the code on url parsing. i'll ping them to confirm whether commit. Factoring out the pattern for URL generation - Key: MESOS-3023 URL: https://issues.apache.org/jira/browse/MESOS-3023 Project: Mesos Issue Type: Task Reporter: Artem Harutyunyan Assignee: Klaus Ma Priority: Minor Labels: beginner, mesosphere, newbie fetcher_test.cpp uses the following code for generating URLs: string url = http://; + net::getHostname(process.self().address.ip).get() + : + stringify(process.self().address.port) + / + process.self().id it would be good to isolate that code in a function, and replace the code above with something like: string url = http://; + endpoint_url(process, uri_test); -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MESOS-3023) Factoring out the pattern for URL generation
[ https://issues.apache.org/jira/browse/MESOS-3023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14626420#comment-14626420 ] Klaus Ma commented on MESOS-3023: - I've a fix for this defect; I'll apply the related permission to trigger review process. Factoring out the pattern for URL generation - Key: MESOS-3023 URL: https://issues.apache.org/jira/browse/MESOS-3023 Project: Mesos Issue Type: Task Reporter: Artem Harutyunyan Priority: Minor Labels: beginner, mesosphere, newbie fetcher_test.cpp uses the following code for generating URLs: string url = http://; + net::getHostname(process.self().address.ip).get() + : + stringify(process.self().address.port) + / + process.self().id it would be good to isolate that code in a function, and replace the code above with something like: string url = http://; + endpoint_url(process, uri_test); -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MESOS-3023) Factoring out the pattern for URL generation
[ https://issues.apache.org/jira/browse/MESOS-3023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14627446#comment-14627446 ] Klaus Ma commented on MESOS-3023: - Hi team, Can you help to review the code diff for this improvement? https://reviews.apache.org/r/36501/ If any comments, please let me know. Thanks Klaus Factoring out the pattern for URL generation - Key: MESOS-3023 URL: https://issues.apache.org/jira/browse/MESOS-3023 Project: Mesos Issue Type: Task Reporter: Artem Harutyunyan Assignee: Klaus Ma Priority: Minor Labels: beginner, mesosphere, newbie fetcher_test.cpp uses the following code for generating URLs: string url = http://; + net::getHostname(process.self().address.ip).get() + : + stringify(process.self().address.port) + / + process.self().id it would be good to isolate that code in a function, and replace the code above with something like: string url = http://; + endpoint_url(process, uri_test); -- This message was sent by Atlassian JIRA (v6.3.4#6332)