Correct name of IndexFieldData#loadGlobalDirect. (#60492)

It seems 'localGlobalDirect' was just a typo.
This commit is contained in:
Julie Tibshirani 2020-07-31 10:51:21 -07:00
parent 771e9f142a
commit f1d4fd8c3e
11 changed files with 13 additions and 13 deletions

View File

@ -253,7 +253,7 @@ public interface IndexFieldData<FD extends LeafFieldData> {
IndexFieldData<FD> loadGlobal(DirectoryReader indexReader);
IndexFieldData<FD> localGlobalDirect(DirectoryReader indexReader) throws Exception;
IndexFieldData<FD> loadGlobalDirect(DirectoryReader indexReader) throws Exception;
}
}

View File

@ -69,7 +69,7 @@ public interface IndexFieldDataCache {
@SuppressWarnings("unchecked")
public <FD extends LeafFieldData, IFD extends IndexFieldData.Global<FD>> IFD load(DirectoryReader indexReader,
IFD indexFieldData) throws Exception {
return (IFD) indexFieldData.localGlobalDirect(indexReader);
return (IFD) indexFieldData.loadGlobalDirect(indexReader);
}
@Override

View File

@ -40,7 +40,7 @@ public interface IndexOrdinalsFieldData extends IndexFieldData.Global<LeafOrdina
* Load a global view of the ordinals for the given {@link IndexReader}.
*/
@Override
IndexOrdinalsFieldData localGlobalDirect(DirectoryReader indexReader) throws Exception;
IndexOrdinalsFieldData loadGlobalDirect(DirectoryReader indexReader) throws Exception;
/**
* Returns the underlying {@link OrdinalMap} for this fielddata

View File

@ -92,7 +92,7 @@ public final class GlobalOrdinalsIndexFieldData implements IndexOrdinalsFieldDat
}
@Override
public IndexOrdinalsFieldData localGlobalDirect(DirectoryReader indexReader) throws Exception {
public IndexOrdinalsFieldData loadGlobalDirect(DirectoryReader indexReader) throws Exception {
return this;
}
@ -183,7 +183,7 @@ public final class GlobalOrdinalsIndexFieldData implements IndexOrdinalsFieldDat
}
@Override
public IndexOrdinalsFieldData localGlobalDirect(DirectoryReader indexReader) throws Exception {
public IndexOrdinalsFieldData loadGlobalDirect(DirectoryReader indexReader) throws Exception {
return this;
}

View File

@ -115,7 +115,7 @@ public abstract class AbstractIndexOrdinalsFieldData extends AbstractIndexFieldD
}
@Override
public IndexOrdinalsFieldData localGlobalDirect(DirectoryReader indexReader) throws Exception {
public IndexOrdinalsFieldData loadGlobalDirect(DirectoryReader indexReader) throws Exception {
return GlobalOrdinalsBuilder.build(
indexReader,
this,

View File

@ -176,7 +176,7 @@ public class ConstantIndexFieldData extends AbstractIndexOrdinalsFieldData {
}
@Override
public IndexOrdinalsFieldData localGlobalDirect(DirectoryReader indexReader) throws Exception {
public IndexOrdinalsFieldData loadGlobalDirect(DirectoryReader indexReader) throws Exception {
return loadGlobal(indexReader);
}

View File

@ -191,7 +191,7 @@ public class SortedSetOrdinalsIndexFieldData implements IndexOrdinalsFieldData {
}
@Override
public IndexOrdinalsFieldData localGlobalDirect(DirectoryReader indexReader) throws Exception {
public IndexOrdinalsFieldData loadGlobalDirect(DirectoryReader indexReader) throws Exception {
return GlobalOrdinalsBuilder.build(indexReader, this, breakerService, logger, scriptFunction);
}

View File

@ -171,7 +171,7 @@ public class IndicesFieldDataCache implements RemovalListener<IndicesFieldDataCa
final Accountable accountable = cache.computeIfAbsent(key, k -> {
ElasticsearchDirectoryReader.addReaderCloseListener(indexReader, IndexFieldCache.this);
Collections.addAll(k.listeners, this.listeners);
final Accountable ifd = (Accountable) indexFieldData.localGlobalDirect(indexReader);
final Accountable ifd = (Accountable) indexFieldData.loadGlobalDirect(indexReader);
for (Listener listener : k.listeners) {
try {
listener.onCache(shardId, fieldName, ifd);

View File

@ -115,7 +115,7 @@ public class FieldDataCacheTests extends ESTestCase {
public <FD extends LeafFieldData, IFD extends IndexFieldData.Global<FD>> IFD load(DirectoryReader indexReader,
IFD indexFieldData) throws Exception {
cachedGlobally++;
return (IFD) indexFieldData.localGlobalDirect(indexReader);
return (IFD) indexFieldData.loadGlobalDirect(indexReader);
}
@Override

View File

@ -393,8 +393,8 @@ public final class FlatObjectFieldMapper extends DynamicKeyFieldMapper {
}
@Override
public IndexOrdinalsFieldData localGlobalDirect(DirectoryReader indexReader) throws Exception {
IndexOrdinalsFieldData fieldData = delegate.localGlobalDirect(indexReader);
public IndexOrdinalsFieldData loadGlobalDirect(DirectoryReader indexReader) throws Exception {
IndexOrdinalsFieldData fieldData = delegate.loadGlobalDirect(indexReader);
return new KeyedFlatObjectFieldData(key, fieldData);
}

View File

@ -164,7 +164,7 @@ public class FieldDataCacheWithFieldSubsetReaderTests extends ESTestCase {
public <FD extends LeafFieldData, IFD extends IndexFieldData.Global<FD>> IFD load(DirectoryReader indexReader,
IFD indexFieldData) throws Exception {
topLevelBuilds++;
return (IFD) indexFieldData.localGlobalDirect(indexReader);
return (IFD) indexFieldData.loadGlobalDirect(indexReader);
}
@Override