From 83409cab07027fbe94e1b33fcd454263c6a2b000 Mon Sep 17 00:00:00 2001 From: zonghaishang Date: Mon, 27 May 2019 14:20:53 +0800 Subject: [PATCH 1/7] register NewLeastActiveLoadBalance --- cluster/loadbalance/least_active.go | 100 ++++++++++++++++++++++++++++ filter/RpcStatus.go | 68 +++++++++++++++++++ filter/impl/active_filter.go | 50 ++++++++++++++ 3 files changed, 218 insertions(+) create mode 100644 cluster/loadbalance/least_active.go create mode 100644 filter/RpcStatus.go create mode 100644 filter/impl/active_filter.go diff --git a/cluster/loadbalance/least_active.go b/cluster/loadbalance/least_active.go new file mode 100644 index 0000000000..588793578f --- /dev/null +++ b/cluster/loadbalance/least_active.go @@ -0,0 +1,100 @@ +// Licensed 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. + +// @author yiji@apache.org +package loadbalance + +import ( + "github.com/dubbo/go-for-apache-dubbo/cluster" + "github.com/dubbo/go-for-apache-dubbo/common/extension" + "github.com/dubbo/go-for-apache-dubbo/filter" + "github.com/dubbo/go-for-apache-dubbo/protocol" + "math/rand" +) + +const ( + leastActive = "leastactive" +) + +func init() { + extension.SetLoadbalance(leastActive, NewLeastActiveLoadBalance) +} + +type leastActiveLoadBalance struct { +} + +func NewLeastActiveLoadBalance() cluster.LoadBalance { + return &leastActiveLoadBalance{} +} + +func (lb *leastActiveLoadBalance) Select(invokers []protocol.Invoker, invocation protocol.Invocation) protocol.Invoker { + + count := len(invokers) + if invokers == nil || count == 0 { + return nil + } + if count == 1 { + return invokers[0] + } + + var ( + leastActive int32 = -1 // The least active value of all invokers + totalWeight int64 = 0 // The number of invokers having the same least active value (leastActive) + firstWeight int64 = 0 // Initial value, used for comparision + leastIndexes = make([]int, count) // The index of invokers having the same least active value (leastActive) + leastCount = 0 // The number of invokers having the same least active value (leastActive) + sameWeight = true // Every invoker has the same weight value? + ) + + for i := 0; i < count; i++ { + invoker := invokers[i] + // Active number + active := filter.GetStatus(invoker.GetUrl(), invocation.MethodName()).GetActive() + // current weight (maybe in warmUp) + weight := GetWeight(invoker, invocation) + // There are smaller active services + if leastActive == -1 || active < leastActive { + leastActive = active + leastIndexes[0] = i + leastCount = 1 // next available leastIndex offset + totalWeight = weight + firstWeight = weight + sameWeight = true + } else if active == leastActive { + leastIndexes[leastCount] = i + totalWeight += weight + leastCount++ + + if sameWeight && (i > 0) && weight != firstWeight { + sameWeight = false + } + } + } + + if leastCount == 1 { + return invokers[0] + } + + if !sameWeight && totalWeight > 0 { + offsetWeight := rand.Int63n(totalWeight) + 1 + for i := 0; i < leastCount; i++ { + leastIndex := leastIndexes[i] + offsetWeight -= GetWeight(invokers[i], invocation) + if offsetWeight <= 0 { + return invokers[leastIndex] + } + } + } + + index := leastIndexes[rand.Intn(leastCount)] + return invokers[index] +} diff --git a/filter/RpcStatus.go b/filter/RpcStatus.go new file mode 100644 index 0000000000..2148594da6 --- /dev/null +++ b/filter/RpcStatus.go @@ -0,0 +1,68 @@ +// Licensed 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. + +// @author yiji@apache.org +package filter + +import ( + "github.com/dubbo/go-for-apache-dubbo/common" + "sync" + "sync/atomic" +) + +var ( + methodStatistics = sync.Map{} // url -> { methodName : RpcStatus} +) + +type RpcStatus struct { + active int32 +} + +func (rpc *RpcStatus) GetActive() int32 { + return atomic.LoadInt32(&rpc.active) +} + +func GetStatus(url common.URL, methodName string) *RpcStatus { + identity := url.Key() + methodMap, found := methodStatistics.Load(identity) + if !found { + methodMap = sync.Map{} + methodStatistics.Store(identity, methodMap) + } + + methodActive := methodMap.(sync.Map) + rpcStatus, found := methodActive.Load(methodName) + if !found { + rpcStatus = RpcStatus{} + methodActive.Store(methodName, rpcStatus) + } + + status := rpcStatus.(RpcStatus) + return &status +} + +func BeginCount(url common.URL, methodName string) { + beginCount0(GetStatus(url, methodName)) +} + +func EndCount(url common.URL, methodName string) { + endCount0(GetStatus(url, methodName)) +} + +// private methods +func beginCount0(rpcStatus *RpcStatus) { + atomic.AddInt32(&rpcStatus.active, 1) +} + +func endCount0(rpcStatus *RpcStatus) { + atomic.AddInt32(&rpcStatus.active, -1) +} diff --git a/filter/impl/active_filter.go b/filter/impl/active_filter.go new file mode 100644 index 0000000000..eaaaeabd26 --- /dev/null +++ b/filter/impl/active_filter.go @@ -0,0 +1,50 @@ +// Licensed 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. + +// @author yiji@apache.org +package impl + +import ( + "github.com/dubbo/go-for-apache-dubbo/common/logger" +) + +import ( + "github.com/dubbo/go-for-apache-dubbo/common/extension" + "github.com/dubbo/go-for-apache-dubbo/filter" + "github.com/dubbo/go-for-apache-dubbo/protocol" +) + +const active = "active" + +func init() { + extension.SetFilter(active, GetActiveFilter) +} + +type ActiveFilter struct { +} + +func (ef *ActiveFilter) Invoke(invoker protocol.Invoker, invocation protocol.Invocation) protocol.Result { + logger.Infof("invoking active filter. %v,%v", invocation.MethodName(), len(invocation.Arguments())) + + filter.BeginCount(invoker.GetUrl(), invocation.MethodName()) + return invoker.Invoke(invocation) +} + +func (ef *ActiveFilter) OnResponse(result protocol.Result, invoker protocol.Invoker, invocation protocol.Invocation) protocol.Result { + + filter.EndCount(invoker.GetUrl(), invocation.MethodName()) + return result +} + +func GetActiveFilter() filter.Filter { + return &ActiveFilter{} +} From a97fa47c4c117404a5861ff52f67915a3a9390a9 Mon Sep 17 00:00:00 2001 From: zonghaishang Date: Wed, 12 Jun 2019 15:29:53 +0800 Subject: [PATCH 2/7] format code --- cluster/loadbalance/least_active.go | 21 +++++++++++---------- filter/impl/active_filter.go | 4 ++-- {filter => protocol}/RpcStatus.go | 9 ++++++--- 3 files changed, 19 insertions(+), 15 deletions(-) rename {filter => protocol}/RpcStatus.go (94%) diff --git a/cluster/loadbalance/least_active.go b/cluster/loadbalance/least_active.go index 588793578f..092b62a9fb 100644 --- a/cluster/loadbalance/least_active.go +++ b/cluster/loadbalance/least_active.go @@ -13,20 +13,22 @@ // @author yiji@apache.org package loadbalance +import ( + "math/rand" +) + import ( "github.com/dubbo/go-for-apache-dubbo/cluster" "github.com/dubbo/go-for-apache-dubbo/common/extension" - "github.com/dubbo/go-for-apache-dubbo/filter" "github.com/dubbo/go-for-apache-dubbo/protocol" - "math/rand" ) const ( - leastActive = "leastactive" + LeastActive = "leastactive" ) func init() { - extension.SetLoadbalance(leastActive, NewLeastActiveLoadBalance) + extension.SetLoadbalance(LeastActive, NewLeastActiveLoadBalance) } type leastActiveLoadBalance struct { @@ -37,9 +39,8 @@ func NewLeastActiveLoadBalance() cluster.LoadBalance { } func (lb *leastActiveLoadBalance) Select(invokers []protocol.Invoker, invocation protocol.Invocation) protocol.Invoker { - count := len(invokers) - if invokers == nil || count == 0 { + if count == 0 { return nil } if count == 1 { @@ -48,17 +49,17 @@ func (lb *leastActiveLoadBalance) Select(invokers []protocol.Invoker, invocation var ( leastActive int32 = -1 // The least active value of all invokers - totalWeight int64 = 0 // The number of invokers having the same least active value (leastActive) + totalWeight int64 = 0 // The number of invokers having the same least active value (LEAST_ACTIVE) firstWeight int64 = 0 // Initial value, used for comparision - leastIndexes = make([]int, count) // The index of invokers having the same least active value (leastActive) - leastCount = 0 // The number of invokers having the same least active value (leastActive) + leastIndexes = make([]int, count) // The index of invokers having the same least active value (LEAST_ACTIVE) + leastCount = 0 // The number of invokers having the same least active value (LEAST_ACTIVE) sameWeight = true // Every invoker has the same weight value? ) for i := 0; i < count; i++ { invoker := invokers[i] // Active number - active := filter.GetStatus(invoker.GetUrl(), invocation.MethodName()).GetActive() + active := protocol.GetStatus(invoker.GetUrl(), invocation.MethodName()).GetActive() // current weight (maybe in warmUp) weight := GetWeight(invoker, invocation) // There are smaller active services diff --git a/filter/impl/active_filter.go b/filter/impl/active_filter.go index eaaaeabd26..7ef1b2f707 100644 --- a/filter/impl/active_filter.go +++ b/filter/impl/active_filter.go @@ -35,13 +35,13 @@ type ActiveFilter struct { func (ef *ActiveFilter) Invoke(invoker protocol.Invoker, invocation protocol.Invocation) protocol.Result { logger.Infof("invoking active filter. %v,%v", invocation.MethodName(), len(invocation.Arguments())) - filter.BeginCount(invoker.GetUrl(), invocation.MethodName()) + protocol.BeginCount(invoker.GetUrl(), invocation.MethodName()) return invoker.Invoke(invocation) } func (ef *ActiveFilter) OnResponse(result protocol.Result, invoker protocol.Invoker, invocation protocol.Invocation) protocol.Result { - filter.EndCount(invoker.GetUrl(), invocation.MethodName()) + protocol.EndCount(invoker.GetUrl(), invocation.MethodName()) return result } diff --git a/filter/RpcStatus.go b/protocol/RpcStatus.go similarity index 94% rename from filter/RpcStatus.go rename to protocol/RpcStatus.go index 2148594da6..89180b2dd8 100644 --- a/filter/RpcStatus.go +++ b/protocol/RpcStatus.go @@ -11,16 +11,19 @@ // limitations under the License. // @author yiji@apache.org -package filter +package protocol import ( - "github.com/dubbo/go-for-apache-dubbo/common" "sync" "sync/atomic" ) +import ( + "github.com/dubbo/go-for-apache-dubbo/common" +) + var ( - methodStatistics = sync.Map{} // url -> { methodName : RpcStatus} + methodStatistics sync.Map // url -> { methodName : RpcStatus} ) type RpcStatus struct { From 51651d685aca79dd56ca3ef9e975b4336086724a Mon Sep 17 00:00:00 2001 From: zonghaishang Date: Wed, 12 Jun 2019 20:10:11 +0800 Subject: [PATCH 3/7] merge from master. --- cluster/loadbalance/least_active.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cluster/loadbalance/least_active.go b/cluster/loadbalance/least_active.go index 092b62a9fb..d7d3056818 100644 --- a/cluster/loadbalance/least_active.go +++ b/cluster/loadbalance/least_active.go @@ -18,9 +18,9 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/cluster" - "github.com/dubbo/go-for-apache-dubbo/common/extension" - "github.com/dubbo/go-for-apache-dubbo/protocol" + "github.com/apache/dubbo-go/cluster" + "github.com/apache/dubbo-go/common/extension" + "github.com/apache/dubbo-go/protocol" ) const ( From dcd25568679593d92c6ceccdcecb34f997b7087a Mon Sep 17 00:00:00 2001 From: zonghaishang Date: Thu, 13 Jun 2019 11:05:31 +0800 Subject: [PATCH 4/7] refactor & unit test --- cluster/loadbalance/least_active_test.go | 70 ++++++++++++++++++++++++ filter/impl/active_filter.go | 8 +-- go.mod | 1 + go.sum | 4 ++ protocol/RpcStatus.go | 14 ++--- 5 files changed, 86 insertions(+), 11 deletions(-) create mode 100644 cluster/loadbalance/least_active_test.go diff --git a/cluster/loadbalance/least_active_test.go b/cluster/loadbalance/least_active_test.go new file mode 100644 index 0000000000..8f2d5402fa --- /dev/null +++ b/cluster/loadbalance/least_active_test.go @@ -0,0 +1,70 @@ +package loadbalance + +import ( + "context" + "fmt" + "testing" +) + +import ( + "github.com/stretchr/testify/assert" +) + +import ( + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/protocol" + "github.com/apache/dubbo-go/protocol/invocation" +) + +func TestLeastActiveSelect(t *testing.T) { + loadBalance := NewLeastActiveLoadBalance() + + var invokers []protocol.Invoker + + url, _ := common.NewURL(context.TODO(), "dubbo://192.168.1.0:20000/org.apache.demo.HelloService") + invokers = append(invokers, protocol.NewBaseInvoker(url)) + i := loadBalance.Select(invokers, &invocation.RPCInvocation{}) + assert.True(t, i.GetUrl().URLEqual(url)) + + for i := 1; i < 10; i++ { + url, _ := common.NewURL(context.TODO(), fmt.Sprintf("dubbo://192.168.1.%v:20000/org.apache.demo.HelloService", i)) + invokers = append(invokers, protocol.NewBaseInvoker(url)) + } + loadBalance.Select(invokers, &invocation.RPCInvocation{}) +} + +func TestLeastActiveByWeight(t *testing.T) { + loadBalance := NewLeastActiveLoadBalance() + + var invokers []protocol.Invoker + loop := 3 + for i := 1; i <= loop; i++ { + url, _ := common.NewURL(context.TODO(), fmt.Sprintf("test%v://192.168.1.%v:20000/org.apache.demo.HelloService?weight=%v", i, i, i)) + invokers = append(invokers, protocol.NewBaseInvoker(url)) + } + + inv := new(invocation.RPCInvocation) + inv.SetMethod("test") + + // test3 active count equals 1 + protocol.BeginCount(invokers[2].GetUrl(), inv.MethodName()) + + loop = 10000 + + var ( + firstCount int + secondCount int + ) + + for i := 1; i <= loop; i++ { + invoker := loadBalance.Select(invokers, inv) + if invoker.GetUrl().Protocol == "test1" { + firstCount++ + } else if invoker.GetUrl().Protocol == "test2" { + secondCount++ + } + } + + assert.Equal(t, firstCount+secondCount, loop) + +} diff --git a/filter/impl/active_filter.go b/filter/impl/active_filter.go index 7ef1b2f707..65abaa505b 100644 --- a/filter/impl/active_filter.go +++ b/filter/impl/active_filter.go @@ -14,13 +14,13 @@ package impl import ( - "github.com/dubbo/go-for-apache-dubbo/common/logger" + "github.com/apache/dubbo-go/common/logger" ) import ( - "github.com/dubbo/go-for-apache-dubbo/common/extension" - "github.com/dubbo/go-for-apache-dubbo/filter" - "github.com/dubbo/go-for-apache-dubbo/protocol" + "github.com/apache/dubbo-go/common/extension" + "github.com/apache/dubbo-go/filter" + "github.com/apache/dubbo-go/protocol" ) const active = "active" diff --git a/go.mod b/go.mod index 4c2276429a..c001cd60d6 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,7 @@ module github.com/apache/dubbo-go require ( + github.com/dubbo/go-for-apache-dubbo v1.0.0 github.com/dubbogo/getty v1.0.7 github.com/dubbogo/hessian2 v1.0.1 github.com/pkg/errors v0.8.1 diff --git a/go.sum b/go.sum index a4fd7f5099..e554da49f5 100644 --- a/go.sum +++ b/go.sum @@ -1,8 +1,12 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dubbo/go-for-apache-dubbo v1.0.0 h1:d1+EmiQNGjOZuEprh7ru/aa/5/pu3lvl8vBkdFEvLuw= +github.com/dubbo/go-for-apache-dubbo v1.0.0/go.mod h1:seatOl29ahGPWuMz4+VqqB6BSNYdHLXtnpPJ54U988Q= +github.com/dubbogo/getty v0.0.0-20190523180329-bdf5e640ea53/go.mod h1:cRMSuoCmwc5lULFFnYZTxyCfZhObmRTNbS7XRnPNHSo= github.com/dubbogo/getty v1.0.7 h1:5Hg+JwXyCKm9Yr4yJkm98ahhnoa8c2h6br5QJxwQ+YU= github.com/dubbogo/getty v1.0.7/go.mod h1:cRMSuoCmwc5lULFFnYZTxyCfZhObmRTNbS7XRnPNHSo= +github.com/dubbogo/hessian2 v0.0.0-20190526221400-d5610bbd0a41/go.mod h1:XFGDn4oSZX26zkcfhkM/fCJrOqwQJxk/xgWW1KMJBKM= github.com/dubbogo/hessian2 v1.0.1 h1:ztI7gJxR3Isxrrl2jE1IZKX61eNR93eRKGhn49vPEX8= github.com/dubbogo/hessian2 v1.0.1/go.mod h1:XFGDn4oSZX26zkcfhkM/fCJrOqwQJxk/xgWW1KMJBKM= github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= diff --git a/protocol/RpcStatus.go b/protocol/RpcStatus.go index 89180b2dd8..fb0f789991 100644 --- a/protocol/RpcStatus.go +++ b/protocol/RpcStatus.go @@ -19,7 +19,7 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/common" + "github.com/apache/dubbo-go/common" ) var ( @@ -35,22 +35,22 @@ func (rpc *RpcStatus) GetActive() int32 { } func GetStatus(url common.URL, methodName string) *RpcStatus { - identity := url.Key() - methodMap, found := methodStatistics.Load(identity) + identifier := url.Key() + methodMap, found := methodStatistics.Load(identifier) if !found { methodMap = sync.Map{} - methodStatistics.Store(identity, methodMap) + methodStatistics.Store(identifier, methodMap) } methodActive := methodMap.(sync.Map) rpcStatus, found := methodActive.Load(methodName) if !found { - rpcStatus = RpcStatus{} + rpcStatus = &RpcStatus{} methodActive.Store(methodName, rpcStatus) } - status := rpcStatus.(RpcStatus) - return &status + status := rpcStatus.(*RpcStatus) + return status } func BeginCount(url common.URL, methodName string) { From 966ae48251d898629e176096aebbbc748b6dcb4a Mon Sep 17 00:00:00 2001 From: zonghaishang Date: Thu, 13 Jun 2019 11:59:36 +0800 Subject: [PATCH 5/7] fix bug & unit test. --- cluster/loadbalance/least_active_test.go | 3 --- protocol/RpcStatus.go | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/cluster/loadbalance/least_active_test.go b/cluster/loadbalance/least_active_test.go index 8f2d5402fa..c29a2092a1 100644 --- a/cluster/loadbalance/least_active_test.go +++ b/cluster/loadbalance/least_active_test.go @@ -45,8 +45,6 @@ func TestLeastActiveByWeight(t *testing.T) { inv := new(invocation.RPCInvocation) inv.SetMethod("test") - - // test3 active count equals 1 protocol.BeginCount(invokers[2].GetUrl(), inv.MethodName()) loop = 10000 @@ -66,5 +64,4 @@ func TestLeastActiveByWeight(t *testing.T) { } assert.Equal(t, firstCount+secondCount, loop) - } diff --git a/protocol/RpcStatus.go b/protocol/RpcStatus.go index fb0f789991..b9f3e6ecb1 100644 --- a/protocol/RpcStatus.go +++ b/protocol/RpcStatus.go @@ -38,11 +38,11 @@ func GetStatus(url common.URL, methodName string) *RpcStatus { identifier := url.Key() methodMap, found := methodStatistics.Load(identifier) if !found { - methodMap = sync.Map{} + methodMap = &sync.Map{} methodStatistics.Store(identifier, methodMap) } - methodActive := methodMap.(sync.Map) + methodActive := methodMap.(*sync.Map) rpcStatus, found := methodActive.Load(methodName) if !found { rpcStatus = &RpcStatus{} From 417117e070fd609a7b2121e08482dde8d108f4c1 Mon Sep 17 00:00:00 2001 From: zonghaishang Date: Thu, 13 Jun 2019 14:00:21 +0800 Subject: [PATCH 6/7] remove `github.com/dubbo/go-for-apache-dubbo v1.0.0` from go.md & go.sum file. --- go.mod | 1 - go.sum | 4 ---- 2 files changed, 5 deletions(-) diff --git a/go.mod b/go.mod index c001cd60d6..4c2276429a 100644 --- a/go.mod +++ b/go.mod @@ -1,7 +1,6 @@ module github.com/apache/dubbo-go require ( - github.com/dubbo/go-for-apache-dubbo v1.0.0 github.com/dubbogo/getty v1.0.7 github.com/dubbogo/hessian2 v1.0.1 github.com/pkg/errors v0.8.1 diff --git a/go.sum b/go.sum index e554da49f5..a4fd7f5099 100644 --- a/go.sum +++ b/go.sum @@ -1,12 +1,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dubbo/go-for-apache-dubbo v1.0.0 h1:d1+EmiQNGjOZuEprh7ru/aa/5/pu3lvl8vBkdFEvLuw= -github.com/dubbo/go-for-apache-dubbo v1.0.0/go.mod h1:seatOl29ahGPWuMz4+VqqB6BSNYdHLXtnpPJ54U988Q= -github.com/dubbogo/getty v0.0.0-20190523180329-bdf5e640ea53/go.mod h1:cRMSuoCmwc5lULFFnYZTxyCfZhObmRTNbS7XRnPNHSo= github.com/dubbogo/getty v1.0.7 h1:5Hg+JwXyCKm9Yr4yJkm98ahhnoa8c2h6br5QJxwQ+YU= github.com/dubbogo/getty v1.0.7/go.mod h1:cRMSuoCmwc5lULFFnYZTxyCfZhObmRTNbS7XRnPNHSo= -github.com/dubbogo/hessian2 v0.0.0-20190526221400-d5610bbd0a41/go.mod h1:XFGDn4oSZX26zkcfhkM/fCJrOqwQJxk/xgWW1KMJBKM= github.com/dubbogo/hessian2 v1.0.1 h1:ztI7gJxR3Isxrrl2jE1IZKX61eNR93eRKGhn49vPEX8= github.com/dubbogo/hessian2 v1.0.1/go.mod h1:XFGDn4oSZX26zkcfhkM/fCJrOqwQJxk/xgWW1KMJBKM= github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= From b2585fc5b97e14aa2657fbd291c6f0fd5df4e372 Mon Sep 17 00:00:00 2001 From: zonghaishang Date: Thu, 13 Jun 2019 14:13:52 +0800 Subject: [PATCH 7/7] refactor imports. --- filter/impl/active_filter.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/filter/impl/active_filter.go b/filter/impl/active_filter.go index 65abaa505b..435bfe7488 100644 --- a/filter/impl/active_filter.go +++ b/filter/impl/active_filter.go @@ -13,12 +13,9 @@ // @author yiji@apache.org package impl -import ( - "github.com/apache/dubbo-go/common/logger" -) - import ( "github.com/apache/dubbo-go/common/extension" + "github.com/apache/dubbo-go/common/logger" "github.com/apache/dubbo-go/filter" "github.com/apache/dubbo-go/protocol" )