Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read brokers and Partition size infomation from input json file instead of Zookeeper #257

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dataops-sre
Copy link

We want have option to read Partition size information from an input file
Currently it relies on metricfetcher to grab metrics from datadog.

  1. Unfortunately we don't stream those jmx metrics to DD due to the cost, so we export partition size jmx metrics to a json file and read from there.
  2. Zookeeper only allows 1MB size for a ZNODE,it is too small to store all our partition size metrics, it's the another reason to use file input

1) stream all partitions metrics to DD is too expensive, read from file
2) zookeeper only allows 1MB size for ZNODE, too small to store all our
partition infos
@jamiealquiza
Copy link
Collaborator

Generally the idea would be to write other metricsfetcher-like tools that would feed the data into ZooKeeper; this ensures that topicmappr is always reading the source data in exactly one way and minimizes config flags and codepaths to maintain.

@dataops-sre
Copy link
Author

dataops-sre commented Jun 3, 2019

Yes I am agree with it, but our partition size map is just too huge(too long topic names and partitions), so the map exceed the Max datalengh of zookeeper znode(1MB) and can't be inserted, that's why we want to coopte with the file inputs option.

@jamiealquiza
Copy link
Collaborator

This is a problem I wanted to solve in general by either supporting compression or breaking the data structure up a bit (e.g. separate entries for each topic), adding versioning to the data structure as well to cope with the various formats. I'll open an issue for this.

@jamiealquiza
Copy link
Collaborator

For reference: #258

@@ -1,6 +1,6 @@
package main

import "github.com/DataDog/kafka-kit/cmd/topicmappr/commands"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is not needed.

@@ -29,6 +29,8 @@ func init() {
rebuildCmd.Flags().Bool("use-meta", true, "Use broker metadata in placement constraints")
rebuildCmd.Flags().String("out-path", "", "Path to write output map files to")
rebuildCmd.Flags().String("out-file", "", "If defined, write a combined map of all topics to a file")
rebuildCmd.Flags().String("partitions-size-in-file", "", "Read Topics partitions sizes from a file")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the changes in this file to the rebalance.go file too. That will allow file input for the rebalance option too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants