file

Write the received data to the local in the form of a file.

Example

  1. sink:
  2. type: file
  3. workerCount: 1024
  4. baseDirs:
  5. - /data0
  6. - /data1
  7. - /data2
  8. dirHashKey: ${namespace}-${deployName}
  9. filename: /${namespace}/${deployName}/${podName}/${filename}
  10. maxSize: 500
  11. maxAge: 7
  12. maxBackups: 50
  13. compress: true

workerCount

fieldtyperequireddefaultdescription
workerCountintfalse1concurrency of writing to file

baseDirs

fieldtyperequireddefaultdescription
baseDirsstring arrayfalseThe base directory of the file, which can be hashed according to a key. And data can be stored in the corresponding base directory.

dirHashKey

fieldtyperequireddefaultdescription
baseDirsstringfalseHash according to the specified Key. Variables supported.

filename

fieldtyperequireddefaultdescription
filenamestringtruefilename. Variables supported.

maxSize

fieldtyperequireddefaultdescription
maxSizeintfalse1File size in MiB

maxAge

fieldtyperequireddefaultdescription
maxAgeintfalseThe number of days to keep old files. The unit is “days”. The default is not to delete.

maxBackups

fieldtyperequireddefaultdescription
maxBackupsintfalse1The maximum number of backup files to retain. Not deleted by default. (if maxAge is configured, the files will be deleted)

localTime

fieldtyperequireddefaultdescription
localTimeboolfalsefalseWhether to format backup files in local time. UTC time is used by default.

compress

fieldtyperequireddefaultdescription
compressboolfalsefalseWhether to compress. Gzip used. No compression by default.