Skip to content

Commit

Permalink
Rely on 'compaction' and non-null 'retention_time_ms'
Browse files Browse the repository at this point in the history
Instead of 'compaction_enabled' and 'retention_enabled'.
  • Loading branch information
Maciek Sakrejda committed Feb 14, 2017
1 parent f8e1728 commit 3383e57
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions commands/topics_info.js
Expand Up @@ -41,7 +41,7 @@ function topicInfo (topic) {
}
]

if (topic.compaction_enabled) {
if (topic.compaction) {
lines.push({
name: 'Compaction',
values: [`Compaction is enabled for ${topic.name}`]
Expand All @@ -52,7 +52,7 @@ function topicInfo (topic) {
values: [`Compaction is disabled for ${topic.name}`]
})
}
if (topic.retention_enabled) {
if (topic.retention_time_ms) {
lines.push({
name: 'Retention',
values: [retention(topic.retention_time_ms)]
Expand Down
7 changes: 3 additions & 4 deletions test/commands/topics_info_test.js
Expand Up @@ -51,8 +51,7 @@ describe('kafka:topics:info', () => {
bytes_out_per_second: 0,
replication_factor: 3,
partitions: 3,
compaction_enabled: false,
retention_enabled: true,
compaction: false,
retention_time_ms: 86400000
}
]
Expand Down Expand Up @@ -82,7 +81,7 @@ Retention: 24 hours
bytes_out_per_second: 0,
replication_factor: 0,
partitions: 0,
compaction_enabled: false,
compaction: false,
retention_time_ms: 86400000
}
]
Expand All @@ -104,7 +103,7 @@ Retention: 24 hours
bytes_out_per_second: 0,
replication_factor: 0,
partitions: 0,
compaction_enabled: false,
compaction: false,
retention_time_ms: 86400000
}
]
Expand Down

0 comments on commit 3383e57

Please sign in to comment.