Skip to content

Commit

Permalink
Upgrade spotless and apply
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Bogan <rbogan@amazon.com>
  • Loading branch information
ryanbogan committed Dec 21, 2023
1 parent f64be6b commit 11fabde
Show file tree
Hide file tree
Showing 61 changed files with 161 additions and 172 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ buildscript {

dependencies {
classpath "${opensearch_group}.gradle:build-tools:${opensearch_version}"
classpath "com.diffplug.spotless:spotless-plugin-gradle:6.3.0"
classpath "com.diffplug.spotless:spotless-plugin-gradle:6.20.0"
classpath "io.freefair.gradle:lombok-plugin:8.4"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
import java.io.IOException;
import java.util.Map;

import lombok.AllArgsConstructor;
import lombok.NonNull;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.opensearch.action.StepListener;
Expand All @@ -20,6 +17,9 @@
import org.opensearch.core.action.ActionListener;
import org.opensearch.core.xcontent.XContentBuilder;

import lombok.AllArgsConstructor;
import lombok.NonNull;

/**
* IndexManager is responsible for managing index operations like create, delete, etc...
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
import java.io.IOException;
import java.util.function.Supplier;

import lombok.AllArgsConstructor;
import lombok.NonNull;
import lombok.extern.log4j.Log4j2;

import org.opensearch.action.StepListener;
import org.opensearch.action.ingest.DeletePipelineRequest;
import org.opensearch.action.ingest.PutPipelineRequest;
Expand All @@ -25,6 +21,10 @@
import org.opensearch.geospatial.processor.FeatureProcessor;
import org.opensearch.ingest.Pipeline;

import lombok.AllArgsConstructor;
import lombok.NonNull;
import lombok.extern.log4j.Log4j2;

/**
* PipelineManager is responsible for managing pipeline operations like create and delete
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
import java.io.IOException;
import java.util.Objects;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NonNull;

import org.opensearch.action.ActionRequest;
import org.opensearch.action.ActionRequestValidationException;
import org.opensearch.core.common.bytes.BytesReference;
import org.opensearch.core.common.io.stream.StreamInput;
import org.opensearch.core.common.io.stream.StreamOutput;
import org.opensearch.rest.RestRequest;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NonNull;

@AllArgsConstructor
@Getter
public class UploadGeoJSONRequest extends ActionRequest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
import java.util.Map;
import java.util.Objects;

import lombok.AccessLevel;
import lombok.AllArgsConstructor;

import org.opensearch.core.ParseField;
import org.opensearch.core.common.Strings;
import org.opensearch.geospatial.GeospatialParser;

import lombok.AccessLevel;
import lombok.AllArgsConstructor;

/**
* UploadGeoJSONRequestContent is the Data model for UploadGeoJSONRequest's body
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
import java.util.List;
import java.util.Map;

import org.opensearch.geospatial.GeospatialParser;

import lombok.NonNull;
import lombok.Value;

import org.opensearch.geospatial.GeospatialParser;

/**
* FeatureCollection represents GEOJSON of type FeatureCollection. A FeatureCollection object has a member
* with the name "features". The value of "features" is a List.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@

import java.util.Map;

import lombok.NonNull;

import org.opensearch.geospatial.geojson.Feature.FeatureBuilder;

import lombok.NonNull;

/**
* FeatureFactory helps to create {@link Feature} instance based on user input
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@
import java.util.stream.DoubleStream;
import java.util.stream.IntStream;

import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import lombok.NonNull;

import org.apache.lucene.geo.XYCircle;
import org.apache.lucene.geo.XYLine;
import org.apache.lucene.geo.XYPoint;
Expand All @@ -26,6 +22,10 @@
import org.opensearch.geometry.Polygon;
import org.opensearch.geometry.Rectangle;

import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import lombok.NonNull;

/**
* Utility class to convert compatible shapes from opensearch to Lucene
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@
import java.util.Locale;
import java.util.Objects;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

import org.opensearch.OpenSearchParseException;
import org.opensearch.core.xcontent.ToXContentFragment;
import org.opensearch.core.xcontent.XContentBuilder;
Expand All @@ -25,6 +21,10 @@
import org.opensearch.geometry.utils.WellKnownText;
import org.opensearch.index.mapper.AbstractPointGeometryFieldMapper;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
* Represents a point in a 2-dimensional planar coordinate system with no range limitations.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
import java.util.Objects;
import java.util.stream.Collectors;

import lombok.AllArgsConstructor;

import org.apache.lucene.document.XYPointField;
import org.apache.lucene.geo.XYPoint;
import org.apache.lucene.index.IndexableField;
Expand All @@ -19,6 +17,8 @@
import org.opensearch.index.mapper.AbstractGeometryFieldMapper;
import org.opensearch.index.mapper.ParseContext;

import lombok.AllArgsConstructor;

/**
* Converts points into Lucene-compatible form{@link XYPoint} for indexing in a xy_point field.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
import java.util.Locale;
import java.util.Objects;

import lombok.AllArgsConstructor;

import org.apache.lucene.document.XYDocValuesField;
import org.apache.lucene.document.XYPointField;
import org.apache.lucene.geo.XYCircle;
Expand Down Expand Up @@ -42,6 +40,8 @@
import org.opensearch.index.query.QueryShardContext;
import org.opensearch.index.query.QueryShardException;

import lombok.AllArgsConstructor;

/**
* Geometry Visitor to create a query to find all cartesian XYPoints
* that comply ShapeRelation with all other XYShapes objects
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
import java.util.List;
import java.util.Locale;

import lombok.NonNull;

import org.apache.lucene.document.ShapeField;
import org.apache.lucene.document.XYShape;
import org.apache.lucene.geo.XYGeometry;
Expand All @@ -23,6 +21,8 @@
import org.opensearch.index.query.QueryShardContext;
import org.opensearch.index.query.QueryShardException;

import lombok.NonNull;

/**
* Query Processor to convert given Geometry into Lucene query
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@

import java.io.IOException;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;

import org.opensearch.action.ActionRequest;
import org.opensearch.action.ActionRequestValidationException;
import org.opensearch.core.common.io.stream.StreamInput;
import org.opensearch.core.common.io.stream.StreamOutput;
import org.opensearch.geospatial.ip2geo.common.ParameterValidator;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;

/**
* GeoIP datasource delete request
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

import java.io.IOException;

import lombok.extern.log4j.Log4j2;

import org.opensearch.ResourceNotFoundException;
import org.opensearch.action.support.ActionFilters;
import org.opensearch.action.support.HandledTransportAction;
Expand All @@ -29,6 +27,8 @@
import org.opensearch.threadpool.ThreadPool;
import org.opensearch.transport.TransportService;

import lombok.extern.log4j.Log4j2;

/**
* Transport action to delete datasource
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@

import java.io.IOException;

import lombok.Getter;
import lombok.Setter;

import org.opensearch.action.ActionRequest;
import org.opensearch.action.ActionRequestValidationException;
import org.opensearch.core.common.io.stream.StreamInput;
import org.opensearch.core.common.io.stream.StreamOutput;

import lombok.Getter;
import lombok.Setter;

/**
* Ip2Geo datasource get request
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
import java.time.Instant;
import java.util.List;

import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

import org.opensearch.core.ParseField;
import org.opensearch.core.action.ActionResponse;
import org.opensearch.core.common.io.stream.StreamInput;
Expand All @@ -21,6 +17,10 @@
import org.opensearch.core.xcontent.XContentBuilder;
import org.opensearch.geospatial.ip2geo.jobscheduler.Datasource;

import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

/**
* Ip2Geo datasource get request
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
import java.util.List;
import java.util.Locale;

import lombok.Getter;
import lombok.Setter;
import lombok.extern.log4j.Log4j2;

import org.opensearch.action.ActionRequest;
import org.opensearch.action.ActionRequestValidationException;
import org.opensearch.common.unit.TimeValue;
Expand All @@ -26,6 +22,10 @@
import org.opensearch.geospatial.ip2geo.common.DatasourceManifest;
import org.opensearch.geospatial.ip2geo.common.ParameterValidator;

import lombok.Getter;
import lombok.Setter;
import lombok.extern.log4j.Log4j2;

/**
* Ip2Geo datasource creation request
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
import java.time.Instant;
import java.util.concurrent.atomic.AtomicReference;

import lombok.extern.log4j.Log4j2;

import org.opensearch.ResourceAlreadyExistsException;
import org.opensearch.action.StepListener;
import org.opensearch.action.index.IndexResponse;
Expand All @@ -33,6 +31,8 @@
import org.opensearch.threadpool.ThreadPool;
import org.opensearch.transport.TransportService;

import lombok.extern.log4j.Log4j2;

/**
* Transport action to create datasource
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@
import java.net.URL;
import java.util.Locale;

import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.extern.log4j.Log4j2;

import org.opensearch.action.ActionRequest;
import org.opensearch.action.ActionRequestValidationException;
import org.opensearch.common.unit.TimeValue;
Expand All @@ -26,6 +21,11 @@
import org.opensearch.geospatial.ip2geo.common.DatasourceManifest;
import org.opensearch.geospatial.ip2geo.common.ParameterValidator;

import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.extern.log4j.Log4j2;

/**
* Ip2Geo datasource update request
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
import java.util.List;
import java.util.Locale;

import lombok.extern.log4j.Log4j2;

import org.opensearch.ResourceNotFoundException;
import org.opensearch.action.support.ActionFilters;
import org.opensearch.action.support.HandledTransportAction;
Expand All @@ -35,6 +33,8 @@
import org.opensearch.threadpool.ThreadPool;
import org.opensearch.transport.TransportService;

import lombok.extern.log4j.Log4j2;

/**
* Transport action to update datasource
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
import java.security.AccessController;
import java.security.PrivilegedAction;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;

import org.opensearch.SpecialPermission;
import org.opensearch.common.SuppressForbidden;
import org.opensearch.common.xcontent.json.JsonXContent;
Expand All @@ -29,6 +25,10 @@
import org.opensearch.geospatial.annotation.VisibleForTesting;
import org.opensearch.geospatial.shared.Constants;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;

/**
* Ip2Geo datasource manifest file object
*
Expand Down
Loading

0 comments on commit 11fabde

Please sign in to comment.