refactoring

This commit is contained in:
Chris Lu
2020-04-16 02:55:09 -07:00
parent ce4b369be2
commit f5a748d33c
5 changed files with 104 additions and 30 deletions

View File

@@ -51,7 +51,7 @@ func NewLogBuffer(flushInterval time.Duration, flushFn func(startTime, stopTime
return lb
}
func (m *LogBuffer) AddToBuffer(key, data []byte) {
func (m *LogBuffer) AddToBuffer(partitionKey, data []byte) {
m.Lock()
defer func() {
@@ -65,7 +65,7 @@ func (m *LogBuffer) AddToBuffer(key, data []byte) {
ts := time.Now()
logEntry := &filer_pb.LogEntry{
TsNs: ts.UnixNano(),
PartitionKeyHash: util.HashToInt32(key),
PartitionKeyHash: util.HashToInt32(partitionKey),
Data: data,
}