-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Added flags for driving cassandra connection compression through config #1675
Merged
yurishkuro
merged 4 commits into
jaegertracing:master
from
sagaranand015:feature/compression-flag
Jul 29, 2019
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
1640a91
Added flags for driving cassandra connection compression through config
sagaranand015 86895fa
updated disable-compression flag for backward compatibility
sagaranand015 b69c88a
Merge branch 'master' into feature/compression-flag
yurishkuro 54dd31a
Refactored for disable-compression flag
sagaranand015 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
updated disable-compression flag for backward compatibility
Signed-off-by: Sagar Anand <sagar.anand015@gmail.com>
- Loading branch information
commit 86895fa117c9663d1389cc1fcc1aa417d3d7fc4f
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,7 +37,7 @@ const ( | |
suffixKeyspace = ".keyspace" | ||
suffixDC = ".local-dc" | ||
suffixConsistency = ".consistency" | ||
suffixEnableCompression = ".enable-compression" | ||
suffixDisableCompression = ".disable-compression" | ||
suffixProtoVer = ".proto-version" | ||
suffixSocketKeepAlive = ".socket-keep-alive" | ||
suffixUsername = ".username" | ||
|
@@ -165,9 +165,9 @@ func addFlags(flagSet *flag.FlagSet, nsConfig *namespaceConfig) { | |
nsConfig.Consistency, | ||
"The Cassandra consistency level, e.g. ANY, ONE, TWO, THREE, QUORUM, ALL, LOCAL_QUORUM, EACH_QUORUM, LOCAL_ONE (default LOCAL_ONE)") | ||
flagSet.Bool( | ||
nsConfig.namespace+suffixEnableCompression, | ||
true, | ||
"Enable the use of Compression while connecting to Cassandra API based Storage backend. Uses SnappyCompression by default") | ||
nsConfig.namespace+suffixDisableCompression, | ||
false, | ||
"Disables the use of the default Snappy Compression while connecting to the Cassandra Cluster if set to true") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. may want to add to description: "This may be useful when using Azure Cosmos DB instead of Cassandra" |
||
flagSet.Int( | ||
nsConfig.namespace+suffixProtoVer, | ||
nsConfig.ProtoVersion, | ||
|
@@ -248,7 +248,7 @@ func (cfg *namespaceConfig) initFromViper(v *viper.Viper) { | |
cfg.TLS.ServerName = v.GetString(cfg.namespace + suffixServerName) | ||
cfg.TLS.EnableHostVerification = v.GetBool(cfg.namespace + suffixVerifyHost) | ||
cfg.EnableDependenciesV2 = v.GetBool(cfg.namespace + suffixEnableDependenciesV2) | ||
cfg.EnableCompression = v.GetBool(cfg.namespace + suffixEnableCompression) | ||
cfg.DisableCompression = v.GetBool(cfg.namespace + suffixDisableCompression) | ||
} | ||
|
||
// GetPrimary returns primary configuration. | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove print statements, we don't do that in Jaeger. I believe at some point we simply log the whole config struct, using the logger, not println.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad..Removed these in the latest push