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) {
|
||||
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