[jira] [Commented] (EAGLE-440) Alert mongodb storage refine

2016-08-11 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/EAGLE-440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15416661#comment-15416661
 ] 

ASF GitHub Bot commented on EAGLE-440:
--

Github user RalphSu commented on the issue:

https://github.com/apache/incubator-eagle/pull/328
  
LGTM


> Alert mongodb storage refine
> 
>
> Key: EAGLE-440
> URL: https://issues.apache.org/jira/browse/EAGLE-440
> Project: Eagle
>  Issue Type: Improvement
>Reporter: Zeng, Bryant
>Assignee: Zeng, Bryant
>
> Currently, some Alert Mongo Collection is too large. Consider future 
> increase, need to split large collection to some small collections.
> To back compatible, need to keep the interface as the same as before. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (EAGLE-440) Alert mongodb storage refine

2016-08-10 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/EAGLE-440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15416431#comment-15416431
 ] 

ASF GitHub Bot commented on EAGLE-440:
--

GitHub user mizeng opened a pull request:

https://github.com/apache/incubator-eagle/pull/328

EAGLE-440: Alert mongodb storage refine



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/mizeng/incubator-eagle develop

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-eagle/pull/328.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 #328


commit 678437aadb5ca6e5c7256fabd40b4966e4227911
Author: mizeng 
Date:   2016-08-10T08:04:16Z

EAGLE-440: Alert mongodb storage refine




> Alert mongodb storage refine
> 
>
> Key: EAGLE-440
> URL: https://issues.apache.org/jira/browse/EAGLE-440
> Project: Eagle
>  Issue Type: Improvement
>Reporter: Zeng, Bryant
>Assignee: Zeng, Bryant
>
> Currently, some Alert Mongo Collection is too large. Consider future 
> increase, need to split large collection to some small collections.
> To back compatible, need to keep the interface as the same as before. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (EAGLE-440) Alert mongodb storage refine

2016-08-10 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/EAGLE-440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15416424#comment-15416424
 ] 

ASF GitHub Bot commented on EAGLE-440:
--

Github user mizeng closed the pull request at:

https://github.com/apache/incubator-eagle/pull/324


> Alert mongodb storage refine
> 
>
> Key: EAGLE-440
> URL: https://issues.apache.org/jira/browse/EAGLE-440
> Project: Eagle
>  Issue Type: Improvement
>Reporter: Zeng, Bryant
>Assignee: Zeng, Bryant
>
> Currently, some Alert Mongo Collection is too large. Consider future 
> increase, need to split large collection to some small collections.
> To back compatible, need to keep the interface as the same as before. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (EAGLE-440) Alert mongodb storage refine

2016-08-10 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/EAGLE-440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15416372#comment-15416372
 ] 

ASF GitHub Bot commented on EAGLE-440:
--

Github user RalphSu commented on a diff in the pull request:

https://github.com/apache/incubator-eagle/pull/324#discussion_r74361599
  
--- Diff: 
eagle-core/eagle-alert-parent/eagle-alert/alert-metadata-parent/alert-metadata/src/main/java/org/apache/eagle/alert/metadata/impl/MongoMetadataDaoImpl.java
 ---
@@ -285,6 +318,21 @@ public OpResult removePublishmentType(String pubType) {
 return remove(publishmentType, pubType);
 }
 
+private  OpResult addOne(MongoCollection collection, T t) 
{
+OpResult result = new OpResult();
+try {
+String json = mapper.writeValueAsString(t);
+collection.insertOne(Document.parse(json));
+result.code = 200;
+result.message = "add state succeed!";
+} catch (Exception e) {
+result.code = 400;
+result.message = e.getMessage();
+LOG.error("", e);
--- End diff --

better to have meaningful message


> Alert mongodb storage refine
> 
>
> Key: EAGLE-440
> URL: https://issues.apache.org/jira/browse/EAGLE-440
> Project: Eagle
>  Issue Type: Improvement
>Reporter: Zeng, Bryant
>Assignee: Zeng, Bryant
>
> Currently, some Alert Mongo Collection is too large. Consider future 
> increase, need to split large collection to some small collections.
> To back compatible, need to keep the interface as the same as before. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (EAGLE-440) Alert mongodb storage refine

2016-08-10 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/EAGLE-440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15414888#comment-15414888
 ] 

ASF GitHub Bot commented on EAGLE-440:
--

GitHub user mizeng opened a pull request:

https://github.com/apache/incubator-eagle/pull/324

EAGLE-440: Alert mongodb storage refine



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/mizeng/incubator-eagle develop

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-eagle/pull/324.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 #324


commit 1fe32803f5c8c93ef9c7f29fe68b5fdc194d5368
Author: mizeng 
Date:   2016-08-10T08:04:16Z

EAGLE-440: Alert mongodb storage refine




> Alert mongodb storage refine
> 
>
> Key: EAGLE-440
> URL: https://issues.apache.org/jira/browse/EAGLE-440
> Project: Eagle
>  Issue Type: Improvement
>Reporter: ZengMing
>Assignee: ZengMing
>
> Currently, some Alert Mongo Collection is too large. Consider future 
> increase, need to split large collection to some small collections.
> To back compatible, need to keep the interface as the same as before. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)