Skip to content

Commit

Permalink
rebase and update
Browse files Browse the repository at this point in the history
Signed-off-by: Nicholas Walter Knize <[email protected]>
  • Loading branch information
nknize committed Oct 6, 2022
1 parent e4a72ea commit 524c433
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 20 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
### Removed
- Remove deprecated code to add node name into log pattern of log4j property file ([#4568](https://github.com/opensearch-project/OpenSearch/pull/4568))
- Unused object and import within TransportClusterAllocationExplainAction ([#4639](https://github.com/opensearch-project/OpenSearch/pull/4639))
- Remove LegacyESVersion.V_7_0_* and V_7_1_* Constants ([#2768](https://https://github.com/opensearch-project/OpenSearch/pull/2768))

### Fixed

Expand Down
11 changes: 0 additions & 11 deletions server/src/main/java/org/opensearch/common/joda/Joda.java
Original file line number Diff line number Diff line change
Expand Up @@ -386,17 +386,6 @@ public DateTimeField getField(Chronology chronology) {
}
};

/**
* Checks if a pattern is Joda-style.
* Joda style patterns are not always compatible with java.time patterns.
* @param version - creation version of the index where pattern was used
* @param pattern - the pattern to check
* @return - true if pattern is joda style, otherwise false
*/
public static boolean isJodaPattern(Version version, String pattern) {
return version.before(LegacyESVersion.V_7_0_0) && pattern.startsWith("8") == false;
}

/**
* parses epcoch timers
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@

package org.opensearch.indices;

import org.opensearch.Version;
import org.opensearch.index.mapper.DocCountFieldMapper;
import org.opensearch.index.mapper.DataStreamFieldMapper;
import org.opensearch.index.mapper.FieldNamesFieldMapper;
Expand Down Expand Up @@ -104,7 +103,6 @@ public Map<String, MetadataFieldMapper.TypeParser> getMetadataMappers() {
public void testBuiltinMappers() {
IndicesModule module = new IndicesModule(Collections.emptyList());
{
Version version = VersionUtils.randomVersionBetween(random(), Version.V_2_0_0, Version.CURRENT);
assertFalse(module.getMapperRegistry().getMapperParsers().isEmpty());
assertFalse(module.getMapperRegistry().getMetadataMapperParsers().isEmpty());
Map<String, MetadataFieldMapper.TypeParser> metadataMapperParsers = module.getMapperRegistry().getMetadataMapperParsers();
Expand All @@ -115,12 +113,7 @@ public void testBuiltinMappers() {
}
}
{
Version version = VersionUtils.randomVersionBetween(
random(),
Version.V_1_0_0,
VersionUtils.getPreviousVersion(Version.V_2_0_0)
);
assertEquals(EXPECTED_METADATA_FIELDS.length - 1, module.getMapperRegistry().getMetadataMapperParsers(version).size());
assertEquals(EXPECTED_METADATA_FIELDS.length - 1, module.getMapperRegistry().getMetadataMapperParsers().size());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
import org.opensearch.index.mapper.KeywordFieldMapper;
import org.opensearch.index.mapper.Mapper;
import org.opensearch.index.mapper.MapperService;
import org.opensearch.index.mapper.NestedPathFieldMapper;
import org.opensearch.index.shard.IllegalIndexShardStateException;
import org.opensearch.index.shard.IndexShard;
import org.opensearch.index.shard.IndexShardState;
Expand Down

0 comments on commit 524c433

Please sign in to comment.