[jira] [Commented] (SCB-477) sdk guava‘s version need to update from 16.0.1 to 19.0

2018-04-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16436622#comment-16436622
 ] 

ASF GitHub Bot commented on SCB-477:


liubao68 closed pull request #645: [SCB-477] sdk guava's version need to update 
to 19.0
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/645
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/foundations/foundation-common/src/main/java/com/google/common/eventbus/SimpleEventBus.java
 
b/foundations/foundation-common/src/main/java/com/google/common/eventbus/SimpleEventBus.java
deleted file mode 100644
index 55c370801..0
--- 
a/foundations/foundation-common/src/main/java/com/google/common/eventbus/SimpleEventBus.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.google.common.eventbus;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-import org.apache.servicecomb.foundation.common.concurrent.ConcurrentHashMapEx;
-
-import com.google.common.collect.Multimap;
-
-/**
- * EventBus has performance problem, we create a new simpler eventBus
- * 
- * extend from EventBus is not necessary
- * but EventManager has a public EventBus field, we need to make compatible
- * 
- * different between this class and EventBus:
- * 1. not support cycle trigger:
- *   subscribe a, when handle a, trigger event b
- *   subscribe b, when handle b, trigger event a
- */
-public class SimpleEventBus extends com.google.common.eventbus.EventBus {
-  private AnnotatedSubscriberFinder finder = new AnnotatedSubscriberFinder();
-
-  // key is event type
-  // value is CopyOnWriteArrayList
-  private Map, List> subscribersByType = new 
ConcurrentHashMapEx<>();
-
-  @Override
-  public void register(Object listener) {
-Multimap, EventSubscriber> methodsInListener = 
finder.findAllSubscribers(listener);
-
-for (Entry, Collection> entry : 
methodsInListener.asMap().entrySet()) {
-  List exists = 
subscribersByType.computeIfAbsent(entry.getKey(), cls -> {
-return new CopyOnWriteArrayList<>();
-  });
-  exists.addAll(entry.getValue());
-}
-  }
-
-  @Override
-  public void unregister(Object listener) {
-Multimap, EventSubscriber> methodsInListener = 
finder.findAllSubscribers(listener);
-
-for (Entry, Collection> entry : 
methodsInListener.asMap().entrySet()) {
-  List exists = subscribersByType.get(entry.getKey());
-  if (exists == null) {
-continue;
-  }
-
-  exists.removeAll(entry.getValue());
-}
-  }
-
-  @Override
-  public void post(Object event) {
-Set> dispatchTypes = flattenHierarchy(event.getClass());
-for (Class dispatchType : dispatchTypes) {
-  List subscribers = 
subscribersByType.getOrDefault(dispatchType, Collections.emptyList());
-
-  for (EventSubscriber subscriber : subscribers) {
-dispatch(event, subscriber);
-  }
-}
-  }
-}
diff --git 
a/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/event/EventManager.java
 
b/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/event/EventManager.java
index 9672a92dc..cb72a21a4 100644
--- 
a/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/event/EventManager.java
+++ 
b/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/event/EventManager.java
@@ -18,14 +18,13 @@
 package org.apache.servicecomb.foundation.common.event;
 
 import com.google.common.eventbus.EventBus;
-import com.google.common.eventbus.SimpleEventBus;
 
 /**
  * EventManager for chassis events
  *
  */
 public class EventManager {
-  public static EventBus eventBus = new SimpleEventBus();
+  public static EventBus eventBus

[jira] [Commented] (SCB-477) sdk guava‘s version need to update from 16.0.1 to 19.0

2018-04-11 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16434881#comment-16434881
 ] 

ASF GitHub Bot commented on SCB-477:


coveralls commented on issue #645: [SCB-477] sdk guava's version need to update 
to 19.0
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/645#issuecomment-380664847
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/16474501/badge)](https://coveralls.io/builds/16474501)
   
   Coverage decreased (-0.02%) to 87.474% when pulling 
**ea7fb801fc01822790507196a00a5413f13e9400 on weichao666:updateguava** into 
**6f66e2622b0c056d26682672b881c15920f06fba on apache:master**.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> sdk guava‘s version need to update from 16.0.1 to 19.0
> --
>
> Key: SCB-477
> URL: https://issues.apache.org/jira/browse/SCB-477
> Project: Apache ServiceComb
>  Issue Type: Improvement
>  Components: Java-Chassis
>Reporter: WeiChao
>Assignee: WeiChao
>Priority: Major
>
> sdk guava‘s version need to update from 16.0.1 to 19.0



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-477) sdk guava‘s version need to update from 16.0.1 to 19.0

2018-04-11 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16434860#comment-16434860
 ] 

ASF GitHub Bot commented on SCB-477:


weichao666 opened a new pull request #645: [SCB-477] sdk guava's version need 
to update to 19.0
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/645
 
 
   Follow this checklist to help us incorporate your contribution quickly and 
easily:
   
- [ ] Make sure there is a [JIRA 
issue](https://issues.apache.org/jira/browse/SCB) filed for the change (usually 
before you start working on it).  Trivial changes like typos do not require a 
JIRA issue.  Your pull request should address just this issue, without pulling 
in other changes.
- [ ] Each commit in the pull request should have a meaningful subject line 
and body.
- [ ] Format the pull request title like `[SCB-XXX] Fixes bug in 
ApproximateQuantiles`, where you replace `SCB-XXX` with the appropriate JIRA 
issue.
- [ ] Write a pull request description that is detailed enough to 
understand what the pull request does, how, and why.
- [ ] Run `mvn clean install` to make sure basic checks pass. A more 
thorough check will be performed on your pull request automatically.
- [ ] If this contribution is large, please file an Apache [Individual 
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   ---
   sdk guava's version need to update from 16.0.1 to 19.0


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> sdk guava‘s version need to update from 16.0.1 to 19.0
> --
>
> Key: SCB-477
> URL: https://issues.apache.org/jira/browse/SCB-477
> Project: Apache ServiceComb
>  Issue Type: Improvement
>  Components: Java-Chassis
>Reporter: WeiChao
>Assignee: WeiChao
>Priority: Major
>
> sdk guava‘s version need to update from 16.0.1 to 19.0



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-477) sdk guava‘s version need to update from 16.0.1 to 19.0

2018-04-11 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SCB-477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16434863#comment-16434863
 ] 

ASF GitHub Bot commented on SCB-477:


weichao666 commented on issue #645: [SCB-477] sdk guava's version need to 
update to 19.0
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/645#issuecomment-380658448
 
 
   
![image](https://user-images.githubusercontent.com/30716999/38653838-37a3e4b0-3e3f-11e8-9727-c0ab5fac7e87.png)
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> sdk guava‘s version need to update from 16.0.1 to 19.0
> --
>
> Key: SCB-477
> URL: https://issues.apache.org/jira/browse/SCB-477
> Project: Apache ServiceComb
>  Issue Type: Improvement
>  Components: Java-Chassis
>Reporter: WeiChao
>Assignee: WeiChao
>Priority: Major
>
> sdk guava‘s version need to update from 16.0.1 to 19.0



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)