需要一些帮助来解决使用kafka集群和3个经纪人设置kafka巡航控制的问题。
我试图设置巡航控制localhost(本地运行kafka经纪人和巡航控制)并取得成功:
MonitorState: {state: RUNNING(1.000% trained), NumValidWindows: (1/1) (100.000%), NumValidPartitions: 138/138 (100.000%), flawedPartitions: 0}...}
但问题是,当我开始设置3个经纪商Kafka 1.1集群时,我没有看到任何进展:
{MonitorState: {**state: RUNNING(0.000% trained), NumValidWindows: (0/0) (NaN%), NumValidPartitions: 0/844 (0.000%)**, flawedPartitions: 0}, ExecutorState: {state: NO_TASK_IN_PROGRESS, finished/total leadership movements: 0/0}, AnalyzerState: {isProposalReady: false, ReadyGoals: []}}
如果我在这里错过任何配置,有人可以帮忙吗?在CC日志中,我看到了:
[2018-05-23 15:27:51,733] INFO Collected 0 partition metric samples for 0 partitions. Total partition assigned: 844. (com.linkedin.kafka.cruisecontrol.monitor.sampling.SamplingFetcher)
[2018-05-23 15:27:51,733] INFO Collected 0 broker metric samples for 0 brokers. (com.linkedin.kafka.cruisecontrol.monitor.sampling.SamplingFetcher)
[2018-05-23 15:27:51,733] INFO Finished sampling in 5147 ms. (com.linkedin.kafka.cruisecontrol.monitor.sampling.MetricFetcherManager)
[2018-05-23 15:27:53,437] INFO Skipping best proposal precomputing because load monitor does not have enough snapshots. (com.linkedin.kafka.cruisecontrol.analyzer.GoalOptimizer)
[2018-05-23 15:28:23,438] INFO Skipping best proposal precomputing because load monitor does not have enough snapshots. (com.linkedin.kafka.cruisecontrol.analyzer.GoalOptimizer)
[2018-05-23 15:28:53,438] INFO Skipping best proposal precomputing because load monitor does not have enough snapshots. (com.linkedin.kafka.cruisecontrol.analyzer.GoalOptimizer)
[2018-05-23 15:29:23,438] INFO Skipping best proposal precomputing because load monitor does not have enough snapshots. (com.linkedin.kafka.cruisecontrol.analyzer.GoalOptimizer)
任何提示都表示赞赏。
答案 0 :(得分:0)
server.properties:cruise.control.metrics.reporter.bootstrap.servers=0.0.0.0:9092
那就是魔术:
{MonitorState: {state: RUNNING(20.000% trained), NumValidWindows: (1/1) (100.000%), NumValidPartitions: 124/124 (100.000%), flawedPartitions: 0}, ExecutorState: {state: NO_TASK_IN_PROGRESS, finished/total leadership movements: 0/0}, AnalyzerState: {isProposalReady: true, ReadyGoals: [NetworkInboundUsageDistributionGoal, CpuUsageDistributionGoal, PotentialNwOutGoal, NetworkInboundCapacityGoal, LeaderBytesInDistributionGoal, DiskCapacityGoal, ReplicaDistributionGoal, RackAwareGoal, TopicReplicaDistributionGoal, NetworkOutboundCapacityGoal, CpuCapacityGoal, DiskUsageDistributionGoal, NetworkOutboundUsageDistributionGoal, ReplicaCapacityGoal]}}
原因:这是因为kafka在主机IP上运行而不是在localhost上运行,上面的配置有助于修复它