Quellcode durchsuchen

Clean up a few more instances of "metaData"

We recently cleaned up the use of the word "metadata" across the
codebase. A few more additional uses have trickled in, likely from
in-progress work. This commit cleans up these last few additional
instances.

Relates #54519
Jason Tedor vor 5 Jahren
Ursprung
Commit
515e408817

+ 6 - 6
server/src/test/java/org/elasticsearch/cluster/routing/allocation/AllocationServiceTests.java

@@ -149,7 +149,7 @@ public class AllocationServiceTests extends ESTestCase {
         nodesBuilder.add(new DiscoveryNode("node2", buildNewFakeTransportAddress(), Version.CURRENT));
         nodesBuilder.add(new DiscoveryNode("node3", buildNewFakeTransportAddress(), Version.CURRENT));
 
-        final Metadata.Builder metaData = Metadata.builder()
+        final Metadata.Builder metadata = Metadata.builder()
             // create 3 indices with different priorities. The high and low priority indices use the default allocator which (in this test)
             // does not allocate any replicas, whereas the medium priority one uses the unrealistic allocator which does allocate replicas
             .put(indexMetadata("highPriority", Settings.builder()
@@ -166,14 +166,14 @@ public class AllocationServiceTests extends ESTestCase {
                 .put(ExistingShardsAllocator.EXISTING_SHARDS_ALLOCATOR_SETTING.getKey(), "unknown")));
 
         final RoutingTable.Builder routingTableBuilder = RoutingTable.builder()
-            .addAsRecovery(metaData.get("highPriority"))
-            .addAsRecovery(metaData.get("mediumPriority"))
-            .addAsRecovery(metaData.get("lowPriority"))
-            .addAsRecovery(metaData.get("invalid"));
+            .addAsRecovery(metadata.get("highPriority"))
+            .addAsRecovery(metadata.get("mediumPriority"))
+            .addAsRecovery(metadata.get("lowPriority"))
+            .addAsRecovery(metadata.get("invalid"));
 
         final ClusterState clusterState = ClusterState.builder(ClusterName.DEFAULT)
             .nodes(nodesBuilder)
-            .metadata(metaData)
+            .metadata(metadata)
             .routingTable(routingTableBuilder.build())
             .build();
 

+ 2 - 2
x-pack/plugin/searchable-snapshots/src/test/java/org/elasticsearch/index/store/cache/CachedBlobContainerIndexInputTests.java

@@ -54,14 +54,14 @@ public class CachedBlobContainerIndexInputTests extends ESIndexInputTestCase {
                 final byte[] input = randomUnicodeOfLength(randomIntBetween(1, 100_000)).getBytes(StandardCharsets.UTF_8);
 
                 final String blobName = randomUnicodeOfLength(10);
-                final StoreFileMetadata metaData = new StoreFileMetadata(fileName, input.length, "_na", Version.CURRENT.luceneVersion);
+                final StoreFileMetadata metadata = new StoreFileMetadata(fileName, input.length, "_na", Version.CURRENT.luceneVersion);
 
                 final int partSize = randomBoolean() ? input.length : randomIntBetween(1, input.length);
 
                 final BlobStoreIndexShardSnapshot snapshot = new BlobStoreIndexShardSnapshot(
                     snapshotId.getName(),
                     0L,
-                    List.of(new BlobStoreIndexShardSnapshot.FileInfo(blobName, metaData, new ByteSizeValue(partSize))),
+                    List.of(new BlobStoreIndexShardSnapshot.FileInfo(blobName, metadata, new ByteSizeValue(partSize))),
                     0L,
                     0L,
                     0,