expose chash params
This commit is contained in:
parent
163c0e4058
commit
a4d26ab82d
@ -17,8 +17,8 @@ func TestReplKey(t *testing.T) {
|
|||||||
|
|
||||||
func TestConfiguration_NodeIds(t *testing.T) {
|
func TestConfiguration_NodeIds(t *testing.T) {
|
||||||
ch, err := chash.New(chash.Config{
|
ch, err := chash.New(chash.Config{
|
||||||
PartitionCount: partitionCount,
|
PartitionCount: PartitionCount,
|
||||||
ReplicationFactor: replicationFactor,
|
ReplicationFactor: ReplicationFactor,
|
||||||
})
|
})
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
conf := &configuration{
|
conf := &configuration{
|
||||||
|
|||||||
@ -13,8 +13,8 @@ import (
|
|||||||
const CName = "common.nodeconf"
|
const CName = "common.nodeconf"
|
||||||
|
|
||||||
const (
|
const (
|
||||||
partitionCount = 3000
|
PartitionCount = 3000
|
||||||
replicationFactor = 3
|
ReplicationFactor = 3
|
||||||
)
|
)
|
||||||
|
|
||||||
var log = logger.NewNamed(CName)
|
var log = logger.NewNamed(CName)
|
||||||
@ -58,8 +58,8 @@ func (s *service) Init(a *app.App) (err error) {
|
|||||||
accountId: s.accountId,
|
accountId: s.accountId,
|
||||||
}
|
}
|
||||||
if fileConfig.chash, err = chash.New(chash.Config{
|
if fileConfig.chash, err = chash.New(chash.Config{
|
||||||
PartitionCount: partitionCount,
|
PartitionCount: PartitionCount,
|
||||||
ReplicationFactor: replicationFactor,
|
ReplicationFactor: ReplicationFactor,
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user