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

Fix LineLength Check Suppressions: index.fielddata #34891

Merged

Conversation

original-brownbear
Copy link
Member

* Fix linelength suppressions in index.fielddata
  * Some lines that were too long were dead code => Removed them and all code that became dead because of it
* Relates elastic#34884
@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 baker's dozen requests to add a single extra level of indentation.

return indexFieldData.loadDirect(context);
}

@Override
@SuppressWarnings("unchecked")
public <FD extends AtomicFieldData, IFD extends IndexFieldData.Global<FD>> IFD load(DirectoryReader indexReader, IFD indexFieldData) throws Exception {
public <FD extends AtomicFieldData, IFD extends IndexFieldData.Global<FD>> IFD load(DirectoryReader indexReader,
IFD indexFieldData) throws Exception {
Copy link
Member

Choose a reason for hiding this comment

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

Could you indent this one more time so the method declaration doesn't line up with the method body?

@@ -43,7 +43,8 @@

private final IndexNumericFieldData indexFieldData;

public DoubleValuesComparatorSource(IndexNumericFieldData indexFieldData, @Nullable Object missingValue, MultiValueMode sortMode, Nested nested) {
public DoubleValuesComparatorSource(IndexNumericFieldData indexFieldData, @Nullable Object missingValue, MultiValueMode sortMode,
Nested nested) {
Copy link
Member

Choose a reason for hiding this comment

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

Could you indent this one more time so the method declaration doesn't line up with the method body?

@@ -41,7 +41,8 @@

private final IndexNumericFieldData indexFieldData;

public FloatValuesComparatorSource(IndexNumericFieldData indexFieldData, @Nullable Object missingValue, MultiValueMode sortMode, Nested nested) {
public FloatValuesComparatorSource(IndexNumericFieldData indexFieldData, @Nullable Object missingValue, MultiValueMode sortMode,
Nested nested) {
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.

@@ -40,7 +40,8 @@

private final IndexNumericFieldData indexFieldData;

public LongValuesComparatorSource(IndexNumericFieldData indexFieldData, @Nullable Object missingValue, MultiValueMode sortMode, Nested nested) {
public LongValuesComparatorSource(IndexNumericFieldData indexFieldData, @Nullable Object missingValue, MultiValueMode sortMode,
Nested nested) {
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.

@@ -79,7 +79,8 @@ public static IndexOrdinalsFieldData build(final IndexReader indexReader, IndexO
);
}

public static IndexOrdinalsFieldData buildEmpty(IndexSettings indexSettings, final IndexReader indexReader, IndexOrdinalsFieldData indexFieldData) throws IOException {
public static IndexOrdinalsFieldData buildEmpty(IndexSettings indexSettings, final IndexReader indexReader,
IndexOrdinalsFieldData indexFieldData) throws IOException {
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.

@@ -46,7 +46,8 @@ public BinaryDVAtomicFieldData loadDirect(LeafReaderContext context) throws Exce
}

@Override
public SortField sortField(@Nullable Object missingValue, MultiValueMode sortMode, XFieldComparatorSource.Nested nested, boolean reverse) {
public SortField sortField(@Nullable Object missingValue, MultiValueMode sortMode, XFieldComparatorSource.Nested nested,
boolean reverse) {
Copy link
Member

Choose a reason for hiding this comment

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

Could you indent this one more time so it doesn't line up with the method body?

@@ -65,7 +65,7 @@ public Builder(double minFrequency, double maxFrequency, int minSegmentSize) {

@Override
public IndexOrdinalsFieldData build(IndexSettings indexSettings, MappedFieldType fieldType,
IndexFieldDataCache cache, CircuitBreakerService breakerService, MapperService mapperService) {
IndexFieldDataCache cache, CircuitBreakerService breakerService, MapperService mapperService) {
Copy link
Member

Choose a reason for hiding this comment

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

Could you indent this one more time so it doesn't line up with the method body?

@@ -78,7 +78,8 @@ public PagedBytesIndexFieldData(IndexSettings indexSettings, String fieldName,
}

@Override
public SortField sortField(@Nullable Object missingValue, MultiValueMode sortMode, XFieldComparatorSource.Nested nested, boolean reverse) {
public SortField sortField(@Nullable Object missingValue, MultiValueMode sortMode, XFieldComparatorSource.Nested nested,
boolean reverse) {
Copy link
Member

Choose a reason for hiding this comment

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

Could you indent this one more time so it doesn't line up with the method body?

@@ -125,7 +128,8 @@ public long applyAsLong(Key key, Accountable ramUsage) {
}

@Override
public <FD extends AtomicFieldData, IFD extends IndexFieldData<FD>> FD load(final LeafReaderContext context, final IFD indexFieldData) throws Exception {
public <FD extends AtomicFieldData, IFD extends IndexFieldData<FD>> FD load(final LeafReaderContext context,
final IFD indexFieldData) throws Exception {
Copy link
Member

Choose a reason for hiding this comment

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

Could you indent this one more time so it doesn't line up with the method body?

@@ -151,7 +155,8 @@ public long applyAsLong(Key key, Accountable ramUsage) {
}

@Override
public <FD extends AtomicFieldData, IFD extends IndexFieldData.Global<FD>> IFD load(final DirectoryReader indexReader, final IFD indexFieldData) throws Exception {
public <FD extends AtomicFieldData, IFD extends IndexFieldData.Global<FD>> IFD load(final DirectoryReader indexReader,
final IFD indexFieldData) throws Exception {
Copy link
Member

Choose a reason for hiding this comment

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

Could you indent this one more time so it doesn't line up with the method body?

@original-brownbear
Copy link
Member Author

@nik9000 thanks!

@original-brownbear original-brownbear merged commit db12005 into elastic:master Oct 26, 2018
@original-brownbear original-brownbear deleted the fielddata-line-lengths branch October 26, 2018 10:56
jasontedor added a commit to jasontedor/elasticsearch that referenced this pull request Oct 26, 2018
* 'master' of github.com:elastic/elasticsearch:
  Fix line length for org.elasticsearch.common.* files (elastic#34888)
  [ML] Extract common native process base class (elastic#34856)
  Refactor children aggregator into a generic ParentJoinAggregator (elastic#34845)
  [Style] Fix line lengths in action.admin.indices (elastic#34890)
  HLRC - add support for source exists API (elastic#34519)
  [CCR] Retry when no index shard stats can be found (elastic#34852)
  [Docs] audit logfile structured format (elastic#34584)
  [Test] Fix FullClusterRestartIT.testShrink() with copy_settings param (elastic#34853)
  Fix LineLength Check Suppressions: index.fielddata (elastic#34891)
  TEST: Stablize Minio Free Port Search (elastic#34894)
  Delete flaky SettingsBasedHostProviderIT test (elastic#34813)
  [ML] Include message in field_stats for text log files (elastic#34861)
  [TEST] HLRC: Expand failure messages in API checks (elastic#34838)
  Lowercase static final DeprecationLogger instance names (elastic#34887)
original-brownbear added a commit to original-brownbear/elasticsearch that referenced this pull request Oct 26, 2018
* Fix linelength suppressions in index.fielddata
  * Some lines that were too long were dead code => Removed them and all code that became dead because of it
* Relates elastic#34884
original-brownbear added a commit that referenced this pull request Oct 27, 2018
* Fix linelength suppressions in index.fielddata
  * Some lines that were too long were dead code => Removed them and all code that became dead because of it
* Relates #34884
kcm pushed a commit that referenced this pull request Oct 30, 2018
* Fix linelength suppressions in index.fielddata
  * Some lines that were too long were dead code => Removed them and all code that became dead because of it
* Relates #34884
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants