Skip to content

Commit

Permalink
logkit update export 导出到kodo的分片策略时,设置时间和大小值
Browse files Browse the repository at this point in the history
  • Loading branch information
wangqiang-qiniu committed Aug 23, 2018
1 parent c3bab93 commit 58919f3
Show file tree
Hide file tree
Showing 5 changed files with 209 additions and 38 deletions.
7 changes: 6 additions & 1 deletion sender/pandora/pandora.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ func NewSender(conf conf.MapConf) (pandoraSender sender.Sender, err error) {
prefix, _ := conf.GetStringOr(sender.KeyPandoraKodoFilePrefix, "logkitauto/date=$(year)-$(mon)-$(day)/hour=$(hour)/min=$(min)/$(sec)")
compress, _ := conf.GetBoolOr(sender.KeyPandoraKodoGzip, false)
kodoRotateStrategy, _ := conf.GetStringOr(sender.KeyPandoraKodoRotateStrategy, "interval")
kodoRotateSize, _ := conf.GetIntOr(sender.KeyPandoraKodoRotateSize, 500*1024)
kodoRotateSize, _ := conf.GetIntOr(sender.KeyPandoraKodoRotateSize, pipeline.DefaultLogkitRotateSize)
kodoRotateSize = kodoRotateSize * 1024
kodoRotateInterval, _ := conf.GetIntOr(sender.KeyPandoraKodoRotateInterval, 10*60)
kodoFileRetention, _ := conf.GetIntOr(sender.KeyPandoraKodoFileRetention, 0)
Expand Down Expand Up @@ -522,6 +522,11 @@ func newPandoraSender(opt *PandoraOption) (s *Sender, err error) {
Format: s.opt.format,
Compress: s.opt.kodoCompress,
AutoExportKodoTokens: s.opt.tokens.KodoTokens,
RotateStrategy: s.opt.kodoRotateStrategy,
RotateSize: s.opt.kodoRotateSize,
RotateInterval: s.opt.kodoRotateInterval,
RotateSizeType: "B",
RotateNumber: s.opt.kodoRotateSize,
},
ToTSDB: s.opt.enableTsdb,
AutoExportToTSDBInput: pipeline.AutoExportToTSDBInput{
Expand Down
132 changes: 122 additions & 10 deletions vendor/github.com/qiniu/pandora-go-sdk/pipeline/api.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

55 changes: 50 additions & 5 deletions vendor/github.com/qiniu/pandora-go-sdk/pipeline/models.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 12 additions & 3 deletions vendor/github.com/qiniu/pandora-go-sdk/pipeline/schemafree.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 58919f3

Please sign in to comment.