diff --git a/NOTICE b/NOTICE index e9ff93311a1cce1c8fe9203f582f72e8de098154..01a66b8f46b11d59900bab9b63236d8fa64dab2f 100644 --- a/NOTICE +++ b/NOTICE @@ -183,7 +183,7 @@ The following software have components provided under the terms of this license: - 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 Lang (from https://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/) - Apache Commons Validator (from http://commons.apache.org/proper/commons-validator/) @@ -553,16 +553,16 @@ The following software have components provided under the terms of this license: - javatuples (from http://www.javatuples.org) - javax.inject (from http://code.google.com/p/atinject/) - 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-container-servlet (from https://repo1.maven.org/maven2/org/glassfish/jersey/containers/jersey-container-servlet) +- jersey-container-servlet-core (from https://repo1.maven.org/maven2/org/glassfish/jersey/containers/jersey-container-servlet-core) +- jersey-core-client (from https://repo1.maven.org/maven2/org/glassfish/jersey/core/jersey-client) - 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-core-server (from https://repo1.maven.org/maven2/org/glassfish/jersey/core/jersey-server) +- jersey-ext-bean-validation (from https://repo1.maven.org/maven2/org/glassfish/jersey/ext/jersey-bean-validation) +- jersey-ext-entity-filtering (from https://repo1.maven.org/maven2/org/glassfish/jersey/ext/jersey-entity-filtering) - jersey-inject-hk2 (from ) - jersey-media-jaxb (from ) -- jersey-media-json-jackson (from git://java.net/jersey~code/project/jersey-media-json-jackson) +- jersey-media-json-jackson (from https://repo1.maven.org/maven2/org/glassfish/jersey/media/jersey-media-json-jackson) - 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) @@ -672,7 +672,7 @@ The following software have components provided under the terms of this license: - 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-ext-bean-validation (from https://repo1.maven.org/maven2/org/glassfish/jersey/ext/jersey-bean-validation) - jersey-spring4 (from https://repo1.maven.org/maven2/org/glassfish/jersey/ext/jersey-spring4) ======================================================================== @@ -688,7 +688,7 @@ The following software have components provided under the terms of this license: - ASM Core (from ) - ASM Tree (from ) - ASM Util (from ) -- ASM library repackaged as OSGi bundle (from ) +- ASM library repackaged as OSGi bundle (from https://repo1.maven.org/maven2/org/glassfish/hk2/external/asm-all-repackaged) - 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) @@ -730,11 +730,11 @@ The following software have components provided under the terms of this license: - 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) -- 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-server (from git://java.net/jersey~code/jersey-server) -- jersey-ext-entity-filtering (from ) +- jersey-container-servlet (from https://repo1.maven.org/maven2/org/glassfish/jersey/containers/jersey-container-servlet) +- jersey-container-servlet-core (from https://repo1.maven.org/maven2/org/glassfish/jersey/containers/jersey-container-servlet-core) +- jersey-core-client (from https://repo1.maven.org/maven2/org/glassfish/jersey/core/jersey-client) +- jersey-core-server (from https://repo1.maven.org/maven2/org/glassfish/jersey/core/jersey-server) +- jersey-ext-entity-filtering (from https://repo1.maven.org/maven2/org/glassfish/jersey/ext/jersey-entity-filtering) - jersey-inject-hk2 (from ) - jersey-media-jaxb (from ) @@ -768,29 +768,29 @@ CDDL-1.0 ======================================================================== The following software have components provided under the terms of this license: -- ASM library repackaged as OSGi bundle (from ) -- Class Model for Hk2 (from ) +- ASM library repackaged as OSGi bundle (from https://repo1.maven.org/maven2/org/glassfish/hk2/external/asm-all-repackaged) +- Class Model for Hk2 (from https://repo1.maven.org/maven2/org/glassfish/hk2/class-model) - 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 config types (from https://repo1.maven.org/maven2/org/glassfish/hk2/config-types) +- HK2 configuration module (from https://repo1.maven.org/maven2/org/glassfish/hk2/hk2-config) - HK2 core module (from ) -- HK2 module of HK2 itself (from ) +- HK2 module of HK2 itself (from https://repo1.maven.org/maven2/org/glassfish/hk2/hk2) - JavaBeans Activation Framework API jar (from ) -- Run Level Service (from ) +- Run Level Service (from https://repo1.maven.org/maven2/org/glassfish/hk2/hk2-runlevel) - ServiceLocator Default Implementation (from https://repo1.maven.org/maven2/org/glassfish/hk2/hk2-locator) - Servlet Specification 2.5 API (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-container-servlet (from https://repo1.maven.org/maven2/org/glassfish/jersey/containers/jersey-container-servlet) +- jersey-container-servlet-core (from https://repo1.maven.org/maven2/org/glassfish/jersey/containers/jersey-container-servlet-core) +- jersey-core-client (from https://repo1.maven.org/maven2/org/glassfish/jersey/core/jersey-client) - 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-core-server (from https://repo1.maven.org/maven2/org/glassfish/jersey/core/jersey-server) +- jersey-ext-entity-filtering (from https://repo1.maven.org/maven2/org/glassfish/jersey/ext/jersey-entity-filtering) - jersey-inject-hk2 (from ) - jersey-media-jaxb (from ) -- jersey-media-json-jackson (from git://java.net/jersey~code/project/jersey-media-json-jackson) +- jersey-media-json-jackson (from https://repo1.maven.org/maven2/org/glassfish/jersey/media/jersey-media-json-jackson) ======================================================================== CDDL-1.1 @@ -806,7 +806,7 @@ The following software have components provided under the terms of this license: - 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-ext-bean-validation (from https://repo1.maven.org/maven2/org/glassfish/jersey/ext/jersey-bean-validation) - jersey-spring4 (from https://repo1.maven.org/maven2/org/glassfish/jersey/ext/jersey-spring4) - tomcat-embed-core (from http://tomcat.apache.org/) @@ -850,39 +850,39 @@ GPL-2.0-only ======================================================================== The following software have components provided under the terms of this license: -- ASM library repackaged as OSGi bundle (from ) -- Class Model for Hk2 (from ) +- ASM library repackaged as OSGi bundle (from https://repo1.maven.org/maven2/org/glassfish/hk2/external/asm-all-repackaged) +- Class Model for Hk2 (from https://repo1.maven.org/maven2/org/glassfish/hk2/class-model) - Cobertura (from http://cobertura.sourceforge.net) - Cobertura Limited Runtime (from http://cobertura.sourceforge.net) - Commons Lang (from http://commons.apache.org/lang/) - Expression Language 3.0 (from http://uel.java.net) - 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 config types (from https://repo1.maven.org/maven2/org/glassfish/hk2/config-types) +- HK2 configuration module (from https://repo1.maven.org/maven2/org/glassfish/hk2/hk2-config) - HK2 core module (from ) -- HK2 module of HK2 itself (from ) +- HK2 module of HK2 itself (from https://repo1.maven.org/maven2/org/glassfish/hk2/hk2) - 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/) - OSGi resource locator (from ) - RabbitMQ Java Client (from https://www.rabbitmq.com) -- Run Level Service (from ) +- Run Level Service (from https://repo1.maven.org/maven2/org/glassfish/hk2/hk2-runlevel) - 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-container-servlet (from https://repo1.maven.org/maven2/org/glassfish/jersey/containers/jersey-container-servlet) +- jersey-container-servlet-core (from https://repo1.maven.org/maven2/org/glassfish/jersey/containers/jersey-container-servlet-core) +- jersey-core-client (from https://repo1.maven.org/maven2/org/glassfish/jersey/core/jersey-client) - 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-core-server (from https://repo1.maven.org/maven2/org/glassfish/jersey/core/jersey-server) +- jersey-ext-bean-validation (from https://repo1.maven.org/maven2/org/glassfish/jersey/ext/jersey-bean-validation) +- jersey-ext-entity-filtering (from https://repo1.maven.org/maven2/org/glassfish/jersey/ext/jersey-entity-filtering) - jersey-inject-hk2 (from ) - jersey-media-jaxb (from ) -- jersey-media-json-jackson (from git://java.net/jersey~code/project/jersey-media-json-jackson) +- jersey-media-json-jackson (from https://repo1.maven.org/maven2/org/glassfish/jersey/media/jersey-media-json-jackson) - jersey-spring4 (from https://repo1.maven.org/maven2/org/glassfish/jersey/ext/jersey-spring4) - tomcat-embed-core (from http://tomcat.apache.org/) @@ -911,16 +911,16 @@ The following software have components provided under the terms of this license: - 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-container-servlet (from https://repo1.maven.org/maven2/org/glassfish/jersey/containers/jersey-container-servlet) +- jersey-container-servlet-core (from https://repo1.maven.org/maven2/org/glassfish/jersey/containers/jersey-container-servlet-core) +- jersey-core-client (from https://repo1.maven.org/maven2/org/glassfish/jersey/core/jersey-client) - 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-core-server (from https://repo1.maven.org/maven2/org/glassfish/jersey/core/jersey-server) +- jersey-ext-bean-validation (from https://repo1.maven.org/maven2/org/glassfish/jersey/ext/jersey-bean-validation) +- jersey-ext-entity-filtering (from https://repo1.maven.org/maven2/org/glassfish/jersey/ext/jersey-entity-filtering) - jersey-inject-hk2 (from ) - jersey-media-jaxb (from ) -- jersey-media-json-jackson (from git://java.net/jersey~code/project/jersey-media-json-jackson) +- jersey-media-json-jackson (from https://repo1.maven.org/maven2/org/glassfish/jersey/media/jersey-media-json-jackson) - jersey-spring4 (from https://repo1.maven.org/maven2/org/glassfish/jersey/ext/jersey-spring4) - tomcat-embed-core (from http://tomcat.apache.org/) @@ -1102,7 +1102,7 @@ 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 https://repo1.maven.org/maven2/org/glassfish/jersey/core/jersey-common) -- jersey-core-server (from git://java.net/jersey~code/jersey-server) +- jersey-core-server (from https://repo1.maven.org/maven2/org/glassfish/jersey/core/jersey-server) - jts-core (from https://repo1.maven.org/maven2/org/locationtech/jts/jts-core) ======================================================================== @@ -1213,11 +1213,11 @@ The following software have components provided under the terms of this license: - 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) -- jersey-core-client (from git://java.net/jersey~code/jersey-client) -- jersey-ext-bean-validation (from ) -- jersey-ext-entity-filtering (from ) +- jersey-container-servlet (from https://repo1.maven.org/maven2/org/glassfish/jersey/containers/jersey-container-servlet) +- jersey-container-servlet-core (from https://repo1.maven.org/maven2/org/glassfish/jersey/containers/jersey-container-servlet-core) +- jersey-core-client (from https://repo1.maven.org/maven2/org/glassfish/jersey/core/jersey-client) +- jersey-ext-bean-validation (from https://repo1.maven.org/maven2/org/glassfish/jersey/ext/jersey-bean-validation) +- jersey-ext-entity-filtering (from https://repo1.maven.org/maven2/org/glassfish/jersey/ext/jersey-entity-filtering) - jersey-inject-hk2 (from ) - jersey-media-jaxb (from ) - jersey-spring4 (from https://repo1.maven.org/maven2/org/glassfish/jersey/ext/jersey-spring4) diff --git a/docs/tutorial/IndexerService.md b/docs/tutorial/IndexerService.md index 0873557d9b48c398bdb17e8aeae3b6a6426f1f38..fdd258cee3b0d64921cfd8aa7b451101d35d2e9d 100644 --- a/docs/tutorial/IndexerService.md +++ b/docs/tutorial/IndexerService.md @@ -2,11 +2,8 @@ ### Table of contents <a name="TOC"></a> - [Indexer service](#indexer-service) - - [Table of contents <a name="TOC"></a>](#table-of-contents) - [Get indexing status <a name="get-indexing-status"></a>](#get-indexing-status) - [Reindex <a name="reindex"></a>](#reindex) -- [Copy Index <a name="copy-index"></a>](#copy-index) -- [Get task status <a name="get-task-status"></a>](#get-task-status) - [Schema Service adoption <a name="schema-service-adoption"></a>](#schema-service-adoption) - [R3 Schema Support <a name="r3-schema-support"></a>](#r3-schema-support) @@ -56,20 +53,22 @@ The indexer is indexes attributes defined in the schema. Schema can be created a ## Get indexing status <a name="get-indexing-status"></a> -Indexer service adds internal meta data to each record which registers the status of the indexing. The meta data includes the status and the last indexing date and time. This additional meta block helps to see the details of indexing. The format of the index meta block is as follows: +Indexer service adds internal metadata to each record which registers the status of the indexing. The meta data includes the status and the last indexing date and time. This additional meta block helps to see the details of indexing. The format of the index meta block is as follows: -``` -"index": { - "trace": [ - String, - String - ], - "statusCode": Integer, - "lastUpdateTime": Datetime +```json +{ + "index": { + "trace": [ + String, + String + ], + "statusCode": Integer, + "lastUpdateTime": Datetime + } } ``` Example: -``` +```json { "results": [ { @@ -97,7 +96,7 @@ Details of the index block: You can query the index status using the following example query: -``` +```bash curl --request POST \ --url /api/search/v2/query \ --header 'Authorization: Token' \ @@ -128,7 +127,7 @@ POST /api/indexer/v2/reindex <details><summary>**Curl**</summary> -``` +```bash curl --request POST \ --url '/api/indexer/v2/reindex' \ --header 'accept: application/json' \ @@ -143,121 +142,11 @@ curl --request POST \ [Back to table of contents](#TOC) -## Copy Index <a name="copy-index"></a> - -Copy Index API can be used copy `kind` index from `common` to a private `data partition` search backend. To call it, kind from `common` partition should be provided as path parameter and private partition-id should be specified in OSDU-Data-Partition-Id header. - -__Note__: Copy Index API is intended for __only__ copying `kind` index from `common` cluster to private `partition` cluster, no other combination of data partitions are honored at this time. - -``` -POST /api/indexer/v2/copyIndex/copy/{kind} -OSDU-Data-Partition-Id:OSDU -``` - -<details><summary>**Curl**</summary> - -``` -curl --request POST \ - --url '/api/indexer/v2/copyIndex/copy/common:welldb:wellbore:1.0.0' \ - --header 'accept: application/json' \ - --header 'authorization: Bearer <JWT>' \ - --header 'content-type: application/json' \ - --header 'OSDU-Data-Partition-Id: OSDU' -``` -</details> - -The successful response from the above request will be a `task-id`, this can be later used to track the status of the task via task status API(#get-task-status). - -``` -{ - "task": "CrOX4STSQF6kgtSRdERhbw:92863567" -} -``` - -[Back to table of contents](#TOC) - -## Get task status <a name="get-task-status"></a> - -Status of ongoing or completed index copy request for given `taskId` can retrieved via GET task status api. - -``` -GET /api/indexer/v2/copyIndex/taskStatus/{taskId} -``` - -<details><summary>**Curl**</summary> - -``` -curl --request GET \ - --url '/api/indexer/v2/copyIndex/taskStatus/[taskid]]' \ - --header 'accept: application/json' \ - --header 'authorization: Bearer <JWT>' \ - --header 'content-type: application/json' \ - --header 'OSDU-Data-Partition-Id: OSDU' -``` -</details> - -API will respond with status of task. - -``` -{ - "completed": true, - "task": { - "node": "[nodeid]", - "id": 113159669, - "type": "transport", - "action": "indices:data/write/reindex", - "status": { - "total": 1530, - "updated": 0, - "created": 1530, - "deleted": 0, - "batches": 1, - "version_conflicts": 0, - "noops": 0, - "retries": { - "bulk": 0, - "search": 0 - }, - "throttled_millis": 0, - "requests_per_second": -1, - "throttled_until_millis": 0 - }, - "description": "reindex from [scheme=https host=host-id port=9243 query={\n \"match_all\" : {\n \"boost\" : 1.0\n }\n}][common:welldb:wellbore:1.0.0] to [common:welldb:wellbore:1.0.0]", - "start_time_in_millis": 1539735233086, - "running_time_in_nanos": 1094744315, - "cancellable": true, - "headers": {} - }, - "response": { - "took": 1084, - "timed_out": false, - "total": 1530, - "updated": 0, - "created": 1530, - "deleted": 0, - "batches": 1, - "version_conflicts": 0, - "noops": 0, - "retries": { - "bulk": 0, - "search": 0 - }, - "throttled_millis": 0, - "requests_per_second": -1, - "throttled_until_millis": 0, - "failures": [] - } -} -``` - -[Back to table of contents](#TOC) - ##Schema Service adoption <a name="schema-service-adoption"></a> Indexer service is in adaptation process to use schemas from the Schema service instead of Storage Service. The Indexer Service retrieves a schema from the Schema Service if the schema is not found on the Storage Service. -Change affects only Azure implementation so far. -Later call to the Storage Service will be deprecated and then removed (after the end of the deprecation period). +Change affects only Azure implementation so far. Later call to the Storage Service will be deprecated and then removed (after the end of the deprecation period). [Back to table of contents](#TOC) diff --git a/testing/indexer-test-aws/src/test/java/org/opengroup/osdu/step_definitions/index/cleanup/RunTest.java b/testing/indexer-test-aws/src/test/java/org/opengroup/osdu/step_definitions/index/cleanup/RunTest.java deleted file mode 100644 index ccf35e02cffb041fdf0582ae87e6891028947543..0000000000000000000000000000000000000000 --- a/testing/indexer-test-aws/src/test/java/org/opengroup/osdu/step_definitions/index/cleanup/RunTest.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright © Amazon Web Services -// -// 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.step_definitions.index.cleanup; - -import cucumber.api.CucumberOptions; -import cucumber.api.junit.Cucumber; -import org.junit.runner.RunWith; - -@RunWith(Cucumber.class) -@CucumberOptions( - features = "classpath:features/indexcleanup/IndexCleanup.feature", - glue = {"classpath:org.opengroup.osdu.step_definitions/index/cleanup"}, - plugin = {"pretty", "junit:target/cucumber-reports/TEST-indexcleanup.xml"}) -public class RunTest { -} \ No newline at end of file diff --git a/testing/indexer-test-aws/src/test/java/org/opengroup/osdu/step_definitions/index/cleanup/Steps.java b/testing/indexer-test-aws/src/test/java/org/opengroup/osdu/step_definitions/index/cleanup/Steps.java deleted file mode 100644 index b69fd683d35214a73fd9c268e6dcb879d95f97c8..0000000000000000000000000000000000000000 --- a/testing/indexer-test-aws/src/test/java/org/opengroup/osdu/step_definitions/index/cleanup/Steps.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright © Amazon Web Services -// -// 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.step_definitions.index.cleanup; - -import cucumber.api.DataTable; -import cucumber.api.Scenario; -import cucumber.api.java.Before; -import cucumber.api.java.en.Given; -import cucumber.api.java.en.Then; -import cucumber.api.java.en.When; -import java.io.IOException; -import java.util.HashSet; -import java.util.Set; - -import lombok.extern.java.Log; -import org.opengroup.osdu.common.CleanupIndiciesSteps; -import org.opengroup.osdu.core.common.model.legal.Legal; -import org.opengroup.osdu.util.AWSHTTPClient; -import org.opengroup.osdu.util.LegalTagUtilsAws; -import org.opengroup.osdu.util.ElasticUtilsAws; - -import static org.opengroup.osdu.util.Config.getOtherRelevantDataCountries; - -@Log -public class Steps extends CleanupIndiciesSteps { - - protected LegalTagUtilsAws legalTagUtils; - private String legalTagName; - - public Steps() { - super(new AWSHTTPClient(), new ElasticUtilsAws()); - } - - @Before - public void before(Scenario scenario) throws Exception { - this.scenario = scenario; - this.httpClient = new AWSHTTPClient(); - legalTagUtils = new LegalTagUtilsAws(this.httpClient); - this.legalTagName = this.legalTagUtils.createRandomName(); - this.legalTagUtils.create(this.legalTagName); - } - - @Override - public void tearDown() { - super.tearDown(); - this.legalTagUtils.delete(this.legalTagName); - } - - @Override - protected Legal generateLegalTag() { - Legal legal = new Legal(); - Set<String> legalTags = new HashSet<>(); - legalTags.add(this.legalTagName); - legal.setLegaltags(legalTags); - Set<String> otherRelevantCountries = new HashSet<>(); - otherRelevantCountries.add(getOtherRelevantDataCountries()); - legal.setOtherRelevantDataCountries(otherRelevantCountries); - return legal; - } - - @Given("^the schema is created with the following kind$") - public void theSchemaIsCreatedWithTheFollowingKind(DataTable dataTable) { - super.theSchemaIsCreatedWithTheFollowingKind(dataTable); - } - - @When("^I ingest records with the \"(.*?)\" with \"(.*?)\" for a given \"(.*?)\"$") - public void iIngestRecordsWithTheforAGiven(String record, String dataGroup, String kind) { - super.iIngestRecordsWithTheforAGiven(record, dataGroup, kind); - } - - @Then("^I check that the index for \"(.*?)\" has been created$") - public void iCheckThatTheIndexForHasBeenCreated(String kind) throws IOException, InterruptedException { - super.iCheckThatTheIndexForHasBeenCreated(kind); - } - - @Then("^I should delete the records I created earlier$") - public void iShouldDeleteTheRecordsForICreatedEarlier() { - super.iShouldDeleteTheRecordsForICreatedEarlier(); - } - - @Then("^I should delete the schema for \"(.*?)\" I created earlier$") - public void iShouldDeleteTheSchemaForICreatedEarlier(String kind) { - super.iShouldDeleteTheSchemaForICreatedEarlier(kind); - } - - @Then("^I should check that the index for \"(.*?)\" has not been deleted$") - public void iShouldCheckThetTheIndexforHasNotBeenDeleted(String kind) throws IOException, InterruptedException { - super.iShouldCheckThetTheIndexforHasNotBeenDeleted(kind); - } - - @Then("^I should to run cleanup of indexes for \"(.*?)\" and \"(.*?)\"$") - public void iShouldToRunCleanupOfIndexesForAnd(String kind, String message) { - super.iShouldToRunCleanupOfIndexesForAnd(kind, message); - } - - @Then("^I should check that the index for \"(.*?)\" has been deleted$") - public void iShouldCheckThatTheIndexForHasBeenDeleted(String kind) throws IOException, InterruptedException { - super.iShouldCheckThatTheIndexForHasBeenDeleted(kind); - } -} \ No newline at end of file diff --git a/testing/indexer-test-core/src/main/java/org/opengroup/osdu/common/CleanupIndiciesSteps.java b/testing/indexer-test-core/src/main/java/org/opengroup/osdu/common/CleanupIndiciesSteps.java deleted file mode 100644 index d348fd9d2a48fb4daaad6099f4609fea20882329..0000000000000000000000000000000000000000 --- a/testing/indexer-test-core/src/main/java/org/opengroup/osdu/common/CleanupIndiciesSteps.java +++ /dev/null @@ -1,193 +0,0 @@ -/* - Copyright 2020 Google LLC - Copyright 2020 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 - - 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.common; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; -import static org.opengroup.osdu.util.Config.getEntitlementsDomain; -import static org.opengroup.osdu.util.Config.getIndexerBaseURL; -import static org.opengroup.osdu.util.Config.getStorageBaseURL; -import com.google.gson.Gson; -import com.google.gson.reflect.TypeToken; -import com.sun.jersey.api.client.ClientResponse; -import cucumber.api.DataTable; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import javax.ws.rs.HttpMethod; -import lombok.extern.java.Log; -import org.apache.http.HttpStatus; -import org.opengroup.osdu.core.common.model.entitlements.Acl; -import org.opengroup.osdu.core.common.model.search.RecordChangedMessages; -import org.opengroup.osdu.models.Setup; -import org.opengroup.osdu.models.TestIndex; -import org.opengroup.osdu.util.FileHandler; -import org.opengroup.osdu.util.HTTPClient; -import org.opengroup.osdu.util.ElasticUtils; - -@Log -public class CleanupIndiciesSteps extends TestsBase { - private final String timeStamp = String.valueOf(System.currentTimeMillis()); - private Map<String, TestIndex> inputIndexMap = new HashMap<>(); - private List<Map<String, Object>> records; - private boolean shutDownHookAdded = false; - private final Map<String, String> headers = httpClient.getCommonHeader(); - - public CleanupIndiciesSteps(HTTPClient httpClient) { - super(httpClient); - } - - public CleanupIndiciesSteps(HTTPClient httpClient, ElasticUtils elasticUtils) { - super(httpClient, elasticUtils); - } - - - public void theSchemaIsCreatedWithTheFollowingKind(DataTable dataTable) { - List<Setup> inputList = dataTable.asList(Setup.class); - for (Setup input : inputList) { - TestIndex testIndex = getTextIndex(); - testIndex.setHttpClient(httpClient); - testIndex.setIndex(generateActualName(input.getIndex(), timeStamp)); - testIndex.setKind(generateActualName(input.getKind(), timeStamp)); - testIndex.setSchemaFile(input.getSchemaFile()); - inputIndexMap.put(testIndex.getKind(), testIndex); - } - - if (!shutDownHookAdded) { - shutDownHookAdded = true; - for (Map.Entry<String, TestIndex> kind : inputIndexMap.entrySet()) { - kind.getValue().setupSchema(); - } - } - } - - public void iIngestRecordsWithTheforAGiven(String record, String dataGroup, String kind) { - String actualKind = generateActualName(kind, timeStamp); - try { - String fileContent = FileHandler.readFile(String.format("%s.%s", record, "json")); - records = new Gson().fromJson(fileContent, new TypeToken<List<Map<String, Object>>>() {}.getType()); - - for (Map<String, Object> testRecord : records) { - testRecord.put("kind", actualKind); - testRecord.put("id", generateActualId(testRecord.get("id").toString(), timeStamp, actualKind)); - testRecord.put("legal", generateLegalTag()); - String[] x_acl = {generateActualName(dataGroup,timeStamp)+"."+getEntitlementsDomain()}; - Acl acl = Acl.builder().viewers(x_acl).owners(x_acl).build(); - testRecord.put("acl", acl); - } - String payLoad = new Gson().toJson(records); - ClientResponse clientResponse = httpClient.send(HttpMethod.PUT, getStorageBaseURL() + "records", payLoad, headers, httpClient.getAccessToken()); - assertEquals(201, clientResponse.getStatus()); - } catch (Exception ex) { - throw new AssertionError(ex.getMessage()); - } - } - - public void iCheckThatTheIndexForHasBeenCreated(String kind) throws IOException, InterruptedException { - assertTrue(isNewIndexCreated(generateActualName(kind, timeStamp))); - } - - public void iShouldDeleteTheRecordsForICreatedEarlier() { - List<Map<String, Object>> deletedRecords = new ArrayList<>(); - if (records != null && !records.isEmpty()) { - for (Map<String, Object> testRecord : records) { - String id = testRecord.get("id").toString(); - ClientResponse clientResponse = httpClient.send(HttpMethod.DELETE, getStorageBaseURL() - + "records/" + id, null, headers, httpClient.getAccessToken()); - if (clientResponse.getStatus() == 204) { - deletedRecords.add(testRecord); - log.info("Deleted the records with id " + id); - } - } - assertEquals(records.size(), deletedRecords.size()); - } - } - - public void iShouldDeleteTheSchemaForICreatedEarlier(String kind) { - ClientResponse response = httpClient.send(HttpMethod.DELETE, - String.format("%sschemas%s", getStorageBaseURL(), "/" + generateActualName(kind, timeStamp)),null, - headers, httpClient.getAccessToken()); - assertEquals(HttpStatus.SC_NO_CONTENT, response.getStatus()); - } - - public void iShouldCheckThetTheIndexforHasNotBeenDeleted(String kind) throws IOException, InterruptedException { - assertTrue(isNewIndexExist(generateActualName(kind, timeStamp))); - } - - public void iShouldToRunCleanupOfIndexesForAnd(String kind, String message) { - - String url = getIndexerBaseURL() + "index-cleanup"; - log.info("URL: " + url); - ClientResponse response = httpClient.send(HttpMethod.POST, url, - convertMessageIntoJson(kind, message), headers, httpClient.getAccessToken()); - assertEquals(HttpStatus.SC_OK, response.getStatus()); - } - - public void iShouldCheckThatTheIndexForHasBeenDeleted(String kind) throws IOException, InterruptedException { - assertFalse(isNewIndexExist(generateActualName(kind, timeStamp))); - } - - private String convertMessageIntoJson(String kind, String message) { - String actualKind = generateActualName(kind, timeStamp); - RecordChangedMessages recordChangedMessages = (new Gson()).fromJson(String.format(message, - actualKind, actualKind, timeStamp), RecordChangedMessages.class); - return new Gson().toJson(recordChangedMessages); - } - - private boolean isNewIndexExist(String index) throws IOException { - return elasticUtils.isIndexExist(index.replace(":", "-")); - } - - private boolean isNewIndexCreated(String index) throws IOException, InterruptedException { - int iterator; - boolean indexExist = false; - - // index.refresh_interval is set to default 30s, wait for 40s initially - Thread.sleep(40000); - - for (iterator = 0; iterator < 20; iterator++) { - indexExist = elasticUtils.isIndexExist(index.replace(":", "-")); - if (indexExist) { - break; - } else { - Thread.sleep(5000); - } - if ((iterator + 1) % 5 == 0) { - elasticUtils.refreshIndex(index.replace(":", "-")); - } - } - if (iterator >= 20) { - fail(String.format("index not created after waiting for %s seconds", ((40000 + iterator * 5000) / 1000))); - } - return indexExist; - } - - @Override - protected String getApi() { - return null; - } - - @Override - protected String getHttpMethod() { - return null; - } -} diff --git a/testing/indexer-test-core/src/main/resources/features/indexrecord/IndexRecord.feature b/testing/indexer-test-core/src/main/resources/features/indexrecord/IndexRecord.feature deleted file mode 100644 index a06fa2efcbcb9107b184934c0304bf105afbb85e..0000000000000000000000000000000000000000 --- a/testing/indexer-test-core/src/main/resources/features/indexrecord/IndexRecord.feature +++ /dev/null @@ -1,28 +0,0 @@ -Feature: Indexing of the documents - This feature deals with validation of the documents in Elastic Search ingested with different kinds and attributes. - - Background: - Given the schema is created with the following kind - | kind | index | schemaFile | - | tenant1:testindex<timestamp>:well:1.0.0 | tenant1-testindex<timestamp>-well-1.0.0 | index_records_1 | - | tenant1:testindex<timestamp>:well:2.0.0 | tenant1-testindex<timestamp>-well-2.0.0 | index_records_2 | - | tenant1:testindex<timestamp>:well:3.0.0 | tenant1-testindex<timestamp>-well-3.0.0 | index_records_3 | - - Scenario Outline: Ingest the record and Index in the Elastic Search - When I ingest records with the <recordFile> with <acl> for a given <kind> - Then I should get the <number> documents for the <index> in the Elastic Search - Then I should get the elastic <mapping> for the <type> and <index> in the Elastic Search - - Examples: - | kind | recordFile | number | index | type | acl | mapping | - | "tenant1:testindex<timestamp>:well:1.0.0" | "index_records_1" | 5 | "tenant1-testindex<timestamp>-well-1.0.0" | "well" | "data.default.viewers@tenant1" | "{"mappings":{"well":{"dynamic":"false","properties":{"acl":{"properties":{"owners":{"type":"keyword"},"viewers":{"type":"keyword"}}},"ancestry":{"properties":{"parents":{"type":"keyword"}}},"data":{"properties":{"Basin":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"Country":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"County":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"EmptyAttribute":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"Established":{"type":"date"},"Field":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"Location":{"type":"geo_point"},"OriginalOperator":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"Rank":{"type":"integer"},"Score":{"type":"integer"},"State":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"WellName":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"WellStatus":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"WellType":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"DblArray":{"type":"double"}}},"id":{"type":"keyword"},"index":{"properties":{"lastUpdateTime":{"type":"date"},"statusCode":{"type":"integer"},"trace":{"type":"text"}}},"kind":{"type":"keyword"},"legal":{"properties":{"legaltags":{"type":"keyword"},"otherRelevantDataCountries":{"type":"keyword"},"status":{"type":"keyword"}}},"namespace":{"type":"keyword"},"type":{"type":"keyword"},"version":{"type":"long"},"x-acl":{"type":"keyword"}}}}}" | - | "tenant1:testindex<timestamp>:well:3.0.0" | "index_records_1" | 5 | "tenant1-testindex<timestamp>-well-3.0.0" | "well" | "data.default.viewers@tenant1" | "{"mappings":{"well":{"dynamic":"false","properties":{"acl":{"properties":{"owners":{"type":"keyword"},"viewers":{"type":"keyword"}}},"ancestry":{"properties":{"parents":{"type":"keyword"}}},"data":{"properties":{"Basin":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"Country":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"County":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"EmptyAttribute":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"Established":{"type":"date"},"Field":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"Location":{"type":"geo_point"},"OriginalOperator":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"Rank":{"type":"integer"},"Score":{"type":"integer"},"State":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"WellName":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"WellStatus":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"WellType":{"type":"text","fields":{"keyword":{"type":"keyword","null_value":"null","ignore_above":256}}},"DblArray":{"type":"double"}}},"id":{"type":"keyword"},"index":{"properties":{"lastUpdateTime":{"type":"date"},"statusCode":{"type":"integer"},"trace":{"type":"text"}}},"kind":{"type":"keyword"},"legal":{"properties":{"legaltags":{"type":"keyword"},"otherRelevantDataCountries":{"type":"keyword"},"status":{"type":"keyword"}}},"namespace":{"type":"keyword"},"type":{"type":"keyword"},"version":{"type":"long"},"x-acl":{"type":"keyword"}}}}}" | - - Scenario Outline: Ingest the record and Index in the Elastic Search with bad attribute - When I ingest records with the <recordFile> with <acl> for a given <kind> - Then I should get the <number> documents for the <index> in the Elastic Search with out <skippedAttribute> - - Examples: - | kind | recordFile | number | index | skippedAttribute | acl | - | "tenant1:testindex<timestamp>:well:2.0.0" | "index_records_2" | 4 | "tenant1-testindex<timestamp>-well-2.0.0" | "data.Location" | "data.default.viewers@tenant1" | - | "tenant1:testindex<timestamp>:well:3.0.0" | "index_records_3" | 7 | "tenant1-testindex<timestamp>-well-3.0.0" | "data.GeoShape" | "data.default.viewers@tenant1" | diff --git a/testing/indexer-test-core/src/main/resources/testData/records_1.json b/testing/indexer-test-core/src/main/resources/testData/records_1.json deleted file mode 100644 index 33c85b80d024481be7ae416ba9bf6865fef2aa4c..0000000000000000000000000000000000000000 --- a/testing/indexer-test-core/src/main/resources/testData/records_1.json +++ /dev/null @@ -1,113 +0,0 @@ -[ - { - "id": "tenant1:well:1.0.0:1", - "kind": "<Kind>", - "namespace": "tenant1:testdatasource", - "type": "well", - "acl": "{viewers=[<Data-Group>], owners=[<Data-Group>]}", - "x-acl": [ - "<Data-Group>" - ], - "legal": { - "legaltags": [ - "<Legal-Tag>" - ], - "otherRelevantDataCountries": [ - "<Country>" - ], - "status": "compliant" - }, - "data": { - "Field": "OSDU OFFICE - 1", - "Location": "18.5204,73.8567", - "Basin": "India", - "State": "Maharashtra", - "Country": "India", - "WellStatus": "Under development", - "OriginalOperator": "OFFICE1", - "WellName": "Data Platform Services", - "WellType": "Data Lake Cloud", - "EmptyAttribute": "", - "Rank": 1, - "Score": 10, - "Established": "1990-03-27T23:38:48Z" - }, - "index": { - "statusCode": 200, - "lastUpdateTime": "2018-10-04T10:11:22.303000" - } - }, - { - "id": "tenant1:well:1.0.0:2", - "kind": "<Kind>", - "namespace": "tenant1:testdatasource", - "type": "well", - "acl": "{viewers=[<Data-Group>], owners=[<Data-Group>]}", - "x-acl": [ - "<Data-Group>" - ], - "legal": { - "legaltags": [ - "<Legal-Tag>" - ], - "otherRelevantDataCountries": [ - "<Country>" - ], - "status": "compliant" - }, - "data": { - "Field": "OSDU OFFICE - 3", - "Location": "29.749655,-95.473476", - "Basin": "KATY", - "County": "Waller", - "State": "TEXAS", - "Country": "United States", - "WellStatus": "Under development", - "OriginalOperator": "OFFICE3", - "WellName": "Data Platform Services", - "WellType": "Data Lake Cloud", - "EmptyAttribute": "", - "Rank": 2, - "Score": 12, - "Established": "2010-03-27T20:38:48Z" - }, - "index": { - "statusCode": 200, - "lastUpdateTime": "2018-10-04T10:11:22.303000" - } - }, - { - "id": "tenant1:well:1.0.0:3", - "kind": "<Kind>", - "namespace": "tenant1:testdatasource", - "type": "well", - "acl": "{viewers=[<Data-Group>], owners=[<Data-Group>]}", - "x-acl": [ - "<Data-Group>" - ], - "legal": { - "legaltags": [ - "<Legal-Tag>" - ], - "otherRelevantDataCountries": [ - "<Country>" - ], - "status": "compliant" - }, - "data": { - "Field": "OSDU OFFICE - 4", - "Location": "29.6197,-95.6349", - "WellStatus": "Under development", - "OriginalOperator": "OFFICE4", - "WellName": "Data Platform Services", - "WellType": "Data Lake Cloud", - "EmptyAttribute": "", - "Rank": 20, - "Established": "2018-03-27T23:38:48Z" - }, - "index": { - "statusCode": 200, - "lastUpdateTime": "2018-10-04T10:11:22.303000" - } - } -] \ No newline at end of file diff --git a/testing/indexer-test-core/src/main/resources/testData/records_1.mapping b/testing/indexer-test-core/src/main/resources/testData/records_1.mapping deleted file mode 100644 index 311cb573db3d78dcb9d3e1a67721e7fd14b2a6e7..0000000000000000000000000000000000000000 --- a/testing/indexer-test-core/src/main/resources/testData/records_1.mapping +++ /dev/null @@ -1,92 +0,0 @@ -{ -"dynamic":false, - "properties": { - "id": { - "type": "keyword" - }, - "kind": { - "type": "keyword" - }, - "namespace": { - "type": "keyword" - }, - "type": { - "type": "keyword" - }, - "version": { - "type": "keyword" - }, - "x-acl": { - "type": "keyword" - }, - "acl": { - "properties": { - "owners": { - "type": "keyword" - }, - "viewers": { - "type": "keyword" - } - } - }, - "legal": { - "properties": { - "legaltags": { - "type": "keyword" - }, - "otherRelevantDataCountries": { - "type": "keyword" - }, - "status": { - "type": "keyword" - } - } - }, - "data": { - "properties": { - "Field": { - "type": "text" - }, - "Location": { - "type": "geo_point" - }, - "Basin": { - "type": "text" - }, - "County": { - "type": "text" - }, - "State": { - "type": "text" - }, - "Country": { - "type": "text" - }, - "WellStatus": { - "type": "text" - }, - "OriginalOperator": { - "type": "text" - }, - "WellName": { - "type": "text" - }, - "WellType": { - "type": "text" - }, - "EmptyAttribute": { - "type": "text" - }, - "Rank": { - "type": "integer" - }, - "Score": { - "type": "integer" - }, - "Established": { - "type": "date" - } - } - } - } -} \ No newline at end of file diff --git a/testing/indexer-test-core/src/main/resources/testData/records_2.json b/testing/indexer-test-core/src/main/resources/testData/records_2.json deleted file mode 100644 index 9227d617e772aeb1d1fd0196b3540d04e9ca62ae..0000000000000000000000000000000000000000 --- a/testing/indexer-test-core/src/main/resources/testData/records_2.json +++ /dev/null @@ -1,109 +0,0 @@ -[ - { - "id": "tenant1:well:2.0.0:1", - "kind": "<kind>", - "acl": "{viewers=[<Data-Group>], owners=[<Data-Group>]}", - "x-acl": [ - "<Data-Group>" - ], - "legal": { - "legaltags": [ - "<Legal-Tag>" - ], - "otherRelevantDataCountries": [ - "<Country>" - ], - "status": "compliant" - }, - "data": { - "Field": "OSDU OFFICE - 2", - "Location": "29.7604,-95.3698", - "Basin": "Houston", - "County": "Harris", - "State": "TX", - "Country": "USA", - "WellStatus": "Under development", - "OriginalOperator": "OFFICE2", - "WellName": "Data Platform Services", - "WellType": "Data Lake Cloud", - "EmptyAttribute": "", - "Rank": 1, - "Score": 10, - "Established": "2000-03-27T23:38:48Z" - }, - "index": { - "statusCode": 200, - "lastUpdateTime": "2018-10-04T10:11:22.303000" - } - }, - { - "id": "tenant1:well:2.0.0:2", - "kind": "<kind>", - "acl": "{viewers=[<Data-Group>], owners=[<Data-Group>]}", - "x-acl": [ - "<Data-Group>" - ], - "legal": { - "legaltags": [ - "<Legal-Tag>" - ], - "otherRelevantDataCountries": [ - "<Country>" - ], - "status": "compliant" - }, - "data": { - "Field": "OSDU OFFICE - 5", - "Location": "37.3861,-122.0839", - "Basin": "Mountain View", - "County": "Orange", - "State": "CA", - "Country": "USA", - "WellStatus": "Under development", - "OriginalOperator": "OFFICE5", - "WellName": "Data Platform Services", - "WellType": "Lake Cloud", - "EmptyAttribute": "", - "Rank": 2, - "Score": 5, - "Established": "1980-03-27T20:38:48Z" - }, - "index": { - "statusCode": 200, - "lastUpdateTime": "2018-10-04T10:11:22.303000" - } - }, - { - "id": "tenant1:well:2.0.0:3", - "kind": "<kind>", - "acl": "{viewers=[<Data-Group>], owners=[<Data-Group>]}", - "x-acl": [ - "<Data-Group>" - ], - "legal": { - "legaltags": [ - "<Legal-Tag>" - ], - "otherRelevantDataCountries": [ - "<Country>" - ], - "status": "compliant" - }, - "data": { - "Field": "OSDU OFFICE - 6", - "Location": "43.6108, 3.8767", - "WellStatus": "Under development", - "OriginalOperator": "OFFICE6", - "Country": "France", - "WellName": "Data Platform Services", - "WellType": "Data Lake Cloud", - "EmptyAttribute": "", - "Rank": 20, - "Established": "2005-03-27T23:38:48Z" - }, - "index": { - "statusCode": 200, - "lastUpdateTime": "2018-10-04T10:11:22.303000" - } - } -] \ No newline at end of file diff --git a/testing/indexer-test-core/src/main/resources/testData/records_2.mapping b/testing/indexer-test-core/src/main/resources/testData/records_2.mapping deleted file mode 100644 index 362ad772264ebe956532edee74a283c2a5e112b8..0000000000000000000000000000000000000000 --- a/testing/indexer-test-core/src/main/resources/testData/records_2.mapping +++ /dev/null @@ -1,89 +0,0 @@ -{ -"dynamic":false, - "properties": { - "id": { - "type": "keyword" - }, - "kind": { - "type": "keyword" - }, - "namespace": { - "type": "keyword" - }, - "type": { - "type": "keyword" - }, - "version": { - "type": "keyword" - }, - "x-acl": { - "type": "keyword" - }, - "acl": { - "properties": { - "owners": { - "type": "keyword" - }, - "viewers": { - "type": "keyword" - } - } - }, - "legal": { - "properties": { - "legaltags": { - "type": "keyword" - }, - "otherRelevantDataCountries": { - "type": "keyword" - }, - "status": { - "type": "keyword" - } - } - }, - "data": { - "properties": { - "Field": { - "type": "text" - }, - "Location": { - "type": "geo_point" - }, - "Basin": { - "type": "text" - }, - "County": { - "type": "text" - }, - "State": { - "type": "text" - }, - "Country": { - "type": "text" - }, - "WellStatus": { - "type": "text" - }, - "OriginalOperator": { - "type": "text" - }, - "WellName": { - "type": "text" - }, - "WellType": { - "type": "text" - }, - "EmptyAttribute": { - "type": "text" - }, - "Rank": { - "type": "integer" - }, - "Established": { - "type": "date" - } - } - } - } -} \ No newline at end of file diff --git a/testing/indexer-test-core/src/main/resources/testData/records_3.json b/testing/indexer-test-core/src/main/resources/testData/records_3.json deleted file mode 100644 index 697644cc7d20c7a768d3cc55183a9d4a788e99cb..0000000000000000000000000000000000000000 --- a/testing/indexer-test-core/src/main/resources/testData/records_3.json +++ /dev/null @@ -1,116 +0,0 @@ -[ - { - "id": "tenant1:well:1.0.0:1", - "kind": "<Kind>", - "namespace": "tenant1:testdatasource", - "type": "well", - "acl": "{viewers=[<Data-Group>], owners=[<Data-Group>]}", - "x-acl": [ - "<Data-Group>" - ], - "legal": { - "legaltags": [ - "<Legal-Tag>" - ], - "otherRelevantDataCountries": [ - "<Country>" - ], - "status": "compliant" - }, - "data": { - "Field": "OSDU OFFICE - 1", - "Location": "18.5204,73.8567", - "Basin": "India", - "State": "Maharashtra", - "Country": "India", - "WellStatus": "Under development", - "OriginalOperator": "OFFICE1", - "WellName": "Data Platform Services", - "WellType": "Data Lake Cloud", - "EmptyAttribute": "", - "Rank": 1, - "Score": 10, - "Established": "1990-03-27T23:38:48Z", - "Center": "OFFICE -1" - }, - "index": { - "statusCode": 200, - "lastUpdateTime": "2018-10-04T10:11:22.303000" - } - }, - { - "id": "tenant1:well:1.0.0:2", - "kind": "<Kind>", - "namespace": "tenant1:testdatasource", - "type": "well", - "acl": "{viewers=[<Data-Group>], owners=[<Data-Group>]}", - "x-acl": [ - "<Data-Group>" - ], - "legal": { - "legaltags": [ - "<Legal-Tag>" - ], - "otherRelevantDataCountries": [ - "<Country>" - ], - "status": "compliant" - }, - "data": { - "Field": "OSDU OFFICE - 3", - "Location": "29.749655,-95.473476", - "Basin": "KATY", - "County": "Waller", - "State": "TEXAS", - "Country": "United States", - "WellStatus": "Under development", - "OriginalOperator": "KDFC", - "WellName": "Data Platform Services", - "WellType": "Data Lake Cloud", - "EmptyAttribute": "", - "Rank": 2, - "Score": 12, - "Established": "2010-03-27T20:38:48Z", - "Center": "KATY" - }, - "index": { - "statusCode": 200, - "lastUpdateTime": "2018-10-04T10:11:22.303000" - } - }, - { - "id": "tenant1:well:1.0.0:3", - "kind": "<Kind>", - "namespace": "tenant1:testdatasource", - "type": "well", - "acl": "{viewers=[<Data-Group>], owners=[<Data-Group>]}", - "x-acl": [ - "<Data-Group>" - ], - "legal": { - "legaltags": [ - "<Legal-Tag>" - ], - "otherRelevantDataCountries": [ - "<Country>" - ], - "status": "compliant" - }, - "data": { - "Field": "OSDU OFFICE - 4", - "Location": "29.6197,-95.6349", - "WellStatus": "Under development", - "OriginalOperator": "OFFICE4", - "WellName": "Data Platform Services", - "WellType": "Data Lake Cloud", - "EmptyAttribute": "", - "Rank": 20, - "Established": "2018-03-27T23:38:48Z", - "Center": "SUGARLAND" - }, - "index": { - "statusCode": 200, - "lastUpdateTime": "2018-10-04T10:11:22.303000" - } - } -] \ No newline at end of file diff --git a/testing/indexer-test-core/src/main/resources/testData/records_3.mapping b/testing/indexer-test-core/src/main/resources/testData/records_3.mapping deleted file mode 100644 index 3823c22a974043897938553841de212c1d2b50a1..0000000000000000000000000000000000000000 --- a/testing/indexer-test-core/src/main/resources/testData/records_3.mapping +++ /dev/null @@ -1,100 +0,0 @@ -{ -"dynamic":false, - "properties": { - "id": { - "type": "keyword" - }, - "kind": { - "type": "keyword" - }, - "namespace": { - "type": "keyword" - }, - "type": { - "type": "keyword" - }, - "version": { - "type": "keyword" - }, - "x-acl": { - "type": "keyword" - }, - "acl": { - "properties": { - "owners": { - "type": "keyword" - }, - "viewers": { - "type": "keyword" - } - } - }, - "legal": { - "properties": { - "legaltags": { - "type": "keyword" - }, - "otherRelevantDataCountries": { - "type": "keyword" - }, - "status": { - "type": "keyword" - } - } - }, - "data": { - "properties": { - "Field": { - "type": "text" - }, - "Location": { - "type": "geo_point" - }, - "Basin": { - "type": "text" - }, - "County": { - "type": "text" - }, - "State": { - "type": "text" - }, - "Country": { - "type": "text" - }, - "WellStatus": { - "type": "text" - }, - "OriginalOperator": { - "type": "text" - }, - "WellName": { - "type": "text" - }, - "WellType": { - "type": "text" - }, - "EmptyAttribute": { - "type": "text" - }, - "Rank": { - "type": "integer" - }, - "Score": { - "type": "integer" - }, - "Established": { - "type": "date" - }, - "Center": { - "type": "text", - "fields": { - "raw": { - "type": "keyword" - } - } - } - } - } - } -} \ No newline at end of file