You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by swgkg <gi...@git.apache.org> on 2014/11/24 14:46:58 UTC
[GitHub] stratos pull request: Meta data service improvement with code refa...
GitHub user swgkg opened a pull request:
https://github.com/apache/stratos/pull/119
Meta data service improvement with code refactor
Fixes for STRATOS-998 and STRATOS-999
This PR contains-
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/gayangunarathne/stratos master-reviewfixes
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/stratos/pull/119.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #119
----
commit 861a69030150144bb1cae35f7cd378cccfd0220b
Author: gayan <ga...@puppet.gayan.org>
Date: 2014-11-24T13:41:50Z
Update meta data service - STRATOS-998
commit 7f9afdf76ddc8594a9c9cc9bb8481e18d39d545f
Author: gayan <ga...@puppet.gayan.org>
Date: 2014-11-24T13:42:33Z
Update meta data service - STRATOS-998
commit 9836fa146c2da27c1219db19c9bec987233d12af
Author: gayan <ga...@puppet.gayan.org>
Date: 2014-11-24T13:43:36Z
STRATOS-999
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] stratos pull request: Meta data service improvement with code refa...
Posted by swgkg <gi...@git.apache.org>.
Github user swgkg commented on a diff in the pull request:
https://github.com/apache/stratos/pull/119#discussion_r22098538
--- Diff: components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/util/Util.java ---
@@ -94,12 +101,17 @@ else if (isNumber(array[0]) && "*".equals(array[1])) {
throw new RuntimeException(String.format("Tenant range %s is not valid", tenantRange));
}
- public static boolean isNumber(String s) {
+ /**
+ * Check given string is a number
+ * @param inputStr String to be checked
+ * @return Boolean of given string is a number
+ */
+ public static boolean isNumber(String inputStr) {
try {
- Integer.parseInt(s);
+ Integer.parseInt(inputStr);
--- End diff --
Thanks Ramith for pointing this.
We removed this method now and change it to the Apache commons isNumber method.It will cover with PR#157
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] stratos pull request: Meta data service improvement with code refa...
Posted by swgkg <gi...@git.apache.org>.
Github user swgkg commented on the pull request:
https://github.com/apache/stratos/pull/119#issuecomment-67806810
Thanks.
This is cover with PR#162
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] stratos pull request: Meta data service improvement with code refa...
Posted by muthulee <gi...@git.apache.org>.
Github user muthulee commented on a diff in the pull request:
https://github.com/apache/stratos/pull/119#discussion_r22154213
--- Diff: components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/util/Util.java ---
@@ -169,20 +179,31 @@ public static Integer getNumericSystemProperty(Integer defaultValue, String prop
}
}
+ /**
+ * Get the Message topic name for event
+ * @param event event name
+ * @return String topic name of the event
+ */
public static String getMessageTopicName(Event event) {
return event.getClass().getName().substring(BEGIN_INDEX).replace(".", "/");
}
- public static String getEventNameForTopic(String arg0) {
- return "org.apache.stratos.messaging.event.".concat(arg0.replace("/", "."));
+ /**
+ * Get the event name for topic
+ * @param topic topic Name
+ * @return String Event name for topic
+ */
+ public static String getEventNameForTopic(String topic) {
+ return "org.apache.stratos.messaging.event.".concat(topic.replace("/", "."));
--- End diff --
Consider using a Constant.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] stratos pull request: Meta data service improvement with code refa...
Posted by ramith <gi...@git.apache.org>.
Github user ramith commented on a diff in the pull request:
https://github.com/apache/stratos/pull/119#discussion_r22095342
--- Diff: components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/util/Util.java ---
@@ -94,12 +101,17 @@ else if (isNumber(array[0]) && "*".equals(array[1])) {
throw new RuntimeException(String.format("Tenant range %s is not valid", tenantRange));
}
- public static boolean isNumber(String s) {
+ /**
+ * Check given string is a number
+ * @param inputStr String to be checked
+ * @return Boolean of given string is a number
+ */
+ public static boolean isNumber(String inputStr) {
try {
- Integer.parseInt(s);
+ Integer.parseInt(inputStr);
--- End diff --
https://commons.apache.org/proper/commons-lang/javadocs/api-2.6/org/apache/commons/lang/math/NumberUtils.html#isNumber%28java.lang.String%29 can't be of use?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] stratos pull request: Meta data service improvement with code refa...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/stratos/pull/119
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] stratos pull request: Meta data service improvement with code refa...
Posted by ramith <gi...@git.apache.org>.
Github user ramith commented on a diff in the pull request:
https://github.com/apache/stratos/pull/119#discussion_r22095407
--- Diff: components/org.apache.stratos.metadataservice/src/main/java/org/apache/stratos/metadataservice/registry/CarbonRegistry.java ---
@@ -112,7 +116,7 @@ public boolean deleteApplication(String applicationId) throws RegistryException
if(StringUtils.isEmpty(applicationId)){
--- End diff --
bettern sementics are given by : https://commons.apache.org/proper/commons-lang/javadocs/api-2.6/org/apache/commons/lang/StringUtils.html#isBlank%28java.lang.String%29 isn't it?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] stratos pull request: Meta data service improvement with code refa...
Posted by swgkg <gi...@git.apache.org>.
Github user swgkg commented on a diff in the pull request:
https://github.com/apache/stratos/pull/119#discussion_r22098577
--- Diff: components/org.apache.stratos.metadataservice/src/main/java/org/apache/stratos/metadataservice/registry/CarbonRegistry.java ---
@@ -112,7 +116,7 @@ public boolean deleteApplication(String applicationId) throws RegistryException
if(StringUtils.isEmpty(applicationId)){
--- End diff --
Thanks Ramith.
"isBlank" is more suitable here as it is checking String is whitespace, empty ("") or null.
This is update with the PR#157
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---