Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Influxdb listener keep database #6256

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
removed a rouge print line debugger.
Added a comment to a function to explain what it should do.
  • Loading branch information
morfien101 committed Mar 15, 2019
commit 5baa3b0b146c789799f1b3ced7b945ac71046b18
8 changes: 6 additions & 2 deletions plugins/outputs/kinesis/kinesisHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ func (handler *putRecordsHandler) addSlugs(partitionKey string, slugs ...[]byte)
}
}

// packageMetrics is responsible to get the metrics split into payloads that we no larger than 1020kb.
// Each partition key will have metrics that need to then be split into payloads.
// If the partition key is random then it will create payloads ready to be split between as many shards
// that you have available.
// packageMetrics can't be called again until init is called. Really it is designed to be used once.
func (handler *putRecordsHandler) packageMetrics(shards int64) error {
if handler.readyToSendLock {
return fmt.Errorf("Already setup to send data")
Expand Down Expand Up @@ -136,7 +141,6 @@ func (handler *putRecordsHandler) packageMetrics(shards int64) error {
}

requiredBlocks := (len(tryOne) / maxRecordSizeBytes) + 1
fmt.Println("Required Blocks", requiredBlocks)

if requiredBlocks == 1 {
// we are ok and we can carry on
Expand Down Expand Up @@ -178,7 +182,7 @@ func (handler *putRecordsHandler) gzipCompressSlugs() error {
return nil
}

//convertToKinesisPutRequests will return a slice that contains a []*kinesis.PutRecordsRequestEntry
// convertToKinesisPutRequests will return a slice that contains a []*kinesis.PutRecordsRequestEntry
// sized to fit into a PutRecords calls. The number of of outer slices is how many times you would
// need to call kinesis.PutRecords.
// The Inner slices ad hear to the current rules. No more than 500 records at once and no more than
Expand Down