diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fd2f9b7c07fa09cc2624f1a47b56dcc43dfff7f8..0cb0a11b71331dab32e922335828866777d61fa9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,7 +22,7 @@ variables: OSDU_SECURITY_HTTPS_CERTIFICATE_TRUST: 'true' OSDU_GCP_STORAGE_RECORDS_BATCH_SIZE: 20 OSDU_GCP_DATA_GROUP: osdu - OSDU_GCP_ENV_VARS: AUTHORIZE_API=$OSDU_GCP_ENTITLEMENTS_URL,GOOGLE_CLOUD_PROJECT=$OSDU_GCP_PROJECT,REDIS_SEARCH_HOST=$REDIS_SEARCH_HOST,REDIS_GROUP_HOST=$REDIS_GROUP_HOST,SECURITY_HTTPS_CERTIFICATE_TRUST=$OSDU_SECURITY_HTTPS_CERTIFICATE_TRUST,INDEXER_HOST=$OSDU_GCP_INDEXER_HOST,STORAGE_QUERY_RECORD_HOST=$OSDU_GCP_STORAGE_QUERY_RECORD_HOST,STORAGE_SCHEMA_HOST=$OSDU_GCP_STORAGE_SCHEMA_HOST,STORAGE_QUERY_RECORD_FOR_CONVERSION_HOST=$OSDU_GCP_STORAGE_QUERY_RECORD_FOR_CONVERSION_HOST,STORAGE_HOSTNAME=$OSDU_GCP_STORAGE_HOSTNAME,STORAGE_RECORDS_BATCH_SIZE=$OSDU_GCP_STORAGE_RECORDS_BATCH_SIZE,INDEXER_QUEUE_HOST=$OSDU_GCP_INDEXER_QUEUE_HOST,LEGALTAG_API=$OSDU_GCP_LEGALTAG_API,CRS_API=$OSDU_GCP_CRS_API,DATA_GROUP=$OSDU_GCP_DATA_GROUP,GOOGLE_AUDIENCES=$GOOGLE_AUDIENCE,PARTITION_API=$OSDU_GCP_PARTITION_API,INDEXER_QUE_SERVICE_MAIL=$OSDU_GCP_QUEUE_SA_EMAIL,SCHEMA_HOST=$OSDU_GCP_SCHEMA_URL/api/schema-service/v1/schema --vpc-connector=$OSDU_GCP_VPC_CONNECTOR + OSDU_GCP_ENV_VARS: AUTHORIZE_API=$OSDU_GCP_ENTITLEMENTS_V2_URL,GOOGLE_CLOUD_PROJECT=$OSDU_GCP_PROJECT,REDIS_SEARCH_HOST=$REDIS_SEARCH_HOST,REDIS_GROUP_HOST=$REDIS_GROUP_HOST,SECURITY_HTTPS_CERTIFICATE_TRUST=$OSDU_SECURITY_HTTPS_CERTIFICATE_TRUST,INDEXER_HOST=$OSDU_GCP_INDEXER_HOST,STORAGE_QUERY_RECORD_HOST=$OSDU_GCP_STORAGE_QUERY_RECORD_HOST,STORAGE_SCHEMA_HOST=$OSDU_GCP_STORAGE_SCHEMA_HOST,STORAGE_QUERY_RECORD_FOR_CONVERSION_HOST=$OSDU_GCP_STORAGE_QUERY_RECORD_FOR_CONVERSION_HOST,STORAGE_HOSTNAME=$OSDU_GCP_STORAGE_HOSTNAME,STORAGE_RECORDS_BATCH_SIZE=$OSDU_GCP_STORAGE_RECORDS_BATCH_SIZE,INDEXER_QUEUE_HOST=$OSDU_GCP_INDEXER_QUEUE_HOST,LEGALTAG_API=$OSDU_GCP_LEGALTAG_API,CRS_API=$OSDU_GCP_CRS_API,DATA_GROUP=$OSDU_GCP_DATA_GROUP,GOOGLE_AUDIENCES=$GOOGLE_AUDIENCE,PARTITION_API=$OSDU_GCP_PARTITION_API,INDEXER_QUE_SERVICE_MAIL=$OSDU_GCP_QUEUE_SA_EMAIL,SCHEMA_HOST=$OSDU_GCP_SCHEMA_URL/api/schema-service/v1/schema --vpc-connector=$OSDU_GCP_VPC_CONNECTOR OSDU_GCP_TEST_SUBDIR: testing/$OSDU_GCP_SERVICE-test-$OSDU_GCP_VENDOR OSDU_GCP_HELM_PACKAGE_CHARTS: "devops/gcp/deploy devops/gcp/configmap" diff --git a/NOTICE b/NOTICE index 47902ddc92d244edd1a34e2e7cb0a5bf1acdd03e..e9ff93311a1cce1c8fe9203f582f72e8de098154 100644 --- a/NOTICE +++ b/NOTICE @@ -15,7 +15,7 @@ Apache-1.1 The following software have components provided under the terms of this license: - Apache Commons CLI (from http://commons.apache.org/proper/commons-cli/) -- Cobertura code coverage (from http://cobertura.sourceforge.net) +- Cobertura (from http://cobertura.sourceforge.net) - Plexus :: Default Container (from ) - Plexus Common Utilities (from http://plexus.codehaus.org/plexus-utils) - oro (from ) @@ -32,18 +32,18 @@ The following software have components provided under the terms of this license: - ASM based accessors helper used by json-smart (from ) - AWS Event Stream (from https://github.com/awslabs/aws-eventstream-java) - AWS Java SDK :: AWS Core (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK :: Annotations (from ) +- AWS Java SDK :: Annotations (from https://repo1.maven.org/maven2/software/amazon/awssdk/annotations) - AWS Java SDK :: Auth (from https://aws.amazon.com/sdkforjava) - AWS Java SDK :: Core :: Protocols :: AWS Json Protocol (from https://aws.amazon.com/sdkforjava) - AWS Java SDK :: Core :: Protocols :: Protocol Core (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK :: HTTP Client Interface (from ) -- AWS Java SDK :: HTTP Clients :: Apache (from ) -- AWS Java SDK :: HTTP Clients :: Netty Non-Blocking I/O (from ) +- AWS Java SDK :: HTTP Client Interface (from https://repo1.maven.org/maven2/software/amazon/awssdk/http-client-spi) +- AWS Java SDK :: HTTP Clients :: Apache (from https://repo1.maven.org/maven2/software/amazon/awssdk/apache-client) +- AWS Java SDK :: HTTP Clients :: Netty Non-Blocking I/O (from https://repo1.maven.org/maven2/software/amazon/awssdk/netty-nio-client) - AWS Java SDK :: Profiles (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK :: Regions (from ) +- AWS Java SDK :: Regions (from https://repo1.maven.org/maven2/software/amazon/awssdk/regions) - AWS Java SDK :: SDK Core (from https://aws.amazon.com/sdkforjava) - AWS Java SDK :: Services :: AWS Simple Systems Management (SSM) (from https://aws.amazon.com/sdkforjava) -- AWS Java SDK :: Utilities (from ) +- AWS Java SDK :: Utilities (from https://repo1.maven.org/maven2/software/amazon/awssdk/utils) - AWS Java SDK for AWS AppSync (from https://aws.amazon.com/sdkforjava) - AWS Java SDK for AWS Application Auto Scaling (from https://aws.amazon.com/sdkforjava) - AWS Java SDK for AWS Application Discovery Service (from https://aws.amazon.com/sdkforjava) @@ -175,13 +175,14 @@ The following software have components provided under the terms of this license: - AWS SDK for Java - BOM (from https://aws.amazon.com/sdkforjava) - AWS SDK for Java - Core (from https://aws.amazon.com/sdkforjava) - AWS SDK for Java - Models (from https://aws.amazon.com/sdkforjava) -- Adapter: RxJava (from ) +- Adapter: RxJava (from https://repo1.maven.org/maven2/com/squareup/retrofit2/adapter-rxjava) - Apache Ant + JUnit (from http://ant.apache.org/) - Apache Ant Core (from http://ant.apache.org/) - Apache Ant Launcher (from http://ant.apache.org/) - Apache Commons BeanUtils (from http://commons.apache.org/proper/commons-beanutils/) -- Apache Commons Codec (from http://commons.apache.org/proper/commons-codec/) -- Apache Commons Collections (from http://commons.apache.org/proper/commons-collections/) +- Apache Commons CLI (from http://commons.apache.org/proper/commons-cli/) +- Apache Commons Codec (from https://commons.apache.org/proper/commons-codec/) +- Apache Commons Collections (from https://commons.apache.org/proper/commons-collections/) - Apache Commons Lang (from http://commons.apache.org/proper/commons-lang/) - Apache Commons Logging (from http://commons.apache.org/proper/commons-logging/) - Apache Commons Logging (from http://commons.apache.org/proper/commons-logging/) @@ -192,10 +193,10 @@ The following software have components provided under the terms of this license: - Apache HttpClient Cache (from http://hc.apache.org/httpcomponents-client) - Apache HttpCore (from http://hc.apache.org/httpcomponents-core-ga) - Apache HttpCore NIO (from http://hc.apache.org/httpcomponents-core-ga) -- Apache Log4j API (from ) -- Apache Log4j Core (from ) -- Apache Log4j JUL Adapter (from ) -- Apache Log4j SLF4J Binding (from ) +- Apache Log4j API (from https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-api) +- Apache Log4j Core (from https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-core) +- Apache Log4j JUL Adapter (from https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-jul) +- Apache Log4j SLF4J Binding (from https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-slf4j-impl) - Apache Log4j to SLF4J Adapter (from ) - Apache Maven Invoker (from ) - Apache Maven Reporting Implementation (from ) @@ -207,26 +208,26 @@ The following software have components provided under the terms of this license: - Apache Maven Wagon :: Providers :: SSH External Provider (from ) - Apache Maven Wagon :: Providers :: SSH Provider (from ) - Apache Velocity (from http://velocity.apache.org/engine/devel/) -- AssertJ fluent assertions (from ) -- Asynchronous Http Client (from ) -- Asynchronous Http Client Netty Utils (from ) -- AutoValue (from ) -- AutoValue Annotations (from ) +- AssertJ fluent assertions (from https://repo1.maven.org/maven2/org/assertj/assertj-core) +- Asynchronous Http Client (from https://repo1.maven.org/maven2/org/asynchttpclient/async-http-client) +- Asynchronous Http Client Netty Utils (from https://repo1.maven.org/maven2/org/asynchttpclient/async-http-client-netty-utils) +- AutoValue Annotations (from https://github.com/google/auto/tree/master/value) +- AutoValue Processor (from https://github.com/google/auto/tree/master/value) - Azure Spring Boot Starter for Azure AD Spring Security Integration (from https://github.com/Azure/azure-sdk-for-java) -- BSON (from http://bsonspec.org) +- BSON (from https://bsonspec.org) - Bean Validation API (from http://beanvalidation.org) - Brave Instrumentation: Http Adapters (from ) - Brave instrumentation for Reactor Netty HTTP (from https://github.com/reactor/reactor-netty) -- Byte Buddy (without dependencies) (from ) -- Byte Buddy Java agent (from ) +- Byte Buddy (without dependencies) (from https://repo1.maven.org/maven2/net/bytebuddy/byte-buddy) +- Byte Buddy Java agent (from https://repo1.maven.org/maven2/net/bytebuddy/byte-buddy-agent) - ClassMate (from http://github.com/cowtowncoder/java-classmate) -- Cloud Storage JSON API v1-rev58-1.21.0 (from ) +- Cloud Storage JSON API v1-rev20181109-1.28.0 (from https://repo1.maven.org/maven2/com/google/apis/google-api-services-storage) - CloudWatch Metrics for AWS Java SDK (from https://aws.amazon.com/sdkforjava) -- Cobertura code coverage (from http://cobertura.sourceforge.net) +- Cobertura (from http://cobertura.sourceforge.net) +- Collections (from https://repo1.maven.org/maven2/commons-collections/commons-collections) - Commons Digester (from http://commons.apache.org/digester/) -- Commons IO (from http://commons.apache.org/io/) - Commons Lang (from http://commons.apache.org/lang/) -- Converter: Jackson (from ) +- Converter: Jackson (from https://repo1.maven.org/maven2/com/squareup/retrofit2/converter-jackson) - Core functionality for the Reactor Netty library (from https://github.com/reactor/reactor-netty) - Data Mapper for Jackson (from http://jackson.codehaus.org) - Doxia :: APT Module (from ) @@ -239,45 +240,48 @@ The following software have components provided under the terms of this license: - Doxia :: XHTML Module (from ) - Elastic JNA Distribution (from https://github.com/java-native-access/jna) - Elastic JNA Distribution (from https://github.com/java-native-access/jna) -- Elasticsearch: 5.0.0-alpha5 (from https://github.com/elastic/elasticsearch) -- Elasticsearch: 5.0.0-alpha5 (from https://github.com/elastic/elasticsearch) +- Expression Language 3.0 (from http://uel.java.net) - FindBugs-jsr305 (from http://findbugs.sourceforge.net/) -- GSON extensions to the Google HTTP Client Library for Java. (from ) -- Google APIs Client Library for Java (from ) -- Google APIs Client Library for Java (from ) -- Google App Engine extensions to the Google HTTP Client Library for Java. (from ) -- Google App Engine extensions to the Google HTTP Client Library for Java. (from ) -- Google Cloud Core (from https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-core) -- Google Cloud Core HTTP (from https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-core-http) -- Google Cloud Core HTTP (from https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-core-http) -- Google Cloud Core gRPC (from https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-core-grpc) -- Google Cloud Core gRPC (from https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-core-grpc) +- GSON extensions to the Google HTTP Client Library for Java. (from https://repo1.maven.org/maven2/com/google/http-client/google-http-client-gson) +- Google APIs Client Library for Java (from https://repo1.maven.org/maven2/com/google/api-client/google-api-client) +- Google APIs Client Library for Java (from https://repo1.maven.org/maven2/com/google/api-client/google-api-client) +- Google App Engine extensions to the Google HTTP Client Library for Java. (from https://repo1.maven.org/maven2/com/google/http-client/google-http-client-appengine) +- Google App Engine extensions to the Google HTTP Client Library for Java. (from https://repo1.maven.org/maven2/com/google/http-client/google-http-client-appengine) +- Google Cloud Common Protos for Java (from https://github.com/googleapis/common-protos-java) +- Google Cloud Common Protos for Java (from https://github.com/googleapis/common-protos-java) +- Google Cloud Common Protos for Java (from https://github.com/googleapis/common-protos-java) +- Google Cloud Core (from https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-core) +- Google Cloud Core HTTP (from https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-core-http) +- Google Cloud Core HTTP (from https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-core-http) +- Google Cloud Core gRPC (from https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-core-grpc) +- Google Cloud Core gRPC (from https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-core-grpc) - Google Cloud Datastore (from https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-datastore) - Google Cloud Datastore (from https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-datastore) - Google Cloud IAM Service Account Credentials (from https://github.com/googleapis/java-iamcredentials) -- Google Cloud Key Management Service (KMS) API v1-rev22-1.23.0 (from ) +- Google Cloud Key Management Service (KMS) API v1-rev9-1.22.0 (from https://repo1.maven.org/maven2/com/google/apis/google-api-services-cloudkms) - Google Cloud Logging (from https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-logging) - Google Cloud Logging (from https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-logging) -- Google Cloud Pub/Sub (from https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-pubsub) -- Google Cloud Pub/Sub (from https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-pubsub) -- Google Cloud Storage (from https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-storage) -- Google HTTP Client Library for Java (from https://github.com/google/google-http-java-client.git) -- Google HTTP Client Library for Java (from https://github.com/google/google-http-java-client.git) -- Google OAuth Client Library for Java (from ) -- Google OAuth Client Library for Java (from ) +- Google Cloud Pub/Sub (from https://github.com/googleapis/java-pubsub) +- Google Cloud Pub/Sub (from https://github.com/googleapis/java-pubsub) +- Google Cloud Storage (from https://github.com/googleapis/java-storage) +- Google HTTP Client Library for Java (from https://repo1.maven.org/maven2/com/google/http-client/google-http-client) +- Google HTTP Client Library for Java (from https://repo1.maven.org/maven2/com/google/http-client/google-http-client) +- Google OAuth Client Library for Java (from https://repo1.maven.org/maven2/com/google/oauth-client/google-oauth-client) +- Google OAuth Client Library for Java (from https://repo1.maven.org/maven2/com/google/oauth-client/google-oauth-client) - Gson (from https://github.com/google/gson) - Gson (from https://github.com/google/gson) -- Guava InternalFutureFailureAccess and InternalFutures (from ) -- Guava: Google Core Libraries for Java (from https://github.com/google/guava.git) -- Guava: Google Core Libraries for Java (from https://github.com/google/guava.git) -- HPPC Collections (from http://labs.carrotsearch.com) -- HPPC Collections (from http://labs.carrotsearch.com) +- Guava InternalFutureFailureAccess and InternalFutures (from https://repo1.maven.org/maven2/com/google/guava/failureaccess) +- Guava: Google Core Libraries for Java (from https://repo1.maven.org/maven2/com/google/guava/guava) +- Guava: Google Core Libraries for Java (from https://repo1.maven.org/maven2/com/google/guava/guava) +- HPPC Collections (from https://repo1.maven.org/maven2/com/carrotsearch/hppc) +- HPPC Collections (from https://repo1.maven.org/maven2/com/carrotsearch/hppc) - HTTP functionality for the Reactor Netty library (from https://github.com/reactor/reactor-netty) - Hibernate Validator Engine (from ) - IBM COS Java SDK for Amazon S3 (from https://github.com/ibm/ibm-cos-sdk-java) - IBM COS Java SDK for COS KMS (from https://github.com/ibm/ibm-cos-sdk-java) - IBM COS SDK For Java (from https://github.com/ibm/ibm-cos-sdk-java) - IBM COS SDK for Java - Core (from https://github.com/ibm/ibm-cos-sdk-java) +- IO (from http://jakarta.apache.org/commons/${pom.artifactId.substring(8)}/) - Identity and Access Management (IAM) API v1-rev247-1.23.0 (from ) - IntelliJ IDEA Annotations (from http://www.jetbrains.org) - J2ObjC Annotations (from https://github.com/google/j2objc/) @@ -286,45 +290,46 @@ The following software have components provided under the terms of this license: - JCIP Annotations under Apache License (from http://stephenc.github.com/jcip-annotations) - JDOM (from http://www.jdom.org) - JMES Path Query library (from https://aws.amazon.com/sdkforjava) -- JSON Small and Fast Parser (from http://www.minidev.net/) +- JSON Small and Fast Parser (from https://repo1.maven.org/maven2/net/minidev/json-smart) - JSON Web Token support for the JVM (from https://github.com/jwtk/jjwt.git) - JSON library from Android SDK (from http://developer.android.com/sdk) - JSON.simple (from http://code.google.com/p/json-simple/) - JSONassert (from https://github.com/skyscreamer/JSONassert) - Jackson (from http://jackson.codehaus.org) - Jackson (from http://jackson.codehaus.org) -- Jackson 2 extensions to the Google HTTP Client Library for Java. (from https://github.com/google/google-http-java-client.git/google-http-client-jackson2) -- Jackson 2 extensions to the Google HTTP Client Library for Java. (from https://github.com/google/google-http-java-client.git/google-http-client-jackson2) +- Jackson 2 extensions to the Google HTTP Client Library for Java. (from https://repo1.maven.org/maven2/com/google/http-client/google-http-client-jackson2) +- Jackson 2 extensions to the Google HTTP Client Library for Java. (from https://repo1.maven.org/maven2/com/google/http-client/google-http-client-jackson2) - Jackson dataformat: CBOR (from http://github.com/FasterXML/jackson-dataformats-binary) -- Jackson datatype: JSR310 (from http://wiki.fasterxml.com/JacksonModuleJSR310) -- Jackson datatype: JSR310 (from http://wiki.fasterxml.com/JacksonModuleJSR310) -- Jackson extensions to the Google HTTP Client Library for Java. (from ) +- Jackson dataformat: Smile (from http://github.com/FasterXML/jackson-dataformats-binary) +- Jackson dataformat: Smile (from http://github.com/FasterXML/jackson-dataformats-binary) +- Jackson datatype: JSR310 (from https://repo1.maven.org/maven2/com/fasterxml/jackson/datatype/jackson-datatype-jsr310) +- Jackson datatype: JSR310 (from https://repo1.maven.org/maven2/com/fasterxml/jackson/datatype/jackson-datatype-jsr310) +- Jackson datatype: jdk8 (from https://repo1.maven.org/maven2/com/fasterxml/jackson/datatype/jackson-datatype-jdk8) +- Jackson datatype: jdk8 (from https://repo1.maven.org/maven2/com/fasterxml/jackson/datatype/jackson-datatype-jdk8) +- Jackson extensions to the Google HTTP Client Library for Java. (from https://repo1.maven.org/maven2/com/google/http-client/google-http-client-jackson) +- Jackson module: Afterburner (from https://github.com/FasterXML/jackson-modules-base) +- Jackson module: JAXB-annotations (from http://github.com/FasterXML/jackson-module-jaxb-annotations) +- Jackson module: JAXB-annotations (from http://github.com/FasterXML/jackson-module-jaxb-annotations) - Jackson-annotations (from http://github.com/FasterXML/jackson) - Jackson-annotations (from http://github.com/FasterXML/jackson) - Jackson-core (from https://github.com/FasterXML/jackson-core) -- Jackson-dataformat-Smile (from http://github.com/FasterXML/jackson-dataformat-smile) -- Jackson-dataformat-Smile (from http://github.com/FasterXML/jackson-dataformat-smile) - Jackson-dataformat-XML (from http://wiki.fasterxml.com/JacksonExtensionXmlDataBinding) -- Jackson-dataformat-YAML (from https://github.com/FasterXML/jackson) -- Jackson-dataformat-YAML (from https://github.com/FasterXML/jackson) +- Jackson-dataformat-YAML (from https://github.com/FasterXML/jackson-dataformats-text) +- Jackson-dataformat-YAML (from https://github.com/FasterXML/jackson-dataformats-text) - Jackson-datatype-Joda (from http://wiki.fasterxml.com/JacksonModuleJoda) -- Jackson-datatype-jdk8 (from ) -- Jackson-datatype-jdk8 (from ) -- Jackson-module-Afterburner (from http://wiki.fasterxml.com/JacksonHome) -- Jackson-module-JAXB-annotations (from http://wiki.fasterxml.com/JacksonJAXBAnnotations) -- Jackson-module-JAXB-annotations (from http://wiki.fasterxml.com/JacksonJAXBAnnotations) -- Jackson-module-parameter-names (from ) -- Jackson-module-parameter-names (from ) +- Jackson-module-parameter-names (from https://repo1.maven.org/maven2/com/fasterxml/jackson/module/jackson-module-parameter-names) +- Jackson-module-parameter-names (from https://repo1.maven.org/maven2/com/fasterxml/jackson/module/jackson-module-parameter-names) - Jakarta Bean Validation API (from https://beanvalidation.org) - Java Libraries for Amazon Simple WorkFlow (from https://aws.amazon.com/sdkforjava) - Java Native Access (from https://github.com/java-native-access/jna) - Java Native Access Platform (from https://github.com/java-native-access/jna) +- Java Servlet API (from http://servlet-spec.java.net) - Java UUID Generator (from http://wiki.fasterxml.com/JugHome) - Javassist (from http://www.javassist.org/) - Javassist (from http://www.javassist.org/) -- Jetty Server (from ) -- Jetty Utilities (from ) -- Joda-Time (from http://www.joda.org/joda-time/) +- Jetty Server (from https://repo1.maven.org/maven2/org/mortbay/jetty/jetty) +- Jetty Utilities (from https://repo1.maven.org/maven2/org/mortbay/jetty/jetty-util) +- Joda-Time (from https://www.joda.org/joda-time/) - Json Path (from https://github.com/jayway/JsonPath) - KeePassJava2 :: All (from https://repo1.maven.org/maven2/org/linguafranca/pwdb/KeePassJava2) - KeePassJava2 :: DOM (from https://repo1.maven.org/maven2/org/linguafranca/pwdb/KeePassJava2-dom) @@ -335,52 +340,52 @@ The following software have components provided under the terms of this license: - Logback Contrib :: JSON :: Classic (from ) - Logback Contrib :: JSON :: Core (from ) - Logback Contrib :: Jackson (from ) -- Lucene Common Analyzers (from ) -- Lucene Common Analyzers (from ) -- Lucene Core (from ) -- Lucene Core (from ) -- Lucene Grouping (from ) -- Lucene Grouping (from ) -- Lucene Highlighter (from ) -- Lucene Highlighter (from ) -- Lucene Join (from ) -- Lucene Join (from ) -- Lucene Memory (from ) -- Lucene Memory (from ) -- Lucene Memory (from ) -- Lucene Memory (from ) -- Lucene Miscellaneous (from ) -- Lucene Miscellaneous (from ) -- Lucene Queries (from ) -- Lucene Queries (from ) -- Lucene QueryParsers (from ) -- Lucene QueryParsers (from ) -- Lucene Sandbox (from ) -- Lucene Sandbox (from ) -- Lucene Spatial (from ) -- Lucene Spatial 3D (from ) -- Lucene Spatial 3D (from ) -- Lucene Spatial Extras (from ) -- Lucene Spatial Extras (from ) -- Lucene Suggest (from ) -- Lucene Suggest (from ) -- MapStruct Core (from ) -- Maven Artifact (from ) +- Lucene Common Analyzers (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-analyzers-common) +- Lucene Common Analyzers (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-analyzers-common) +- Lucene Core (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-core) +- Lucene Core (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-core) +- Lucene Grouping (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-grouping) +- Lucene Grouping (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-grouping) +- Lucene Highlighter (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-highlighter) +- Lucene Highlighter (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-highlighter) +- Lucene Join (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-join) +- Lucene Join (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-join) +- Lucene Memory (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-memory) +- Lucene Memory (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-backward-codecs) +- Lucene Memory (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-backward-codecs) +- Lucene Memory (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-memory) +- Lucene Miscellaneous (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-misc) +- Lucene Miscellaneous (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-misc) +- Lucene Queries (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-queries) +- Lucene Queries (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-queries) +- Lucene QueryParsers (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-queryparser) +- Lucene QueryParsers (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-queryparser) +- Lucene Sandbox (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-sandbox) +- Lucene Sandbox (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-sandbox) +- Lucene Spatial (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-spatial) +- Lucene Spatial 3D (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-spatial3d) +- Lucene Spatial 3D (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-spatial3d) +- Lucene Spatial Extras (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-spatial-extras) +- Lucene Spatial Extras (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-spatial-extras) +- Lucene Suggest (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-suggest) +- Lucene Suggest (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-suggest) +- MapStruct Core (from http://mapstruct.org/mapstruct/) +- Maven Artifact (from https://repo1.maven.org/maven2/org/apache/maven/maven-artifact) - Maven Artifact Manager (from ) -- Maven Core (from https://git-wip-us.apache.org/repos/asf/maven.git/maven-core) +- Maven Core (from https://repo1.maven.org/maven2/org/apache/maven/maven-core) - Maven Error Diagnostics (from ) -- Maven Model (from https://git-wip-us.apache.org/repos/asf/maven.git/maven-model) +- Maven Model (from https://repo1.maven.org/maven2/org/apache/maven/maven-model) - Maven Monitor (from ) -- Maven Plugin API (from https://git-wip-us.apache.org/repos/asf/maven.git/maven-plugin-api) +- Maven Plugin API (from https://repo1.maven.org/maven2/org/apache/maven/maven-plugin-api) - Maven Plugin Descriptor Model (from ) - Maven Plugin Parameter Documenter API (from ) - Maven Plugin Registry Model (from ) - Maven Profile Model (from ) - Maven Project (from ) - Maven Reporting API (from ) -- Maven Repository Metadata Model (from ) -- Maven Settings (from ) -- Metrics Core (from https://github.com/dropwizard/metrics) +- Maven Repository Metadata Model (from https://repo1.maven.org/maven2/org/apache/maven/maven-repository-metadata) +- Maven Settings (from https://repo1.maven.org/maven2/org/apache/maven/maven-settings) +- Metrics Core (from https://repo1.maven.org/maven2/io/dropwizard/metrics/metrics-core) - Microsoft Application Insights Java SDK Spring Boot starter (from https://github.com/Microsoft/ApplicationInsights-Java) - Microsoft Application Insights Java SDK Web Module (from https://github.com/Microsoft/ApplicationInsights-Java) - Microsoft Application Insights Log4j 2 Appender (from https://github.com/Microsoft/ApplicationInsights-Java) @@ -388,56 +393,55 @@ The following software have components provided under the terms of this license: - Microsoft Azure Netty HTTP Client Library (from https://github.com/Azure/azure-sdk-for-java) - Microsoft Azure SDK for SQL API of Azure Cosmos DB Service (from https://github.com/Azure/azure-sdk-for-java) - Mockito (from http://www.mockito.org) -- Mockito (from http://mockito.org) -- Mockito (from http://mockito.org) -- Mockito (from http://mockito.org) - Mojo's Maven plugin for Cobertura (from http://mojo.codehaus.org/cobertura-maven-plugin/) -- MongoDB Driver (from http://www.mongodb.org) +- MongoDB Java Driver (from http://www.mongodb.org) - MongoDB Java Driver Core (from http://www.mongodb.org) -- Netty Reactive Streams HTTP support (from ) -- Netty Reactive Streams Implementation (from ) -- Netty/Buffer (from http://netty.io/) -- Netty/Buffer (from http://netty.io/) -- Netty/Codec (from ) -- Netty/Codec (from ) -- Netty/Codec/DNS (from ) -- Netty/Codec/HTTP (from ) -- Netty/Codec/HTTP (from ) -- Netty/Codec/HTTP2 (from ) -- Netty/Codec/HTTP2 (from ) -- Netty/Codec/Socks (from ) -- Netty/Common (from ) -- Netty/Common (from ) -- Netty/Handler (from ) -- Netty/Handler (from ) -- Netty/Handler/Proxy (from ) -- Netty/Resolver (from ) -- Netty/Resolver (from ) -- Netty/Resolver/DNS (from ) -- Netty/TomcatNative [BoringSSL - Static] (from ) -- Netty/Transport (from http://netty.io/) -- Netty/Transport (from http://netty.io/) -- Netty/Transport/Native/Unix/Common (from ) -- Netty/Transport/Native/Unix/Common (from ) +- Netty Reactive Streams HTTP support (from https://repo1.maven.org/maven2/com/typesafe/netty/netty-reactive-streams-http) +- Netty Reactive Streams Implementation (from https://repo1.maven.org/maven2/com/typesafe/netty/netty-reactive-streams) +- Netty/Buffer (from https://repo1.maven.org/maven2/io/netty/netty-buffer) +- Netty/Buffer (from https://repo1.maven.org/maven2/io/netty/netty-buffer) +- Netty/Codec (from https://repo1.maven.org/maven2/io/netty/netty-codec) +- Netty/Codec (from https://repo1.maven.org/maven2/io/netty/netty-codec) +- Netty/Codec/DNS (from https://repo1.maven.org/maven2/io/netty/netty-codec-dns) +- Netty/Codec/HTTP (from https://repo1.maven.org/maven2/io/netty/netty-codec-http) +- Netty/Codec/HTTP (from https://repo1.maven.org/maven2/io/netty/netty-codec-http) +- Netty/Codec/HTTP2 (from https://repo1.maven.org/maven2/io/netty/netty-codec-http2) +- Netty/Codec/HTTP2 (from https://repo1.maven.org/maven2/io/netty/netty-codec-http2) +- Netty/Codec/Socks (from https://repo1.maven.org/maven2/io/netty/netty-codec-socks) +- Netty/Common (from https://repo1.maven.org/maven2/io/netty/netty-common) +- Netty/Common (from https://repo1.maven.org/maven2/io/netty/netty-common) +- Netty/Handler (from https://repo1.maven.org/maven2/io/netty/netty-handler) +- Netty/Handler (from https://repo1.maven.org/maven2/io/netty/netty-handler) +- Netty/Handler/Proxy (from https://repo1.maven.org/maven2/io/netty/netty-handler-proxy) +- Netty/Resolver (from https://repo1.maven.org/maven2/io/netty/netty-resolver) +- Netty/Resolver (from https://repo1.maven.org/maven2/io/netty/netty-resolver) +- Netty/Resolver/DNS (from https://repo1.maven.org/maven2/io/netty/netty-resolver-dns) +- Netty/TomcatNative [BoringSSL - Static] (from https://repo1.maven.org/maven2/io/netty/netty-tcnative-boringssl-static) +- Netty/Transport (from https://repo1.maven.org/maven2/io/netty/netty-transport) +- Netty/Transport (from https://repo1.maven.org/maven2/io/netty/netty-transport) +- Netty/Transport/Native/Unix/Common (from https://repo1.maven.org/maven2/io/netty/netty-transport-native-unix-common) +- Netty/Transport/Native/Unix/Common (from https://repo1.maven.org/maven2/io/netty/netty-transport-native-unix-common) - Nimbus Content Type (from https://bitbucket.org/connect2id/nimbus-content-type) - Nimbus JOSE+JWT (from https://bitbucket.org/connect2id/nimbus-jose-jwt) - Nimbus JOSE+JWT (from https://bitbucket.org/connect2id/nimbus-jose-jwt) - Nimbus JOSE+JWT (from https://bitbucket.org/connect2id/nimbus-jose-jwt) +- Nimbus JOSE+JWT (from https://bitbucket.org/connect2id/nimbus-jose-jwt) - Nimbus LangTag (from https://bitbucket.org/connect2id/nimbus-language-tags) - Nimbus LangTag (from https://bitbucket.org/connect2id/nimbus-language-tags) -- Non-Blocking Reactive Foundation for the JVM (from https://github.com/reactor/reactor) +- Non-Blocking Reactive Foundation for the JVM (from https://github.com/reactor/reactor-core) - OAuth 2.0 SDK with OpenID Connect extensions (from https://bitbucket.org/connect2id/oauth-2.0-sdk-with-openid-connect-extensions) - OAuth 2.0 SDK with OpenID Connect extensions (from https://bitbucket.org/connect2id/oauth-2.0-sdk-with-openid-connect-extensions) - OAuth 2.0 SDK with OpenID Connect extensions (from https://bitbucket.org/connect2id/oauth-2.0-sdk-with-openid-connect-extensions) - OAuth2 for Spring Security (from ) +- OAuth2 for Spring Security (from ) - Objenesis (from http://objenesis.org) -- OkHttp (from ) -- OkHttp (from ) -- OkHttp Logging Interceptor (from ) -- OkHttp URLConnection (from ) -- OkHttp URLConnection (from ) -- Okio (from ) -- Okio (from ) +- OkHttp (from https://repo1.maven.org/maven2/com/squareup/okhttp3/okhttp) +- OkHttp (from https://repo1.maven.org/maven2/com/squareup/okhttp3/okhttp) +- OkHttp Logging Interceptor (from https://repo1.maven.org/maven2/com/squareup/okhttp3/logging-interceptor) +- OkHttp URLConnection (from https://repo1.maven.org/maven2/com/squareup/okhttp3/okhttp-urlconnection) +- OkHttp URLConnection (from https://repo1.maven.org/maven2/com/squareup/okhttp3/okhttp-urlconnection) +- Okio (from https://github.com/square/okio/) +- Okio (from https://github.com/square/okio/) - OpenCensus (from https://github.com/census-instrumentation/opencensus-java) - OpenCensus (from https://github.com/census-instrumentation/opencensus-java) - OpenCensus (from https://github.com/census-instrumentation/opencensus-java) @@ -451,60 +455,39 @@ The following software have components provided under the terms of this license: - Plexus Common Utilities (from http://plexus.codehaus.org/plexus-utils) - Plexus Velocity Component (from ) - PowerMock (from http://www.powermock.org) -- Protocol Buffer extensions to the Google HTTP Client Library for Java. (from ) +- Protocol Buffer extensions to the Google HTTP Client Library for Java. (from https://repo1.maven.org/maven2/com/google/http-client/google-http-client-protobuf) +- Proton-J (from https://repo1.maven.org/maven2/org/apache/qpid/proton-j) - QpidJMS Client (from ) -- RabbitMQ Java Client (from http://www.rabbitmq.com) +- RabbitMQ Java Client (from https://www.rabbitmq.com) - Reactive Streams Netty driver (from https://github.com/reactor/reactor-netty) -- Retrofit (from ) +- Retrofit (from https://repo1.maven.org/maven2/com/squareup/retrofit2/retrofit) - Servlet Specification 2.5 API (from ) -- SnakeYAML (from http://www.snakeyaml.org) -- Spatial4J (from http://www.locationtech.org/projects/locationtech.spatial4j) -- Spring AMQP Core (from https://projects.spring.io/spring-amqp) -- Spring AOP (from https://github.com/spring-projects/spring-framework) -- Spring Beans (from https://github.com/spring-projects/spring-framework) -- Spring Boot (from http://projects.spring.io/spring-boot/) +- SnakeYAML (from http://code.google.com/p/snakeyaml/) +- Spatial4J (from https://projects.eclipse.org/projects/locationtech.spatial4j) +- Spring AMQP Core (from https://github.com/spring-projects/spring-amqp) - Spring Boot AMQP Starter (from http://projects.spring.io/spring-boot/) -- Spring Boot Actuator (from http://projects.spring.io/spring-boot/) -- Spring Boot Actuator AutoConfigure (from https://projects.spring.io/spring-boot/#/spring-boot-parent/spring-boot-actuator-autoconfigure) -- Spring Boot Actuator Starter (from http://projects.spring.io/spring-boot/) -- Spring Boot AutoConfigure (from http://projects.spring.io/spring-boot/) -- Spring Boot Configuration Processor (from http://projects.spring.io/spring-boot/) -- Spring Boot Data MongoDB Starter (from http://projects.spring.io/spring-boot/) -- Spring Boot Dependencies (from http://projects.spring.io/spring-boot/) -- Spring Boot Jersey Starter (from http://projects.spring.io/spring-boot/) -- Spring Boot Json Starter (from https://projects.spring.io/spring-boot/#/spring-boot-parent/spring-boot-starters/spring-boot-starter-json) -- Spring Boot Log4J2 Starter (from http://projects.spring.io/spring-boot/) -- Spring Boot Logging Starter (from http://projects.spring.io/spring-boot/) -- Spring Boot Reactor Netty Starter (from https://projects.spring.io/spring-boot/#/spring-boot-parent/spring-boot-starters/spring-boot-starter-reactor-netty) -- Spring Boot Security Starter (from http://projects.spring.io/spring-boot/) -- Spring Boot Starter (from http://projects.spring.io/spring-boot/) -- Spring Boot Test (from http://projects.spring.io/spring-boot/) -- Spring Boot Test Auto-Configure (from http://projects.spring.io/spring-boot/) -- Spring Boot Test Starter (from http://projects.spring.io/spring-boot/) -- Spring Boot Tomcat Starter (from http://projects.spring.io/spring-boot/) -- Spring Boot Validation Starter (from http://projects.spring.io/spring-boot/) -- Spring Boot Web Starter (from http://projects.spring.io/spring-boot/) -- Spring Boot WebFlux Starter (from https://projects.spring.io/spring-boot/#/spring-boot-parent/spring-boot-starters/spring-boot-starter-webflux) - Spring Commons Logging Bridge (from https://github.com/spring-projects/spring-framework) -- Spring Context (from https://github.com/spring-projects/spring-framework) -- Spring Core (from https://github.com/spring-projects/spring-framework) -- Spring Data Core (from ) -- Spring Data Core (from ) -- Spring Data MongoDB - Core (from ) +- Spring Data Core (from https://repo1.maven.org/maven2/org/springframework/data/spring-data-commons) +- Spring Data Core (from https://repo1.maven.org/maven2/org/springframework/data/spring-data-commons) +- Spring Data MongoDB - Core (from https://repo1.maven.org/maven2/org/springframework/data/spring-data-mongodb) - Spring Expression Language (SpEL) (from https://github.com/spring-projects/spring-framework) +- Spring Framework: AOP (from http://www.springframework.org) +- Spring Framework: Context (from http://www.springframework.org) +- Spring Framework: WebMVC (from http://www.springframework.org) - Spring JMS (from https://github.com/spring-projects/spring-framework) - Spring Messaging (from https://github.com/spring-projects/spring-framework) - Spring Plugin - Core (from ) -- Spring Plugin - Metadata Extension (from ) -- Spring RabbitMQ Support (from https://projects.spring.io/spring-amqp) -- Spring Retry (from http://www.springsource.org) +- Spring Plugin - Metadata Extension (from https://repo1.maven.org/maven2/org/springframework/plugin/spring-plugin-metadata) +- Spring RabbitMQ Support (from https://github.com/spring-projects/spring-amqp) +- Spring Retry (from https://www.springsource.org) - Spring Security JWT Library (from http://github.com/spring-projects/spring-security-oauth) - Spring Security JWT Library (from http://github.com/spring-projects/spring-security-oauth) - Spring TestContext Framework (from https://github.com/spring-projects/spring-framework) - Spring Transaction (from https://github.com/spring-projects/spring-framework) -- Spring Web (from https://github.com/spring-projects/spring-framework) -- Spring Web MVC (from https://github.com/spring-projects/spring-framework) - Spring WebFlux (from https://github.com/spring-projects/spring-framework) +- Spring beans (from https://repo1.maven.org/maven2/org/springframework/spring-beans) +- Spring core (from https://repo1.maven.org/maven2/org/springframework/spring-core) +- Spring web (from https://repo1.maven.org/maven2/org/springframework/spring-web) - T-Digest (from https://github.com/tdunning/t-digest) - Vavr (from http://vavr.io) - Vavr Match (from http://vavr.io) @@ -518,28 +501,25 @@ The following software have components provided under the terms of this license: - aggs-matrix-stats (from https://github.com/elastic/elasticsearch) - aws-ssm-java-caching-client (from https://github.com/awslabs/aws-ssm-java-caching-client) - brave (from ) -- cli (from https://github.com/elastic/elasticsearch) -- cli (from https://github.com/elastic/elasticsearch) - com.google.api.grpc:grpc-google-cloud-pubsub-v1 (from https://github.com/googleapis/googleapis) - com.google.api.grpc:grpc-google-cloud-pubsub-v1 (from https://github.com/googleapis/googleapis) - com.google.api.grpc:proto-google-cloud-logging-v2 (from https://github.com/googleapis/googleapis) - com.google.api.grpc:proto-google-cloud-logging-v2 (from https://github.com/googleapis/googleapis) -- com.google.api.grpc:proto-google-cloud-pubsub-v1 (from https://github.com/googleapis/googleapis) -- com.google.api.grpc:proto-google-cloud-pubsub-v1 (from https://github.com/googleapis/googleapis) -- com.google.api.grpc:proto-google-common-protos (from https://github.com/googleapis/googleapis) -- com.google.api.grpc:proto-google-common-protos (from https://github.com/googleapis/googleapis) -- com.google.api.grpc:proto-google-common-protos (from https://github.com/googleapis/googleapis) -- com.google.api.grpc:proto-google-iam-v1 (from https://github.com/googleapis/googleapis) -- commons-collections (from ) - compiler (from http://github.com/spullara/mustache.java) - compiler (from http://github.com/spullara/mustache.java) - datastore-v1-proto-client (from ) +- elasticsearch-cli (from https://github.com/elastic/elasticsearch) +- elasticsearch-cli (from https://github.com/elastic/elasticsearch) - elasticsearch-core (from https://github.com/elastic/elasticsearch) - elasticsearch-core (from https://github.com/elastic/elasticsearch) - elasticsearch-geo (from https://github.com/elastic/elasticsearch) -- error-prone annotations (from ) -- error-prone annotations (from ) -- error-prone annotations (from ) +- elasticsearch-secure-sm (from https://github.com/elastic/elasticsearch) +- elasticsearch-secure-sm (from https://github.com/elastic/elasticsearch) +- elasticsearch-x-content (from https://github.com/elastic/elasticsearch) +- elasticsearch-x-content (from https://github.com/elastic/elasticsearch) +- error-prone annotations (from https://repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations) +- error-prone annotations (from https://repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations) +- error-prone annotations (from https://repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations) - io.grpc:grpc-alts (from https://github.com/grpc/grpc-java) - io.grpc:grpc-alts (from https://github.com/grpc/grpc-java) - io.grpc:grpc-api (from https://github.com/grpc/grpc-java) @@ -576,14 +556,14 @@ The following software have components provided under the terms of this license: - jersey-container-servlet (from git://java.net/jersey~code/project/jersey-container-servlet) - jersey-container-servlet-core (from git://java.net/jersey~code/project/jersey-container-servlet-core) - jersey-core-client (from git://java.net/jersey~code/jersey-client) -- jersey-core-common (from ) +- jersey-core-common (from https://repo1.maven.org/maven2/org/glassfish/jersey/core/jersey-common) - jersey-core-server (from git://java.net/jersey~code/jersey-server) - jersey-ext-bean-validation (from ) - jersey-ext-entity-filtering (from ) - jersey-inject-hk2 (from ) - jersey-media-jaxb (from ) - jersey-media-json-jackson (from git://java.net/jersey~code/project/jersey-media-json-jackson) -- jersey-spring4 (from ) +- jersey-spring4 (from https://repo1.maven.org/maven2/org/glassfish/jersey/ext/jersey-spring4) - jose4j (from https://bitbucket.org/b_c/jose4j/) - lang-mustache (from https://github.com/elastic/elasticsearch) - lang-mustache (from https://github.com/elastic/elasticsearch) @@ -591,6 +571,9 @@ The following software have components provided under the terms of this license: - mapper-extras (from https://github.com/elastic/elasticsearch) - micrometer-core (from https://github.com/micrometer-metrics/micrometer) - micrometer-registry-azure-monitor (from https://github.com/micrometer-metrics/micrometer) +- mockito-core (from https://github.com/mockito/mockito) +- mockito-core (from https://github.com/mockito/mockito) +- mockito-core (from https://github.com/mockito/mockito) - nio-multipart-parser (from ) - nio-stream-storage (from https://github.com/synchronoss/nio-stream-storage) - org.conscrypt:conscrypt-openjdk-uber (from https://conscrypt.org/) @@ -606,7 +589,9 @@ The following software have components provided under the terms of this license: - proto-google-cloud-datastore-v1 (from https://github.com/googleapis/api-client-staging) - proto-google-cloud-datastore-v1 (from https://github.com/googleapis/api-client-staging) - proto-google-cloud-iamcredentials-v1 (from https://repo1.maven.org/maven2/com/google/api/grpc/proto-google-cloud-iamcredentials-v1) -- proton-j (from ) +- proto-google-cloud-pubsub-v1 (from https://github.com/googleapis/java-pubsub/proto-google-cloud-pubsub-v1) +- proto-google-cloud-pubsub-v1 (from https://github.com/googleapis/java-pubsub/proto-google-cloud-pubsub-v1) +- proto-google-iam-v1 (from https://github.com/googleapis/api-client-staging) - rank-eval (from https://github.com/elastic/elasticsearch) - rank-eval (from https://github.com/elastic/elasticsearch) - resilience4j (from https://github.com/resilience4j/resilience4j) @@ -616,16 +601,39 @@ The following software have components provided under the terms of this license: - rest-high-level (from https://github.com/elastic/elasticsearch) - rest-high-level (from https://github.com/elastic/elasticsearch) - rxjava (from https://github.com/ReactiveX/RxJava) -- secure-sm (from https://github.com/elastic/elasticsearch) -- secure-sm (from https://github.com/elastic/elasticsearch) +- server (from https://github.com/elastic/elasticsearch) +- server (from https://github.com/elastic/elasticsearch) +- spring-boot (from https://spring.io/projects/spring-boot) +- spring-boot-actuator (from https://spring.io/projects/spring-boot) +- spring-boot-actuator-autoconfigure (from https://spring.io/projects/spring-boot) +- spring-boot-autoconfigure (from https://spring.io/projects/spring-boot) +- spring-boot-configuration-processor (from https://spring.io/projects/spring-boot) +- spring-boot-dependencies (from https://spring.io/projects/spring-boot) +- spring-boot-starter (from https://spring.io/projects/spring-boot) +- spring-boot-starter-actuator (from https://spring.io/projects/spring-boot) +- spring-boot-starter-data-mongodb (from https://spring.io/projects/spring-boot) +- spring-boot-starter-jersey (from https://spring.io/projects/spring-boot) +- spring-boot-starter-json (from https://spring.io/projects/spring-boot) +- spring-boot-starter-log4j2 (from https://spring.io/projects/spring-boot) +- spring-boot-starter-logging (from https://spring.io/projects/spring-boot) +- spring-boot-starter-reactor-netty (from https://spring.io/projects/spring-boot) +- spring-boot-starter-security (from https://spring.io/projects/spring-boot) +- spring-boot-starter-test (from https://spring.io/projects/spring-boot) +- spring-boot-starter-tomcat (from https://spring.io/projects/spring-boot) +- spring-boot-starter-validation (from https://spring.io/projects/spring-boot) +- spring-boot-starter-web (from https://spring.io/projects/spring-boot) +- spring-boot-starter-webflux (from https://spring.io/projects/spring-boot) +- spring-boot-test (from https://spring.io/projects/spring-boot) +- spring-boot-test-autoconfigure (from https://spring.io/projects/spring-boot) - spring-security-config (from http://spring.io/spring-security) -- spring-security-core (from http://spring.io/spring-security) +- spring-security-core (from https://repo1.maven.org/maven2/org/springframework/security/spring-security-core) - spring-security-oauth2-client (from http://spring.io/spring-security) - spring-security-oauth2-core (from http://spring.io/spring-security) - spring-security-oauth2-jose (from http://spring.io/spring-security) +- spring-security-oauth2-jose (from http://spring.io/spring-security) - spring-security-oauth2-resource-server (from http://spring.io/spring-security) - spring-security-test (from http://spring.io/spring-security) -- spring-security-web (from http://spring.io/spring-security) +- spring-security-web (from https://repo1.maven.org/maven2/org/springframework/security/spring-security-web) - springfox-core (from https://github.com/springfox/springfox) - springfox-schema (from https://github.com/springfox/springfox) - springfox-spi (from https://github.com/springfox/springfox) @@ -633,15 +641,13 @@ The following software have components provided under the terms of this license: - springfox-swagger-common (from https://github.com/springfox/springfox) - springfox-swagger-ui (from https://github.com/springfox/springfox) - springfox-swagger2 (from https://github.com/springfox/springfox) -- swagger-annotations (from ) +- swagger-annotations (from https://repo1.maven.org/maven2/io/swagger/swagger-annotations) - swagger-jaxrs (from ) - swagger-models (from ) -- tomcat-annotations-api (from http://tomcat.apache.org/) +- tomcat-annotations-api (from https://tomcat.apache.org/) - tomcat-embed-core (from http://tomcat.apache.org/) -- tomcat-embed-el (from http://tomcat.apache.org/) -- tomcat-embed-websocket (from http://tomcat.apache.org/) -- x-content (from https://github.com/elastic/elasticsearch) -- x-content (from https://github.com/elastic/elasticsearch) +- tomcat-embed-el (from https://tomcat.apache.org/) +- tomcat-embed-websocket (from https://tomcat.apache.org/) - xml-apis (from ) ======================================================================== @@ -649,31 +655,33 @@ BSD-2-Clause ======================================================================== The following software have components provided under the terms of this license: -- API Common (from https://github.com/googleapis) -- GAX (Google Api eXtensions) (from https://github.com/googleapis) -- GAX (Google Api eXtensions) (from https://github.com/googleapis) -- GAX (Google Api eXtensions) (from https://github.com/googleapis) -- GAX (Google Api eXtensions) (from https://github.com/googleapis) -- GAX (Google Api eXtensions) (from https://github.com/googleapis) -- GAX (Google Api eXtensions) (from https://github.com/googleapis) -- Lucene Common Analyzers (from ) -- Lucene Common Analyzers (from ) -- Lucene Core (from ) +- API Common (from https://github.com/googleapis/api-common-java) +- Apache Commons CLI (from http://commons.apache.org/proper/commons-cli/) +- GAX (Google Api eXtensions) for Java (from https://github.com/googleapis/gax-java) +- GAX (Google Api eXtensions) for Java (from https://github.com/googleapis/gax-java) +- GAX (Google Api eXtensions) for Java (from https://github.com/googleapis/gax-java) +- GAX (Google Api eXtensions) for Java (from https://github.com/googleapis/gax-java) +- GAX (Google Api eXtensions) for Java (from https://github.com/googleapis/gax-java) +- GAX (Google Api eXtensions) for Java (from https://github.com/googleapis/gax-java) +- Lucene Common Analyzers (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-analyzers-common) +- Lucene Common Analyzers (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-analyzers-common) +- Lucene Core (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-core) +- Lucene Core (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-core) - Plexus Common Utilities (from http://plexus.codehaus.org/plexus-utils) - Reflections (from http://github.com/ronmamo/reflections) - Stax2 API (from http://github.com/FasterXML/stax2-api) - ThreeTen backport (from https://www.threeten.org/threetenbp) - ThreeTen backport (from https://www.threeten.org/threetenbp) - jersey-ext-bean-validation (from ) -- jersey-spring4 (from ) +- jersey-spring4 (from https://repo1.maven.org/maven2/org/glassfish/jersey/ext/jersey-spring4) ======================================================================== BSD-3-Clause ======================================================================== The following software have components provided under the terms of this license: -- API Common (from https://github.com/googleapis) -- API Common (from https://github.com/googleapis) +- API Common (from https://github.com/googleapis/api-common-java) +- API Common (from https://github.com/googleapis/api-common-java) - ASM Analysis (from ) - ASM Commons (from ) - ASM Core (from ) @@ -681,41 +689,45 @@ The following software have components provided under the terms of this license: - ASM Tree (from ) - ASM Util (from ) - ASM library repackaged as OSGi bundle (from ) -- GAX (Google Api eXtensions) (from https://github.com/googleapis) -- GAX (Google Api eXtensions) (from https://github.com/googleapis) -- GAX (Google Api eXtensions) (from https://github.com/googleapis) -- GAX (Google Api eXtensions) (from https://github.com/googleapis) -- GAX (Google Api eXtensions) (from https://github.com/googleapis) -- GAX (Google Api eXtensions) (from https://github.com/googleapis) -- Google APIs Client Library for Java (from ) -- Google APIs Client Library for Java (from ) -- Google Auth Library for Java - Credentials (from ) -- Google Auth Library for Java - Credentials (from ) -- Google Auth Library for Java - OAuth2 HTTP (from ) -- Google Auth Library for Java - OAuth2 HTTP (from ) +- Apache Commons Codec (from https://commons.apache.org/proper/commons-codec/) +- GAX (Google Api eXtensions) for Java (from https://github.com/googleapis/gax-java) +- GAX (Google Api eXtensions) for Java (from https://github.com/googleapis/gax-java) +- GAX (Google Api eXtensions) for Java (from https://github.com/googleapis/gax-java) +- GAX (Google Api eXtensions) for Java (from https://github.com/googleapis/gax-java) +- GAX (Google Api eXtensions) for Java (from https://github.com/googleapis/gax-java) +- GAX (Google Api eXtensions) for Java (from https://github.com/googleapis/gax-java) +- Google APIs Client Library for Java (from https://repo1.maven.org/maven2/com/google/api-client/google-api-client) +- Google APIs Client Library for Java (from https://repo1.maven.org/maven2/com/google/api-client/google-api-client) +- Google Auth Library for Java - Credentials (from https://repo1.maven.org/maven2/com/google/auth/google-auth-library-credentials) +- Google Auth Library for Java - Credentials (from https://repo1.maven.org/maven2/com/google/auth/google-auth-library-credentials) +- Google Auth Library for Java - OAuth2 HTTP (from https://repo1.maven.org/maven2/com/google/auth/google-auth-library-oauth2-http) +- Google Auth Library for Java - OAuth2 HTTP (from https://repo1.maven.org/maven2/com/google/auth/google-auth-library-oauth2-http) - JSch (from http://www.jcraft.com/jsch/) - JavaBeans Activation Framework API jar (from ) -- Lucene Common Analyzers (from ) -- Lucene Common Analyzers (from ) -- Lucene Core (from ) -- Lucene Core (from ) -- Lucene Suggest (from ) -- Lucene Suggest (from ) +- Lucene Common Analyzers (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-analyzers-common) +- Lucene Common Analyzers (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-analyzers-common) +- Lucene Core (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-core) +- Lucene Core (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-core) +- Lucene Suggest (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-suggest) +- Lucene Suggest (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-suggest) - Microsoft Application Insights Java SDK Spring Boot starter (from https://github.com/Microsoft/ApplicationInsights-Java) - Microsoft Application Insights Java SDK Web Module (from https://github.com/Microsoft/ApplicationInsights-Java) - Microsoft Application Insights Log4j 2 Appender (from https://github.com/Microsoft/ApplicationInsights-Java) - Mockito (from http://www.mockito.org) -- Netty/Codec/HTTP (from ) -- Netty/Codec/HTTP (from ) +- Netty/Codec/HTTP (from https://repo1.maven.org/maven2/io/netty/netty-codec-http) +- Netty/Codec/HTTP (from https://repo1.maven.org/maven2/io/netty/netty-codec-http) - Plexus Common Utilities (from http://plexus.codehaus.org/plexus-utils) -- Protocol Buffer Java API (from https://developers.google.com/protocol-buffers/) -- Protocol Buffer Java API (from https://developers.google.com/protocol-buffers/) -- Protocol Buffer Java API (from https://developers.google.com/protocol-buffers/) -- Protocol Buffers [Util] (from ) -- Protocol Buffers [Util] (from ) -- Spring Core (from https://github.com/spring-projects/spring-framework) +- Protocol Buffers [Core] (from https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java) +- Protocol Buffers [Core] (from https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java) +- Protocol Buffers [Core] (from https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java) +- Protocol Buffers [Util] (from https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java-util) +- Protocol Buffers [Util] (from https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java-util) +- Reflections (from http://github.com/ronmamo/reflections) +- SnakeYAML (from http://code.google.com/p/snakeyaml/) +- Spring core (from https://repo1.maven.org/maven2/org/springframework/spring-core) - ThreeTen backport (from https://www.threeten.org/threetenbp) - ThreeTen backport (from https://www.threeten.org/threetenbp) +- classworlds (from http://classworlds.codehaus.org/) - jakarta.xml.bind-api (from ) - jaxen (from http://jaxen.codehaus.org/) - jersey-container-servlet (from git://java.net/jersey~code/project/jersey-container-servlet) @@ -749,13 +761,6 @@ CC0-1.0 ======================================================================== The following software have components provided under the terms of this license: -- Guava: Google Core Libraries for Java (from https://github.com/google/guava.git) -- Guava: Google Core Libraries for Java (from https://github.com/google/guava.git) -- HdrHistogram (from http://hdrhistogram.github.io/HdrHistogram/) -- LatencyUtils (from http://latencyutils.github.io/LatencyUtils/) -- MongoDB Java Driver Core (from http://www.mongodb.org) -- Netty/Common (from ) -- Netty/Common (from ) - reactive-streams (from http://www.reactive-streams.org/) ======================================================================== @@ -764,26 +769,23 @@ CDDL-1.0 The following software have components provided under the terms of this license: - ASM library repackaged as OSGi bundle (from ) -- Apache Log4j Core (from ) - Class Model for Hk2 (from ) -- HK2 API module (from git://java.net/hk2~git/hk2-api) -- HK2 Implementation Utilities (from ) +- HK2 Implementation Utilities (from https://repo1.maven.org/maven2/org/glassfish/hk2/hk2-utils) - HK2 Spring Bridge (from ) - HK2 config types (from ) - HK2 configuration module (from ) - HK2 core module (from ) - HK2 module of HK2 itself (from ) - JavaBeans Activation Framework API jar (from ) -- JavaBeans(TM) Activation Framework (from http://java.sun.com/javase/technologies/desktop/javabeans/jaf/index.jsp) - Run Level Service (from ) -- ServiceLocator Default Implementation (from git://java.net/hk2~git/hk2-locator) +- ServiceLocator Default Implementation (from https://repo1.maven.org/maven2/org/glassfish/hk2/hk2-locator) - Servlet Specification 2.5 API (from ) -- aopalliance-repackaged (from ) +- aopalliance-repackaged (from https://repo1.maven.org/maven2/org/glassfish/hk2/external/aopalliance-repackaged) - javax.ws.rs-api (from http://jax-rs-spec.java.net) - jersey-container-servlet (from git://java.net/jersey~code/project/jersey-container-servlet) - jersey-container-servlet-core (from git://java.net/jersey~code/project/jersey-container-servlet-core) - jersey-core-client (from git://java.net/jersey~code/jersey-client) -- jersey-core-common (from ) +- jersey-core-common (from https://repo1.maven.org/maven2/org/glassfish/jersey/core/jersey-common) - jersey-core-server (from git://java.net/jersey~code/jersey-server) - jersey-ext-entity-filtering (from ) - jersey-inject-hk2 (from ) @@ -795,11 +797,17 @@ CDDL-1.1 ======================================================================== The following software have components provided under the terms of this license: -- Java Architecture For XML Binding (from ) +- Expression Language 3.0 (from http://uel.java.net) +- Java Architecture for XML Binding (from http://jaxb.java.net/) +- Java Servlet API (from http://servlet-spec.java.net) - JavaBeans Activation Framework (from ) - JavaBeans(TM) Activation Framework (from http://java.sun.com/javase/technologies/desktop/javabeans/jaf/index.jsp) +- JavaMail API (from https://repo1.maven.org/maven2/com/sun/mail/javax.mail) +- OSGi resource locator (from ) +- Servlet Specification 2.5 API (from ) +- javax.annotation-api (from http://jcp.org/en/jsr/detail?id=250) - jersey-ext-bean-validation (from ) -- jersey-spring4 (from ) +- jersey-spring4 (from https://repo1.maven.org/maven2/org/glassfish/jersey/ext/jersey-spring4) - tomcat-embed-core (from http://tomcat.apache.org/) ======================================================================== @@ -816,21 +824,25 @@ DOC The following software have components provided under the terms of this license: - JDOM (from http://www.jdom.org) -- Xerces2-j (from https://xerces.apache.org/xerces2-j/) -- aalto-xml (from ) +- Lucene Core (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-core) +- Lucene Core (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-core) +- Woodstox (from https://github.com/FasterXML/woodstox) ======================================================================== EPL-1.0 ======================================================================== The following software have components provided under the terms of this license: +- Logback Classic Module (from https://repo1.maven.org/maven2/ch/qos/logback/logback-classic) - Logback Contrib :: JSON :: Classic (from ) - Logback Contrib :: JSON :: Core (from ) - Logback Contrib :: Jackson (from ) +- Logback Core Module (from https://repo1.maven.org/maven2/ch/qos/logback/logback-core) - Microsoft Application Insights Java SDK Spring Boot starter (from https://github.com/Microsoft/ApplicationInsights-Java) - Microsoft Application Insights Java SDK Web Module (from https://github.com/Microsoft/ApplicationInsights-Java) - Microsoft Application Insights Log4j 2 Appender (from https://github.com/Microsoft/ApplicationInsights-Java) -- jts-core (from ) +- SnakeYAML (from http://code.google.com/p/snakeyaml/) +- jts-core (from https://repo1.maven.org/maven2/org/locationtech/jts/jts-core) - jts-io-common (from ) ======================================================================== @@ -840,62 +852,76 @@ The following software have components provided under the terms of this license: - ASM library repackaged as OSGi bundle (from ) - Class Model for Hk2 (from ) +- Cobertura (from http://cobertura.sourceforge.net) - Cobertura Limited Runtime (from http://cobertura.sourceforge.net) -- Cobertura code coverage (from http://cobertura.sourceforge.net) +- Commons Lang (from http://commons.apache.org/lang/) - Expression Language 3.0 (from http://uel.java.net) -- HK2 API module (from git://java.net/hk2~git/hk2-api) -- HK2 Implementation Utilities (from ) +- HK2 Implementation Utilities (from https://repo1.maven.org/maven2/org/glassfish/hk2/hk2-utils) - HK2 Spring Bridge (from ) - HK2 config types (from ) - HK2 configuration module (from ) - HK2 core module (from ) - HK2 module of HK2 itself (from ) +- Java Architecture for XML Binding (from http://jaxb.java.net/) - Java Servlet API (from http://servlet-spec.java.net) - JavaBeans Activation Framework (from ) - Mojo's Maven plugin for Cobertura (from http://mojo.codehaus.org/cobertura-maven-plugin/) -- RabbitMQ Java Client (from http://www.rabbitmq.com) +- OSGi resource locator (from ) +- RabbitMQ Java Client (from https://www.rabbitmq.com) - Run Level Service (from ) -- ServiceLocator Default Implementation (from git://java.net/hk2~git/hk2-locator) -- aopalliance-repackaged (from ) +- ServiceLocator Default Implementation (from https://repo1.maven.org/maven2/org/glassfish/hk2/hk2-locator) +- aopalliance-repackaged (from https://repo1.maven.org/maven2/org/glassfish/hk2/external/aopalliance-repackaged) - javax.annotation-api (from http://jcp.org/en/jsr/detail?id=250) - javax.ws.rs-api (from http://jax-rs-spec.java.net) - jersey-container-servlet (from git://java.net/jersey~code/project/jersey-container-servlet) - jersey-container-servlet-core (from git://java.net/jersey~code/project/jersey-container-servlet-core) - jersey-core-client (from git://java.net/jersey~code/jersey-client) -- jersey-core-common (from ) +- jersey-core-common (from https://repo1.maven.org/maven2/org/glassfish/jersey/core/jersey-common) - jersey-core-server (from git://java.net/jersey~code/jersey-server) - jersey-ext-bean-validation (from ) - jersey-ext-entity-filtering (from ) - jersey-inject-hk2 (from ) - jersey-media-jaxb (from ) - jersey-media-json-jackson (from git://java.net/jersey~code/project/jersey-media-json-jackson) -- jersey-spring4 (from ) +- jersey-spring4 (from https://repo1.maven.org/maven2/org/glassfish/jersey/ext/jersey-spring4) - tomcat-embed-core (from http://tomcat.apache.org/) +======================================================================== +GPL-2.0-or-later +======================================================================== +The following software have components provided under the terms of this license: + +- SnakeYAML (from http://code.google.com/p/snakeyaml/) + ======================================================================== GPL-2.0-with-classpath-exception ======================================================================== The following software have components provided under the terms of this license: - Checker Qual (from https://checkerframework.org) -- Cobertura code coverage (from http://cobertura.sourceforge.net) -- HK2 Implementation Utilities (from ) -- Java Architecture For XML Binding (from ) +- Cobertura (from http://cobertura.sourceforge.net) +- Expression Language 3.0 (from http://uel.java.net) +- HK2 Implementation Utilities (from https://repo1.maven.org/maven2/org/glassfish/hk2/hk2-utils) +- Java Architecture for XML Binding (from http://jaxb.java.net/) +- Java Servlet API (from http://servlet-spec.java.net) - JavaBeans Activation Framework (from ) -- ServiceLocator Default Implementation (from git://java.net/hk2~git/hk2-locator) -- aopalliance-repackaged (from ) +- OSGi resource locator (from ) +- RabbitMQ Java Client (from https://www.rabbitmq.com) +- ServiceLocator Default Implementation (from https://repo1.maven.org/maven2/org/glassfish/hk2/hk2-locator) +- aopalliance-repackaged (from https://repo1.maven.org/maven2/org/glassfish/hk2/external/aopalliance-repackaged) +- javax.annotation-api (from http://jcp.org/en/jsr/detail?id=250) - javax.ws.rs-api (from http://jax-rs-spec.java.net) - jersey-container-servlet (from git://java.net/jersey~code/project/jersey-container-servlet) - jersey-container-servlet-core (from git://java.net/jersey~code/project/jersey-container-servlet-core) - jersey-core-client (from git://java.net/jersey~code/jersey-client) -- jersey-core-common (from ) +- jersey-core-common (from https://repo1.maven.org/maven2/org/glassfish/jersey/core/jersey-common) - jersey-core-server (from git://java.net/jersey~code/jersey-server) - jersey-ext-bean-validation (from ) - jersey-ext-entity-filtering (from ) - jersey-inject-hk2 (from ) - jersey-media-jaxb (from ) - jersey-media-json-jackson (from git://java.net/jersey~code/project/jersey-media-json-jackson) -- jersey-spring4 (from ) +- jersey-spring4 (from https://repo1.maven.org/maven2/org/glassfish/jersey/ext/jersey-spring4) - tomcat-embed-core (from http://tomcat.apache.org/) ======================================================================== @@ -903,25 +929,16 @@ GPL-3.0-only ======================================================================== The following software have components provided under the terms of this license: +- Project Lombok (from https://projectlombok.org) - javax.ws.rs-api (from http://jax-rs-spec.java.net) -======================================================================== -ISC -======================================================================== -The following software have components provided under the terms of this license: - -- Java Native Access Platform (from https://github.com/java-native-access/jna) - ======================================================================== ImageMagick ======================================================================== The following software have components provided under the terms of this license: -- Data Mapper for Jackson (from http://jackson.codehaus.org) -- Jackson (from http://jackson.codehaus.org) -- Jackson (from http://jackson.codehaus.org) - Stax2 API (from http://github.com/FasterXML/stax2-api) -- aalto-xml (from ) +- Woodstox (from https://github.com/FasterXML/woodstox) ======================================================================== Info-ZIP @@ -942,29 +959,49 @@ LGPL-2.1-only ======================================================================== The following software have components provided under the terms of this license: -- Cobertura code coverage (from http://cobertura.sourceforge.net) +- Cobertura (from http://cobertura.sourceforge.net) +- Commons Lang (from http://commons.apache.org/lang/) - Elastic JNA Distribution (from https://github.com/java-native-access/jna) - Elastic JNA Distribution (from https://github.com/java-native-access/jna) - Java Native Access (from https://github.com/java-native-access/jna) - Java Native Access Platform (from https://github.com/java-native-access/jna) - Javassist (from http://www.javassist.org/) - Javassist (from http://www.javassist.org/) +- Logback Classic Module (from https://repo1.maven.org/maven2/ch/qos/logback/logback-classic) - Logback Contrib :: JSON :: Classic (from ) - Logback Contrib :: JSON :: Core (from ) - Logback Contrib :: Jackson (from ) +- Logback Core Module (from https://repo1.maven.org/maven2/ch/qos/logback/logback-core) - Microsoft Application Insights Java SDK Spring Boot starter (from https://github.com/Microsoft/ApplicationInsights-Java) - Microsoft Application Insights Java SDK Web Module (from https://github.com/Microsoft/ApplicationInsights-Java) - Microsoft Application Insights Log4j 2 Appender (from https://github.com/Microsoft/ApplicationInsights-Java) +======================================================================== +LGPL-2.1-or-later +======================================================================== +The following software have components provided under the terms of this license: + +- Javassist (from http://www.javassist.org/) +- Javassist (from http://www.javassist.org/) +- SnakeYAML (from http://code.google.com/p/snakeyaml/) + +======================================================================== +LGPL-3.0-only +======================================================================== +The following software have components provided under the terms of this license: + +- Apache Log4j API (from https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-api) +- Apache Log4j Core (from https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-core) +- RabbitMQ Java Client (from https://www.rabbitmq.com) + ======================================================================== MIT ======================================================================== The following software have components provided under the terms of this license: - AWS Java SDK for AWS Lambda (from https://aws.amazon.com/sdkforjava) -- Animal Sniffer Annotations (from ) -- Animal Sniffer Annotations (from ) -- Apache Log4j SLF4J Binding (from ) +- Animal Sniffer Annotations (from https://repo1.maven.org/maven2/org/codehaus/mojo/animal-sniffer-annotations) +- Animal Sniffer Annotations (from https://repo1.maven.org/maven2/org/codehaus/mojo/animal-sniffer-annotations) - Azure Java Client Authentication Library for AutoRest (from https://github.com/Azure/autorest-clientruntime-for-java) - Azure Java Client Runtime for ARM (from https://github.com/Azure/autorest-clientruntime-for-java) - Azure Java Client Runtime for AutoRest (from https://github.com/Azure/autorest-clientruntime-for-java) @@ -974,16 +1011,13 @@ The following software have components provided under the terms of this license: - Checker Qual (from https://checkerframework.org) - Checker Qual (from https://checkerframework.org) - Checker Qual (from https://checkerframework.org) -- Elasticsearch: 5.0.0-alpha5 (from https://github.com/elastic/elasticsearch) - Extensions on Apache Proton-J library (from https://github.com/Azure/qpid-proton-j-extensions) - JOpt Simple (from http://pholser.github.io/jopt-simple) -- JTidy (from http://jtidy.sourceforge.net) - JUL to SLF4J bridge (from http://www.slf4j.org) - Java Client Runtime for AutoRest (from https://github.com/Azure/autorest-clientruntime-for-java) -- Java JWT (from http://www.jwt.io) -- Lucene Core (from ) -- Lucene Core (from ) -- Lucene Sandbox (from ) +- Lucene Core (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-core) +- Lucene Core (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-core) +- Lucene Sandbox (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-sandbox) - Microsoft Application Insights Java SDK Core (from https://github.com/Microsoft/ApplicationInsights-Java) - Microsoft Application Insights Java SDK Spring Boot starter (from https://github.com/Microsoft/ApplicationInsights-Java) - Microsoft Application Insights Java SDK Web Module (from https://github.com/Microsoft/ApplicationInsights-Java) @@ -1002,13 +1036,10 @@ The following software have components provided under the terms of this license: - Microsoft Azure common module for Storage (from https://github.com/Azure/azure-sdk-for-java) - Microsoft Azure internal Avro module for Storage (from https://github.com/Azure/azure-sdk-for-java) - Mockito (from http://www.mockito.org) -- Mockito (from http://mockito.org) -- Mockito (from http://mockito.org) -- Mockito (from http://mockito.org) -- Netty/Codec/HTTP (from ) -- Netty/Codec/HTTP (from ) -- Netty/Common (from ) -- Netty/Common (from ) +- Netty/Codec/HTTP (from https://repo1.maven.org/maven2/io/netty/netty-codec-http) +- Netty/Codec/HTTP (from https://repo1.maven.org/maven2/io/netty/netty-codec-http) +- Netty/Common (from https://repo1.maven.org/maven2/io/netty/netty-common) +- Netty/Common (from https://repo1.maven.org/maven2/io/netty/netty-common) - Plexus :: Default Container (from ) - Plexus Default Interactivity Handler (from ) - Project Lombok (from https://projectlombok.org) @@ -1018,17 +1049,25 @@ The following software have components provided under the terms of this license: - adal4j (from https://github.com/AzureAD/azure-activedirectory-library-for-java) - azure-documentdb (from https://azure.microsoft.com/en-us/services/cosmos-db/) - documentdb-bulkexecutor (from http://azure.microsoft.com/en-us/services/documentdb/) +- java jwt (from http://www.jwt.io) - micrometer-core (from https://github.com/micrometer-metrics/micrometer) +- mockito-core (from https://github.com/mockito/mockito) +- mockito-core (from https://github.com/mockito/mockito) +- mockito-core (from https://github.com/mockito/mockito) - msal4j (from https://github.com/AzureAD/microsoft-authentication-library-for-java) - msal4j-persistence-extension (from https://github.com/AzureAD/microsoft-authentication-extensions-for-java) -- spring-security-core (from http://spring.io/spring-security) +- server (from https://github.com/elastic/elasticsearch) +- spring-security-core (from https://repo1.maven.org/maven2/org/springframework/security/spring-security-core) ======================================================================== MPL-1.1 ======================================================================== The following software have components provided under the terms of this license: -- Cobertura code coverage (from http://cobertura.sourceforge.net) +- Cobertura (from http://cobertura.sourceforge.net) +- Javassist (from http://www.javassist.org/) +- Javassist (from http://www.javassist.org/) +- RabbitMQ Java Client (from https://www.rabbitmq.com) ======================================================================== MPL-2.0 @@ -1037,7 +1076,8 @@ The following software have components provided under the terms of this license: - Javassist (from http://www.javassist.org/) - Javassist (from http://www.javassist.org/) -- RabbitMQ Java Client (from http://www.rabbitmq.com) +- OkHttp (from https://repo1.maven.org/maven2/com/squareup/okhttp3/okhttp) +- RabbitMQ Java Client (from https://www.rabbitmq.com) ======================================================================== MS-RL @@ -1047,18 +1087,12 @@ The following software have components provided under the terms of this license: - Microsoft Application Insights Java SDK Core (from https://github.com/Microsoft/ApplicationInsights-Java) ======================================================================== -NCSA +PHP-3.01 ======================================================================== The following software have components provided under the terms of this license: -- Jetty Server (from ) - -======================================================================== -Plexus -======================================================================== -The following software have components provided under the terms of this license: - -- classworlds (from http://classworlds.codehaus.org/) +- JavaBeans Activation Framework API jar (from ) +- jakarta.xml.bind-api (from ) ======================================================================== Public-Domain @@ -1067,37 +1101,50 @@ The following software have components provided under the terms of this license: - Plexus Common Utilities (from http://plexus.codehaus.org/plexus-utils) - Spongy Castle (from http://rtyley.github.io/spongycastle/) -- jersey-core-common (from ) +- jersey-core-common (from https://repo1.maven.org/maven2/org/glassfish/jersey/core/jersey-common) - jersey-core-server (from git://java.net/jersey~code/jersey-server) -- jts-core (from ) +- jts-core (from https://repo1.maven.org/maven2/org/locationtech/jts/jts-core) ======================================================================== SAX-PD ======================================================================== The following software have components provided under the terms of this license: -- Apache Ant + JUnit (from http://ant.apache.org/) - Apache Ant Core (from http://ant.apache.org/) -- Apache Ant Launcher (from http://ant.apache.org/) -- xml-apis (from ) ======================================================================== -W3C +SPL-1.0 ======================================================================== The following software have components provided under the terms of this license: -- Apache Ant + JUnit (from http://ant.apache.org/) -- Apache Ant Core (from http://ant.apache.org/) -- Apache Ant Launcher (from http://ant.apache.org/) -- xml-apis (from ) +- Checker Qual (from https://checkerframework.org) +- Checker Qual (from https://checkerframework.org) +- Servlet Specification 2.5 API (from ) ======================================================================== -W3C-19980720 +SunPro ======================================================================== The following software have components provided under the terms of this license: +- Lucene Core (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-core) +- Lucene Core (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-core) + +======================================================================== +TCL +======================================================================== +The following software have components provided under the terms of this license: + +- HK2 API module (from https://repo1.maven.org/maven2/org/glassfish/hk2/hk2-api) + +======================================================================== +W3C +======================================================================== +The following software have components provided under the terms of this license: + +- Apache Ant Core (from http://ant.apache.org/) - JTidy (from http://jtidy.sourceforge.net) - Xerces2-j (from https://xerces.apache.org/xerces2-j/) +- jaxen (from http://jaxen.codehaus.org/) - xml-apis (from ) ======================================================================== @@ -1112,9 +1159,8 @@ X11 ======================================================================== The following software have components provided under the terms of this license: -- Guava: Google Core Libraries for Java (from https://github.com/google/guava.git) -- Guava: Google Core Libraries for Java (from https://github.com/google/guava.git) -- MongoDB Java Driver Core (from http://www.mongodb.org) +- Lucene Core (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-core) +- Lucene Core (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-core) ======================================================================== public-domain @@ -1123,19 +1169,30 @@ The following software have components provided under the terms of this license: - AWS Java SDK :: SDK Core (from https://aws.amazon.com/sdkforjava) - AWS SDK for Java - Models (from https://aws.amazon.com/sdkforjava) -- Asynchronous Http Client (from ) +- Asynchronous Http Client (from https://repo1.maven.org/maven2/org/asynchttpclient/async-http-client) +- Bouncy Castle PKIX, CMS, EAC, TSP, PKCS, OCSP, CMP, and CRMF APIs (from http://www.bouncycastle.org/java.html) +- Bouncy Castle PKIX, CMS, EAC, TSP, PKCS, OCSP, CMP, and CRMF APIs (from http://www.bouncycastle.org/java.html) +- Bouncy Castle Provider (from http://www.bouncycastle.org/java.html) +- Bouncy Castle Provider (from http://www.bouncycastle.org/java.html) +- Guava: Google Core Libraries for Java (from https://repo1.maven.org/maven2/com/google/guava/guava) +- Guava: Google Core Libraries for Java (from https://repo1.maven.org/maven2/com/google/guava/guava) - HdrHistogram (from http://hdrhistogram.github.io/HdrHistogram/) -- Joda-Time (from http://www.joda.org/joda-time/) +- JTidy (from http://jtidy.sourceforge.net) +- Joda-Time (from https://www.joda.org/joda-time/) - LatencyUtils (from http://latencyutils.github.io/LatencyUtils/) - Microsoft Application Insights Java SDK Core (from https://github.com/Microsoft/ApplicationInsights-Java) - Microsoft Azure SDK for EventGrid Management (from https://github.com/Azure/azure-sdk-for-java) - Microsoft Azure SDK for SQL API of Azure Cosmos DB Service (from https://github.com/Azure/azure-sdk-for-java) - Microsoft Azure client library for Blob Storage (from https://github.com/Azure/azure-sdk-for-java) +- Project Lombok (from https://projectlombok.org) +- RabbitMQ Java Client (from https://www.rabbitmq.com) - Spring Security JWT Library (from http://github.com/spring-projects/spring-security-oauth) - Spring Security JWT Library (from http://github.com/spring-projects/spring-security-oauth) -- Spring Web (from https://github.com/spring-projects/spring-framework) +- Spring web (from https://repo1.maven.org/maven2/org/springframework/spring-web) - azure-documentdb (from https://azure.microsoft.com/en-us/services/cosmos-db/) - msal4j (from https://github.com/AzureAD/microsoft-authentication-library-for-java) +- reactive-streams (from http://www.reactive-streams.org/) +- xml-apis (from ) ======================================================================== unknown @@ -1146,12 +1203,15 @@ The following software have components provided under the terms of this license: - Bouncy Castle PKIX, CMS, EAC, TSP, PKCS, OCSP, CMP, and CRMF APIs (from http://www.bouncycastle.org/java.html) - Bouncy Castle Provider (from http://www.bouncycastle.org/java.html) - Bouncy Castle Provider (from http://www.bouncycastle.org/java.html) -- Byte Buddy (without dependencies) (from ) +- Byte Buddy (without dependencies) (from https://repo1.maven.org/maven2/net/bytebuddy/byte-buddy) +- Checker Qual (from https://checkerframework.org) - JSON in Java (from https://github.com/douglascrockford/JSON-java) - JTidy (from http://jtidy.sourceforge.net) - JUnit (from http://junit.org) +- JavaBeans Activation Framework API jar (from ) - Spongy Castle (from http://rtyley.github.io/spongycastle/) - System Rules (from http://stefanbirkner.github.io/system-rules/) +- jakarta.xml.bind-api (from ) - jaxen (from http://jaxen.codehaus.org/) - jersey-container-servlet (from git://java.net/jersey~code/project/jersey-container-servlet) - jersey-container-servlet-core (from git://java.net/jersey~code/project/jersey-container-servlet-core) @@ -1160,8 +1220,8 @@ The following software have components provided under the terms of this license: - jersey-ext-entity-filtering (from ) - jersey-inject-hk2 (from ) - jersey-media-jaxb (from ) -- jersey-spring4 (from ) -- jts-core (from ) +- jersey-spring4 (from https://repo1.maven.org/maven2/org/glassfish/jersey/ext/jersey-spring4) +- jts-core (from https://repo1.maven.org/maven2/org/locationtech/jts/jts-core) - jts-io-common (from ) - xml-apis (from ) diff --git a/devops/gcp/deploy/templates/indexer-deploy.yml b/devops/gcp/deploy/templates/indexer-deploy.yml index c85dbf030fce67577620768211a427c61de97055..3c7a1fa1e3b592e90b829a7cc350ca95c5f5489e 100644 --- a/devops/gcp/deploy/templates/indexer-deploy.yml +++ b/devops/gcp/deploy/templates/indexer-deploy.yml @@ -14,6 +14,8 @@ spec: metadata: labels: app: "{{ .Values.conf.app_name }}" + annotations: + rollme: {{ randAlphaNum 5 | quote }} spec: containers: - name: "{{ .Values.conf.app_name }}" diff --git a/indexer-core/pom.xml b/indexer-core/pom.xml index 94aa6f13d7c3c3c7f9c755f5585eea1306ed5481..a6d2ba058ad3ffe95566caf1071b503b0e8b971b 100644 --- a/indexer-core/pom.xml +++ b/indexer-core/pom.xml @@ -4,19 +4,19 @@ <parent> <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-service</artifactId> - <version>0.10.0-SNAPSHOT</version> + <version>0.11.0-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent> <artifactId>indexer-core</artifactId> - <version>0.10.0-SNAPSHOT</version> + <version>0.11.0-SNAPSHOT</version> <name>indexer-core</name> <description>Indexer Service Core</description> <packaging>jar</packaging> <properties> <commons-beanutils.version>1.9.4</commons-beanutils.version> - <osdu.oscorecommon.version>0.9.0</osdu.oscorecommon.version> + <osdu.oscorecommon.version>0.10.0</osdu.oscorecommon.version> </properties> <dependencies> diff --git a/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/IndexSchemaService.java b/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/IndexSchemaService.java index 7e512ae7af32a70650372cfd2a2e48bed6093e27..9691ada93cdfc8b90c6650b99e8782768afcaad2 100644 --- a/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/IndexSchemaService.java +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/IndexSchemaService.java @@ -20,15 +20,20 @@ import org.opengroup.osdu.core.common.model.indexer.IndexSchema; import org.opengroup.osdu.core.common.model.indexer.OperationType; import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URISyntaxException; +import java.util.List; import java.util.Map; public interface IndexSchemaService { - IndexSchema getIndexerInputSchema(String kind, boolean invalidateCached) throws AppException; + IndexSchema getIndexerInputSchema(String kind, List<String> errors) throws AppException, UnsupportedEncodingException, URISyntaxException; + + IndexSchema getIndexerInputSchema(String kind, boolean invalidateCached) throws AppException, UnsupportedEncodingException, URISyntaxException; void processSchemaMessages(Map<String, OperationType> schemaMsgs) throws IOException; - void syncIndexMappingWithStorageSchema(String kind) throws ElasticsearchException, IOException, AppException; + void syncIndexMappingWithStorageSchema(String kind) throws ElasticsearchException, IOException, AppException, URISyntaxException; boolean isStorageSchemaSyncRequired(String kind, boolean forceClean) throws IOException; } diff --git a/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/IndexSchemaServiceImpl.java b/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/IndexSchemaServiceImpl.java index fb0469356a95978325aa45d9f44b3dd186b308fa..a979c0868f074adc77c7bcaec6d51ed2ab1eac86 100644 --- a/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/IndexSchemaServiceImpl.java +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/IndexSchemaServiceImpl.java @@ -16,12 +16,6 @@ package org.opengroup.osdu.indexer.service; import com.google.common.base.Strings; import com.google.gson.Gson; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URISyntaxException; -import java.util.HashMap; -import java.util.Map; -import javax.inject.Inject; import org.apache.http.HttpStatus; import org.elasticsearch.ElasticsearchException; import org.elasticsearch.ElasticsearchStatusException; @@ -38,18 +32,23 @@ import org.opengroup.osdu.core.common.model.storage.SchemaItem; import org.opengroup.osdu.core.common.search.ElasticIndexNameResolver; import org.opengroup.osdu.core.common.search.IndicesService; import org.opengroup.osdu.indexer.provider.interfaces.ISchemaCache; +import org.opengroup.osdu.indexer.schema.converter.exeption.SchemaProcessingException; import org.opengroup.osdu.indexer.util.ElasticClientHandler; import org.opengroup.osdu.indexer.util.TypeMapper; import org.springframework.stereotype.Service; +import javax.inject.Inject; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URISyntaxException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + @Service public class IndexSchemaServiceImpl implements IndexSchemaService { private static final String FLATTENED_SCHEMA = "_flattened"; - private static final String WELLBORE_MARKER_SET = "WellboreMarkerSet"; - private static final String MARKERS = "Markers"; - private static final String WELL_LOG = "WellLog"; - private static final String CURVES = "Curves"; private final Gson gson = new Gson(); @@ -73,14 +72,14 @@ public class IndexSchemaServiceImpl implements IndexSchemaService { schemaMsgs.entrySet().forEach(msg -> { try { processSchemaEvents(restClient, msg); - } catch (IOException | ElasticsearchStatusException e) { + } catch (IOException | ElasticsearchStatusException | URISyntaxException e) { throw new AppException(HttpStatus.SC_INTERNAL_SERVER_ERROR, "unable to process schema update", e.getMessage()); } }); } } - private void processSchemaEvents(RestHighLevelClient restClient, Map.Entry<String, OperationType> msg) throws IOException, ElasticsearchStatusException { + private void processSchemaEvents(RestHighLevelClient restClient, Map.Entry<String, OperationType> msg) throws IOException, ElasticsearchStatusException, URISyntaxException { String kind = msg.getKey(); String index = this.elasticIndexNameResolver.getIndexNameFromKind(kind); @@ -123,51 +122,59 @@ public class IndexSchemaServiceImpl implements IndexSchemaService { } @Override - public IndexSchema getIndexerInputSchema(String kind, boolean invalidateCached) throws AppException { + public IndexSchema getIndexerInputSchema(String kind, List<String> errors) throws AppException, UnsupportedEncodingException, URISyntaxException { + try { + return getIndexerInputSchema(kind, false); + } catch (SchemaProcessingException ex) { + log.error(ex.getMessage(), ex); + errors.add(ex.getMessage()); + } catch (RuntimeException ex) { + String msg = String.format("Failed to get the schema from the Schema service, kind: %s | message: %s", kind, ex.getMessage()); + log.error(msg, ex); + errors.add(msg); + } + return this.getEmptySchema(kind); + } + + @Override + public IndexSchema getIndexerInputSchema(String kind, boolean invalidateCached) throws AppException, UnsupportedEncodingException, URISyntaxException { if (invalidateCached) { this.invalidateCache(kind); } - try { - String schema = (String) this.schemaCache.get(kind); + String schema = (String) this.schemaCache.get(kind); + if (Strings.isNullOrEmpty(schema)) { + // get from storage + schema = this.schemaProvider.getSchema(kind); if (Strings.isNullOrEmpty(schema)) { - // get from storage - schema = getSchema(kind); - if (Strings.isNullOrEmpty(schema)) { - Schema basicSchema = Schema.builder().kind(kind).build(); - return normalizeSchema(gson.toJson(basicSchema)); - } else { - // cache the schema - this.schemaCache.put(kind, schema); - // get flatten schema and cache it - IndexSchema flatSchemaObj = normalizeSchema(schema); - if (flatSchemaObj != null) { - this.schemaCache.put(kind + FLATTENED_SCHEMA, gson.toJson(flatSchemaObj)); - } - return flatSchemaObj; - } + return this.getEmptySchema(kind); } else { - // search flattened schema in memcache - String flattenedSchema = (String) this.schemaCache.get(kind + FLATTENED_SCHEMA); - if (Strings.isNullOrEmpty(flattenedSchema)) { - Schema basicSchema = Schema.builder().kind(kind).build(); - return normalizeSchema(gson.toJson(basicSchema)); + // cache the schema + this.schemaCache.put(kind, schema); + // get flatten schema and cache it + IndexSchema flatSchemaObj = normalizeSchema(schema); + if (flatSchemaObj != null) { + this.schemaCache.put(kind + FLATTENED_SCHEMA, gson.toJson(flatSchemaObj)); } - return this.gson.fromJson(flattenedSchema, IndexSchema.class); + return flatSchemaObj; } - } catch (AppException e) { - throw e; - } catch (Exception e) { - throw new AppException(HttpStatus.SC_INTERNAL_SERVER_ERROR, "Schema parse/read error", "Error while reading schema via storage service.", e); + } else { + // search flattened schema in memcache + String flattenedSchema = (String) this.schemaCache.get(kind + FLATTENED_SCHEMA); + if (Strings.isNullOrEmpty(flattenedSchema)) { + return this.getEmptySchema(kind); + } + return this.gson.fromJson(flattenedSchema, IndexSchema.class); } } - private String getSchema(String kind) throws URISyntaxException, UnsupportedEncodingException { - return this.schemaProvider.getSchema(kind); + private IndexSchema getEmptySchema(String kind) { + Schema basicSchema = Schema.builder().kind(kind).build(); + return normalizeSchema(gson.toJson(basicSchema)); } - public void syncIndexMappingWithStorageSchema(String kind) throws ElasticsearchException, IOException, AppException { + public void syncIndexMappingWithStorageSchema(String kind) throws ElasticsearchException, IOException, AppException, URISyntaxException { String index = this.elasticIndexNameResolver.getIndexNameFromKind(kind); try (RestHighLevelClient restClient = this.elasticClientHandler.createRestClient()) { if (this.indicesService.isIndexExist(restClient, index)) { @@ -209,7 +216,7 @@ public class IndexSchemaServiceImpl implements IndexSchemaService { for (SchemaItem schemaItem : schemaObj.getSchema()) { String dataType = schemaItem.getKind(); Object elasticDataType = TypeMapper.getIndexerType(dataType, ElasticType.TEXT.getValue()); - if(schemaItem.getProperties() != null){ + if (schemaItem.getProperties() != null) { HashMap<String, Object> propertiesMap = normalizeInnerProperties(schemaItem); elasticDataType = TypeMapper.getObjectsArrayMapping(dataType, propertiesMap); } @@ -244,12 +251,12 @@ public class IndexSchemaServiceImpl implements IndexSchemaService { HashMap<String, Object> propertiesMap = new HashMap<>(); for (SchemaItem propertiesItem : schemaItem.getProperties()) { String propertiesItemKind = propertiesItem.getKind(); - Object propertiesElasticType = TypeMapper.getIndexerType(propertiesItemKind,ElasticType.TEXT.getValue()); - if(propertiesItem.getProperties() != null){ + Object propertiesElasticType = TypeMapper.getIndexerType(propertiesItemKind, ElasticType.TEXT.getValue()); + if (propertiesItem.getProperties() != null) { HashMap<String, Object> innerProperties = normalizeInnerProperties(propertiesItem); propertiesElasticType = TypeMapper.getObjectsArrayMapping(propertiesItemKind, innerProperties); } - propertiesMap.put(propertiesItem.getPath(),propertiesElasticType); + propertiesMap.put(propertiesItem.getPath(), propertiesElasticType); } return propertiesMap; } diff --git a/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/IndexerServiceImpl.java b/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/IndexerServiceImpl.java index af1e5aea27f0b3846c68ba76a0514fa2ae714c22..6f796030f9d6ec73e8e6675c6c24882c86646a14 100644 --- a/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/IndexerServiceImpl.java +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/IndexerServiceImpl.java @@ -15,7 +15,6 @@ package org.opengroup.osdu.indexer.service; import com.google.gson.Gson; - import com.google.gson.GsonBuilder; import org.apache.http.HttpStatus; import org.elasticsearch.ElasticsearchStatusException; @@ -30,33 +29,34 @@ import org.elasticsearch.client.RestHighLevelClient; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.rest.RestStatus; -import org.opengroup.osdu.core.common.model.entitlements.Acl; import org.opengroup.osdu.core.common.Constants; -import org.opengroup.osdu.core.common.model.http.DpsHeaders; -import org.opengroup.osdu.core.common.model.http.AppException; -import org.opengroup.osdu.core.common.model.indexer.*; import org.opengroup.osdu.core.common.logging.JaxRsDpsLog; -import org.opengroup.osdu.indexer.provider.interfaces.IPublisher; -import org.opengroup.osdu.indexer.logging.AuditLogger; -import org.opengroup.osdu.indexer.util.IndexerQueueTaskBuilder; +import org.opengroup.osdu.core.common.model.entitlements.Acl; +import org.opengroup.osdu.core.common.model.http.AppException; +import org.opengroup.osdu.core.common.model.http.DpsHeaders; import org.opengroup.osdu.core.common.model.http.RequestStatus; +import org.opengroup.osdu.core.common.model.indexer.*; import org.opengroup.osdu.core.common.model.search.RecordChangedMessages; import org.opengroup.osdu.core.common.model.search.RecordMetaAttribute; import org.opengroup.osdu.core.common.provider.interfaces.IRequestInfo; +import org.opengroup.osdu.core.common.search.ElasticIndexNameResolver; import org.opengroup.osdu.core.common.search.IndicesService; +import org.opengroup.osdu.indexer.logging.AuditLogger; +import org.opengroup.osdu.indexer.provider.interfaces.IPublisher; import org.opengroup.osdu.indexer.util.ElasticClientHandler; -import org.opengroup.osdu.core.common.search.ElasticIndexNameResolver; -import org.apache.commons.beanutils.PropertyUtils; -import org.apache.commons.beanutils.NestedNullException; +import org.opengroup.osdu.indexer.util.IndexerQueueTaskBuilder; import org.springframework.context.annotation.Primary; import org.springframework.stereotype.Service; import javax.inject.Inject; import java.io.IOException; -import java.lang.reflect.InvocationTargetException; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; import java.util.function.Consumer; -import java.util.logging.Level; import java.util.stream.Collectors; @Service @@ -221,8 +221,11 @@ public class IndexerServiceImpl implements IndexerService { for (Map.Entry<String, Map<String, OperationType>> entry : upsertRecordMap.entrySet()) { String kind = entry.getKey(); - IndexSchema schemaObj = this.schemaService.getIndexerInputSchema(kind, false); - if (schemaObj.isDataSchemaMissing()) { + List<String> errors = new ArrayList<>(); + IndexSchema schemaObj = this.schemaService.getIndexerInputSchema(kind, errors); + if (!errors.isEmpty()) { + this.jobStatus.addOrUpdateRecordStatus(entry.getValue().keySet(), IndexingStatus.WARN, HttpStatus.SC_BAD_REQUEST, String.join("|", errors), String.format("error | kind: %s", kind)); + } else if (schemaObj.isDataSchemaMissing()) { this.jobStatus.addOrUpdateRecordStatus(entry.getValue().keySet(), IndexingStatus.WARN, HttpStatus.SC_NOT_FOUND, "schema not found", String.format("schema not found | kind: %s", kind)); } diff --git a/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/SchemaProviderImpl.java b/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/SchemaProviderImpl.java index 6f2bf52cca0a5addf8c3c59a297cb548cd9171c6..164cf5fa4fac298e761ea2195246c591067c76b8 100644 --- a/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/SchemaProviderImpl.java +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/SchemaProviderImpl.java @@ -58,18 +58,7 @@ public class SchemaProviderImpl implements SchemaService { @Override public String getSchema(String kind) throws URISyntaxException, UnsupportedEncodingException { - String schemaServiceSchema; - - try { - schemaServiceSchema = getFromSchemaService(kind); - } catch (SchemaProcessingException ex) { - log.error(ex.getMessage(), ex); - return null; - } catch (RuntimeException ex) { - log.error(String.format("Failed to get the schema from the Schema service, kind: %s | message: %s", kind, ex.getMessage()), ex); - return null; - } - + String schemaServiceSchema = getFromSchemaService(kind); return Objects.nonNull(schemaServiceSchema) ? schemaServiceSchema : getFromStorageService(kind); } diff --git a/provider/indexer-azure/src/test/java/org/opengroup/osdu/indexer/azure/service/IndexerSchemaServiceTest.java b/indexer-core/src/test/java/org/opengroup/osdu/indexer/service/IndexerSchemaServiceTest.java similarity index 86% rename from provider/indexer-azure/src/test/java/org/opengroup/osdu/indexer/azure/service/IndexerSchemaServiceTest.java rename to indexer-core/src/test/java/org/opengroup/osdu/indexer/service/IndexerSchemaServiceTest.java index 9cc054aaaa67619bd8631e00b74fc4d330bad954..705f8e98ad4e733377abc03948fbe0fb22227c5c 100644 --- a/provider/indexer-azure/src/test/java/org/opengroup/osdu/indexer/azure/service/IndexerSchemaServiceTest.java +++ b/indexer-core/src/test/java/org/opengroup/osdu/indexer/service/IndexerSchemaServiceTest.java @@ -12,13 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -package org.opengroup.osdu.indexer.azure.service; +package org.opengroup.osdu.indexer.service; import org.apache.http.HttpStatus; import org.elasticsearch.client.RestHighLevelClient; import org.junit.Assert; import org.junit.Before; -import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.InjectMocks; @@ -31,26 +30,36 @@ import org.opengroup.osdu.core.common.model.indexer.OperationType; import org.opengroup.osdu.core.common.search.ElasticIndexNameResolver; import org.opengroup.osdu.core.common.search.IndicesService; import org.opengroup.osdu.indexer.provider.interfaces.ISchemaCache; -import org.opengroup.osdu.indexer.service.IndexSchemaServiceImpl; -import org.opengroup.osdu.indexer.service.IndexerMappingService; -import org.opengroup.osdu.indexer.service.SchemaService; +import org.opengroup.osdu.indexer.schema.converter.exeption.SchemaProcessingException; import org.opengroup.osdu.indexer.util.ElasticClientHandler; import org.powermock.core.classloader.annotations.PrepareForTest; import org.springframework.test.context.junit4.SpringRunner; import java.io.IOException; +import java.io.UnsupportedEncodingException; import java.net.URISyntaxException; +import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; -import static org.junit.Assert.*; -import static org.mockito.ArgumentMatchers.*; -import static org.mockito.Mockito.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyBoolean; +import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.never; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.verifyNoMoreInteractions; import static org.mockito.MockitoAnnotations.initMocks; import static org.powermock.api.mockito.PowerMockito.mock; import static org.powermock.api.mockito.PowerMockito.when; -@Ignore @RunWith(SpringRunner.class) @PrepareForTest({RestHighLevelClient.class}) public class IndexerSchemaServiceTest { @@ -128,7 +137,7 @@ public class IndexerSchemaServiceTest { } @Test - public void should_return_basic_schema_when_storage_returns_no_schema() { + public void should_return_basic_schema_when_storage_returns_no_schema() throws UnsupportedEncodingException, URISyntaxException { IndexSchema returnedSchema = this.sut.getIndexerInputSchema(kind, false); assertNotNull(returnedSchema.getDataSchema()); @@ -235,9 +244,9 @@ public class IndexerSchemaServiceTest { try { this.sut.processSchemaMessages(schemaMessages); } catch (AppException e){ - assertEquals(e.getError().getCode(), RequestStatus.SCHEMA_CONFLICT); - assertEquals(e.getError().getMessage(), "error creating or merging index mapping"); - assertEquals(e.getError().getReason(), reason); + assertEquals(RequestStatus.SCHEMA_CONFLICT, e.getError().getCode()); + assertEquals("error creating or merging index mapping", e.getError().getMessage()); + assertEquals(reason, e.getError().getReason()); } catch (Exception e) { fail("Should not throw this exception " + e.getMessage()); } @@ -268,9 +277,9 @@ public class IndexerSchemaServiceTest { try { this.sut.processSchemaMessages(schemaMessages); } catch (AppException e){ - assertEquals(e.getError().getCode(), HttpStatus.SC_FORBIDDEN); - assertEquals(e.getError().getMessage(), "blah"); - assertEquals(e.getError().getReason(), reason); + assertEquals(HttpStatus.SC_FORBIDDEN, e.getError().getCode()); + assertEquals("blah", e.getError().getMessage()); + assertEquals(reason, e.getError().getReason()); } catch (Exception e) { fail("Should not throw this exception " + e.getMessage()); } @@ -365,9 +374,9 @@ public class IndexerSchemaServiceTest { try { this.sut.syncIndexMappingWithStorageSchema(kind); } catch (AppException e) { - assertEquals(e.getError().getCode(), HttpStatus.SC_CONFLICT); - assertEquals(e.getError().getMessage(), "blah"); - assertEquals(e.getError().getReason(), "Index deletion error"); + assertEquals(HttpStatus.SC_CONFLICT, e.getError().getCode()); + assertEquals("blah", e.getError().getMessage()); + assertEquals("Index deletion error", e.getError().getReason()); } catch (Exception e) { fail("Should not throw this exception " + e.getMessage()); } @@ -404,4 +413,28 @@ public class IndexerSchemaServiceTest { assertFalse(this.sut.isStorageSchemaSyncRequired(kind, false)); } + + @Test + public void should_returnErrors_givenSchemaProcessingException_getIndexerInputSchemaSchemaTest() throws UnsupportedEncodingException, URISyntaxException { + SchemaProcessingException processingException = new SchemaProcessingException("error processing schema"); + when(schemaService.getSchema(any())).thenThrow(processingException); + + List<String> errors = new ArrayList<>(); + IndexSchema indexSchema = this.sut.getIndexerInputSchema(kind, errors); + + assertNotNull(indexSchema); + assertTrue(errors.get(0).contains("error processing schema")); + } + + @Test + public void should_returnErrors_givenRuntimeException_getIndexerInputSchemaSchemaTest() throws UnsupportedEncodingException, URISyntaxException { + RuntimeException exception = new RuntimeException("error processing schema, RuntimeException exception thrown"); + when(schemaService.getSchema(any())).thenThrow(exception); + + List<String> errors = new ArrayList<>(); + IndexSchema indexSchema = this.sut.getIndexerInputSchema(kind, errors); + + assertNotNull(indexSchema); + assertTrue(errors.get(0).contains("error processing schema, RuntimeException exception thrown")); + } } diff --git a/pom.xml b/pom.xml index 6cb939bafbe005a3fafe98a932c1a130fd3a9199..dc99cd5e0ac97e2ef22e9029dca6b90316497150 100644 --- a/pom.xml +++ b/pom.xml @@ -12,14 +12,14 @@ <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-service</artifactId> <packaging>pom</packaging> - <version>0.10.0-SNAPSHOT</version> + <version>0.11.0-SNAPSHOT</version> <description>Indexer Service</description> <properties> <java.version>1.8</java.version> <springfox-version>2.7.0</springfox-version> <spring-cloud.version>Greenwich.SR2</spring-cloud.version> - <os-core-common.version>0.9.0</os-core-common.version> + <os-core-common.version>0.10.0</os-core-common.version> <snakeyaml.version>1.26</snakeyaml.version> <hibernate-validator.version>6.1.5.Final</hibernate-validator.version> <jackson.version>2.11.4</jackson.version> diff --git a/provider/indexer-aws/pom.xml b/provider/indexer-aws/pom.xml index f5fc5d3acc0637c82d78a2d21661ebcad08c387e..efb92440d38474a8cbd2c666d26a5d8c2c5a7b1f 100644 --- a/provider/indexer-aws/pom.xml +++ b/provider/indexer-aws/pom.xml @@ -18,7 +18,7 @@ <parent> <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-service</artifactId> - <version>0.10.0-SNAPSHOT</version> + <version>0.11.0-SNAPSHOT</version> <relativePath>../../pom.xml</relativePath> </parent> @@ -26,7 +26,7 @@ <artifactId>indexer-aws</artifactId> <description>Storage service on AWS</description> <packaging>jar</packaging> - <version>0.10.0-SNAPSHOT</version> + <version>0.11.0-SNAPSHOT</version> <properties> <aws.version>1.11.637</aws.version> @@ -42,7 +42,7 @@ <dependency> <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-core</artifactId> - <version>0.10.0-SNAPSHOT</version> + <version>0.11.0-SNAPSHOT</version> </dependency> <dependency> <groupId>org.opengroup.osdu.core.aws</groupId> diff --git a/provider/indexer-azure/pom.xml b/provider/indexer-azure/pom.xml index 527ee87a6191a5aaa13c87b1d6fd960f0bcc3b70..a91cc0902f87daddd54c4e417dd99504c5809e8d 100644 --- a/provider/indexer-azure/pom.xml +++ b/provider/indexer-azure/pom.xml @@ -21,12 +21,12 @@ <parent> <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-service</artifactId> - <version>0.10.0-SNAPSHOT</version> + <version>0.11.0-SNAPSHOT</version> <relativePath>../../pom.xml</relativePath> </parent> <artifactId>indexer-azure</artifactId> - <version>0.10.0-SNAPSHOT</version> + <version>0.11.0-SNAPSHOT</version> <name>indexer-azure</name> <description>Indexer Service Azure</description> <packaging>jar</packaging> @@ -39,9 +39,9 @@ <azure.appservice.subscription /> <log4j.version>2.11.2</log4j.version> <nimbus-jose-jwt.version>8.2</nimbus-jose-jwt.version> - <indexer-core.version>0.10.0-SNAPSHOT</indexer-core.version> + <indexer-core.version>0.11.0-SNAPSHOT</indexer-core.version> <spring-security-jwt.version>1.1.1.RELEASE</spring-security-jwt.version> - <osdu.corelibazure.version>0.9.0</osdu.corelibazure.version> + <osdu.corelibazure.version>0.10.1</osdu.corelibazure.version> <reactor-netty.version>0.9.12.RELEASE</reactor-netty.version> <java-jwt.version>3.8.1</java-jwt.version> <powermock.version>2.0.2</powermock.version> diff --git a/provider/indexer-gcp/pom.xml b/provider/indexer-gcp/pom.xml index 9913de6cd42cf90100717eeb6034e0cc9a483253..a04ddb08ca81f99410fdb050b8cbb998936cce96 100644 --- a/provider/indexer-gcp/pom.xml +++ b/provider/indexer-gcp/pom.xml @@ -5,12 +5,12 @@ <parent> <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-service</artifactId> - <version>0.10.0-SNAPSHOT</version> + <version>0.11.0-SNAPSHOT</version> <relativePath>../../pom.xml</relativePath> </parent> <artifactId>indexer-gcp</artifactId> - <version>0.10.0-SNAPSHOT</version> + <version>0.11.0-SNAPSHOT</version> <name>indexer-gcp</name> <description>Indexer Service GCP App Engine</description> <packaging>jar</packaging> @@ -19,13 +19,13 @@ <dependency> <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-core</artifactId> - <version>0.10.0-SNAPSHOT</version> + <version>0.11.0-SNAPSHOT</version> </dependency> <dependency> <groupId>org.opengroup.osdu</groupId> <artifactId>core-lib-gcp</artifactId> - <version>0.10.0-SNAPSHOT</version> + <version>0.10.0</version> </dependency> <dependency> diff --git a/provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/util/ServiceAccountJwtGcpClientImpl.java b/provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/util/ServiceAccountJwtGcpClientImpl.java index 680151671136ea6d942deb84a69c50c94dee8bc6..6c57527219c328d75ab5acaffbee7d85f7c558e8 100644 --- a/provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/util/ServiceAccountJwtGcpClientImpl.java +++ b/provider/indexer-gcp/src/main/java/org/opengroup/osdu/indexer/util/ServiceAccountJwtGcpClientImpl.java @@ -45,7 +45,7 @@ public class ServiceAccountJwtGcpClientImpl implements IServiceAccountJwtClient private final IamCredentialsProvider iamCredentialsProvider = new IamCredentialsProvider(); - @Value("GOOGLE_AUDIENCES") + @Value("${GOOGLE_AUDIENCES}") private String audiences; @Inject diff --git a/provider/indexer-gcp/src/test/java/org/opengroup/osdu/indexer/service/IndexerSchemaServiceTest.java b/provider/indexer-gcp/src/test/java/org/opengroup/osdu/indexer/service/IndexerSchemaServiceTest.java deleted file mode 100644 index 631c840c22670a08200664c66aa8a0f82fc70ae6..0000000000000000000000000000000000000000 --- a/provider/indexer-gcp/src/test/java/org/opengroup/osdu/indexer/service/IndexerSchemaServiceTest.java +++ /dev/null @@ -1,401 +0,0 @@ -// Copyright 2017-2019, Schlumberger -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package org.opengroup.osdu.indexer.service; - -import org.apache.http.HttpStatus; -import org.elasticsearch.client.RestHighLevelClient; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.opengroup.osdu.core.common.model.http.AppException; -import org.opengroup.osdu.core.common.model.indexer.OperationType; -import org.opengroup.osdu.core.common.logging.JaxRsDpsLog; -import org.opengroup.osdu.indexer.provider.interfaces.ISchemaCache; -import org.opengroup.osdu.core.common.model.indexer.IndexSchema; -import org.opengroup.osdu.core.common.model.http.RequestStatus; -import org.opengroup.osdu.core.common.search.IndicesService; -import org.opengroup.osdu.indexer.service.SchemaProviderImpl; -import org.opengroup.osdu.indexer.util.ElasticClientHandler; -import org.opengroup.osdu.core.common.search.ElasticIndexNameResolver; -import org.powermock.core.classloader.annotations.PrepareForTest; -import org.springframework.test.context.junit4.SpringRunner; - -import java.io.IOException; -import java.net.URISyntaxException; -import java.util.HashMap; -import java.util.Map; - -import static org.junit.Assert.*; -import static org.mockito.Mockito.*; -import static org.mockito.MockitoAnnotations.initMocks; -import static org.powermock.api.mockito.PowerMockito.mock; -import static org.powermock.api.mockito.PowerMockito.when; - -@RunWith(SpringRunner.class) -@PrepareForTest({RestHighLevelClient.class}) -public class IndexerSchemaServiceTest { - - private final String kind = "tenant:test:test:1.0.0"; - private final String emptySchema = null; - private final String someSchema = "{\"kind\":\"tenant:test:test:1.0.0\", \"schema\":[{\"path\":\"test-path\", \"kind\":\"tenant:test:test:1.0.0\"}]}"; - - @Mock - private JaxRsDpsLog log; - @Mock - private SchemaProviderImpl schemaProvider; - @Mock - private ElasticClientHandler elasticClientHandler; - @Mock - private ElasticIndexNameResolver elasticIndexNameResolver; - @Mock - private IndexerMappingService mappingService; - @Mock - private IndicesService indicesService; - @Mock - private ISchemaCache schemaCache; - @InjectMocks - private IndexSchemaServiceImpl sut; - - @Before - public void setup() { - initMocks(this); - RestHighLevelClient restHighLevelClient = mock(RestHighLevelClient.class); - when(elasticClientHandler.createRestClient()).thenReturn(restHighLevelClient); - } - - @Test - public void should_returnNull_givenEmptySchema_getIndexerInputSchemaSchemaTest() throws Exception { - when(schemaProvider.getSchema(any())).thenReturn(emptySchema); - - IndexSchema indexSchema = this.sut.getIndexerInputSchema(kind, false); - - Assert.assertNotNull(indexSchema); - } - - @Test - public void should_returnValidResponse_givenValidSchema_getIndexerInputSchemaTest() throws Exception { - when(schemaProvider.getSchema(any())).thenReturn(someSchema); - - IndexSchema indexSchema = this.sut.getIndexerInputSchema(kind, false); - - Assert.assertEquals(kind, indexSchema.getKind()); - } - - @Test - public void should_returnValidResponse_givenValidSchemaWithCacheHit_getIndexerInputSchemaTest() throws Exception { - when(schemaProvider.getSchema(any())).thenReturn(someSchema); - when(this.schemaCache.get(kind + "_flattened")).thenReturn(someSchema); - - IndexSchema indexSchema = this.sut.getIndexerInputSchema(kind, false); - - Assert.assertEquals(kind, indexSchema.getKind()); - } - - @Test - public void should_throw500_givenInvalidSchemaCacheHit_getIndexerInputSchemaTest() { - try { - String invalidSchema = "{}}"; - when(schemaProvider.getSchema(any())).thenReturn(invalidSchema); - - this.sut.getIndexerInputSchema(kind, false); - fail("Should throw exception"); - } catch (AppException e) { - Assert.assertEquals(HttpStatus.SC_INTERNAL_SERVER_ERROR, e.getError().getCode()); - Assert.assertEquals("An error has occurred while normalizing the schema.", e.getError().getMessage()); - } catch (Exception e) { - fail("Should not throw exception" + e.getMessage()); - } - } - - @Test - public void should_return_basic_schema_when_storage_returns_no_schema() { - IndexSchema returnedSchema = this.sut.getIndexerInputSchema(kind, false); - - assertNotNull(returnedSchema.getDataSchema()); - assertNotNull(returnedSchema); - assertEquals(kind, returnedSchema.getKind()); - } - - @Test - public void should_create_schema_when_storage_returns_valid_schema() throws IOException, URISyntaxException { - String kind = "tenant1:avocet:completion:1.0.0"; - String storageSchema = "{" + - " \"kind\": \"tenant1:avocet:completion:1.0.0\"," + - " \"schema\": [" + - " {" + - " \"path\": \"status\"," + - " \"kind\": \"string\"" + - " }," + - " {" + - " \"path\": \"startDate\"," + - " \"kind\": \"string\"" + - " }," + - " {" + - " \"path\": \"endDate\"," + - " \"kind\": \"string\"" + - " }," + - " {" + - " \"path\": \"type \"," + - " \"kind\": \"string\"" + - " }," + - " {" + - " \"path\": \"itemguid\"," + - " \"kind\": \"string\"" + - " }" + - " ]" + - "}"; - Map<String, OperationType> schemaMessages = new HashMap<>(); - schemaMessages.put(kind, OperationType.create_schema); - - when(this.elasticIndexNameResolver.getIndexNameFromKind(kind)).thenReturn(kind.replace(":", "-")); - when(this.schemaCache.get(kind)).thenReturn(null); - when(this.indicesService.isIndexExist(any(), any())).thenReturn(false); - when(this.schemaProvider.getSchema(kind)).thenReturn(storageSchema); - - this.sut.processSchemaMessages(schemaMessages); - - verify(this.mappingService, times(1)).getIndexMappingFromRecordSchema(any()); - verify(this.indicesService, times(1)).createIndex(any(), any(), any(), any(), any()); - verifyNoMoreInteractions(this.mappingService); - } - - @Test - public void should_merge_mapping_when_storage_returns_valid_schema() throws IOException, URISyntaxException { - String kind = "tenant1:avocet:completion:1.0.0"; - String storageSchema = "{" + - " \"kind\": \"tenant1:avocet:completion:1.0.0\"," + - " \"schema\": [" + - " {" + - " \"path\": \"status\"," + - " \"kind\": \"string\"" + - " }," + - " {" + - " \"path\": \"startDate\"," + - " \"kind\": \"string\"" + - " }" + - " ]" + - "}"; - Map<String, OperationType> schemaMessages = new HashMap<>(); - schemaMessages.put(kind, OperationType.create_schema); - - when(this.elasticIndexNameResolver.getIndexNameFromKind(kind)).thenReturn(kind.replace(":", "-")); - when(this.schemaCache.get(kind)).thenReturn(null); - when(this.indicesService.isIndexExist(any(), any())).thenReturn(true); - when(this.schemaProvider.getSchema(kind)).thenReturn(storageSchema); - - this.sut.processSchemaMessages(schemaMessages); - - verify(this.indicesService, times(0)).createIndex(any(), any(), any(), any(), any()); - verify(this.mappingService, times(1)).createMapping(any(), any(), any(), anyBoolean()); - verifyNoMoreInteractions(this.mappingService); - } - - @Test - public void should_throw_mapping_conflict_when_elastic_backend_cannot_process_schema_changes() throws IOException, URISyntaxException { - String kind = "tenant1:avocet:completion:1.0.0"; - String reason = String.format("Could not create type mapping %s/completion.", kind.replace(":", "-")); - String storageSchema = "{" + - " \"kind\": \"tenant1:avocet:completion:1.0.0\"," + - " \"schema\": [" + - " {" + - " \"path\": \"status\"," + - " \"kind\": \"string\"" + - " }" + - " ]" + - "}"; - Map<String, OperationType> schemaMessages = new HashMap<>(); - schemaMessages.put(kind, OperationType.create_schema); - - when(this.elasticIndexNameResolver.getIndexNameFromKind(kind)).thenReturn(kind.replace(":", "-")); - when(this.schemaCache.get(kind)).thenReturn(null); - when(this.indicesService.isIndexExist(any(), any())).thenReturn(true); - when(this.schemaProvider.getSchema(kind)).thenReturn(storageSchema); - when(this.mappingService.createMapping(any(), any(), any(), anyBoolean())).thenThrow(new AppException(HttpStatus.SC_BAD_REQUEST, reason, "")); - - try { - this.sut.processSchemaMessages(schemaMessages); - } catch (AppException e) { - assertEquals(RequestStatus.SCHEMA_CONFLICT, e.getError().getCode()); - assertEquals("error creating or merging index mapping", e.getError().getMessage()); - assertEquals(reason, e.getError().getReason()); - } catch (Exception e) { - fail("Should not throw this exception " + e.getMessage()); - } - } - - @Test - public void should_throw_genericAppException_when_elastic_backend_cannot_process_schema_changes() throws IOException, URISyntaxException { - String kind = "tenant1:avocet:completion:1.0.0"; - String reason = String.format("Could not create type mapping %s/completion.", kind.replace(":", "-")); - String storageSchema = "{" + - " \"kind\": \"tenant1:avocet:completion:1.0.0\"," + - " \"schema\": [" + - " {" + - " \"path\": \"status\"," + - " \"kind\": \"string\"" + - " }" + - " ]" + - "}"; - Map<String, OperationType> schemaMessages = new HashMap<>(); - schemaMessages.put(kind, OperationType.create_schema); - - when(this.elasticIndexNameResolver.getIndexNameFromKind(kind)).thenReturn(kind.replace(":", "-")); - when(this.schemaCache.get(kind)).thenReturn(null); - when(this.indicesService.isIndexExist(any(), any())).thenReturn(true); - when(this.schemaProvider.getSchema(kind)).thenReturn(storageSchema); - when(this.mappingService.createMapping(any(), any(), any(), anyBoolean())).thenThrow(new AppException(HttpStatus.SC_FORBIDDEN, reason, "blah")); - - try { - this.sut.processSchemaMessages(schemaMessages); - } catch (AppException e) { - assertEquals(HttpStatus.SC_FORBIDDEN, e.getError().getCode()); - assertEquals("blah", e.getError().getMessage()); - assertEquals(reason, e.getError().getReason()); - } catch (Exception e) { - fail("Should not throw this exception " + e.getMessage()); - } - } - - @Test - public void should_log_and_do_nothing_when_storage_returns_invalid_schema() throws IOException, URISyntaxException { - String kind = "tenant1:avocet:completion:1.0.0"; - String storageSchema = "{" + - " \"kind\": \"tenant1:avocet:completion:1.0.0\"" + - "}"; - Map<String, OperationType> schemaMessages = new HashMap<>(); - schemaMessages.put(kind, OperationType.create_schema); - - when(this.elasticIndexNameResolver.getIndexNameFromKind(kind)).thenReturn(kind.replace(":", "-")); - when(this.schemaCache.get(kind)).thenReturn(null); - when(this.indicesService.isIndexExist(any(), any())).thenReturn(true); - when(this.schemaProvider.getSchema(kind)).thenReturn(storageSchema); - - this.sut.processSchemaMessages(schemaMessages); - - verify(this.log).warning(eq("schema not found for kind: tenant1:avocet:completion:1.0.0")); - } - - @Test - public void should_invalidateCache_when_purge_schema_and_schema_found_in_cache() throws IOException { - String kind = "tenant1:avocet:completion:1.0.0"; - Map<String, OperationType> schemaMessages = new HashMap<>(); - schemaMessages.put(kind, OperationType.purge_schema); - - when(this.elasticIndexNameResolver.getIndexNameFromKind(kind)).thenReturn(kind.replace(":", "-")); - when(this.indicesService.isIndexExist(any(), any())).thenReturn(true); - when(this.schemaCache.get(kind)).thenReturn("schema"); - when(this.schemaCache.get(kind + "_flattened")).thenReturn("flattened schema"); - - this.sut.processSchemaMessages(schemaMessages); - - verify(this.schemaCache, times(2)).get(anyString()); - verify(this.schemaCache, times(2)).delete(anyString()); - } - - @Test - public void should_log_warning_when_purge_schema_and_schema_not_found_in_cache() throws IOException { - String kind = "tenant1:avocet:completion:1.0.0"; - Map<String, OperationType> schemaMessages = new HashMap<>(); - schemaMessages.put(kind, OperationType.purge_schema); - - when(this.elasticIndexNameResolver.getIndexNameFromKind(kind)).thenReturn(kind.replace(":", "-")); - when(this.indicesService.isIndexExist(any(), any())).thenReturn(false); - - this.sut.processSchemaMessages(schemaMessages); - - verify(this.log).warning(eq(String.format("Kind: %s not found", kind))); - } - - @Test - public void should_sync_schema_with_storage() throws Exception { - String kind = "tenant1:avocet:completion:1.0.0"; - String storageSchema = "{" + - " \"kind\": \"tenant1:avocet:completion:1.0.0\"," + - " \"schema\": [" + - " {" + - " \"path\": \"status\"," + - " \"kind\": \"string\"" + - " }" + - " ]" + - "}"; - when(this.elasticIndexNameResolver.getIndexNameFromKind(kind)).thenReturn(kind.replace(":", "-")); - when(this.schemaCache.get(kind)).thenReturn(null); - when(this.indicesService.isIndexExist(any(), any())).thenReturn(true); - when(this.indicesService.deleteIndex(any(), any())).thenReturn(true); - when(this.schemaProvider.getSchema(kind)).thenReturn(storageSchema); - - this.sut.syncIndexMappingWithStorageSchema(kind); - - verify(this.mappingService, times(1)).getIndexMappingFromRecordSchema(any()); - verify(this.indicesService, times(1)).isIndexExist(any(), any()); - verify(this.indicesService, times(1)).deleteIndex(any(), any()); - verify(this.indicesService, times(1)).createIndex(any(), any(), any(), any(), any()); - verifyNoMoreInteractions(this.mappingService); - } - - @Test - public void should_throw_exception_while_snapshot_running_sync_schema_with_storage() throws Exception { - String kind = "tenant1:avocet:completion:1.0.0"; - when(this.elasticIndexNameResolver.getIndexNameFromKind(kind)).thenReturn(kind.replace(":", "-")); - when(this.schemaCache.get(kind)).thenReturn(null); - when(this.indicesService.isIndexExist(any(), any())).thenReturn(true); - when(this.indicesService.deleteIndex(any(), any())).thenThrow(new AppException(HttpStatus.SC_CONFLICT, "Index deletion error", "blah")); - - try { - this.sut.syncIndexMappingWithStorageSchema(kind); - } catch (AppException e) { - assertEquals(HttpStatus.SC_CONFLICT, e.getError().getCode()); - assertEquals("blah", e.getError().getMessage()); - assertEquals("Index deletion error", e.getError().getReason()); - } catch (Exception e) { - fail("Should not throw this exception " + e.getMessage()); - } - - verify(this.indicesService, times(1)).isIndexExist(any(), any()); - verify(this.indicesService, times(1)).deleteIndex(any(), any()); - verify(this.mappingService, never()).getIndexMappingFromRecordSchema(any()); - verify(this.indicesService, never()).createIndex(any(), any(), any(), any(), any()); - } - - @Test - public void should_return_true_while_if_forceClean_requested() throws IOException { - String kind = "tenant1:avocet:completion:1.0.0"; - when(this.elasticIndexNameResolver.getIndexNameFromKind(kind)).thenReturn(kind.replace(":", "-")); - when(this.indicesService.isIndexExist(any(), any())).thenReturn(true); - - assertTrue(this.sut.isStorageSchemaSyncRequired(kind, true)); - } - - @Test - public void should_return_true_while_if_forceClean_notRequested_and_indexNotFound() throws IOException { - String kind = "tenant1:avocet:completion:1.0.0"; - when(this.elasticIndexNameResolver.getIndexNameFromKind(kind)).thenReturn(kind.replace(":", "-")); - when(this.indicesService.isIndexExist(any(), any())).thenReturn(false); - - assertTrue(this.sut.isStorageSchemaSyncRequired(kind, false)); - } - - @Test - public void should_return_false_while_if_forceClean_notRequested_and_indexExist() throws IOException { - String kind = "tenant1:avocet:completion:1.0.0"; - when(this.elasticIndexNameResolver.getIndexNameFromKind(kind)).thenReturn(kind.replace(":", "-")); - when(this.indicesService.isIndexExist(any(), any())).thenReturn(true); - - assertFalse(this.sut.isStorageSchemaSyncRequired(kind, false)); - } -} diff --git a/provider/indexer-ibm/pom.xml b/provider/indexer-ibm/pom.xml index 4da0811c54dcdcbd8dee467802452e48e7bc56e4..3ffb6c735078a39f5b1799e540b9a7e0abd3a146 100644 --- a/provider/indexer-ibm/pom.xml +++ b/provider/indexer-ibm/pom.xml @@ -21,7 +21,7 @@ <parent> <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-service</artifactId> - <version>0.10.0-SNAPSHOT</version> + <version>0.11.0-SNAPSHOT</version> <relativePath>../../pom.xml</relativePath> </parent> @@ -53,7 +53,7 @@ <dependency> <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-core</artifactId> - <version>0.10.0-SNAPSHOT</version> + <version>0.11.0-SNAPSHOT</version> </dependency> <dependency> diff --git a/provider/indexer-ibm/src/test/java/org/opengroup/osdu/indexer/ibm/service/IndexerSchemaServiceTest.java b/provider/indexer-ibm/src/test/java/org/opengroup/osdu/indexer/ibm/service/IndexerSchemaServiceTest.java deleted file mode 100644 index d85ba30116235c96bb80d70fdf6c2f0065cfb94c..0000000000000000000000000000000000000000 --- a/provider/indexer-ibm/src/test/java/org/opengroup/osdu/indexer/ibm/service/IndexerSchemaServiceTest.java +++ /dev/null @@ -1,395 +0,0 @@ -/* Licensed Materials - Property of IBM */ -/* (c) Copyright IBM Corp. 2020. All Rights Reserved.*/ - -package org.opengroup.osdu.indexer.ibm.service; - -import org.apache.http.HttpStatus; -import org.elasticsearch.client.RestHighLevelClient; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.opengroup.osdu.core.common.model.indexer.IndexSchema; -import org.opengroup.osdu.core.common.model.indexer.OperationType; -import org.opengroup.osdu.core.common.logging.JaxRsDpsLog; -import org.opengroup.osdu.indexer.provider.interfaces.ISchemaCache; -import org.opengroup.osdu.indexer.service.IndexSchemaServiceImpl; -import org.opengroup.osdu.indexer.service.IndexerMappingService; -import org.opengroup.osdu.indexer.service.StorageService; -import org.opengroup.osdu.core.common.model.http.RequestStatus; -import org.opengroup.osdu.core.common.search.IndicesService; -import org.opengroup.osdu.core.common.model.http.AppException; -import org.opengroup.osdu.indexer.util.ElasticClientHandler; -import org.opengroup.osdu.core.common.search.ElasticIndexNameResolver; -import org.powermock.core.classloader.annotations.PrepareForTest; -import org.springframework.test.context.junit4.SpringRunner; - -import java.io.IOException; -import java.net.URISyntaxException; -import java.util.HashMap; -import java.util.Map; - -import static org.junit.Assert.*; -import static org.mockito.ArgumentMatchers.*; -import static org.mockito.Mockito.*; -import static org.mockito.MockitoAnnotations.initMocks; -import static org.powermock.api.mockito.PowerMockito.mock; -import static org.powermock.api.mockito.PowerMockito.when; - -@Ignore -@RunWith(SpringRunner.class) -@PrepareForTest({RestHighLevelClient.class}) -public class IndexerSchemaServiceTest { - - private final String kind = "tenant:test:test:1.0.0"; - private final String emptySchema = null; - private final String someSchema = "{\"kind\":\"tenant:test:test:1.0.0\", \"schema\":[{\"path\":\"test-path\", \"kind\":\"tenant:test:test:1.0.0\"}]}"; - - @Mock - private JaxRsDpsLog log; - @Mock - private StorageService storageService; - @Mock - private ElasticClientHandler elasticClientHandler; - @Mock - private ElasticIndexNameResolver elasticIndexNameResolver; - @Mock - private IndexerMappingService mappingService; - @Mock - private IndicesService indicesService; - @Mock - private ISchemaCache schemaCache; - @InjectMocks - private IndexSchemaServiceImpl sut; - - @Before - public void setup() { - initMocks(this); - RestHighLevelClient restHighLevelClient = mock(RestHighLevelClient.class); - when(elasticClientHandler.createRestClient()).thenReturn(restHighLevelClient); - } - - @Test - public void should_returnNull_givenEmptySchema_getIndexerInputSchemaSchemaTest() throws Exception { - when(storageService.getStorageSchema(any())).thenReturn(emptySchema); - - IndexSchema indexSchema = this.sut.getIndexerInputSchema(kind, false); - - Assert.assertNotNull(indexSchema); - } - - @Test - public void should_returnValidResponse_givenValidSchema_getIndexerInputSchemaTest() throws Exception { - when(storageService.getStorageSchema(any())).thenReturn(someSchema); - - IndexSchema indexSchema = this.sut.getIndexerInputSchema(kind, false); - - Assert.assertEquals(kind, indexSchema.getKind()); - } - - @Test - public void should_returnValidResponse_givenValidSchemaWithCacheHit_getIndexerInputSchemaTest() throws Exception { - when(storageService.getStorageSchema(any())).thenReturn(someSchema); - when(this.schemaCache.get(kind + "_flattened")).thenReturn(someSchema); - - IndexSchema indexSchema = this.sut.getIndexerInputSchema(kind, false); - - Assert.assertEquals(kind, indexSchema.getKind()); - } - - @Test - public void should_throw500_givenInvalidSchemaCacheHit_getIndexerInputSchemaTest() { - try { - String invalidSchema = "{}}"; - when(storageService.getStorageSchema(any())).thenReturn(invalidSchema); - - this.sut.getIndexerInputSchema(kind, false); - fail("Should throw exception"); - } catch (AppException e) { - Assert.assertEquals(HttpStatus.SC_INTERNAL_SERVER_ERROR, e.getError().getCode()); - Assert.assertEquals("An error has occurred while normalizing the schema.", e.getError().getMessage()); - } catch (Exception e) { - fail("Should not throw exception" + e.getMessage()); - } - } - - @Test - public void should_return_basic_schema_when_storage_returns_no_schema() { - IndexSchema returnedSchema = this.sut.getIndexerInputSchema(kind, false); - - assertNotNull(returnedSchema.getDataSchema()); - assertNotNull(returnedSchema); - assertEquals(kind, returnedSchema.getKind()); - } - - @Test - public void should_create_schema_when_storage_returns_valid_schema() throws IOException, URISyntaxException { - String kind = "tenant1:avocet:completion:1.0.0"; - String storageSchema = "{" + - " \"kind\": \"tenant1:avocet:completion:1.0.0\"," + - " \"schema\": [" + - " {" + - " \"path\": \"status\"," + - " \"kind\": \"string\"" + - " }," + - " {" + - " \"path\": \"startDate\"," + - " \"kind\": \"string\"" + - " }," + - " {" + - " \"path\": \"endDate\"," + - " \"kind\": \"string\"" + - " }," + - " {" + - " \"path\": \"type \"," + - " \"kind\": \"string\"" + - " }," + - " {" + - " \"path\": \"itemguid\"," + - " \"kind\": \"string\"" + - " }" + - " ]" + - "}"; - Map<String, OperationType> schemaMessages = new HashMap<>(); - schemaMessages.put(kind, OperationType.create_schema); - - when(this.elasticIndexNameResolver.getIndexNameFromKind(kind)).thenReturn(kind.replace(":", "-")); - when(this.schemaCache.get(kind)).thenReturn(null); - when(this.indicesService.isIndexExist(any(), any())).thenReturn(false); - when(this.storageService.getStorageSchema(kind)).thenReturn(storageSchema); - - this.sut.processSchemaMessages(schemaMessages); - - verify(this.mappingService, times(1)).getIndexMappingFromRecordSchema(any()); - verify(this.indicesService, times(1)).createIndex(any(), any(), any(), any(), any()); - verifyNoMoreInteractions(this.mappingService); - } - - @Test - public void should_merge_mapping_when_storage_returns_valid_schema() throws IOException, URISyntaxException { - String kind = "tenant1:avocet:completion:1.0.0"; - String storageSchema = "{" + - " \"kind\": \"tenant1:avocet:completion:1.0.0\"," + - " \"schema\": [" + - " {" + - " \"path\": \"status\"," + - " \"kind\": \"string\"" + - " }," + - " {" + - " \"path\": \"startDate\"," + - " \"kind\": \"string\"" + - " }" + - " ]" + - "}"; - Map<String, OperationType> schemaMessages = new HashMap<>(); - schemaMessages.put(kind, OperationType.create_schema); - - when(this.elasticIndexNameResolver.getIndexNameFromKind(kind)).thenReturn(kind.replace(":", "-")); - when(this.schemaCache.get(kind)).thenReturn(null); - when(this.indicesService.isIndexExist(any(), any())).thenReturn(true); - when(this.storageService.getStorageSchema(kind)).thenReturn(storageSchema); - - this.sut.processSchemaMessages(schemaMessages); - - verify(this.indicesService, times(0)).createIndex(any(), any(), any(), any(), any()); - verify(this.mappingService, times(1)).createMapping(any(), any(), any(), anyBoolean()); - verifyNoMoreInteractions(this.mappingService); - } - - @Test - public void should_throw_mapping_conflict_when_elastic_backend_cannot_process_schema_changes() throws IOException, URISyntaxException { - String kind = "tenant1:avocet:completion:1.0.0"; - String reason = String.format("Could not create type mapping %s/completion.", kind.replace(":", "-")); - String storageSchema = "{" + - " \"kind\": \"tenant1:avocet:completion:1.0.0\"," + - " \"schema\": [" + - " {" + - " \"path\": \"status\"," + - " \"kind\": \"string\"" + - " }" + - " ]" + - "}"; - Map<String, OperationType> schemaMessages = new HashMap<>(); - schemaMessages.put(kind, OperationType.create_schema); - - when(this.elasticIndexNameResolver.getIndexNameFromKind(kind)).thenReturn(kind.replace(":", "-")); - when(this.schemaCache.get(kind)).thenReturn(null); - when(this.indicesService.isIndexExist(any(), any())).thenReturn(true); - when(this.storageService.getStorageSchema(kind)).thenReturn(storageSchema); - when(this.mappingService.createMapping(any(), any(), any(), anyBoolean())).thenThrow(new AppException(HttpStatus.SC_BAD_REQUEST, reason, "")); - - try { - this.sut.processSchemaMessages(schemaMessages); - } catch (AppException e) { - assertEquals(e.getError().getCode(), RequestStatus.SCHEMA_CONFLICT); - assertEquals(e.getError().getMessage(), "error creating or merging index mapping"); - assertEquals(e.getError().getReason(), reason); - } catch (Exception e) { - fail("Should not throw this exception " + e.getMessage()); - } - } - - @Test - public void should_throw_genericAppException_when_elastic_backend_cannot_process_schema_changes() throws IOException, URISyntaxException { - String kind = "tenant1:avocet:completion:1.0.0"; - String reason = String.format("Could not create type mapping %s/completion.", kind.replace(":", "-")); - String storageSchema = "{" + - " \"kind\": \"tenant1:avocet:completion:1.0.0\"," + - " \"schema\": [" + - " {" + - " \"path\": \"status\"," + - " \"kind\": \"string\"" + - " }" + - " ]" + - "}"; - Map<String, OperationType> schemaMessages = new HashMap<>(); - schemaMessages.put(kind, OperationType.create_schema); - - when(this.elasticIndexNameResolver.getIndexNameFromKind(kind)).thenReturn(kind.replace(":", "-")); - when(this.schemaCache.get(kind)).thenReturn(null); - when(this.indicesService.isIndexExist(any(), any())).thenReturn(true); - when(this.storageService.getStorageSchema(kind)).thenReturn(storageSchema); - when(this.mappingService.createMapping(any(), any(), any(), anyBoolean())).thenThrow(new AppException(HttpStatus.SC_FORBIDDEN, reason, "blah")); - - try { - this.sut.processSchemaMessages(schemaMessages); - } catch (AppException e) { - assertEquals(e.getError().getCode(), HttpStatus.SC_FORBIDDEN); - assertEquals(e.getError().getMessage(), "blah"); - assertEquals(e.getError().getReason(), reason); - } catch (Exception e) { - fail("Should not throw this exception " + e.getMessage()); - } - } - - @Test - public void should_log_and_do_nothing_when_storage_returns_invalid_schema() throws IOException, URISyntaxException { - String kind = "tenant1:avocet:completion:1.0.0"; - String storageSchema = "{" + - " \"kind\": \"tenant1:avocet:completion:1.0.0\"" + - "}"; - Map<String, OperationType> schemaMessages = new HashMap<>(); - schemaMessages.put(kind, OperationType.create_schema); - - when(this.elasticIndexNameResolver.getIndexNameFromKind(kind)).thenReturn(kind.replace(":", "-")); - when(this.schemaCache.get(kind)).thenReturn(null); - when(this.indicesService.isIndexExist(any(), any())).thenReturn(true); - when(this.storageService.getStorageSchema(kind)).thenReturn(storageSchema); - - this.sut.processSchemaMessages(schemaMessages); - - verify(this.log).warning(eq("schema not found for kind: tenant1:avocet:completion:1.0.0")); - } - - @Test - public void should_invalidateCache_when_purge_schema_and_schema_found_in_cache() throws IOException { - String kind = "tenant1:avocet:completion:1.0.0"; - Map<String, OperationType> schemaMessages = new HashMap<>(); - schemaMessages.put(kind, OperationType.purge_schema); - - when(this.elasticIndexNameResolver.getIndexNameFromKind(kind)).thenReturn(kind.replace(":", "-")); - when(this.indicesService.isIndexExist(any(), any())).thenReturn(true); - when(this.schemaCache.get(kind)).thenReturn("schema"); - when(this.schemaCache.get(kind + "_flattened")).thenReturn("flattened schema"); - - this.sut.processSchemaMessages(schemaMessages); - - verify(this.schemaCache, times(2)).get(anyString()); - verify(this.schemaCache, times(2)).delete(anyString()); - } - - @Test - public void should_log_warning_when_purge_schema_and_schema_not_found_in_cache() throws IOException { - String kind = "tenant1:avocet:completion:1.0.0"; - Map<String, OperationType> schemaMessages = new HashMap<>(); - schemaMessages.put(kind, OperationType.purge_schema); - - when(this.elasticIndexNameResolver.getIndexNameFromKind(kind)).thenReturn(kind.replace(":", "-")); - when(this.indicesService.isIndexExist(any(), any())).thenReturn(false); - - this.sut.processSchemaMessages(schemaMessages); - - verify(this.log).warning(eq(String.format("Kind: %s not found", kind))); - } - - @Test - public void should_sync_schema_with_storage() throws Exception { - String kind = "tenant1:avocet:completion:1.0.0"; - String storageSchema = "{" + - " \"kind\": \"tenant1:avocet:completion:1.0.0\"," + - " \"schema\": [" + - " {" + - " \"path\": \"status\"," + - " \"kind\": \"string\"" + - " }" + - " ]" + - "}"; - when(this.elasticIndexNameResolver.getIndexNameFromKind(kind)).thenReturn(kind.replace(":", "-")); - when(this.schemaCache.get(kind)).thenReturn(null); - when(this.indicesService.isIndexExist(any(), any())).thenReturn(true); - when(this.indicesService.deleteIndex(any(), any())).thenReturn(true); - when(this.storageService.getStorageSchema(kind)).thenReturn(storageSchema); - - this.sut.syncIndexMappingWithStorageSchema(kind); - - verify(this.mappingService, times(1)).getIndexMappingFromRecordSchema(any()); - verify(this.indicesService, times(1)).isIndexExist(any(), any()); - verify(this.indicesService, times(1)).deleteIndex(any(), any()); - verify(this.indicesService, times(1)).createIndex(any(), any(), any(), any(), any()); - verifyNoMoreInteractions(this.mappingService); - } - - @Test - public void should_throw_exception_while_snapshot_running_sync_schema_with_storage() throws Exception { - String kind = "tenant1:avocet:completion:1.0.0"; - when(this.elasticIndexNameResolver.getIndexNameFromKind(kind)).thenReturn(kind.replace(":", "-")); - when(this.schemaCache.get(kind)).thenReturn(null); - when(this.indicesService.isIndexExist(any(), any())).thenReturn(true); - when(this.indicesService.deleteIndex(any(), any())).thenThrow(new AppException(HttpStatus.SC_CONFLICT, "Index deletion error", "blah")); - - try { - this.sut.syncIndexMappingWithStorageSchema(kind); - } catch (AppException e) { - assertEquals(e.getError().getCode(), HttpStatus.SC_CONFLICT); - assertEquals(e.getError().getMessage(), "blah"); - assertEquals(e.getError().getReason(), "Index deletion error"); - } catch (Exception e) { - fail("Should not throw this exception " + e.getMessage()); - } - - verify(this.indicesService, times(1)).isIndexExist(any(), any()); - verify(this.indicesService, times(1)).deleteIndex(any(), any()); - verify(this.mappingService, never()).getIndexMappingFromRecordSchema(any()); - verify(this.indicesService, never()).createIndex(any(), any(), any(), any(), any()); - } - - @Test - public void should_return_true_while_if_forceClean_requested() throws IOException { - String kind = "tenant1:avocet:completion:1.0.0"; - when(this.elasticIndexNameResolver.getIndexNameFromKind(kind)).thenReturn(kind.replace(":", "-")); - when(this.indicesService.isIndexExist(any(), any())).thenReturn(true); - - assertTrue(this.sut.isStorageSchemaSyncRequired(kind, true)); - } - - @Test - public void should_return_true_while_if_forceClean_notRequested_and_indexNotFound() throws IOException { - String kind = "tenant1:avocet:completion:1.0.0"; - when(this.elasticIndexNameResolver.getIndexNameFromKind(kind)).thenReturn(kind.replace(":", "-")); - when(this.indicesService.isIndexExist(any(), any())).thenReturn(false); - - assertTrue(this.sut.isStorageSchemaSyncRequired(kind, false)); - } - - @Test - public void should_return_false_while_if_forceClean_notRequested_and_indexExist() throws IOException { - String kind = "tenant1:avocet:completion:1.0.0"; - when(this.elasticIndexNameResolver.getIndexNameFromKind(kind)).thenReturn(kind.replace(":", "-")); - when(this.indicesService.isIndexExist(any(), any())).thenReturn(true); - - assertFalse(this.sut.isStorageSchemaSyncRequired(kind, false)); - } -} diff --git a/provider/indexer-reference/pom.xml b/provider/indexer-reference/pom.xml index b1cf1243eedff75bba1f34662720559e476b26f0..3aa33b3733a74817ef0ea27c5cd52ca8e11ea288 100644 --- a/provider/indexer-reference/pom.xml +++ b/provider/indexer-reference/pom.xml @@ -22,12 +22,12 @@ <parent> <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-service</artifactId> - <version>0.10.0-SNAPSHOT</version> + <version>0.11.0-SNAPSHOT</version> <relativePath>../../pom.xml</relativePath> </parent> <artifactId>indexer-reference</artifactId> - <version>0.10.0-SNAPSHOT</version> + <version>0.11.0-SNAPSHOT</version> <name>indexer-reference</name> <description>Indexer Service GCP Anthos</description> <packaging>jar</packaging> @@ -36,7 +36,7 @@ <dependency> <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-core</artifactId> - <version>0.10.0-SNAPSHOT</version> + <version>0.11.0-SNAPSHOT</version> </dependency> <dependency> diff --git a/provider/indexer-reference/src/test/java/org/opengroup/osdu/indexer/service/IndexerSchemaServiceTest.java b/provider/indexer-reference/src/test/java/org/opengroup/osdu/indexer/service/IndexerSchemaServiceTest.java deleted file mode 100644 index 3b59eb203d3c9bd4391b0a25325ec30e70d06257..0000000000000000000000000000000000000000 --- a/provider/indexer-reference/src/test/java/org/opengroup/osdu/indexer/service/IndexerSchemaServiceTest.java +++ /dev/null @@ -1,445 +0,0 @@ -/* - * Copyright 2021 Google LLC - * Copyright 2021 EPAM Systems, Inc - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.opengroup.osdu.indexer.service; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; -import static org.mockito.Mockito.any; -import static org.mockito.Mockito.anyBoolean; -import static org.mockito.Mockito.anyString; -import static org.mockito.Mockito.eq; -import static org.mockito.Mockito.never; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.verifyNoMoreInteractions; -import static org.mockito.MockitoAnnotations.initMocks; -import static org.powermock.api.mockito.PowerMockito.mock; -import static org.powermock.api.mockito.PowerMockito.when; - -import java.io.IOException; -import java.net.URISyntaxException; -import java.util.HashMap; -import java.util.Map; -import org.apache.http.HttpStatus; -import org.elasticsearch.client.RestHighLevelClient; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.opengroup.osdu.core.common.logging.JaxRsDpsLog; -import org.opengroup.osdu.core.common.model.http.AppException; -import org.opengroup.osdu.core.common.model.http.RequestStatus; -import org.opengroup.osdu.core.common.model.indexer.IndexSchema; -import org.opengroup.osdu.core.common.model.indexer.OperationType; -import org.opengroup.osdu.core.common.search.ElasticIndexNameResolver; -import org.opengroup.osdu.core.common.search.IndicesService; -import org.opengroup.osdu.indexer.provider.interfaces.ISchemaCache; -import org.opengroup.osdu.indexer.service.SchemaProviderImpl; -import org.opengroup.osdu.indexer.util.ElasticClientHandler; -import org.powermock.core.classloader.annotations.PrepareForTest; -import org.springframework.test.context.junit4.SpringRunner; - -@RunWith(SpringRunner.class) -@PrepareForTest({RestHighLevelClient.class}) -public class IndexerSchemaServiceTest { - - private final String kind = "tenant:test:test:1.0.0"; - private final String emptySchema = null; - private final String someSchema = "{\"kind\":\"tenant:test:test:1.0.0\", \"schema\":[{\"path\":\"test-path\", \"kind\":\"tenant:test:test:1.0.0\"}]}"; - - @Mock - private JaxRsDpsLog log; - @Mock - private SchemaProviderImpl schemaProvider; - @Mock - private ElasticClientHandler elasticClientHandler; - @Mock - private ElasticIndexNameResolver elasticIndexNameResolver; - @Mock - private IndexerMappingService mappingService; - @Mock - private IndicesService indicesService; - @Mock - private ISchemaCache schemaCache; - @InjectMocks - private IndexSchemaServiceImpl sut; - - @Before - public void setup() { - initMocks(this); - RestHighLevelClient restHighLevelClient = mock(RestHighLevelClient.class); - when(elasticClientHandler.createRestClient()).thenReturn(restHighLevelClient); - } - - @Test - public void should_returnNull_givenEmptySchema_getIndexerInputSchemaSchemaTest() - throws Exception { - when(schemaProvider.getSchema(any())).thenReturn(emptySchema); - - IndexSchema indexSchema = this.sut.getIndexerInputSchema(kind, false); - - Assert.assertNotNull(indexSchema); - } - - @Test - public void should_returnValidResponse_givenValidSchema_getIndexerInputSchemaTest() - throws Exception { - when(schemaProvider.getSchema(any())).thenReturn(someSchema); - - IndexSchema indexSchema = this.sut.getIndexerInputSchema(kind, false); - - Assert.assertEquals(kind, indexSchema.getKind()); - } - - @Test - public void should_returnValidResponse_givenValidSchemaWithCacheHit_getIndexerInputSchemaTest() - throws Exception { - when(schemaProvider.getSchema(any())).thenReturn(someSchema); - when(this.schemaCache.get(kind + "_flattened")).thenReturn(someSchema); - - IndexSchema indexSchema = this.sut.getIndexerInputSchema(kind, false); - - Assert.assertEquals(kind, indexSchema.getKind()); - } - - @Test - public void should_throw500_givenInvalidSchemaCacheHit_getIndexerInputSchemaTest() { - try { - String invalidSchema = "{}}"; - when(schemaProvider.getSchema(any())).thenReturn(invalidSchema); - - this.sut.getIndexerInputSchema(kind, false); - fail("Should throw exception"); - } catch (AppException e) { - Assert.assertEquals(HttpStatus.SC_INTERNAL_SERVER_ERROR, e.getError().getCode()); - Assert.assertEquals("An error has occurred while normalizing the schema.", - e.getError().getMessage()); - } catch (Exception e) { - fail("Should not throw exception" + e.getMessage()); - } - } - - @Test - public void should_return_basic_schema_when_storage_returns_no_schema() { - IndexSchema returnedSchema = this.sut.getIndexerInputSchema(kind, false); - - assertNotNull(returnedSchema.getDataSchema()); - assertNotNull(returnedSchema); - assertEquals(kind, returnedSchema.getKind()); - } - - @Test - public void should_create_schema_when_storage_returns_valid_schema() - throws IOException, URISyntaxException { - String kind = "tenant1:avocet:completion:1.0.0"; - String storageSchema = "{" + - " \"kind\": \"tenant1:avocet:completion:1.0.0\"," + - " \"schema\": [" + - " {" + - " \"path\": \"status\"," + - " \"kind\": \"string\"" + - " }," + - " {" + - " \"path\": \"startDate\"," + - " \"kind\": \"string\"" + - " }," + - " {" + - " \"path\": \"endDate\"," + - " \"kind\": \"string\"" + - " }," + - " {" + - " \"path\": \"type \"," + - " \"kind\": \"string\"" + - " }," + - " {" + - " \"path\": \"itemguid\"," + - " \"kind\": \"string\"" + - " }" + - " ]" + - "}"; - Map<String, OperationType> schemaMessages = new HashMap<>(); - schemaMessages.put(kind, OperationType.create_schema); - - when(this.elasticIndexNameResolver.getIndexNameFromKind(kind)) - .thenReturn(kind.replace(":", "-")); - when(this.schemaCache.get(kind)).thenReturn(null); - when(this.indicesService.isIndexExist(any(), any())).thenReturn(false); - when(this.schemaProvider.getSchema(kind)).thenReturn(storageSchema); - - this.sut.processSchemaMessages(schemaMessages); - - verify(this.mappingService, times(1)).getIndexMappingFromRecordSchema(any()); - verify(this.indicesService, times(1)).createIndex(any(), any(), any(), any(), any()); - verifyNoMoreInteractions(this.mappingService); - } - - @Test - public void should_merge_mapping_when_storage_returns_valid_schema() - throws IOException, URISyntaxException { - String kind = "tenant1:avocet:completion:1.0.0"; - String storageSchema = "{" + - " \"kind\": \"tenant1:avocet:completion:1.0.0\"," + - " \"schema\": [" + - " {" + - " \"path\": \"status\"," + - " \"kind\": \"string\"" + - " }," + - " {" + - " \"path\": \"startDate\"," + - " \"kind\": \"string\"" + - " }" + - " ]" + - "}"; - Map<String, OperationType> schemaMessages = new HashMap<>(); - schemaMessages.put(kind, OperationType.create_schema); - - when(this.elasticIndexNameResolver.getIndexNameFromKind(kind)) - .thenReturn(kind.replace(":", "-")); - when(this.schemaCache.get(kind)).thenReturn(null); - when(this.indicesService.isIndexExist(any(), any())).thenReturn(true); - when(this.schemaProvider.getSchema(kind)).thenReturn(storageSchema); - - this.sut.processSchemaMessages(schemaMessages); - - verify(this.indicesService, times(0)).createIndex(any(), any(), any(), any(), any()); - verify(this.mappingService, times(1)).createMapping(any(), any(), any(), anyBoolean()); - verifyNoMoreInteractions(this.mappingService); - } - - @Test - public void should_throw_mapping_conflict_when_elastic_backend_cannot_process_schema_changes() - throws IOException, URISyntaxException { - String kind = "tenant1:avocet:completion:1.0.0"; - String reason = String - .format("Could not create type mapping %s/completion.", kind.replace(":", "-")); - String storageSchema = "{" + - " \"kind\": \"tenant1:avocet:completion:1.0.0\"," + - " \"schema\": [" + - " {" + - " \"path\": \"status\"," + - " \"kind\": \"string\"" + - " }" + - " ]" + - "}"; - Map<String, OperationType> schemaMessages = new HashMap<>(); - schemaMessages.put(kind, OperationType.create_schema); - - when(this.elasticIndexNameResolver.getIndexNameFromKind(kind)) - .thenReturn(kind.replace(":", "-")); - when(this.schemaCache.get(kind)).thenReturn(null); - when(this.indicesService.isIndexExist(any(), any())).thenReturn(true); - when(this.schemaProvider.getSchema(kind)).thenReturn(storageSchema); - when(this.mappingService.createMapping(any(), any(), any(), anyBoolean())) - .thenThrow(new AppException(HttpStatus.SC_BAD_REQUEST, reason, "")); - - try { - this.sut.processSchemaMessages(schemaMessages); - } catch (AppException e) { - assertEquals(RequestStatus.SCHEMA_CONFLICT, e.getError().getCode()); - assertEquals("error creating or merging index mapping", e.getError().getMessage()); - assertEquals(reason, e.getError().getReason()); - } catch (Exception e) { - fail("Should not throw this exception " + e.getMessage()); - } - } - - @Test - public void should_throw_genericAppException_when_elastic_backend_cannot_process_schema_changes() - throws IOException, URISyntaxException { - String kind = "tenant1:avocet:completion:1.0.0"; - String reason = String - .format("Could not create type mapping %s/completion.", kind.replace(":", "-")); - String storageSchema = "{" + - " \"kind\": \"tenant1:avocet:completion:1.0.0\"," + - " \"schema\": [" + - " {" + - " \"path\": \"status\"," + - " \"kind\": \"string\"" + - " }" + - " ]" + - "}"; - Map<String, OperationType> schemaMessages = new HashMap<>(); - schemaMessages.put(kind, OperationType.create_schema); - - when(this.elasticIndexNameResolver.getIndexNameFromKind(kind)) - .thenReturn(kind.replace(":", "-")); - when(this.schemaCache.get(kind)).thenReturn(null); - when(this.indicesService.isIndexExist(any(), any())).thenReturn(true); - when(this.schemaProvider.getSchema(kind)).thenReturn(storageSchema); - when(this.mappingService.createMapping(any(), any(), any(), anyBoolean())) - .thenThrow(new AppException(HttpStatus.SC_FORBIDDEN, reason, "blah")); - - try { - this.sut.processSchemaMessages(schemaMessages); - } catch (AppException e) { - assertEquals(HttpStatus.SC_FORBIDDEN, e.getError().getCode()); - assertEquals("blah", e.getError().getMessage()); - assertEquals(reason, e.getError().getReason()); - } catch (Exception e) { - fail("Should not throw this exception " + e.getMessage()); - } - } - - @Test - public void should_log_and_do_nothing_when_storage_returns_invalid_schema() - throws IOException, URISyntaxException { - String kind = "tenant1:avocet:completion:1.0.0"; - String storageSchema = "{" + - " \"kind\": \"tenant1:avocet:completion:1.0.0\"" + - "}"; - Map<String, OperationType> schemaMessages = new HashMap<>(); - schemaMessages.put(kind, OperationType.create_schema); - - when(this.elasticIndexNameResolver.getIndexNameFromKind(kind)) - .thenReturn(kind.replace(":", "-")); - when(this.schemaCache.get(kind)).thenReturn(null); - when(this.indicesService.isIndexExist(any(), any())).thenReturn(true); - when(this.schemaProvider.getSchema(kind)).thenReturn(storageSchema); - - this.sut.processSchemaMessages(schemaMessages); - - verify(this.log).warning(eq("schema not found for kind: tenant1:avocet:completion:1.0.0")); - } - - @Test - public void should_invalidateCache_when_purge_schema_and_schema_found_in_cache() - throws IOException { - String kind = "tenant1:avocet:completion:1.0.0"; - Map<String, OperationType> schemaMessages = new HashMap<>(); - schemaMessages.put(kind, OperationType.purge_schema); - - when(this.elasticIndexNameResolver.getIndexNameFromKind(kind)) - .thenReturn(kind.replace(":", "-")); - when(this.indicesService.isIndexExist(any(), any())).thenReturn(true); - when(this.schemaCache.get(kind)).thenReturn("schema"); - when(this.schemaCache.get(kind + "_flattened")).thenReturn("flattened schema"); - - this.sut.processSchemaMessages(schemaMessages); - - verify(this.schemaCache, times(2)).get(anyString()); - verify(this.schemaCache, times(2)).delete(anyString()); - } - - @Test - public void should_log_warning_when_purge_schema_and_schema_not_found_in_cache() - throws IOException { - String kind = "tenant1:avocet:completion:1.0.0"; - Map<String, OperationType> schemaMessages = new HashMap<>(); - schemaMessages.put(kind, OperationType.purge_schema); - - when(this.elasticIndexNameResolver.getIndexNameFromKind(kind)) - .thenReturn(kind.replace(":", "-")); - when(this.indicesService.isIndexExist(any(), any())).thenReturn(false); - - this.sut.processSchemaMessages(schemaMessages); - - verify(this.log).warning(eq(String.format("Kind: %s not found", kind))); - } - - @Test - public void should_sync_schema_with_storage() throws Exception { - String kind = "tenant1:avocet:completion:1.0.0"; - String storageSchema = "{" + - " \"kind\": \"tenant1:avocet:completion:1.0.0\"," + - " \"schema\": [" + - " {" + - " \"path\": \"status\"," + - " \"kind\": \"string\"" + - " }" + - " ]" + - "}"; - when(this.elasticIndexNameResolver.getIndexNameFromKind(kind)) - .thenReturn(kind.replace(":", "-")); - when(this.schemaCache.get(kind)).thenReturn(null); - when(this.indicesService.isIndexExist(any(), any())).thenReturn(true); - when(this.indicesService.deleteIndex(any(), any())).thenReturn(true); - when(this.schemaProvider.getSchema(kind)).thenReturn(storageSchema); - - this.sut.syncIndexMappingWithStorageSchema(kind); - - verify(this.mappingService, times(1)).getIndexMappingFromRecordSchema(any()); - verify(this.indicesService, times(1)).isIndexExist(any(), any()); - verify(this.indicesService, times(1)).deleteIndex(any(), any()); - verify(this.indicesService, times(1)).createIndex(any(), any(), any(), any(), any()); - verifyNoMoreInteractions(this.mappingService); - } - - @Test - public void should_throw_exception_while_snapshot_running_sync_schema_with_storage() - throws Exception { - String kind = "tenant1:avocet:completion:1.0.0"; - when(this.elasticIndexNameResolver.getIndexNameFromKind(kind)) - .thenReturn(kind.replace(":", "-")); - when(this.schemaCache.get(kind)).thenReturn(null); - when(this.indicesService.isIndexExist(any(), any())).thenReturn(true); - when(this.indicesService.deleteIndex(any(), any())) - .thenThrow(new AppException(HttpStatus.SC_CONFLICT, "Index deletion error", "blah")); - - try { - this.sut.syncIndexMappingWithStorageSchema(kind); - } catch (AppException e) { - assertEquals(HttpStatus.SC_CONFLICT, e.getError().getCode()); - assertEquals("blah", e.getError().getMessage()); - assertEquals("Index deletion error", e.getError().getReason()); - } catch (Exception e) { - fail("Should not throw this exception " + e.getMessage()); - } - - verify(this.indicesService, times(1)).isIndexExist(any(), any()); - verify(this.indicesService, times(1)).deleteIndex(any(), any()); - verify(this.mappingService, never()).getIndexMappingFromRecordSchema(any()); - verify(this.indicesService, never()).createIndex(any(), any(), any(), any(), any()); - } - - @Test - public void should_return_true_while_if_forceClean_requested() throws IOException { - String kind = "tenant1:avocet:completion:1.0.0"; - when(this.elasticIndexNameResolver.getIndexNameFromKind(kind)) - .thenReturn(kind.replace(":", "-")); - when(this.indicesService.isIndexExist(any(), any())).thenReturn(true); - - assertTrue(this.sut.isStorageSchemaSyncRequired(kind, true)); - } - - @Test - public void should_return_true_while_if_forceClean_notRequested_and_indexNotFound() - throws IOException { - String kind = "tenant1:avocet:completion:1.0.0"; - when(this.elasticIndexNameResolver.getIndexNameFromKind(kind)) - .thenReturn(kind.replace(":", "-")); - when(this.indicesService.isIndexExist(any(), any())).thenReturn(false); - - assertTrue(this.sut.isStorageSchemaSyncRequired(kind, false)); - } - - @Test - public void should_return_false_while_if_forceClean_notRequested_and_indexExist() - throws IOException { - String kind = "tenant1:avocet:completion:1.0.0"; - when(this.elasticIndexNameResolver.getIndexNameFromKind(kind)) - .thenReturn(kind.replace(":", "-")); - when(this.indicesService.isIndexExist(any(), any())).thenReturn(true); - - assertFalse(this.sut.isStorageSchemaSyncRequired(kind, false)); - } -} diff --git a/testing/indexer-test-aws/pom.xml b/testing/indexer-test-aws/pom.xml index 3b30e04e49c219b315f3f291f8f1c4a153215765..1f44c614b05c08ac7a73f1d52d0cdabcc7971f03 100644 --- a/testing/indexer-test-aws/pom.xml +++ b/testing/indexer-test-aws/pom.xml @@ -21,13 +21,13 @@ <parent> <groupId>org.opengroup.osdu</groupId> <artifactId>indexer-test</artifactId> - <version>0.10.0-SNAPSHOT</version> + <version>0.11.0-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent> <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-test-aws</artifactId> - <version>0.10.0-SNAPSHOT</version> + <version>0.11.0-SNAPSHOT</version> <packaging>jar</packaging> <properties> @@ -42,7 +42,7 @@ <dependency> <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-test-core</artifactId> - <version>0.10.0-SNAPSHOT</version> + <version>0.11.0-SNAPSHOT</version> </dependency> <!-- AWS specific packages --> diff --git a/testing/indexer-test-azure/pom.xml b/testing/indexer-test-azure/pom.xml index 69b19fdf0ed9ab49bc14c7e1bdad2ac96a83763f..9f897aa2140a4d8e6ca82f9d882567fefd9f0014 100644 --- a/testing/indexer-test-azure/pom.xml +++ b/testing/indexer-test-azure/pom.xml @@ -21,13 +21,13 @@ <parent> <groupId>org.opengroup.osdu</groupId> <artifactId>indexer-test</artifactId> - <version>0.10.0-SNAPSHOT</version> + <version>0.11.0-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent> <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-test-azure</artifactId> - <version>0.10.0-SNAPSHOT</version> + <version>0.11.0-SNAPSHOT</version> <packaging>jar</packaging> <properties> @@ -45,7 +45,7 @@ <dependency> <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-test-core</artifactId> - <version>0.10.0-SNAPSHOT</version> + <version>0.11.0-SNAPSHOT</version> </dependency> <!-- Azure dependencies --> diff --git a/testing/indexer-test-core/pom.xml b/testing/indexer-test-core/pom.xml index 365aa1f09e4d65f87aa0a097fe56769d393a2621..7e7a0e821ecb21d523a4ba630d1c233c32261672 100644 --- a/testing/indexer-test-core/pom.xml +++ b/testing/indexer-test-core/pom.xml @@ -5,13 +5,13 @@ <parent> <groupId>org.opengroup.osdu</groupId> <artifactId>indexer-test</artifactId> - <version>0.10.0-SNAPSHOT</version> + <version>0.11.0-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent> <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-test-core</artifactId> - <version>0.10.0-SNAPSHOT</version> + <version>0.11.0-SNAPSHOT</version> <properties> <maven.compiler.target>1.8</maven.compiler.target> diff --git a/testing/indexer-test-gcp/pom.xml b/testing/indexer-test-gcp/pom.xml index 2d94432a53ce3b8317865e30a90a55815aa943c7..c04bfaa9a8eeaab55a87e34ab2cb2800c579bfb2 100644 --- a/testing/indexer-test-gcp/pom.xml +++ b/testing/indexer-test-gcp/pom.xml @@ -6,13 +6,13 @@ <parent> <groupId>org.opengroup.osdu</groupId> <artifactId>indexer-test</artifactId> - <version>0.10.0-SNAPSHOT</version> + <version>0.11.0-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent> <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-test-gcp</artifactId> - <version>0.10.0-SNAPSHOT</version> + <version>0.11.0-SNAPSHOT</version> <packaging>jar</packaging> <properties> @@ -37,7 +37,7 @@ <dependency> <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-test-core</artifactId> - <version>0.10.0-SNAPSHOT</version> + <version>0.11.0-SNAPSHOT</version> </dependency> <!-- Cucumber --> diff --git a/testing/indexer-test-ibm/pom.xml b/testing/indexer-test-ibm/pom.xml index 5fe05406e7e282d498ac755f731354a8d0cb7495..26a2c992ad25c8a1fd09441cbb78d85b431bf90f 100644 --- a/testing/indexer-test-ibm/pom.xml +++ b/testing/indexer-test-ibm/pom.xml @@ -6,13 +6,13 @@ <parent> <groupId>org.opengroup.osdu</groupId> <artifactId>indexer-test</artifactId> - <version>0.10.0-SNAPSHOT</version> + <version>0.11.0-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent> <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-test-ibm</artifactId> - <version>0.10.0-SNAPSHOT</version> + <version>0.11.0-SNAPSHOT</version> <packaging>jar</packaging> <properties> @@ -38,7 +38,7 @@ <dependency> <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-test-core</artifactId> - <version>0.10.0-SNAPSHOT</version> + <version>0.11.0-SNAPSHOT</version> </dependency> <dependency> diff --git a/testing/pom.xml b/testing/pom.xml index e33b2a83643bab6e01eed2ccd6852fe69f15c484..948d86e1854bb3a62757e5da3bf2989e01799783 100644 --- a/testing/pom.xml +++ b/testing/pom.xml @@ -18,7 +18,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>org.opengroup.osdu</groupId> <artifactId>indexer-test</artifactId> - <version>0.10.0-SNAPSHOT</version> + <version>0.11.0-SNAPSHOT</version> <description>Indexer Service Integration Test Root Project</description> <properties> <spring.version>5.1.19.RELEASE</spring.version>