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