brokers.ts 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. import { BrokerConfig, BrokersLogdirs, ConfigSource } from 'generated-sources';
  2. export const brokersPayload = [
  3. { id: 100, host: 'b-1.test.kafka.amazonaws.com', port: 9092 },
  4. { id: 200, host: 'b-2.test.kafka.amazonaws.com', port: 9092 },
  5. ];
  6. const partition = {
  7. broker: 2,
  8. offsetLag: 0,
  9. partition: 2,
  10. size: 0,
  11. };
  12. const topics = {
  13. name: '_confluent-ksql-devquery_CTAS_NUMBER_OF_TESTS_59-Aggregate-Aggregate-Materialize-changelog',
  14. partitions: [partition],
  15. };
  16. export const brokerLogDirsPayload: BrokersLogdirs[] = [
  17. {
  18. error: 'NONE',
  19. name: '/opt/kafka/data-0/logs',
  20. topics: [
  21. {
  22. ...topics,
  23. partitions: [partition, partition, partition],
  24. },
  25. topics,
  26. {
  27. ...topics,
  28. partitions: [],
  29. },
  30. ],
  31. },
  32. {
  33. error: 'NONE',
  34. name: '/opt/kafka/data-1/logs',
  35. },
  36. ];
  37. export const brokerConfigPayload: BrokerConfig[] = [
  38. {
  39. name: 'compression.type',
  40. value: 'producer',
  41. source: ConfigSource.DYNAMIC_BROKER_CONFIG,
  42. isSensitive: false,
  43. isReadOnly: false,
  44. synonyms: [
  45. {
  46. name: 'compression.type',
  47. value: 'producer',
  48. source: ConfigSource.DYNAMIC_BROKER_CONFIG,
  49. },
  50. {
  51. name: 'compression.type',
  52. value: 'producer',
  53. source: ConfigSource.DEFAULT_CONFIG,
  54. },
  55. ],
  56. },
  57. {
  58. name: 'confluent.value.schema.validation',
  59. value: 'false',
  60. source: ConfigSource.DEFAULT_CONFIG,
  61. isSensitive: false,
  62. isReadOnly: false,
  63. synonyms: [],
  64. },
  65. {
  66. name: 'leader.replication.throttled.replicas',
  67. value: '',
  68. source: ConfigSource.DEFAULT_CONFIG,
  69. isSensitive: false,
  70. isReadOnly: false,
  71. synonyms: [],
  72. },
  73. {
  74. name: 'confluent.key.subject.name.strategy',
  75. value: 'io.confluent.kafka.serializers.subject.TopicNameStrategy',
  76. source: ConfigSource.DEFAULT_CONFIG,
  77. isSensitive: false,
  78. isReadOnly: false,
  79. synonyms: [],
  80. },
  81. {
  82. name: 'message.downconversion.enable',
  83. value: 'true',
  84. source: ConfigSource.DEFAULT_CONFIG,
  85. isSensitive: false,
  86. isReadOnly: false,
  87. synonyms: [
  88. {
  89. name: 'log.message.downconversion.enable',
  90. value: 'true',
  91. source: ConfigSource.DEFAULT_CONFIG,
  92. },
  93. ],
  94. },
  95. {
  96. name: 'min.insync.replicas',
  97. value: '1',
  98. source: ConfigSource.DYNAMIC_BROKER_CONFIG,
  99. isSensitive: false,
  100. isReadOnly: false,
  101. synonyms: [
  102. {
  103. name: 'min.insync.replicas',
  104. value: '1',
  105. source: ConfigSource.DYNAMIC_BROKER_CONFIG,
  106. },
  107. {
  108. name: 'min.insync.replicas',
  109. value: '1',
  110. source: ConfigSource.DEFAULT_CONFIG,
  111. },
  112. ],
  113. },
  114. ];