From 612617920f4119e6ae69e1c79e68acb48ae13243 Mon Sep 17 00:00:00 2001 From: Eric Pugh Date: Tue, 19 Jul 2022 22:00:43 -0400 Subject: [PATCH] explicit imports (#949) --- .../solr/analytics/ExpressionFactory.java | 57 +++- .../test/org/apache/hadoop/fs/FileUtil.java | 32 +- .../apache/hadoop/fs/RawLocalFileSystem.java | 33 +- .../fsdataset/impl/BlockPoolSlice.java | 61 ++-- .../namenode/NameNodeResourceChecker.java | 4 +- .../org/apache/hadoop/util/DiskChecker.java | 16 +- .../solr/hdfs/cloud/StressHdfsTest.java | 6 +- .../hdfs/store/blockcache/BlockCacheTest.java | 4 +- .../solr/security/jwt/JWTAuthPluginTest.java | 8 +- .../update/ScriptUpdateProcessorFactory.java | 6 +- .../xslt/XSLTUpdateRequestHandler.java | 4 +- .../org/apache/solr/handler/sql/SolrRel.java | 5 +- .../apache/solr/handler/sql/SolrRules.java | 4 +- .../apache/solr/handler/sql/SolrTable.java | 37 ++- .../solr/handler/sql/SolrTableScan.java | 7 +- .../sql/SolrToEnumerableConverter.java | 12 +- .../handler/sql/functions/ArrayContains.java | 9 +- .../solrj/beans/DocumentObjectBinder.java | 16 +- .../apache/solr/client/solrj/beans/Field.java | 3 +- .../impl/BaseHttpClusterStateProvider.java | 2 +- .../org/apache/solr/client/solrj/io/Lang.java | 295 +++++++++++++++++- .../io/eval/BinomialCoefficientEvaluator.java | 2 +- .../solrj/io/graph/GatherNodesStream.java | 10 +- .../solr/client/solrj/io/graph/Node.java | 7 +- .../solrj/io/graph/ShortestPathStream.java | 5 +- .../solr/client/solrj/io/graph/Traversal.java | 7 +- .../solr/client/solrj/request/ApiMapping.java | 7 +- .../solrj/request/CollectionAdminRequest.java | 14 +- .../org/apache/solr/common/ConfigNode.java | 5 +- .../apache/solr/common/LazySolrCluster.java | 26 +- .../solr/common/util/FastJavaBinDecoder.java | 30 +- .../solr/common/util/JsonRecordReader.java | 21 +- .../solr/common/util/JsonSchemaValidator.java | 10 +- .../solr/common/util/SimpleOrderedMap.java | 4 +- .../solrj/src/java/org/noggit/JSONWriter.java | 4 +- ...lectionAdminRequestRequiredParamsTest.java | 7 +- .../solrj/impl/CloudSolrClientCacheTest.java | 4 +- .../solrj/io/stream/StreamExpressionTest.java | 15 +- .../solr/common/util/TestFastInputStream.java | 6 +- .../apache/solr/common/util/URLUtilTest.java | 4 +- .../java/org/apache/solr/JSONTestUtil.java | 8 +- 41 files changed, 691 insertions(+), 126 deletions(-) diff --git a/solr/modules/analytics/src/java/org/apache/solr/analytics/ExpressionFactory.java b/solr/modules/analytics/src/java/org/apache/solr/analytics/ExpressionFactory.java index 235175b2627..88320fe183f 100644 --- a/solr/modules/analytics/src/java/org/apache/solr/analytics/ExpressionFactory.java +++ b/solr/modules/analytics/src/java/org/apache/solr/analytics/ExpressionFactory.java @@ -28,21 +28,70 @@ import org.apache.solr.analytics.function.MergingReductionCollectionManager; import org.apache.solr.analytics.function.ReductionCollectionManager; import org.apache.solr.analytics.function.ReductionFunction; -import org.apache.solr.analytics.function.field.*; -import org.apache.solr.analytics.function.mapping.*; +import org.apache.solr.analytics.function.field.AnalyticsField; +import org.apache.solr.analytics.function.field.BooleanField; +import org.apache.solr.analytics.function.field.BooleanMultiField; +import org.apache.solr.analytics.function.field.DateField; +import org.apache.solr.analytics.function.field.DateMultiPointField; +import org.apache.solr.analytics.function.field.DateMultiTrieField; +import org.apache.solr.analytics.function.field.DoubleField; +import org.apache.solr.analytics.function.field.DoubleMultiPointField; +import org.apache.solr.analytics.function.field.DoubleMultiTrieField; +import org.apache.solr.analytics.function.field.FloatField; +import org.apache.solr.analytics.function.field.FloatMultiPointField; +import org.apache.solr.analytics.function.field.FloatMultiTrieField; +import org.apache.solr.analytics.function.field.IntField; +import org.apache.solr.analytics.function.field.IntMultiPointField; +import org.apache.solr.analytics.function.field.IntMultiTrieField; +import org.apache.solr.analytics.function.field.LongField; +import org.apache.solr.analytics.function.field.LongMultiPointField; +import org.apache.solr.analytics.function.field.LongMultiTrieField; +import org.apache.solr.analytics.function.field.StringField; +import org.apache.solr.analytics.function.field.StringMultiField; +import org.apache.solr.analytics.function.mapping.AbsoluteValueFunction; +import org.apache.solr.analytics.function.mapping.AddFunction; +import org.apache.solr.analytics.function.mapping.BottomFunction; import org.apache.solr.analytics.function.mapping.ComparisonFunction.GTEFunction; import org.apache.solr.analytics.function.mapping.ComparisonFunction.GTFunction; import org.apache.solr.analytics.function.mapping.ComparisonFunction.LTEFunction; import org.apache.solr.analytics.function.mapping.ComparisonFunction.LTFunction; +import org.apache.solr.analytics.function.mapping.ConcatFunction; import org.apache.solr.analytics.function.mapping.ConcatFunction.SeparatedConcatFunction; +import org.apache.solr.analytics.function.mapping.DateMathFunction; +import org.apache.solr.analytics.function.mapping.DateParseFunction; import org.apache.solr.analytics.function.mapping.DecimalNumericConversionFunction.CeilingFunction; import org.apache.solr.analytics.function.mapping.DecimalNumericConversionFunction.FloorFunction; import org.apache.solr.analytics.function.mapping.DecimalNumericConversionFunction.RoundFunction; +import org.apache.solr.analytics.function.mapping.DivideFunction; +import org.apache.solr.analytics.function.mapping.EqualFunction; +import org.apache.solr.analytics.function.mapping.ExistsFunction; +import org.apache.solr.analytics.function.mapping.FillMissingFunction; +import org.apache.solr.analytics.function.mapping.FilterFunction; +import org.apache.solr.analytics.function.mapping.IfFunction; +import org.apache.solr.analytics.function.mapping.LogFunction; import org.apache.solr.analytics.function.mapping.LogicFunction.AndFunction; import org.apache.solr.analytics.function.mapping.LogicFunction.OrFunction; -import org.apache.solr.analytics.function.reduction.*; +import org.apache.solr.analytics.function.mapping.MultFunction; +import org.apache.solr.analytics.function.mapping.NegateFunction; +import org.apache.solr.analytics.function.mapping.PowerFunction; +import org.apache.solr.analytics.function.mapping.RemoveFunction; +import org.apache.solr.analytics.function.mapping.ReplaceFunction; +import org.apache.solr.analytics.function.mapping.StringCastFunction; +import org.apache.solr.analytics.function.mapping.SubtractFunction; +import org.apache.solr.analytics.function.mapping.TopFunction; +import org.apache.solr.analytics.function.reduction.CountFunction; +import org.apache.solr.analytics.function.reduction.DocCountFunction; +import org.apache.solr.analytics.function.reduction.MaxFunction; +import org.apache.solr.analytics.function.reduction.MeanFunction; +import org.apache.solr.analytics.function.reduction.MedianFunction; +import org.apache.solr.analytics.function.reduction.MinFunction; +import org.apache.solr.analytics.function.reduction.MissingFunction; +import org.apache.solr.analytics.function.reduction.OrdinalFunction; +import org.apache.solr.analytics.function.reduction.PercentileFunction; +import org.apache.solr.analytics.function.reduction.SumFunction; +import org.apache.solr.analytics.function.reduction.UniqueFunction; import org.apache.solr.analytics.function.reduction.data.ReductionDataCollector; -import org.apache.solr.analytics.value.*; +import org.apache.solr.analytics.value.AnalyticsValueStream; import org.apache.solr.analytics.value.AnalyticsValueStream.ExpressionType; import org.apache.solr.analytics.value.constant.ConstantValue; import org.apache.solr.common.SolrException; diff --git a/solr/modules/hdfs/src/test/org/apache/hadoop/fs/FileUtil.java b/solr/modules/hdfs/src/test/org/apache/hadoop/fs/FileUtil.java index 677114dcae7..dbbb2b9f29e 100644 --- a/solr/modules/hdfs/src/test/org/apache/hadoop/fs/FileUtil.java +++ b/solr/modules/hdfs/src/test/org/apache/hadoop/fs/FileUtil.java @@ -18,6 +18,22 @@ package org.apache.hadoop.fs; +import org.apache.commons.collections4.map.CaseInsensitiveMap; +import org.apache.commons.compress.archivers.tar.TarArchiveEntry; +import org.apache.commons.compress.archivers.tar.TarArchiveInputStream; +import org.apache.hadoop.classification.InterfaceAudience; +import org.apache.hadoop.classification.InterfaceStability; +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.fs.permission.FsAction; +import org.apache.hadoop.fs.permission.FsPermission; +import org.apache.hadoop.io.IOUtils; +import org.apache.hadoop.io.nativeio.NativeIO; +import org.apache.hadoop.util.Shell; +import org.apache.hadoop.util.Shell.ShellCommandExecutor; +import org.apache.hadoop.util.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.BufferedReader; @@ -55,22 +71,6 @@ import java.util.zip.ZipFile; import java.util.zip.ZipInputStream; -import org.apache.commons.collections4.map.CaseInsensitiveMap; -import org.apache.commons.compress.archivers.tar.TarArchiveEntry; -import org.apache.commons.compress.archivers.tar.TarArchiveInputStream; -import org.apache.hadoop.classification.InterfaceAudience; -import org.apache.hadoop.classification.InterfaceStability; -import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.fs.permission.FsAction; -import org.apache.hadoop.fs.permission.FsPermission; -import org.apache.hadoop.io.IOUtils; -import org.apache.hadoop.io.nativeio.NativeIO; -import org.apache.hadoop.util.Shell; -import org.apache.hadoop.util.Shell.ShellCommandExecutor; -import org.apache.hadoop.util.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - /** * A collection of file-processing util methods */ diff --git a/solr/modules/hdfs/src/test/org/apache/hadoop/fs/RawLocalFileSystem.java b/solr/modules/hdfs/src/test/org/apache/hadoop/fs/RawLocalFileSystem.java index 8b971deb7e5..3c8a819cf9f 100644 --- a/solr/modules/hdfs/src/test/org/apache/hadoop/fs/RawLocalFileSystem.java +++ b/solr/modules/hdfs/src/test/org/apache/hadoop/fs/RawLocalFileSystem.java @@ -18,26 +18,40 @@ package org.apache.hadoop.fs; +import org.apache.hadoop.classification.InterfaceAudience; +import org.apache.hadoop.classification.InterfaceStability; +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.fs.impl.StoreImplementationUtils; +import org.apache.hadoop.fs.permission.FsPermission; +import org.apache.hadoop.fs.statistics.BufferedIOStatisticsOutputStream; +import org.apache.hadoop.fs.statistics.IOStatistics; +import org.apache.hadoop.fs.statistics.IOStatisticsSource; +import org.apache.hadoop.fs.statistics.impl.IOStatisticsStore; +import org.apache.hadoop.io.IOUtils; +import org.apache.hadoop.io.nativeio.NativeIO; import org.apache.hadoop.thirdparty.com.google.common.annotations.VisibleForTesting; +import org.apache.hadoop.util.Progressable; +import org.apache.hadoop.util.Shell; +import org.apache.hadoop.util.StringUtils; import java.io.BufferedOutputStream; import java.io.DataOutput; import java.io.EOFException; import java.io.File; +import java.io.FileDescriptor; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; -import java.io.FileDescriptor; import java.net.URI; import java.nio.ByteBuffer; import java.nio.file.Files; import java.nio.file.LinkOption; import java.nio.file.NoSuchFileException; import java.nio.file.Paths; -import java.nio.file.attribute.BasicFileAttributes; import java.nio.file.attribute.BasicFileAttributeView; +import java.nio.file.attribute.BasicFileAttributes; import java.nio.file.attribute.FileTime; import java.nio.file.attribute.PosixFileAttributes; import java.nio.file.attribute.PosixFilePermissions; @@ -47,21 +61,6 @@ import java.util.Optional; import java.util.concurrent.atomic.AtomicLong; -import org.apache.hadoop.classification.InterfaceAudience; -import org.apache.hadoop.classification.InterfaceStability; -import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.fs.impl.StoreImplementationUtils; -import org.apache.hadoop.fs.permission.FsPermission; -import org.apache.hadoop.fs.statistics.IOStatistics; -import org.apache.hadoop.fs.statistics.IOStatisticsSource; -import org.apache.hadoop.fs.statistics.BufferedIOStatisticsOutputStream; -import org.apache.hadoop.fs.statistics.impl.IOStatisticsStore; -import org.apache.hadoop.io.IOUtils; -import org.apache.hadoop.io.nativeio.NativeIO; -import org.apache.hadoop.util.Progressable; -import org.apache.hadoop.util.Shell; -import org.apache.hadoop.util.StringUtils; - import static org.apache.hadoop.fs.impl.PathCapabilitiesSupport.validatePathCapabilityArgs; import static org.apache.hadoop.fs.statistics.StreamStatisticNames.STREAM_READ_BYTES; import static org.apache.hadoop.fs.statistics.StreamStatisticNames.STREAM_READ_EXCEPTIONS; diff --git a/solr/modules/hdfs/src/test/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/BlockPoolSlice.java b/solr/modules/hdfs/src/test/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/BlockPoolSlice.java index 32aa3c6ad34..cd13a814b63 100644 --- a/solr/modules/hdfs/src/test/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/BlockPoolSlice.java +++ b/solr/modules/hdfs/src/test/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/BlockPoolSlice.java @@ -17,6 +17,35 @@ */ package org.apache.hadoop.hdfs.server.datanode.fsdataset.impl; +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.fs.CommonConfigurationKeys; +import org.apache.hadoop.hdfs.DFSConfigKeys; +import org.apache.hadoop.hdfs.DFSUtilClient; +import org.apache.hadoop.hdfs.protocol.Block; +import org.apache.hadoop.hdfs.protocol.BlockListAsLongs; +import org.apache.hadoop.hdfs.protocol.BlockListAsLongs.BlockReportReplica; +import org.apache.hadoop.hdfs.server.common.HdfsServerConstants.ReplicaState; +import org.apache.hadoop.hdfs.server.datanode.BlockMetadataHeader; +import org.apache.hadoop.hdfs.server.datanode.DataStorage; +import org.apache.hadoop.hdfs.server.datanode.DatanodeUtil; +import org.apache.hadoop.hdfs.server.datanode.FileIoProvider; +import org.apache.hadoop.hdfs.server.datanode.ReplicaBuilder; +import org.apache.hadoop.hdfs.server.datanode.ReplicaInfo; +import org.apache.hadoop.hdfs.server.datanode.fsdataset.ReplicaInputStreams; +import org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.RamDiskReplicaTracker.RamDiskReplica; +import org.apache.hadoop.io.IOUtils; +import org.apache.hadoop.io.MultipleIOException; +import org.apache.hadoop.thirdparty.com.google.common.annotations.VisibleForTesting; +import org.apache.hadoop.util.DataChecksum; +import org.apache.hadoop.util.DataChecksum.Type; +import org.apache.hadoop.util.DiskChecker; +import org.apache.hadoop.util.DiskChecker.DiskErrorException; +import org.apache.hadoop.util.ShutdownHookManager; +import org.apache.hadoop.util.Timer; +import org.apache.solr.hdfs.cloud.HdfsTestUtil; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import java.io.BufferedInputStream; import java.io.DataInputStream; import java.io.File; @@ -39,39 +68,9 @@ import java.util.concurrent.ForkJoinPool; import java.util.concurrent.ForkJoinTask; import java.util.concurrent.RecursiveAction; +import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.locks.ReentrantReadWriteLock; -import java.util.concurrent.TimeUnit; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.fs.CommonConfigurationKeys; -import org.apache.hadoop.hdfs.DFSConfigKeys; -import org.apache.hadoop.hdfs.DFSUtilClient; -import org.apache.hadoop.hdfs.protocol.Block; -import org.apache.hadoop.hdfs.protocol.BlockListAsLongs; -import org.apache.hadoop.hdfs.protocol.BlockListAsLongs.BlockReportReplica; -import org.apache.hadoop.hdfs.server.common.HdfsServerConstants.ReplicaState; -import org.apache.hadoop.hdfs.server.datanode.FileIoProvider; -import org.apache.hadoop.hdfs.server.datanode.BlockMetadataHeader; -import org.apache.hadoop.hdfs.server.datanode.DataStorage; -import org.apache.hadoop.hdfs.server.datanode.DatanodeUtil; -import org.apache.hadoop.hdfs.server.datanode.ReplicaInfo; -import org.apache.hadoop.hdfs.server.datanode.ReplicaBuilder; -import org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.RamDiskReplicaTracker.RamDiskReplica; -import org.apache.hadoop.hdfs.server.datanode.fsdataset.ReplicaInputStreams; -import org.apache.hadoop.io.IOUtils; -import org.apache.hadoop.io.MultipleIOException; -import org.apache.hadoop.util.DataChecksum; -import org.apache.hadoop.util.DataChecksum.Type; -import org.apache.hadoop.util.DiskChecker; -import org.apache.hadoop.util.DiskChecker.DiskErrorException; -import org.apache.hadoop.util.ShutdownHookManager; -import org.apache.hadoop.util.Timer; -import org.apache.solr.hdfs.cloud.HdfsTestUtil; - -import org.apache.hadoop.thirdparty.com.google.common.annotations.VisibleForTesting; /** * A block pool slice represents a portion of a block pool stored on a volume. diff --git a/solr/modules/hdfs/src/test/org/apache/hadoop/hdfs/server/namenode/NameNodeResourceChecker.java b/solr/modules/hdfs/src/test/org/apache/hadoop/hdfs/server/namenode/NameNodeResourceChecker.java index 0f500e1ef69..f911d4801fb 100644 --- a/solr/modules/hdfs/src/test/org/apache/hadoop/hdfs/server/namenode/NameNodeResourceChecker.java +++ b/solr/modules/hdfs/src/test/org/apache/hadoop/hdfs/server/namenode/NameNodeResourceChecker.java @@ -17,11 +17,11 @@ */ package org.apache.hadoop.hdfs.server.namenode; -import java.io.IOException; - import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.conf.Configuration; +import java.io.IOException; + /** * * NameNodeResourceChecker provides a method - diff --git a/solr/modules/hdfs/src/test/org/apache/hadoop/util/DiskChecker.java b/solr/modules/hdfs/src/test/org/apache/hadoop/util/DiskChecker.java index fab293b21f7..113e73d805b 100644 --- a/solr/modules/hdfs/src/test/org/apache/hadoop/util/DiskChecker.java +++ b/solr/modules/hdfs/src/test/org/apache/hadoop/util/DiskChecker.java @@ -18,14 +18,6 @@ package org.apache.hadoop.util; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; -import java.util.UUID; -import java.util.concurrent.atomic.AtomicReference; - -import org.apache.hadoop.thirdparty.com.google.common.annotations.VisibleForTesting; import org.apache.commons.io.FileUtils; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceStability; @@ -34,9 +26,17 @@ import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.permission.FsPermission; import org.apache.hadoop.io.IOUtils; +import org.apache.hadoop.thirdparty.com.google.common.annotations.VisibleForTesting; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.util.UUID; +import java.util.concurrent.atomic.AtomicReference; + /** * Class that provides utility functions for checking disk problem */ diff --git a/solr/modules/hdfs/src/test/org/apache/solr/hdfs/cloud/StressHdfsTest.java b/solr/modules/hdfs/src/test/org/apache/solr/hdfs/cloud/StressHdfsTest.java index 8bf2f37c874..065f183c2a0 100644 --- a/solr/modules/hdfs/src/test/org/apache/solr/hdfs/cloud/StressHdfsTest.java +++ b/solr/modules/hdfs/src/test/org/apache/solr/hdfs/cloud/StressHdfsTest.java @@ -40,7 +40,11 @@ import org.apache.solr.client.solrj.impl.HttpSolrClient; import org.apache.solr.client.solrj.request.QueryRequest; import org.apache.solr.cloud.AbstractBasicDistributedZkTestBase; -import org.apache.solr.common.cloud.*; +import org.apache.solr.common.cloud.ClusterState; +import org.apache.solr.common.cloud.DocCollection; +import org.apache.solr.common.cloud.Replica; +import org.apache.solr.common.cloud.Slice; +import org.apache.solr.common.cloud.ZkStateReader; import org.apache.solr.common.params.CollectionParams.CollectionAction; import org.apache.solr.common.params.ModifiableSolrParams; import org.apache.solr.common.util.NamedList; diff --git a/solr/modules/hdfs/src/test/org/apache/solr/hdfs/store/blockcache/BlockCacheTest.java b/solr/modules/hdfs/src/test/org/apache/solr/hdfs/store/blockcache/BlockCacheTest.java index f3c7f7c7efb..8e1fbaad21c 100644 --- a/solr/modules/hdfs/src/test/org/apache/solr/hdfs/store/blockcache/BlockCacheTest.java +++ b/solr/modules/hdfs/src/test/org/apache/solr/hdfs/store/blockcache/BlockCacheTest.java @@ -16,7 +16,9 @@ */ package org.apache.solr.hdfs.store.blockcache; -import com.github.benmanes.caffeine.cache.*; +import com.github.benmanes.caffeine.cache.Caffeine; +import com.github.benmanes.caffeine.cache.RemovalCause; +import com.github.benmanes.caffeine.cache.RemovalListener; import java.util.Arrays; import java.util.Random; import java.util.concurrent.atomic.AtomicBoolean; diff --git a/solr/modules/jwt-auth/src/test/org/apache/solr/security/jwt/JWTAuthPluginTest.java b/solr/modules/jwt-auth/src/test/org/apache/solr/security/jwt/JWTAuthPluginTest.java index e25d2fb008a..1abbdfa4e11 100644 --- a/solr/modules/jwt-auth/src/test/org/apache/solr/security/jwt/JWTAuthPluginTest.java +++ b/solr/modules/jwt-auth/src/test/org/apache/solr/security/jwt/JWTAuthPluginTest.java @@ -16,7 +16,13 @@ */ package org.apache.solr.security.jwt; -import static org.apache.solr.security.jwt.JWTAuthPlugin.JWTAuthenticationResponse.AuthCode.*; +import static org.apache.solr.security.jwt.JWTAuthPlugin.JWTAuthenticationResponse.AuthCode.AUTZ_HEADER_PROBLEM; +import static org.apache.solr.security.jwt.JWTAuthPlugin.JWTAuthenticationResponse.AuthCode.CLAIM_MISMATCH; +import static org.apache.solr.security.jwt.JWTAuthPlugin.JWTAuthenticationResponse.AuthCode.JWT_VALIDATION_EXCEPTION; +import static org.apache.solr.security.jwt.JWTAuthPlugin.JWTAuthenticationResponse.AuthCode.NO_AUTZ_HEADER; +import static org.apache.solr.security.jwt.JWTAuthPlugin.JWTAuthenticationResponse.AuthCode.PASS_THROUGH; +import static org.apache.solr.security.jwt.JWTAuthPlugin.JWTAuthenticationResponse.AuthCode.PRINCIPAL_MISSING; +import static org.apache.solr.security.jwt.JWTAuthPlugin.JWTAuthenticationResponse.AuthCode.SCOPE_MISSING; import java.io.IOException; import java.io.InputStream; diff --git a/solr/modules/scripting/src/java/org/apache/solr/scripting/update/ScriptUpdateProcessorFactory.java b/solr/modules/scripting/src/java/org/apache/solr/scripting/update/ScriptUpdateProcessorFactory.java index a5de3f64588..6484dad2949 100644 --- a/solr/modules/scripting/src/java/org/apache/solr/scripting/update/ScriptUpdateProcessorFactory.java +++ b/solr/modules/scripting/src/java/org/apache/solr/scripting/update/ScriptUpdateProcessorFactory.java @@ -48,7 +48,11 @@ import org.apache.solr.request.LocalSolrQueryRequest; import org.apache.solr.request.SolrQueryRequest; import org.apache.solr.response.SolrQueryResponse; -import org.apache.solr.update.*; +import org.apache.solr.update.AddUpdateCommand; +import org.apache.solr.update.CommitUpdateCommand; +import org.apache.solr.update.DeleteUpdateCommand; +import org.apache.solr.update.MergeIndexesCommand; +import org.apache.solr.update.RollbackUpdateCommand; import org.apache.solr.update.processor.UpdateRequestProcessor; import org.apache.solr.update.processor.UpdateRequestProcessorFactory; import org.apache.solr.util.plugin.SolrCoreAware; diff --git a/solr/modules/scripting/src/java/org/apache/solr/scripting/xslt/XSLTUpdateRequestHandler.java b/solr/modules/scripting/src/java/org/apache/solr/scripting/xslt/XSLTUpdateRequestHandler.java index a7ff851e4b1..f5530c769ff 100644 --- a/solr/modules/scripting/src/java/org/apache/solr/scripting/xslt/XSLTUpdateRequestHandler.java +++ b/solr/modules/scripting/src/java/org/apache/solr/scripting/xslt/XSLTUpdateRequestHandler.java @@ -17,7 +17,9 @@ package org.apache.solr.scripting.xslt; -import static org.apache.solr.scripting.xslt.XSLTConstants.*; +import static org.apache.solr.scripting.xslt.XSLTConstants.TR; +import static org.apache.solr.scripting.xslt.XSLTConstants.XSLT_CACHE_DEFAULT; +import static org.apache.solr.scripting.xslt.XSLTConstants.XSLT_CACHE_PARAM; import com.google.common.annotations.VisibleForTesting; import java.util.Map; diff --git a/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrRel.java b/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrRel.java index 23e19f3e396..072adeaae3a 100644 --- a/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrRel.java +++ b/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrRel.java @@ -18,7 +18,10 @@ import static org.apache.solr.handler.sql.SolrAggregate.solrAggMetricId; -import java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import org.apache.calcite.plan.Convention; import org.apache.calcite.plan.RelOptTable; import org.apache.calcite.rel.RelNode; diff --git a/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrRules.java b/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrRules.java index 3358afb598c..a0b585af077 100644 --- a/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrRules.java +++ b/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrRules.java @@ -21,7 +21,9 @@ import java.util.List; import java.util.function.Predicate; import org.apache.calcite.adapter.java.JavaTypeFactory; -import org.apache.calcite.plan.*; +import org.apache.calcite.plan.Convention; +import org.apache.calcite.plan.RelOptRule; +import org.apache.calcite.plan.RelTraitSet; import org.apache.calcite.rel.RelCollations; import org.apache.calcite.rel.RelNode; import org.apache.calcite.rel.convert.ConverterRule; diff --git a/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrTable.java b/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrTable.java index f376951118f..b0602d4d6ed 100644 --- a/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrTable.java +++ b/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrTable.java @@ -21,10 +21,22 @@ import static org.apache.solr.common.params.CommonParams.SORT; import java.io.IOException; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Properties; +import java.util.Set; import java.util.stream.Collectors; import org.apache.calcite.adapter.java.AbstractQueryableTable; -import org.apache.calcite.linq4j.*; +import org.apache.calcite.linq4j.AbstractEnumerable; +import org.apache.calcite.linq4j.Enumerable; +import org.apache.calcite.linq4j.Enumerator; +import org.apache.calcite.linq4j.QueryProvider; +import org.apache.calcite.linq4j.Queryable; import org.apache.calcite.plan.RelOptCluster; import org.apache.calcite.plan.RelOptTable; import org.apache.calcite.rel.RelNode; @@ -52,10 +64,27 @@ import org.apache.solr.client.solrj.io.eval.OrEvaluator; import org.apache.solr.client.solrj.io.eval.RawValueEvaluator; import org.apache.solr.client.solrj.io.eval.RecursiveBooleanEvaluator; -import org.apache.solr.client.solrj.io.stream.*; +import org.apache.solr.client.solrj.io.stream.CloudSolrStream; +import org.apache.solr.client.solrj.io.stream.FacetStream; +import org.apache.solr.client.solrj.io.stream.HavingStream; +import org.apache.solr.client.solrj.io.stream.ParallelStream; +import org.apache.solr.client.solrj.io.stream.RankStream; +import org.apache.solr.client.solrj.io.stream.RollupStream; +import org.apache.solr.client.solrj.io.stream.SortStream; +import org.apache.solr.client.solrj.io.stream.StatsStream; +import org.apache.solr.client.solrj.io.stream.StreamContext; +import org.apache.solr.client.solrj.io.stream.TupleStream; +import org.apache.solr.client.solrj.io.stream.UniqueStream; import org.apache.solr.client.solrj.io.stream.expr.StreamExpressionParser; import org.apache.solr.client.solrj.io.stream.expr.StreamFactory; -import org.apache.solr.client.solrj.io.stream.metrics.*; +import org.apache.solr.client.solrj.io.stream.metrics.Bucket; +import org.apache.solr.client.solrj.io.stream.metrics.CountDistinctMetric; +import org.apache.solr.client.solrj.io.stream.metrics.CountMetric; +import org.apache.solr.client.solrj.io.stream.metrics.MaxMetric; +import org.apache.solr.client.solrj.io.stream.metrics.MeanMetric; +import org.apache.solr.client.solrj.io.stream.metrics.Metric; +import org.apache.solr.client.solrj.io.stream.metrics.MinMetric; +import org.apache.solr.client.solrj.io.stream.metrics.SumMetric; import org.apache.solr.common.params.CommonParams; import org.apache.solr.common.params.ModifiableSolrParams; diff --git a/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrTableScan.java b/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrTableScan.java index ed264fd5a3c..92d2f9c4134 100644 --- a/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrTableScan.java +++ b/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrTableScan.java @@ -18,7 +18,12 @@ import java.util.List; import org.apache.calcite.adapter.enumerable.EnumerableRules; -import org.apache.calcite.plan.*; +import org.apache.calcite.plan.RelOptCluster; +import org.apache.calcite.plan.RelOptCost; +import org.apache.calcite.plan.RelOptPlanner; +import org.apache.calcite.plan.RelOptRule; +import org.apache.calcite.plan.RelOptTable; +import org.apache.calcite.plan.RelTraitSet; import org.apache.calcite.rel.RelNode; import org.apache.calcite.rel.core.TableScan; import org.apache.calcite.rel.metadata.RelMetadataQuery; diff --git a/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrToEnumerableConverter.java b/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrToEnumerableConverter.java index 82dfb4b0fd8..29b0f4c4679 100644 --- a/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrToEnumerableConverter.java +++ b/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrToEnumerableConverter.java @@ -21,12 +21,20 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; -import org.apache.calcite.adapter.enumerable.*; +import org.apache.calcite.adapter.enumerable.EnumerableRel; +import org.apache.calcite.adapter.enumerable.EnumerableRelImplementor; +import org.apache.calcite.adapter.enumerable.JavaRowFormat; +import org.apache.calcite.adapter.enumerable.PhysType; +import org.apache.calcite.adapter.enumerable.PhysTypeImpl; import org.apache.calcite.linq4j.tree.BlockBuilder; import org.apache.calcite.linq4j.tree.Expression; import org.apache.calcite.linq4j.tree.Expressions; import org.apache.calcite.linq4j.tree.MethodCallExpression; -import org.apache.calcite.plan.*; +import org.apache.calcite.plan.ConventionTraitDef; +import org.apache.calcite.plan.RelOptCluster; +import org.apache.calcite.plan.RelOptCost; +import org.apache.calcite.plan.RelOptPlanner; +import org.apache.calcite.plan.RelTraitSet; import org.apache.calcite.rel.RelNode; import org.apache.calcite.rel.convert.ConverterImpl; import org.apache.calcite.rel.metadata.RelMetadataQuery; diff --git a/solr/modules/sql/src/java/org/apache/solr/handler/sql/functions/ArrayContains.java b/solr/modules/sql/src/java/org/apache/solr/handler/sql/functions/ArrayContains.java index d9606556e3d..deb0ecf05a2 100644 --- a/solr/modules/sql/src/java/org/apache/solr/handler/sql/functions/ArrayContains.java +++ b/solr/modules/sql/src/java/org/apache/solr/handler/sql/functions/ArrayContains.java @@ -20,7 +20,14 @@ import java.util.Arrays; import java.util.List; import org.apache.calcite.rel.type.RelDataType; -import org.apache.calcite.sql.*; +import org.apache.calcite.sql.SqlBasicCall; +import org.apache.calcite.sql.SqlCall; +import org.apache.calcite.sql.SqlCallBinding; +import org.apache.calcite.sql.SqlFunction; +import org.apache.calcite.sql.SqlFunctionCategory; +import org.apache.calcite.sql.SqlKind; +import org.apache.calcite.sql.SqlNode; +import org.apache.calcite.sql.SqlOperandCountRange; import org.apache.calcite.sql.type.ReturnTypes; import org.apache.calcite.sql.type.SqlOperandCountRanges; import org.apache.calcite.sql.validate.SqlValidator; diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/beans/DocumentObjectBinder.java b/solr/solrj/src/java/org/apache/solr/client/solrj/beans/DocumentObjectBinder.java index beff1850219..8f6a2058e6a 100644 --- a/solr/solrj/src/java/org/apache/solr/client/solrj/beans/DocumentObjectBinder.java +++ b/solr/solrj/src/java/org/apache/solr/client/solrj/beans/DocumentObjectBinder.java @@ -16,11 +16,23 @@ */ package org.apache.solr.client.solrj.beans; -import java.lang.reflect.*; +import java.lang.reflect.AccessibleObject; +import java.lang.reflect.Array; +import java.lang.reflect.GenericArrayType; +import java.lang.reflect.Method; +import java.lang.reflect.ParameterizedType; +import java.lang.reflect.Type; import java.nio.ByteBuffer; import java.security.AccessController; import java.security.PrivilegedAction; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.regex.Pattern; import org.apache.solr.common.SolrDocument; diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/beans/Field.java b/solr/solrj/src/java/org/apache/solr/client/solrj/beans/Field.java index cf7f782069b..c488797ecba 100644 --- a/solr/solrj/src/java/org/apache/solr/client/solrj/beans/Field.java +++ b/solr/solrj/src/java/org/apache/solr/client/solrj/beans/Field.java @@ -16,7 +16,8 @@ */ package org.apache.solr.client.solrj.beans; -import static java.lang.annotation.ElementType.*; +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.RetentionPolicy.RUNTIME; import static org.apache.solr.client.solrj.beans.DocumentObjectBinder.DEFAULT; diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseHttpClusterStateProvider.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseHttpClusterStateProvider.java index 93eccdc0ddc..be08057d271 100644 --- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseHttpClusterStateProvider.java +++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseHttpClusterStateProvider.java @@ -17,7 +17,7 @@ package org.apache.solr.client.solrj.impl; -import static org.apache.solr.client.solrj.impl.BaseHttpSolrClient.*; +import static org.apache.solr.client.solrj.impl.BaseHttpSolrClient.RemoteSolrException; import java.io.IOException; import java.lang.invoke.MethodHandles; diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/Lang.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/Lang.java index 4fffe69d0be..4da6766cb44 100644 --- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/Lang.java +++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/Lang.java @@ -22,7 +22,233 @@ import org.apache.solr.client.solrj.io.comp.FieldComparator; import org.apache.solr.client.solrj.io.comp.MultipleFieldComparator; import org.apache.solr.client.solrj.io.comp.StreamComparator; -import org.apache.solr.client.solrj.io.eval.*; +import org.apache.solr.client.solrj.io.eval.AbsoluteValueEvaluator; +import org.apache.solr.client.solrj.io.eval.AddEvaluator; +import org.apache.solr.client.solrj.io.eval.AkimaEvaluator; +import org.apache.solr.client.solrj.io.eval.AndEvaluator; +import org.apache.solr.client.solrj.io.eval.AnovaEvaluator; +import org.apache.solr.client.solrj.io.eval.AppendEvaluator; +import org.apache.solr.client.solrj.io.eval.ArcCosineEvaluator; +import org.apache.solr.client.solrj.io.eval.ArcSineEvaluator; +import org.apache.solr.client.solrj.io.eval.ArcTangentEvaluator; +import org.apache.solr.client.solrj.io.eval.ArrayEvaluator; +import org.apache.solr.client.solrj.io.eval.AscEvaluator; +import org.apache.solr.client.solrj.io.eval.BetaDistributionEvaluator; +import org.apache.solr.client.solrj.io.eval.BicubicSplineEvaluator; +import org.apache.solr.client.solrj.io.eval.BinomialCoefficientEvaluator; +import org.apache.solr.client.solrj.io.eval.BinomialDistributionEvaluator; +import org.apache.solr.client.solrj.io.eval.CanberraEvaluator; +import org.apache.solr.client.solrj.io.eval.CeilingEvaluator; +import org.apache.solr.client.solrj.io.eval.ChebyshevEvaluator; +import org.apache.solr.client.solrj.io.eval.ChiSquareDataSetEvaluator; +import org.apache.solr.client.solrj.io.eval.CoalesceEvaluator; +import org.apache.solr.client.solrj.io.eval.ColumnAtEvaluator; +import org.apache.solr.client.solrj.io.eval.ColumnCountEvaluator; +import org.apache.solr.client.solrj.io.eval.ColumnEvaluator; +import org.apache.solr.client.solrj.io.eval.ConcatEvaluator; +import org.apache.solr.client.solrj.io.eval.ConstantDistributionEvaluator; +import org.apache.solr.client.solrj.io.eval.ConversionEvaluator; +import org.apache.solr.client.solrj.io.eval.ConvexHullEvaluator; +import org.apache.solr.client.solrj.io.eval.ConvolutionEvaluator; +import org.apache.solr.client.solrj.io.eval.CopyOfEvaluator; +import org.apache.solr.client.solrj.io.eval.CopyOfRangeEvaluator; +import org.apache.solr.client.solrj.io.eval.CorrelationEvaluator; +import org.apache.solr.client.solrj.io.eval.CorrelationSignificanceEvaluator; +import org.apache.solr.client.solrj.io.eval.CosineDistanceEvaluator; +import org.apache.solr.client.solrj.io.eval.CosineEvaluator; +import org.apache.solr.client.solrj.io.eval.CosineSimilarityEvaluator; +import org.apache.solr.client.solrj.io.eval.CovarianceEvaluator; +import org.apache.solr.client.solrj.io.eval.CubedRootEvaluator; +import org.apache.solr.client.solrj.io.eval.CumulativeProbabilityEvaluator; +import org.apache.solr.client.solrj.io.eval.DateEvaluator; +import org.apache.solr.client.solrj.io.eval.DbscanEvaluator; +import org.apache.solr.client.solrj.io.eval.DensityEvaluator; +import org.apache.solr.client.solrj.io.eval.DerivativeEvaluator; +import org.apache.solr.client.solrj.io.eval.DescribeEvaluator; +import org.apache.solr.client.solrj.io.eval.DistanceEvaluator; +import org.apache.solr.client.solrj.io.eval.DivideEvaluator; +import org.apache.solr.client.solrj.io.eval.DotProductEvaluator; +import org.apache.solr.client.solrj.io.eval.DoubleEvaluator; +import org.apache.solr.client.solrj.io.eval.EBEAddEvaluator; +import org.apache.solr.client.solrj.io.eval.EBEDivideEvaluator; +import org.apache.solr.client.solrj.io.eval.EBEMultiplyEvaluator; +import org.apache.solr.client.solrj.io.eval.EBESubtractEvaluator; +import org.apache.solr.client.solrj.io.eval.EarthMoversEvaluator; +import org.apache.solr.client.solrj.io.eval.EmpiricalDistributionEvaluator; +import org.apache.solr.client.solrj.io.eval.EnclosingDiskEvaluator; +import org.apache.solr.client.solrj.io.eval.EnumeratedDistributionEvaluator; +import org.apache.solr.client.solrj.io.eval.EqualToEvaluator; +import org.apache.solr.client.solrj.io.eval.EuclideanEvaluator; +import org.apache.solr.client.solrj.io.eval.ExclusiveOrEvaluator; +import org.apache.solr.client.solrj.io.eval.ExponentialMovingAverageEvaluator; +import org.apache.solr.client.solrj.io.eval.FFTEvaluator; +import org.apache.solr.client.solrj.io.eval.FactorialEvaluator; +import org.apache.solr.client.solrj.io.eval.FeatureSelectEvaluator; +import org.apache.solr.client.solrj.io.eval.FindDelayEvaluator; +import org.apache.solr.client.solrj.io.eval.FloorEvaluator; +import org.apache.solr.client.solrj.io.eval.FrequencyTableEvaluator; +import org.apache.solr.client.solrj.io.eval.FuzzyKmeansEvaluator; +import org.apache.solr.client.solrj.io.eval.GTestDataSetEvaluator; +import org.apache.solr.client.solrj.io.eval.GammaDistributionEvaluator; +import org.apache.solr.client.solrj.io.eval.GaussFitEvaluator; +import org.apache.solr.client.solrj.io.eval.GeometricDistributionEvaluator; +import org.apache.solr.client.solrj.io.eval.GetAmplitudeEvaluator; +import org.apache.solr.client.solrj.io.eval.GetAngularFrequencyEvaluator; +import org.apache.solr.client.solrj.io.eval.GetAreaEvaluator; +import org.apache.solr.client.solrj.io.eval.GetAttributeEvaluator; +import org.apache.solr.client.solrj.io.eval.GetAttributesEvaluator; +import org.apache.solr.client.solrj.io.eval.GetBaryCenterEvaluator; +import org.apache.solr.client.solrj.io.eval.GetBoundarySizeEvaluator; +import org.apache.solr.client.solrj.io.eval.GetCacheEvaluator; +import org.apache.solr.client.solrj.io.eval.GetCenterEvaluator; +import org.apache.solr.client.solrj.io.eval.GetCentroidsEvaluator; +import org.apache.solr.client.solrj.io.eval.GetClusterEvaluator; +import org.apache.solr.client.solrj.io.eval.GetColumnLabelsEvaluator; +import org.apache.solr.client.solrj.io.eval.GetMembershipMatrixEvaluator; +import org.apache.solr.client.solrj.io.eval.GetPhaseEvaluator; +import org.apache.solr.client.solrj.io.eval.GetRadiusEvaluator; +import org.apache.solr.client.solrj.io.eval.GetRowLabelsEvaluator; +import org.apache.solr.client.solrj.io.eval.GetSupportPointsEvaluator; +import org.apache.solr.client.solrj.io.eval.GetValueEvaluator; +import org.apache.solr.client.solrj.io.eval.GetVerticesEvaluator; +import org.apache.solr.client.solrj.io.eval.GrandSumEvaluator; +import org.apache.solr.client.solrj.io.eval.GreaterThanEqualToEvaluator; +import org.apache.solr.client.solrj.io.eval.GreaterThanEvaluator; +import org.apache.solr.client.solrj.io.eval.HarmonicFitEvaluator; +import org.apache.solr.client.solrj.io.eval.HistogramEvaluator; +import org.apache.solr.client.solrj.io.eval.HyperbolicCosineEvaluator; +import org.apache.solr.client.solrj.io.eval.HyperbolicSineEvaluator; +import org.apache.solr.client.solrj.io.eval.HyperbolicTangentEvaluator; +import org.apache.solr.client.solrj.io.eval.IFFTEvaluator; +import org.apache.solr.client.solrj.io.eval.IfThenElseEvaluator; +import org.apache.solr.client.solrj.io.eval.IndexOfEvaluator; +import org.apache.solr.client.solrj.io.eval.IntegrateEvaluator; +import org.apache.solr.client.solrj.io.eval.IsNullEvaluator; +import org.apache.solr.client.solrj.io.eval.KmeansEvaluator; +import org.apache.solr.client.solrj.io.eval.KnnEvaluator; +import org.apache.solr.client.solrj.io.eval.KnnRegressionEvaluator; +import org.apache.solr.client.solrj.io.eval.KolmogorovSmirnovEvaluator; +import org.apache.solr.client.solrj.io.eval.L1NormEvaluator; +import org.apache.solr.client.solrj.io.eval.LInfNormEvaluator; +import org.apache.solr.client.solrj.io.eval.LatLonVectorsEvaluator; +import org.apache.solr.client.solrj.io.eval.LeftShiftEvaluator; +import org.apache.solr.client.solrj.io.eval.LengthEvaluator; +import org.apache.solr.client.solrj.io.eval.LerpEvaluator; +import org.apache.solr.client.solrj.io.eval.LessThanEqualToEvaluator; +import org.apache.solr.client.solrj.io.eval.LessThanEvaluator; +import org.apache.solr.client.solrj.io.eval.ListCacheEvaluator; +import org.apache.solr.client.solrj.io.eval.LoessEvaluator; +import org.apache.solr.client.solrj.io.eval.Log10Evaluator; +import org.apache.solr.client.solrj.io.eval.LogNormalDistributionEvaluator; +import org.apache.solr.client.solrj.io.eval.LongEvaluator; +import org.apache.solr.client.solrj.io.eval.LowerEvaluator; +import org.apache.solr.client.solrj.io.eval.ManhattanEvaluator; +import org.apache.solr.client.solrj.io.eval.MannWhitneyUEvaluator; +import org.apache.solr.client.solrj.io.eval.MarkovChainEvaluator; +import org.apache.solr.client.solrj.io.eval.MatchesEvaluator; +import org.apache.solr.client.solrj.io.eval.MatrixEvaluator; +import org.apache.solr.client.solrj.io.eval.MatrixMultiplyEvaluator; +import org.apache.solr.client.solrj.io.eval.MeanDifferenceEvaluator; +import org.apache.solr.client.solrj.io.eval.MeanEvaluator; +import org.apache.solr.client.solrj.io.eval.MemsetEvaluator; +import org.apache.solr.client.solrj.io.eval.MinMaxScaleEvaluator; +import org.apache.solr.client.solrj.io.eval.ModeEvaluator; +import org.apache.solr.client.solrj.io.eval.ModuloEvaluator; +import org.apache.solr.client.solrj.io.eval.MonteCarloEvaluator; +import org.apache.solr.client.solrj.io.eval.MovingAverageEvaluator; +import org.apache.solr.client.solrj.io.eval.MovingMADEvaluator; +import org.apache.solr.client.solrj.io.eval.MovingMedianEvaluator; +import org.apache.solr.client.solrj.io.eval.MultiKmeansEvaluator; +import org.apache.solr.client.solrj.io.eval.MultiVariateNormalDistributionEvaluator; +import org.apache.solr.client.solrj.io.eval.MultiplyEvaluator; +import org.apache.solr.client.solrj.io.eval.NaturalEvaluator; +import org.apache.solr.client.solrj.io.eval.NaturalLogEvaluator; +import org.apache.solr.client.solrj.io.eval.NormEvaluator; +import org.apache.solr.client.solrj.io.eval.NormalDistributionEvaluator; +import org.apache.solr.client.solrj.io.eval.NormalizeEvaluator; +import org.apache.solr.client.solrj.io.eval.NormalizeSumEvaluator; +import org.apache.solr.client.solrj.io.eval.NotEvaluator; +import org.apache.solr.client.solrj.io.eval.NotNullEvaluator; +import org.apache.solr.client.solrj.io.eval.OLSRegressionEvaluator; +import org.apache.solr.client.solrj.io.eval.OnesEvaluator; +import org.apache.solr.client.solrj.io.eval.OrEvaluator; +import org.apache.solr.client.solrj.io.eval.OscillateEvaluator; +import org.apache.solr.client.solrj.io.eval.OutliersEvaluator; +import org.apache.solr.client.solrj.io.eval.PairSortEvaluator; +import org.apache.solr.client.solrj.io.eval.PairedTTestEvaluator; +import org.apache.solr.client.solrj.io.eval.PercentileEvaluator; +import org.apache.solr.client.solrj.io.eval.PivotEvaluator; +import org.apache.solr.client.solrj.io.eval.PoissonDistributionEvaluator; +import org.apache.solr.client.solrj.io.eval.PolyFitEvaluator; +import org.apache.solr.client.solrj.io.eval.PowerEvaluator; +import org.apache.solr.client.solrj.io.eval.PrecisionEvaluator; +import org.apache.solr.client.solrj.io.eval.PredictEvaluator; +import org.apache.solr.client.solrj.io.eval.PrimesEvaluator; +import org.apache.solr.client.solrj.io.eval.ProbabilityEvaluator; +import org.apache.solr.client.solrj.io.eval.ProjectToBorderEvaluator; +import org.apache.solr.client.solrj.io.eval.PutCacheEvaluator; +import org.apache.solr.client.solrj.io.eval.RankEvaluator; +import org.apache.solr.client.solrj.io.eval.RawValueEvaluator; +import org.apache.solr.client.solrj.io.eval.RecNumEvaluator; +import org.apache.solr.client.solrj.io.eval.RecipEvaluator; +import org.apache.solr.client.solrj.io.eval.RegressionEvaluator; +import org.apache.solr.client.solrj.io.eval.RemoveCacheEvaluator; +import org.apache.solr.client.solrj.io.eval.RepeatEvaluator; +import org.apache.solr.client.solrj.io.eval.ReverseEvaluator; +import org.apache.solr.client.solrj.io.eval.RightShiftEvaluator; +import org.apache.solr.client.solrj.io.eval.RoundEvaluator; +import org.apache.solr.client.solrj.io.eval.RowAtEvaluator; +import org.apache.solr.client.solrj.io.eval.RowCountEvaluator; +import org.apache.solr.client.solrj.io.eval.SampleEvaluator; +import org.apache.solr.client.solrj.io.eval.ScalarAddEvaluator; +import org.apache.solr.client.solrj.io.eval.ScalarDivideEvaluator; +import org.apache.solr.client.solrj.io.eval.ScalarMultiplyEvaluator; +import org.apache.solr.client.solrj.io.eval.ScalarSubtractEvaluator; +import org.apache.solr.client.solrj.io.eval.ScaleEvaluator; +import org.apache.solr.client.solrj.io.eval.SequenceEvaluator; +import org.apache.solr.client.solrj.io.eval.SetColumnLabelsEvaluator; +import org.apache.solr.client.solrj.io.eval.SetRowLabelsEvaluator; +import org.apache.solr.client.solrj.io.eval.SetValueEvaluator; +import org.apache.solr.client.solrj.io.eval.SineEvaluator; +import org.apache.solr.client.solrj.io.eval.SplineEvaluator; +import org.apache.solr.client.solrj.io.eval.SplitEvaluator; +import org.apache.solr.client.solrj.io.eval.SquareRootEvaluator; +import org.apache.solr.client.solrj.io.eval.StandardDeviationEvaluator; +import org.apache.solr.client.solrj.io.eval.SubtractEvaluator; +import org.apache.solr.client.solrj.io.eval.SumColumnsEvaluator; +import org.apache.solr.client.solrj.io.eval.SumDifferenceEvaluator; +import org.apache.solr.client.solrj.io.eval.SumRowsEvaluator; +import org.apache.solr.client.solrj.io.eval.SumSqEvaluator; +import org.apache.solr.client.solrj.io.eval.TTestEvaluator; +import org.apache.solr.client.solrj.io.eval.TangentEvaluator; +import org.apache.solr.client.solrj.io.eval.TemporalEvaluatorDay; +import org.apache.solr.client.solrj.io.eval.TemporalEvaluatorDayOfQuarter; +import org.apache.solr.client.solrj.io.eval.TemporalEvaluatorDayOfYear; +import org.apache.solr.client.solrj.io.eval.TemporalEvaluatorEpoch; +import org.apache.solr.client.solrj.io.eval.TemporalEvaluatorHour; +import org.apache.solr.client.solrj.io.eval.TemporalEvaluatorMinute; +import org.apache.solr.client.solrj.io.eval.TemporalEvaluatorMonth; +import org.apache.solr.client.solrj.io.eval.TemporalEvaluatorQuarter; +import org.apache.solr.client.solrj.io.eval.TemporalEvaluatorSecond; +import org.apache.solr.client.solrj.io.eval.TemporalEvaluatorWeek; +import org.apache.solr.client.solrj.io.eval.TemporalEvaluatorYear; +import org.apache.solr.client.solrj.io.eval.TermVectorsEvaluator; +import org.apache.solr.client.solrj.io.eval.TimeDifferencingEvaluator; +import org.apache.solr.client.solrj.io.eval.TopFeaturesEvaluator; +import org.apache.solr.client.solrj.io.eval.TransposeEvaluator; +import org.apache.solr.client.solrj.io.eval.TriangularDistributionEvaluator; +import org.apache.solr.client.solrj.io.eval.TrimEvaluator; +import org.apache.solr.client.solrj.io.eval.TruncEvaluator; +import org.apache.solr.client.solrj.io.eval.UniformDistributionEvaluator; +import org.apache.solr.client.solrj.io.eval.UniformIntegerDistributionEvaluator; +import org.apache.solr.client.solrj.io.eval.UnitEvaluator; +import org.apache.solr.client.solrj.io.eval.UpperEvaluator; +import org.apache.solr.client.solrj.io.eval.UuidEvaluator; +import org.apache.solr.client.solrj.io.eval.ValueAtEvaluator; +import org.apache.solr.client.solrj.io.eval.VarianceEvaluator; +import org.apache.solr.client.solrj.io.eval.WeibullDistributionEvaluator; +import org.apache.solr.client.solrj.io.eval.ZerosEvaluator; +import org.apache.solr.client.solrj.io.eval.ZipFDistributionEvaluator; import org.apache.solr.client.solrj.io.graph.GatherNodesStream; import org.apache.solr.client.solrj.io.graph.ShortestPathStream; import org.apache.solr.client.solrj.io.ops.DistinctOperation; @@ -30,14 +256,77 @@ import org.apache.solr.client.solrj.io.ops.ReplaceOperation; import org.apache.solr.client.solrj.io.ops.ReplaceWithFieldOperation; import org.apache.solr.client.solrj.io.ops.ReplaceWithValueOperation; -import org.apache.solr.client.solrj.io.stream.*; +import org.apache.solr.client.solrj.io.stream.CalculatorStream; +import org.apache.solr.client.solrj.io.stream.CartesianProductStream; +import org.apache.solr.client.solrj.io.stream.CellStream; +import org.apache.solr.client.solrj.io.stream.CommitStream; +import org.apache.solr.client.solrj.io.stream.ComplementStream; +import org.apache.solr.client.solrj.io.stream.CsvStream; +import org.apache.solr.client.solrj.io.stream.DaemonStream; +import org.apache.solr.client.solrj.io.stream.DeleteStream; +import org.apache.solr.client.solrj.io.stream.DrillStream; +import org.apache.solr.client.solrj.io.stream.EchoStream; +import org.apache.solr.client.solrj.io.stream.EvalStream; +import org.apache.solr.client.solrj.io.stream.ExecutorStream; +import org.apache.solr.client.solrj.io.stream.Facet2DStream; +import org.apache.solr.client.solrj.io.stream.FacetStream; +import org.apache.solr.client.solrj.io.stream.FeaturesSelectionStream; +import org.apache.solr.client.solrj.io.stream.FetchStream; +import org.apache.solr.client.solrj.io.stream.GetStream; +import org.apache.solr.client.solrj.io.stream.HashJoinStream; +import org.apache.solr.client.solrj.io.stream.HashRollupStream; +import org.apache.solr.client.solrj.io.stream.HavingStream; +import org.apache.solr.client.solrj.io.stream.InnerJoinStream; +import org.apache.solr.client.solrj.io.stream.IntersectStream; +import org.apache.solr.client.solrj.io.stream.KnnStream; +import org.apache.solr.client.solrj.io.stream.LeftOuterJoinStream; +import org.apache.solr.client.solrj.io.stream.LetStream; +import org.apache.solr.client.solrj.io.stream.ListStream; +import org.apache.solr.client.solrj.io.stream.MergeStream; +import org.apache.solr.client.solrj.io.stream.ModelStream; +import org.apache.solr.client.solrj.io.stream.NoOpStream; +import org.apache.solr.client.solrj.io.stream.NullStream; +import org.apache.solr.client.solrj.io.stream.OuterHashJoinStream; +import org.apache.solr.client.solrj.io.stream.ParallelListStream; +import org.apache.solr.client.solrj.io.stream.ParallelStream; +import org.apache.solr.client.solrj.io.stream.PlotStream; +import org.apache.solr.client.solrj.io.stream.PriorityStream; +import org.apache.solr.client.solrj.io.stream.RandomFacadeStream; +import org.apache.solr.client.solrj.io.stream.RankStream; +import org.apache.solr.client.solrj.io.stream.ReducerStream; +import org.apache.solr.client.solrj.io.stream.RollupStream; +import org.apache.solr.client.solrj.io.stream.ScoreNodesStream; +import org.apache.solr.client.solrj.io.stream.SearchFacadeStream; +import org.apache.solr.client.solrj.io.stream.SelectStream; +import org.apache.solr.client.solrj.io.stream.ShuffleStream; +import org.apache.solr.client.solrj.io.stream.SignificantTermsStream; +import org.apache.solr.client.solrj.io.stream.SortStream; +import org.apache.solr.client.solrj.io.stream.SqlStream; +import org.apache.solr.client.solrj.io.stream.StatsStream; +import org.apache.solr.client.solrj.io.stream.StreamContext; +import org.apache.solr.client.solrj.io.stream.TextLogitStream; +import org.apache.solr.client.solrj.io.stream.TimeSeriesStream; +import org.apache.solr.client.solrj.io.stream.TopicStream; +import org.apache.solr.client.solrj.io.stream.TsvStream; +import org.apache.solr.client.solrj.io.stream.TupStream; +import org.apache.solr.client.solrj.io.stream.TupleStream; +import org.apache.solr.client.solrj.io.stream.UniqueStream; +import org.apache.solr.client.solrj.io.stream.UpdateStream; +import org.apache.solr.client.solrj.io.stream.ZplotStream; import org.apache.solr.client.solrj.io.stream.expr.Explanation; import org.apache.solr.client.solrj.io.stream.expr.Expressible; import org.apache.solr.client.solrj.io.stream.expr.StreamExplanation; import org.apache.solr.client.solrj.io.stream.expr.StreamExpression; import org.apache.solr.client.solrj.io.stream.expr.StreamExpressionParameter; import org.apache.solr.client.solrj.io.stream.expr.StreamFactory; -import org.apache.solr.client.solrj.io.stream.metrics.*; +import org.apache.solr.client.solrj.io.stream.metrics.CountDistinctMetric; +import org.apache.solr.client.solrj.io.stream.metrics.CountMetric; +import org.apache.solr.client.solrj.io.stream.metrics.MaxMetric; +import org.apache.solr.client.solrj.io.stream.metrics.MeanMetric; +import org.apache.solr.client.solrj.io.stream.metrics.MinMetric; +import org.apache.solr.client.solrj.io.stream.metrics.PercentileMetric; +import org.apache.solr.client.solrj.io.stream.metrics.StdMetric; +import org.apache.solr.client.solrj.io.stream.metrics.SumMetric; import org.apache.solr.common.params.CommonParams; public class Lang { diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/eval/BinomialCoefficientEvaluator.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/eval/BinomialCoefficientEvaluator.java index 1ed522db3ae..0b95f282fc7 100644 --- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/eval/BinomialCoefficientEvaluator.java +++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/eval/BinomialCoefficientEvaluator.java @@ -19,7 +19,7 @@ import java.io.IOException; import java.util.Locale; -import org.apache.commons.math3.util.*; +import org.apache.commons.math3.util.CombinatoricsUtils; import org.apache.solr.client.solrj.io.stream.expr.StreamExpression; import org.apache.solr.client.solrj.io.stream.expr.StreamFactory; diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/graph/GatherNodesStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/graph/GatherNodesStream.java index 5c9199f7589..924e6afffce 100644 --- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/graph/GatherNodesStream.java +++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/graph/GatherNodesStream.java @@ -27,7 +27,15 @@ import java.time.Instant; import java.time.ZoneId; import java.time.temporal.ChronoUnit; -import java.util.*; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Set; import java.util.concurrent.Callable; import java.util.concurrent.ExecutorService; import java.util.concurrent.Future; diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/graph/Node.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/graph/Node.java index f8d760e58d1..be8e3b6f0ef 100644 --- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/graph/Node.java +++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/graph/Node.java @@ -17,9 +17,12 @@ package org.apache.solr.client.solrj.io.graph; -import java.util.*; +import java.util.ArrayList; +import java.util.List; +import java.util.Set; +import java.util.TreeSet; import org.apache.solr.client.solrj.io.Tuple; -import org.apache.solr.client.solrj.io.stream.metrics.*; +import org.apache.solr.client.solrj.io.stream.metrics.Metric; public class Node { diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/graph/ShortestPathStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/graph/ShortestPathStream.java index 59bda8519bf..eebdc218eba 100644 --- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/graph/ShortestPathStream.java +++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/graph/ShortestPathStream.java @@ -37,7 +37,10 @@ import org.apache.solr.client.solrj.io.comp.StreamComparator; import org.apache.solr.client.solrj.io.eq.FieldEqualitor; import org.apache.solr.client.solrj.io.eq.MultipleFieldEqualitor; -import org.apache.solr.client.solrj.io.stream.*; +import org.apache.solr.client.solrj.io.stream.CloudSolrStream; +import org.apache.solr.client.solrj.io.stream.StreamContext; +import org.apache.solr.client.solrj.io.stream.TupleStream; +import org.apache.solr.client.solrj.io.stream.UniqueStream; import org.apache.solr.client.solrj.io.stream.expr.Explanation; import org.apache.solr.client.solrj.io.stream.expr.Explanation.ExpressionType; import org.apache.solr.client.solrj.io.stream.expr.Expressible; diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/graph/Traversal.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/graph/Traversal.java index 3206589ce3b..30256c5fe09 100644 --- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/graph/Traversal.java +++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/graph/Traversal.java @@ -17,7 +17,12 @@ package org.apache.solr.client.solrj.io.graph; -import java.util.*; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; import org.apache.solr.client.solrj.io.Tuple; public class Traversal { diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/request/ApiMapping.java b/solr/solrj/src/java/org/apache/solr/client/solrj/request/ApiMapping.java index 1438b36f5cf..8c972a343eb 100644 --- a/solr/solrj/src/java/org/apache/solr/client/solrj/request/ApiMapping.java +++ b/solr/solrj/src/java/org/apache/solr/client/solrj/request/ApiMapping.java @@ -17,7 +17,12 @@ package org.apache.solr.client.solrj.request; -import java.util.*; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; +import java.util.Map; import org.apache.solr.client.solrj.SolrRequest; import org.apache.solr.common.util.CommandOperation; diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/request/CollectionAdminRequest.java b/solr/solrj/src/java/org/apache/solr/client/solrj/request/CollectionAdminRequest.java index ef72467c6b2..21380c4a0ac 100644 --- a/solr/solrj/src/java/org/apache/solr/client/solrj/request/CollectionAdminRequest.java +++ b/solr/solrj/src/java/org/apache/solr/client/solrj/request/CollectionAdminRequest.java @@ -17,8 +17,18 @@ package org.apache.solr.client.solrj.request; import static org.apache.solr.common.cloud.DocCollection.PER_REPLICA_STATE; -import static org.apache.solr.common.cloud.ZkStateReader.*; -import static org.apache.solr.common.params.CollectionAdminParams.*; +import static org.apache.solr.common.cloud.ZkStateReader.NRT_REPLICAS; +import static org.apache.solr.common.cloud.ZkStateReader.PULL_REPLICAS; +import static org.apache.solr.common.cloud.ZkStateReader.READ_ONLY; +import static org.apache.solr.common.cloud.ZkStateReader.REPLICATION_FACTOR; +import static org.apache.solr.common.cloud.ZkStateReader.TLOG_REPLICAS; +import static org.apache.solr.common.params.CollectionAdminParams.ALIAS; +import static org.apache.solr.common.params.CollectionAdminParams.COLL_CONF; +import static org.apache.solr.common.params.CollectionAdminParams.COUNT_PROP; +import static org.apache.solr.common.params.CollectionAdminParams.CREATE_NODE_SET_PARAM; +import static org.apache.solr.common.params.CollectionAdminParams.CREATE_NODE_SET_SHUFFLE_PARAM; +import static org.apache.solr.common.params.CollectionAdminParams.ROUTER_PREFIX; +import static org.apache.solr.common.params.CollectionAdminParams.SKIP_NODE_ASSIGNMENT; import java.io.IOException; import java.util.ArrayList; diff --git a/solr/solrj/src/java/org/apache/solr/common/ConfigNode.java b/solr/solrj/src/java/org/apache/solr/common/ConfigNode.java index 42b5eaf0091..111739c3677 100644 --- a/solr/solrj/src/java/org/apache/solr/common/ConfigNode.java +++ b/solr/solrj/src/java/org/apache/solr/common/ConfigNode.java @@ -16,7 +16,10 @@ */ package org.apache.solr.common; -import static org.apache.solr.common.ConfigNode.Helpers.*; +import static org.apache.solr.common.ConfigNode.Helpers._bool; +import static org.apache.solr.common.ConfigNode.Helpers._double; +import static org.apache.solr.common.ConfigNode.Helpers._int; +import static org.apache.solr.common.ConfigNode.Helpers._txt; import java.util.ArrayList; import java.util.Arrays; diff --git a/solr/solrj/src/java/org/apache/solr/common/LazySolrCluster.java b/solr/solrj/src/java/org/apache/solr/common/LazySolrCluster.java index d8bc32869ab..cd42888587f 100644 --- a/solr/solrj/src/java/org/apache/solr/common/LazySolrCluster.java +++ b/solr/solrj/src/java/org/apache/solr/common/LazySolrCluster.java @@ -20,11 +20,31 @@ import static org.apache.solr.common.cloud.ZkStateReader.URL_SCHEME; import static org.apache.solr.common.cloud.ZkStateReader.getCollectionPathRoot; -import java.util.*; +import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.function.BiConsumer; -import org.apache.solr.cluster.api.*; -import org.apache.solr.common.cloud.*; +import org.apache.solr.cluster.api.ApiType; +import org.apache.solr.cluster.api.CollectionConfig; +import org.apache.solr.cluster.api.HashRange; +import org.apache.solr.cluster.api.Resource; +import org.apache.solr.cluster.api.Router; +import org.apache.solr.cluster.api.Shard; +import org.apache.solr.cluster.api.ShardReplica; +import org.apache.solr.cluster.api.SimpleMap; +import org.apache.solr.cluster.api.SolrCluster; +import org.apache.solr.cluster.api.SolrCollection; +import org.apache.solr.cluster.api.SolrNode; +import org.apache.solr.common.cloud.Aliases; +import org.apache.solr.common.cloud.DocCollection; +import org.apache.solr.common.cloud.Replica; +import org.apache.solr.common.cloud.Slice; +import org.apache.solr.common.cloud.ZkStateReader; import org.apache.solr.common.util.Utils; import org.apache.solr.common.util.WrappedSimpleMap; import org.apache.zookeeper.KeeperException; diff --git a/solr/solrj/src/java/org/apache/solr/common/util/FastJavaBinDecoder.java b/solr/solrj/src/java/org/apache/solr/common/util/FastJavaBinDecoder.java index 9840e5d4796..3a31d468c5e 100644 --- a/solr/solrj/src/java/org/apache/solr/common/util/FastJavaBinDecoder.java +++ b/solr/solrj/src/java/org/apache/solr/common/util/FastJavaBinDecoder.java @@ -18,7 +18,35 @@ package org.apache.solr.common.util; import static org.apache.solr.common.util.FastJavaBinDecoder.Tag._EXTERN_STRING; -import static org.apache.solr.common.util.JavaBinCodec.*; +import static org.apache.solr.common.util.JavaBinCodec.ARR; +import static org.apache.solr.common.util.JavaBinCodec.BOOL_FALSE; +import static org.apache.solr.common.util.JavaBinCodec.BOOL_TRUE; +import static org.apache.solr.common.util.JavaBinCodec.BYTE; +import static org.apache.solr.common.util.JavaBinCodec.BYTEARR; +import static org.apache.solr.common.util.JavaBinCodec.DATE; +import static org.apache.solr.common.util.JavaBinCodec.DOUBLE; +import static org.apache.solr.common.util.JavaBinCodec.END; +import static org.apache.solr.common.util.JavaBinCodec.ENUM_FIELD_VALUE; +import static org.apache.solr.common.util.JavaBinCodec.EXTERN_STRING; +import static org.apache.solr.common.util.JavaBinCodec.FLOAT; +import static org.apache.solr.common.util.JavaBinCodec.INT; +import static org.apache.solr.common.util.JavaBinCodec.ITERATOR; +import static org.apache.solr.common.util.JavaBinCodec.LONG; +import static org.apache.solr.common.util.JavaBinCodec.MAP; +import static org.apache.solr.common.util.JavaBinCodec.MAP_ENTRY; +import static org.apache.solr.common.util.JavaBinCodec.MAP_ENTRY_ITER; +import static org.apache.solr.common.util.JavaBinCodec.NAMED_LST; +import static org.apache.solr.common.util.JavaBinCodec.NULL; +import static org.apache.solr.common.util.JavaBinCodec.ORDERED_MAP; +import static org.apache.solr.common.util.JavaBinCodec.SHORT; +import static org.apache.solr.common.util.JavaBinCodec.SINT; +import static org.apache.solr.common.util.JavaBinCodec.SLONG; +import static org.apache.solr.common.util.JavaBinCodec.SOLRDOC; +import static org.apache.solr.common.util.JavaBinCodec.SOLRDOCLST; +import static org.apache.solr.common.util.JavaBinCodec.SOLRINPUTDOC; +import static org.apache.solr.common.util.JavaBinCodec.STR; +import static org.apache.solr.common.util.JavaBinCodec.TAG_AND_LEN; +import static org.apache.solr.common.util.JavaBinCodec.readVInt; import java.io.IOException; import java.io.InputStream; diff --git a/solr/solrj/src/java/org/apache/solr/common/util/JsonRecordReader.java b/solr/solrj/src/java/org/apache/solr/common/util/JsonRecordReader.java index b8fa2848ac8..851434988f2 100644 --- a/solr/solrj/src/java/org/apache/solr/common/util/JsonRecordReader.java +++ b/solr/solrj/src/java/org/apache/solr/common/util/JsonRecordReader.java @@ -16,11 +16,28 @@ */ package org.apache.solr.common.util; -import static org.noggit.JSONParser.*; +import static org.noggit.JSONParser.ARRAY_END; +import static org.noggit.JSONParser.ARRAY_START; +import static org.noggit.JSONParser.BIGNUMBER; +import static org.noggit.JSONParser.BOOLEAN; +import static org.noggit.JSONParser.EOF; +import static org.noggit.JSONParser.LONG; +import static org.noggit.JSONParser.NULL; +import static org.noggit.JSONParser.NUMBER; +import static org.noggit.JSONParser.OBJECT_END; +import static org.noggit.JSONParser.OBJECT_START; +import static org.noggit.JSONParser.STRING; import java.io.IOException; import java.io.Reader; -import java.util.*; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Stack; import org.noggit.JSONParser; /** A Streaming parser for json to emit one record at a time. */ diff --git a/solr/solrj/src/java/org/apache/solr/common/util/JsonSchemaValidator.java b/solr/solrj/src/java/org/apache/solr/common/util/JsonSchemaValidator.java index 7c5c3084025..af350fffa97 100644 --- a/solr/solrj/src/java/org/apache/solr/common/util/JsonSchemaValidator.java +++ b/solr/solrj/src/java/org/apache/solr/common/util/JsonSchemaValidator.java @@ -17,7 +17,15 @@ package org.apache.solr.common.util; -import java.util.*; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedList; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Set; import java.util.function.Function; /** diff --git a/solr/solrj/src/java/org/apache/solr/common/util/SimpleOrderedMap.java b/solr/solrj/src/java/org/apache/solr/common/util/SimpleOrderedMap.java index d1ee6e687b8..6e6dd15438a 100644 --- a/solr/solrj/src/java/org/apache/solr/common/util/SimpleOrderedMap.java +++ b/solr/solrj/src/java/org/apache/solr/common/util/SimpleOrderedMap.java @@ -16,7 +16,9 @@ */ package org.apache.solr.common.util; -import java.util.*; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; /** * SimpleOrderedMap is a {@link NamedList} where access by key is more important than diff --git a/solr/solrj/src/java/org/noggit/JSONWriter.java b/solr/solrj/src/java/org/noggit/JSONWriter.java index 0a4e810fce0..0782717b8ae 100644 --- a/solr/solrj/src/java/org/noggit/JSONWriter.java +++ b/solr/solrj/src/java/org/noggit/JSONWriter.java @@ -19,7 +19,9 @@ package org.noggit; -import java.util.*; +import java.util.Arrays; +import java.util.Collection; +import java.util.Map; public class JSONWriter { diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/CollectionAdminRequestRequiredParamsTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/CollectionAdminRequestRequiredParamsTest.java index 9b78bb601c9..77493b85a49 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/CollectionAdminRequestRequiredParamsTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/CollectionAdminRequestRequiredParamsTest.java @@ -17,7 +17,12 @@ package org.apache.solr.client.solrj; import static org.apache.solr.common.params.CollectionAdminParams.FLUSH; -import static org.apache.solr.common.params.CoreAdminParams.*; +import static org.apache.solr.common.params.CoreAdminParams.ACTION; +import static org.apache.solr.common.params.CoreAdminParams.COLLECTION; +import static org.apache.solr.common.params.CoreAdminParams.NAME; +import static org.apache.solr.common.params.CoreAdminParams.REPLICA; +import static org.apache.solr.common.params.CoreAdminParams.REQUESTID; +import static org.apache.solr.common.params.CoreAdminParams.SHARD; import com.google.common.collect.Sets; import java.util.Iterator; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientCacheTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientCacheTest.java index b8f82de9de7..1622f97d365 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientCacheTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientCacheTest.java @@ -18,7 +18,9 @@ package org.apache.solr.client.solrj.impl; import static java.nio.charset.StandardCharsets.UTF_8; -import static org.mockito.Mockito.*; +import static org.mockito.Mockito.any; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; import java.net.ConnectException; import java.net.SocketException; diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionTest.java index a478bc46aa3..5e3d2454c00 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionTest.java @@ -17,7 +17,11 @@ package org.apache.solr.client.solrj.io.stream; import com.carrotsearch.randomizedtesting.annotations.ThreadLeakLingering; -import java.io.*; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.OutputStreamWriter; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; @@ -43,7 +47,14 @@ import org.apache.solr.client.solrj.io.stream.expr.StreamExpression; import org.apache.solr.client.solrj.io.stream.expr.StreamExpressionParser; import org.apache.solr.client.solrj.io.stream.expr.StreamFactory; -import org.apache.solr.client.solrj.io.stream.metrics.*; +import org.apache.solr.client.solrj.io.stream.metrics.CountDistinctMetric; +import org.apache.solr.client.solrj.io.stream.metrics.CountMetric; +import org.apache.solr.client.solrj.io.stream.metrics.MaxMetric; +import org.apache.solr.client.solrj.io.stream.metrics.MeanMetric; +import org.apache.solr.client.solrj.io.stream.metrics.MinMetric; +import org.apache.solr.client.solrj.io.stream.metrics.PercentileMetric; +import org.apache.solr.client.solrj.io.stream.metrics.StdMetric; +import org.apache.solr.client.solrj.io.stream.metrics.SumMetric; import org.apache.solr.client.solrj.request.CollectionAdminRequest; import org.apache.solr.client.solrj.request.UpdateRequest; import org.apache.solr.cloud.SolrCloudTestCase; diff --git a/solr/solrj/src/test/org/apache/solr/common/util/TestFastInputStream.java b/solr/solrj/src/test/org/apache/solr/common/util/TestFastInputStream.java index 83f7f54a0a8..d3937a28f9c 100644 --- a/solr/solrj/src/test/org/apache/solr/common/util/TestFastInputStream.java +++ b/solr/solrj/src/test/org/apache/solr/common/util/TestFastInputStream.java @@ -16,7 +16,11 @@ */ package org.apache.solr.common.util; -import java.io.*; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; import java.util.zip.GZIPInputStream; import java.util.zip.GZIPOutputStream; import org.apache.solr.SolrTestCase; diff --git a/solr/solrj/src/test/org/apache/solr/common/util/URLUtilTest.java b/solr/solrj/src/test/org/apache/solr/common/util/URLUtilTest.java index 23f04d7f72b..43d4956b8df 100644 --- a/solr/solrj/src/test/org/apache/solr/common/util/URLUtilTest.java +++ b/solr/solrj/src/test/org/apache/solr/common/util/URLUtilTest.java @@ -16,7 +16,9 @@ */ package org.apache.solr.common.util; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; import org.junit.Test; diff --git a/solr/test-framework/src/java/org/apache/solr/JSONTestUtil.java b/solr/test-framework/src/java/org/apache/solr/JSONTestUtil.java index 1580e2c9440..7091ac58ef9 100644 --- a/solr/test-framework/src/java/org/apache/solr/JSONTestUtil.java +++ b/solr/test-framework/src/java/org/apache/solr/JSONTestUtil.java @@ -17,7 +17,13 @@ package org.apache.solr; import java.io.IOException; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.solr.common.util.StrUtils;