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

Remove remaining line length violations for o.e.action.admin.cluster #35156

Merged
merged 4 commits into from
Nov 16, 2018

Conversation

tomcallahan
Copy link
Contributor

@tomcallahan tomcallahan commented Nov 1, 2018

This PR inserts newlines in order to reduce line lengths in the
o.e.action.admin.cluster package to 140 characters or less. This
also removes the checkstyle suppressions for affected files.

@rjernst addressed much of these in #34923, but this rounds
out this package and removes all the suppressions.

The only edits in code files consist of newlines as well as some
adjustments to indentation for consistency.

Relates #34884, #34923

This inserts newlines in order to reduce line lengths in the
o.e.action.admin.cluster package to 140 characters or less.  This
also remves the checkstyle suppressions for affected files.

Relates elastic#34884, elastic#34923
@tomcallahan tomcallahan added >non-issue :Core/Infra/Core Core issues without another label v7.0.0 v6.6.0 labels Nov 1, 2018
@tomcallahan tomcallahan self-assigned this Nov 1, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

Copy link
Member

@nik9000 nik9000 left a comment

Choose a reason for hiding this comment

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

I left a couple of small formatting things that I'd like but it looks great!

Thanks @tomcallahan. We're working these down!

updater.updateSettings(build, Settings.builder().put(BalancedShardsAllocator.INDEX_BALANCE_FACTOR_SETTING.getKey(), "not a float").build(),
Settings.builder().put(BalancedShardsAllocator.INDEX_BALANCE_FACTOR_SETTING.getKey(), "not a float").put(BalancedShardsAllocator.SHARD_BALANCE_FACTOR_SETTING.getKey(), 1.0f).build(), logger);
updater.updateSettings(build,
Settings.builder().put(BalancedShardsAllocator.INDEX_BALANCE_FACTOR_SETTING.getKey(), "not a float").build(),
Copy link
Member

Choose a reason for hiding this comment

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

I might make this one mirror the one below it so any differences jump out visually.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not exactly sure what you mean here, @nik9000 , can you clarify?

Copy link
Member

Choose a reason for hiding this comment

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

If you write it like:

            updater.updateSettings(build,
                Settings.builder()
                    .put(BalancedShardsAllocator.INDEX_BALANCE_FACTOR_SETTING.getKey(), "not a float")
                    .build(),
                Settings.builder()
                    .put(BalancedShardsAllocator.INDEX_BALANCE_FACTOR_SETTING.getKey(), "not a float")
                    .put(BalancedShardsAllocator.SHARD_BALANCE_FACTOR_SETTING.getKey(), 1.0f)
                    .build(),
                logger);

Then the differences between the original settings and the new settings pop out visually because the old and the new settings builders are formatted in the same way. It isn't important, but it is pleasant.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

makes sense, thanks!

Settings.builder().put(BalancedShardsAllocator.INDEX_BALANCE_FACTOR_SETTING.getKey(), 1.6).put(BalancedShardsAllocator.SHARD_BALANCE_FACTOR_SETTING.getKey(), 1.0f).build(), logger);
ClusterState clusterState =
updater.updateSettings(build, Settings.builder().put(MetaData.SETTING_READ_ONLY_SETTING.getKey(), true).build(),
Settings.builder().put(BalancedShardsAllocator.INDEX_BALANCE_FACTOR_SETTING.getKey(), 1.6)
Copy link
Member

Choose a reason for hiding this comment

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

I like:

ClusterState clusterState = updater.updateSettings(build,
        Settings.builder()...,
        Settings.builder()...,
        logger);

Or something like it. This one has a parameter lining up with the method and I get confused by stuff like that.

Settings.builder().put(BalancedShardsAllocator.INDEX_BALANCE_FACTOR_SETTING.getKey(), 1.6).put(BalancedShardsAllocator.SHARD_BALANCE_FACTOR_SETTING.getKey(), 1.0f).build(), logger);
clusterState =
updater.updateSettings(build, Settings.builder().put(MetaData.SETTING_READ_ONLY_ALLOW_DELETE_SETTING.getKey(), true).build(),
Settings.builder().put(BalancedShardsAllocator.INDEX_BALANCE_FACTOR_SETTING.getKey(), 1.6)
Copy link
Member

Choose a reason for hiding this comment

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

Same here.

@tomcallahan
Copy link
Contributor Author

@elasticmachine test this please

@tomcallahan tomcallahan merged commit 76b77db into elastic:master Nov 16, 2018
jasontedor added a commit to jasontedor/elasticsearch that referenced this pull request Nov 17, 2018
* master: (59 commits)
  SQL: Move internals from Joda to java.time (elastic#35649)
  Add HLRC docs for Get Lifecycle Policy (elastic#35612)
  Align RolloverStep's name with other step names (elastic#35655)
  Watcher: Use joda method to get local TZ (elastic#35608)
  Fix line length for org.elasticsearch.action.* files (elastic#35607)
  Remove use of AbstractComponent in server (elastic#35444)
  Deprecate types in count and msearch. (elastic#35421)
  Refactor an ambigious TermVectorsRequest constructor. (elastic#35614)
  [Scripting] Use Number as a return value for BucketAggregationScript (elastic#35653)
  Removes AbstractComponent from several classes (elastic#35566)
  [DOCS] Add beta warning to ILM pages. (elastic#35571)
  Deprecate types in validate query requests. (elastic#35575)
  Unmute BuildExamplePluginsIT
  Revert "AwaitsFix the RecoveryIT suite - see elastic#35597"
  Revert "[RCI] Check blocks while having index shard permit in TransportReplicationAction (elastic#35332)"
  Remove remaining line length violations for o.e.action.admin.cluster (elastic#35156)
  ML: Adjusing BWC version post backport to 6.6 (elastic#35605)
  [TEST] Replace fields in response with actual values
  Remove usages of CharSequence in Sets (elastic#35501)
  AwaitsFix the RecoveryIT suite - see elastic#35597
  ...
@danielmitterdorfer
Copy link
Member

Backported to 6.6 by #35668.

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

Successfully merging this pull request may close these issues.

5 participants