Commit Graph

6007 Commits

Author SHA1 Message Date
Owais Kazi 996d33adb2
Run spotless and exclude checkstyle on server module (#1380)
Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
2021-10-19 08:32:54 -04:00
Saurabh Singh 24fd89a1fd
Minor fix for the flaky test to reduce concurrency (#1361) (#1364)
Fixes flakiness for test testReplicaThreadedThroughputDegradationAndRejection.

Reduced the number of threads concurrently executing from the initial range between (100-120) to a new range between (80-100), as the previous range was breaking the node limits set as 10kb, for every execution where number of threads were greater than 110.

Signed-off-by: Saurabh Singh <sisurab@amazon.com>
2021-10-14 15:25:17 -07:00
Andriy Redko 3779576c51
Modernize and consolidate JDKs usage across all stages of the build. Use JDK-17 as bundled JDK distribution to run tests (#1358)
* Modernize and consolidate JDKs usage across all stages of the build. Use JDK-17 as bundled JDK distribution to run tests

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>

* Using -Djava.security.egd=file:/dev/urandom explicitly for cli tests

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2021-10-13 17:25:48 -04:00
Andriy Redko e9635d6bfe
Replace securemock with mock-maker (test support), update Mockito to 3.12.4 (#1332)
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2021-10-10 14:18:54 -04:00
Saurabh Singh 3665daf5d0
Add Shard Level Indexing Pressure (#1336)
Shard level indexing pressure improves the current Indexing Pressure framework which performs memory accounting at node level and rejects the requests. This takes a step further to have rejections based on the memory accounting at shard level along with other key performance factors like throughput and last successful requests. 

**Key features**
- Granular tracking of indexing tasks performance, at every shard level, for each node role i.e. coordinator, primary and replica.
- Smarter rejections by discarding the requests intended only for problematic index or shard, while still allowing others to continue (fairness in rejection).
- Rejections thresholds governed by combination of configurable parameters (such as memory limits on node) and dynamic parameters (such as latency increase, throughput degradation).
- Node level and shard level indexing pressure statistics exposed through stats api.
- Integration of Indexing pressure stats with Plugins for for metric visibility and auto-tuning in future.
- Control knobs to tune to the key performance thresholds which control rejections, to address any specific requirement or issues.
- Control knobs to run the feature in shadow-mode or enforced-mode. In shadow-mode only internal rejection breakdown metrics will be published while no actual rejections will be performed.

The changes were divided into small manageable chunks as part of the following PRs against a feature branch.

- Add Shard Indexing Pressure Settings. #716
- Add Shard Indexing Pressure Tracker. #717
- Refactor IndexingPressure to allow extension. #718
- Add Shard Indexing Pressure Store #838
- Add Shard Indexing Pressure Memory Manager #945
- Add ShardIndexingPressure framework level construct and Stats #1015
- Add Indexing Pressure Service which acts as orchestrator for IP #1084
- Add plumbing logic for IndexingPressureService in Transport Actions. #1113
- Add shard indexing pressure metric/stats via rest end point. #1171
- Add shard indexing pressure integration tests. #1198

Signed-off-by: Saurabh Singh <sisurab@amazon.com>
Co-authored-by: Saurabh Singh <sisurab@amazon.com>
Co-authored-by: Rabi Panda <adnapibar@gmail.com>
2021-10-07 11:06:15 -07:00
Andriy Redko d46c206f29
[BUG] ConcurrentSnapshotsIT#testAssertMultipleSnapshotsAndPrimaryFailOver fails intermittently (#1311)
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2021-09-30 12:44:29 -04:00
Andriy Redko 180db5cd09
Support for Heap after GC stats (correction after backport to 1.2.0) (#1315)
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2021-09-30 09:48:24 -04:00
Andriy Redko 80388a8a29
Support for Heap after GC stats (#1265)
* Support for Heap after GC stats

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>

* Addressing code review comments

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>

* Using the right version 2.0.0 (instead of 1.2.0) for the change

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2021-09-28 14:40:00 -04:00
Shivansh Arora 416220f510
Making GeneralScriptException an Implementation of OpensearchWrapperException (#1066)
Signed-off-by: Shivansh Arora <hishiv@amazon.com>
2021-09-28 12:17:43 -04:00
Nick Knize 46e0f63539
[Tests] Translog Pruning tests to MetadataCreateIndexServiceTests (#1295)
This commit adds test coverage for translog pruning setting to
MetadataCreateIndexServiceTests

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-09-25 23:05:32 -05:00
Sai 29c88c6900
Rename translog pruning setting to CCR specific setting and addressed Bug in the test case (#1243)
* Rename translog pruing setting to CCR specific setting

Signed-off-by: Sai Kumar <karanas@amazon.com>

* Rename to index.plugins.replication.translog.retention_lease.pruning.enabled as
index settings needs "index." as prefix

Signed-off-by: Sai Kumar <karanas@amazon.com>

* Add deprecations to retention pruning controls

This commit adds deprecation flags to all added settings, variables, and methods
specific to ccr's retention lease pruning mechanism.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>

* Addressed CR comments

Signed-off-by: Sai Kumar <karanas@amazon.com>

* fix javadoc deprecation

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>

* fix deprecation tag in TranslogDeletionPolicy

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>

* Addressed test issue under translog tests

Signed-off-by: Sai Kumar <karanas@amazon.com>

Co-authored-by: Nicholas Walter Knize <nknize@apache.org>
2021-09-24 16:09:59 -07:00
Bukhtawar Khan 390e678f92
Handle shard over allocation during partial zone/rack or independent node failures (#1149)
The changes ensure that in the event of a partial zone failure, the surviving nodes in the minority zone don't get overloaded with shards, this is governed by a skewness limit.

Signed-off-by: Bukhtawar Khan <bukhtawa@amazon.com>
2021-09-20 10:32:23 -07:00
Bukhtawar Khan f7e2984248
Introduce FS Health HEALTHY threshold to fail stuck node (#1167)
This will cause the leader stuck on IO during publication to step down and eventually trigger a leader election.

Issue Description
---
The publication of cluster state is time bound to 30s by a cluster.publish.timeout settings. If this time is reached before the new cluster state is committed, then the cluster state change is rejected and the leader considers itself to have failed. It stands down and starts trying to elect a new master.

There is a bug in leader that when it tries to publish the new cluster state it first tries acquire a lock to flush the new state under a mutex to disk. The same lock is used to cancel the publication on timeout. Below is the state of the timeout scheduler meant to cancel the publication. So essentially if the flushing of cluster state is stuck on IO, so will the cancellation of the publication since both of them share the same mutex. So leader will not step down and effectively block the cluster from making progress.

Signed-off-by: Bukhtawar Khan <bukhtawa@amazon.com>
2021-09-16 17:02:25 -07:00
Andriy Redko b6c8bdf872
Drop mocksocket in favour of custom security manager checks (tests only) (#1205)
* Drop mocksocket in favour of custom security manager checks (tests only)

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>

* Slightly relaxed host checks to allow all local addresses

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2021-09-16 17:21:47 -04:00
Nick Knize cbbf967d76
[Version] Add 1.2 for BWC testing (#1241)
Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-09-15 09:07:53 -07:00
Sai 7e440af9e4
Changes to support retrieval of operations from translog based on specified range (#1210)
* Changes to support retrieval of operations from translog based on specified range

Signed-off-by: Sai Kumar <karanas@amazon.com>

* Addressed CR comments

Signed-off-by: Sai Kumar <karanas@amazon.com>

* Added testcases for internal engine

Signed-off-by: Sai Kumar <karanas@amazon.com>
2021-09-08 20:22:24 +05:30
Sai a9e1913bd5
Support for translog pruning based on retention leases (#1038)
* Support for translog pruning based on retention leases

Signed-off-by: Sai Kumar <karanas@amazon.com>

* Addressed CR Comments

Signed-off-by: Sai Kumar <karanas@amazon.com>

* Addressed test case issue

Signed-off-by: Sai Kumar <karanas@amazon.com>
2021-09-08 16:23:00 +05:30
Vacha 83332c8ab6
Kept the original constructor for PluginInfo to maintain bwc (#1206) 2021-09-02 18:09:15 -07:00
Nick Knize 4b31e1ba04
[Version] Increment main to 2.0 (#1192)
Increment version on main to 2.0.0.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
Co-authored-by: dblock <dblock@amazon.com>
2021-09-01 22:35:53 -05:00
Andriy Redko 6e199d223b
Restoring alpha/beta/rc version semantics (#1112)
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2021-09-01 18:22:20 -05:00
Nick Knize 3a7f0762ac
[Bug] Fix mixed cluster support for OpenSearch 2+ (#1191)
The version framework only added support for OpenSearch 1.x bwc with legacy
clusters. This commit adds support for v2.0 which will be the last version with
bwc support for legacy clusters (v7.10)

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-09-01 14:45:46 -05:00
Abbas Hussain 91d9922f3b
Reduce iterations to improve test run time (#1168)
Signed-off-by: Abbas Hussain <abbas_10690@yahoo.com>
2021-08-30 23:51:52 +05:30
Abbas Hussain 9b4440d1f6
Tune datanode count and shards count to improve test run time (#1170)
Signed-off-by: Abbas Hussain <abbas_10690@yahoo.com>
2021-08-30 22:33:31 +05:30
Nick Knize 7ed024e2c8
Add 1.0.1 revision (#1152)
This commit stages the branch to the next 1.0.1 patch release. BWC testing needs
this even if the next revision is never actually released.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-08-25 23:11:43 -05:00
Nicholas Walter Knize 33cabe2e45
[Bug] Change 1.0.0 version check in PluginInfo
PluginInfo should use .onOrAfter(Version.V_1_1_0) instead of
.after(Version.V_1_0_0) for the new custom folder name for plugin feature.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-08-25 16:30:11 -05:00
Nick Knize 5ae00456a0
Upgrade to Lucene 8.9 (#1080)
This commit upgrades to the official lucene 8.9 release

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-08-20 11:28:06 -05:00
Nick Knize ff7e7904ca
[DEPRECATE] SimpleFS in favor of NIOFS (#1073)
Lucene 9 removes support for SimpleFS File System format. This commit deprecates
the SimpleFS format in favor of NIOFS.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-08-19 17:56:55 -05:00
Sorabh 93a621f54e
Fix failure in SearchCancellationIT.testMSearchChildReqCancellationWithHybridTimeout (#1103)
In some cases as one shared with issue #1099, the maxConcurrentSearchRequests was chosen as 0 which
will compute the final value during execution of the request based on processor counts. When this
computed value is less than number of search request in msearch request, it will execute all the
requests in multiple iterations causing the failure since test will only wait for one such
iteration. Hence setting the maxConcurrentSearchRequests explicitly to number of search requests
being added in the test to ensure correct behavior

Signed-off-by: Sorabh Hamirwasia <sohami.apache@gmail.com>
2021-08-17 14:10:31 -04:00
Sorabh 9b6e621452
Part 1: Support for cancel_after_timeinterval parameter in search and msearch request (#986)
* Part 1: Support for cancel_after_timeinterval parameter in search and msearch request

This commit introduces the new request level parameter to configure the timeout interval after which
a search request will be cancelled. For msearch request the parameter is supported both at parent
request and at sub child search requests. If it is provided at parent level and child search request
doesn't have it then the parent level value is set at such child request. The parent level msearch
is not used to cancel the parent request as it may be tricky to come up with correct value in cases
when child search request can have different runtimes

TEST: Added test for ser/de with new parameter

Signed-off-by: Sorabh Hamirwasia <sohami.apache@gmail.com>

* Part 2: Support for cancel_after_timeinterval parameter in search and msearch request

This commit adds the handling of the new request level parameter and schedule cancellation task. It
also adds a cluster setting to set a global cancellation timeout for search request which will be
used in absence of request level timeout.

TEST: Added new tests in SearchCancellationIT
Signed-off-by: Sorabh Hamirwasia <sohami.apache@gmail.com>

* Address Review feedback for Part 1

Signed-off-by: Sorabh Hamirwasia <sohami.apache@gmail.com>

* Address review feedback for Part 2

Signed-off-by: Sorabh Hamirwasia <sohami.apache@gmail.com>

* Update CancellableTask to remove the cancelOnTimeout boolean flag

Signed-off-by: Sorabh Hamirwasia <sohami.apache@gmail.com>

* Replace search.cancellation.timeout cluster setting with search.enforce_server.timeout.cancellation to control if cluster level cancel_after_time_interval should take precedence over request level cancel_after_time_interval value

Signed-off-by: Sorabh Hamirwasia <sohami.apache@gmail.com>

* Removing the search.enforce_server.timeout.cancellation cluster setting and just keeping search.cancel_after_time_interval setting with request level parameter taking the precedence.

Signed-off-by: Sorabh Hamirwasia <sohami.apache@gmail.com>

Co-authored-by: Sorabh Hamirwasia <hsorabh@amazon.com>
2021-08-12 11:01:28 -04:00
frotsch c34f9ab75c
Avoid crashing on using the index.lifecycle.name in the API body (#1060)
* Avoid crashing on using the index.lifecycle.name in the API body

Signed-off-by: frotsch <frotsch@mailbox.org>
2021-08-10 11:03:19 -04:00
Bukhtawar Khan fbdc180944
Max scroll limit breach to throw a OpenSearchRejectedExecutionException (#1054)
* Changes the Exception to throw a OpenSearchRejectedExecutionException on max scroll limit breach

Signed-off-by: Bukhtawar Khan bukhtawa@amazon.com
2021-08-10 11:02:04 -04:00
xuezhou25 7d18eaf3a4
Replaced custom built JNA by official JNA distribution. (#1003)
Signed-off-by: Xue Zhou <xuezhou@amazon.com>
2021-08-03 13:52:53 -04:00
Bukhtawar Khan 1a87534c20
Prevent /_cat/master from getting tripped by the CB (#1036)
_cat/master is a fundamental API to know the master instance in the cluster. Given RestClusterState is exempted from tripping already, doesn't make sense for RestMasterAction to trip

Signed-off-by: Bukhtawar Khan bukhtawa@amazon.com
2021-08-02 10:15:42 -07:00
Vlad Rozov b7cf1fae41
Introduce RestHandler.Wrapper to help with delegate implementations (#1004)
Signed-off-by: Vlad Rozov <vrozov@users.noreply.github.com>
2021-07-30 15:17:27 -04:00
Vlad Rozov ee644bdc40
Add unit test for RestActionListener. Validate that onFailure() sends response even when BytesRestResponse can not be constructed using passed exception. Follow up on #923. (#1024)
Signed-off-by: Vlad Rozov <vrozov@users.noreply.github.com>
2021-07-30 14:38:14 -04:00
Vacha 19e54d6624
Allowing custom folder name for plugin installation (#848)
Signed-off-by: Vacha Shah <vachshah@amazon.com>
2021-07-22 04:28:49 +05:30
afazel 23d604571c
Introduce replaceRoutes() method and 2 new constructors to RestHandler.java (#947)
* Add addRoutesPrefix() method to RestHandler.java

Signed-off-by: Azar Fazel <azar.fazel@gmail.com>
2021-07-15 19:14:15 -07:00
Vlad Rozov 854967ff92
Fail fast when BytesRestResponse ctor throws exception (#923)
Signed-off-by: Vlad Rozov <vrozov@users.noreply.github.com>
2021-07-15 14:52:28 -05:00
Chang Liu 7241127c1d
Avoid override of routes() in BaseRestHandler to respect the default behavior defined in RestHandler (#889) 2021-07-14 16:22:39 -05:00
Rabi Panda 4906a3c1b0
A CLI tool to assist during an upgrade to OpenSearch. (#846)
This change adds the initial version of a new CLI tool `opensearch-upgrade` as part of the OpenSearch distribution. This tool is meant for assisting during an upgrade from an existing Elasticsearch v7.10.2/v6.8.0 node to OpenSearch. It automates the process of importing existing configurations and installing of core plugins.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-07-13 09:51:02 -07:00
Daniel Doubrovkine (dB.) 88f17b1822
Cleanup TESTING and DEVELOPER_GUIDE markdowns (#946) 2021-07-12 15:02:56 -05:00
Daniel Doubrovkine (dB.) 5d020170ff
Lower build requirement from Java 14+ to Java 11+ (#940)
* Lower build requirement from Java 14+ to Java 11+

Avoid use of -Werror -Xlint:all, which may change significantly across
java releases (new warnings could be added). Instead, just list the
warnings individually.

Workaround JDK 11 compiler bug (JDK-8209058) that only impacts test fixture
code in the build itself.

Signed-off-by: Robert Muir <rmuir@apache.org>

* Disable warning around -source 7 -release 7 for java version checker

The java version checker triggers some default warnings because it
targets java7:

```
> Task :distribution:tools:java-version-checker:compileJava FAILED
warning: [options] source value 7 is obsolete and will be removed in a future release
warning: [options] target value 7 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
error: warnings found and -Werror specified
```

Suppress this warning explicitly for this module.

Signed-off-by: Robert Muir <rmuir@apache.org>

* more java14 -> java11 cleanup

Signed-off-by: Robert Muir <rmuir@apache.org>

Co-authored-by: Robert Muir <rmuir@apache.org>
2021-07-06 11:55:23 -05:00
Rabi Panda f652e95236
Update favicon for OpenSearch (#932)
Signed-off-by: Rabi Panda <pandarab@amazon.com>
2021-07-02 13:40:28 -07:00
shwetathareja 8082604ec2
Refresh OpenSearch nodes version in cluster state after upgrade (#865)
Signed-off-by: Shweta Thareja <tharejas@amazon.com>

Co-authored-by: Shweta Thareja <tharejas@amazon.com>
2021-07-02 09:03:34 -07:00
Tianli Feng 4a1add9481
Add 'tagline' back to MainResponse in server that was removed in PR #427 (#913)
* Add "tagline" field back to "MainResponse" in sever side (not in rest-high-level-client side) that removed in PR #427 .
* Replace with a new tagline "The OpenSearch Project: https://opensearch.org/".
* Turn the tagline into a constant in server/src/main/java/org/opensearch/action/main/MainResponse.java.
2021-07-01 15:30:29 -07:00
Marc Handalian c91c29e5c2
Remove distribution from main response in compatibility mode (#898)
This Change removes version.distribution when the version.number is
overridden with the cluster setting compatibility.override_main_response_version.

Signed-off-by: Marc Handalian <handalm@amazon.com>
2021-06-30 17:36:21 -07:00
Vlad Rozov 362f116abe
Replace metadata keys in OpenSearchException during serialization and deserialization (#905)
Signed-off-by: Vlad Rozov <vrozov@users.noreply.github.com>
2021-06-30 11:39:26 -07:00
Nick Knize ef1cbd9e3d
Version bump for 1.1 release (#772)
Bumps the minor to 1.1 for the 1.0 release.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-06-28 09:58:27 -05:00
Marc Handalian c1250c963d
Add cluster setting to spoof version number returned from MainResponse (#847)
This change adds a new cluster setting "compatibility.override_main_response_version"
that when enabled spoofs the version.number returned from MainResponse
for REST clients expecting legacy version 7.10.2.

Signed-off-by: Marc Handalian <handalm@amazon.com>
2021-06-22 10:42:23 -07:00
itiyamas 11babe7782
Decouple throttling limits for new and old indices. (#778)
* Decouple throttling limits for new and old indices.

Signed-off-by: Itiyama <itiyamas@amazon.com>

* Precommit fixes.

Signed-off-by: Itiyama <itiyamas@amazon.com>

* Review comments.

Signed-off-by: Itiyama <itiyamas@amazon.com>

* Review comments and test fix.

Signed-off-by: Itiyama <itiyamas@amazon.com>

* Checkstyle fixes.

Signed-off-by: Itiyama <itiyamas@amazon.com>

* Review comments.

Signed-off-by: Itiyama <itiyamas@amazon.com>
2021-06-17 10:58:50 +05:30
jayesh hathila 3cd4e7ff54
Verbose plugin not found exception (#849)
* Add Plugin name for verbose Plugin not found exception
* Make the plugin loading failure exception more verbose
* Throw Opensearch in place of RuntimeException for plugin load failure
* Nit fix, added ... to make logging standout

Signed-off-by: Jayesh Hathila <sharma.jayesh52@gmail.com>
2021-06-15 15:12:01 -04:00
Tianli Feng 110cef7882
Fix resource leak issues suggested by Amazon CodeGuru (#816)
* Address a kind of issue suggested by Amazon CodeGuru Reviewer:

* Add try-with-resources block to automatically close the resources after using to avoid resource leak, in `SymbolicLinkPreservingTarIT`, `LicenseAnalyzer`, `SymbolicLinkPreservingUntarTransform`, `ConcurrentSeqNoVersioningIT` in `VersionProperties`, `GeoFilterIT`, `XContentHelper`,  `Json` and `IndexShard` class

* Add try-finally block to close the resources after using to avoid resource leak, in `ServerChannelContext` class.

* Add try-catch block to close the resources when exception occurs in `FsBlobContainer` class (when XContentFactory.xContentType throws an exception).

* Close resources when assertion error occurs, in `ServerChannelContext` class.
2021-06-15 09:31:36 -07:00
Marc Handalian da78b889c8
Remove checks for legacy .yaml and .json config files. (#792)
Signed-off-by: Marc Handalian <handalm@amazon.com>
2021-06-03 15:09:57 -04:00
Daniel Doubrovkine (dB.) bd9ca7cce5
Version checks are incorrectly returning versions < 1.0.0. (#797)
* Version checks are incorrectly returning versions < 1.0.0.

Signed-off-by: dblock <dblock@amazon.com>

* Removed V_7_10_3 which has not been released as of time of the fork.

Signed-off-by: dblock <dblock@amazon.com>

* Update check for current version to get unreleased versions.

- no unreleased version if the current version is "1.0.0"
- add unit tests for OpenSearch 1.0.0 with legacy ES versions.
- update VersionUtils to include all legacy ES versions as released.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>

Co-authored-by: Rabi Panda <adnapibar@gmail.com>
2021-06-02 16:03:50 -04:00
Nick Knize d821b15a6b
[BWC] fix mixedCluster and rolling upgrades (#775)
This commit fixes mixedCluster and rolling upgrades by spoofing OpenSearch
version 1.0.0 as Legacy version 7.10.2. With this commit an OpenSearch 1.x node
can join a legacy (<= 7.10.2) cluster and rolling upgrades work as expected.
Mixed clusters will not work beyond the duration of the upgrade since shards
cannot be replicated from upgraded nodes to nodes running older versions.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>

Co-authored-by: Shweta Thareja <tharejas@amazon.com>
2021-05-28 00:42:57 -05:00
Nick Knize c62884a1e9
[BUG] fix MainResponse to spoof version number for legacy clients (#708)
This commit changes MainResponse to spoof OpenSearch 1.x version numbers as
Legacy version number 7.10.2 for legacy clients.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-05-26 18:16:23 -05:00
Chloe 141d6b4e86
Add a method to use fallback setting to set the memory size (#755)
* Overwrote a memory size setting method to use fallback setting

Signed-off-by: chloe-zh <chloezh1102@gmail.com>
2021-05-26 11:09:01 -04:00
ashwinpankaj 002ce9eddf
An allocation constraint mechanism, that de-prioritizes nodes from getting picked for allocation if they breach certain constraints (#680)
* An allocation constraint mechanism, that de-prioritizes nodes from getting picked for allocation if they breach certain constraints

Signed-off-by: Ashwin Pankaj <appankaj@amazon.com>
2021-05-26 12:42:37 +05:30
Mohit Godwani 4e8c92f2aa
Apply fix for health API response to distinguish no master (#656)
Signed-off-by: Mohit Godwani <mgodwan@amazon.com>
2021-05-24 13:05:55 -04:00
Daniel Doubrovkine (dB.) 658dc18b5f
Create group settings with fallback. (#743)
* Create group settings with fallback.

Signed-off-by: dblock <dblock@amazon.com>

* Use protected fallbackSetting in Setting.

Signed-off-by: dblock <dblock@amazon.com>
2021-05-20 16:02:48 -04:00
Dhwanil Patel a3f29b3875
Add timeout on cat/stats API (#552)
Signed-off-by: Dhwanil Patel <dhwanip@amazon.com>
2021-05-20 13:30:32 +05:30
Ankit Jain e0c8b7ea27
Make allocation decisions at node level first for pending task optimi… (#534)
* Make allocation decisions at node level first for pending task optimization

Signed-off-by: Ankit Jain <akjain@amazon.com>

* Addressing review comments

Signed-off-by: Ankit Jain <akjain@amazon.com>

* Fixing benchmark and adding debug mode tests

Signed-off-by: Ankit Jain <akjain@amazon.com>

* Fixing typo in previous commit

Signed-off-by: Ankit Jain <akjain@amazon.com>

* Moving test file to correct package

Signed-off-by: Ankit Jain <akjain@amazon.com>

* Addressing review comments

Signed-off-by: Ankit Jain <akjain@amazon.com>
2021-05-19 19:09:30 -07:00
itiyamas c116062909
Decouples primaries_recoveries limit from concurrent recoveries limit. (#546)
* Decouples initial primaries limit from node concurrent limits.

Signed-off-by: Itiyama <itiyamas@amazon.com>

* Checkstyle fixes.

Signed-off-by: Itiyama <itiyamas@amazon.com>

* Checkstyle test fixes.

Signed-off-by: Itiyama <itiyamas@amazon.com>

* Review comments

Signed-off-by: Itiyama <itiyamas@amazon.com>

* Fixes review comments.

Signed-off-by: Itiyama <itiyamas@amazon.com>
2021-05-19 18:07:26 +05:30
Harmish 6732239f1c
Add read_only block argument to opensearch-node unsafe-bootstrap command (#599)
* apply user defined cluster wide read only block after unsafe bootstrap command

Signed-off-by: Harmish Lakhani <harmish.lakhani@gmail.com>
2021-05-18 10:15:37 -04:00
Ketan Verma ce12097095
Support Data Streams in OpenSearch (#690)
This commit adds support for data streams by adding a DataStreamFieldMapper, and making timestamp 
field name configurable. Backwards compatibility is supported.

Signed-off-by: Ketan Verma <ketan9495@gmail.com>
2021-05-17 09:09:25 -05:00
Daniel Doubrovkine (dB.) 58f9aaccb0
Catch runtime exceptions to make class loader race conditions easier to debug. (#608)
Signed-off-by: dblock <dblock@amazon.com>
2021-05-10 15:21:33 -04:00
Daniel Doubrovkine (dB.) 61f4c7d5a4
Standardize int, long, double and float Setting constructors. (#665) 2021-05-06 17:17:11 -04:00
Daniel Doubrovkine (dB.) 2cf40be8ce
Fix #649: Properly escape @ in JavaDoc. (#651)
Signed-off-by: dblock <dblock@amazon.com>
2021-05-05 16:39:49 -04:00
arunabh23 41e0ff9d6d
Make default number of shards configurable (#625)
* Make default number of shards configurable

The default number of primary shards for a new index, when the number of shards are not provided in the request, can be configured for the cluster.

Signed-off-by: Arunabh Singh <arunabs@amazon.com>

* Address PR comments

Signed-off-by: Arunabh Singh <arunabs@amazon.com>

Co-authored-by: Arunabh Singh <arunabs@amazon.com>
2021-05-05 12:23:49 -07:00
amitai stern ca9fb6d302
Fix snapshot deletion task getting stuck in the event of exceptions (#629)
Changes the behavior of the recursive deletion function `executeOneStaleIndexDelete()` stop
condition to be when the queue of `staleIndicesToDelete` is empty -- also in the error flow.
Otherwise the GroupedActionListener never responds and in the event of a few exceptions the
deletion task gets stuck.
Alters the test case to fail to delete in bulk many snapshots at the first attempt, and then
the next successful deletion also takes care of the previously failed attempt as the test
originally intended.
SNAPSHOT threadpool is at most 5. So in the event we get more than 5 exceptions there are no
more threads to handle the deletion task and there is still one more snapshot to delete in the
queue. Thus, in the test I made the number of extra snapshots be one more than the max in the
SNAPSHOT threadpool.

Signed-off-by: AmiStrn <amitai.stern@logz.io>
2021-05-04 08:44:15 -05:00
Meet Shah 6cc989c548
Handle inefficiencies while fetching the delayed unassigned shards during cluster health (#588)
Signed-off-by: Meet Shah <meetshsh@gmail.com>
2021-04-29 09:19:25 -07:00
piyush 7ccb714045
Speedup snapshot stale indices delete (#613)
Instead of snapshot delete of stale indices being a single threaded operation this commit makes 
it a multithreaded operation and delete multiple stale indices in parallel using SNAPSHOT 
threadpool's workers.

Signed-off-by: Piyush Daftary <piyush.besu@gmail.com>
2021-04-27 13:28:35 -05:00
Sarat Vemulapalli 0e9f74e35f
Renaming CPU architecture to have consistent naming (#612)
* Renaming CPU architecture from x86_64, aarch64 to x64, arm64

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>
2021-04-26 09:40:09 -07:00
Nick Knize c5a3c3cb41
Update lucene version to 8.8.2 (#557)
This commit updates the codebase to the latest released version of Lucene.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-04-23 09:48:41 -05:00
Rabi Panda 821c44c440
Fix failing test caused by versioning change. (#598)
The change in 0ba0e7cc, introduced the issue where randomly selecting an incompatible version fails the test. It caused the filtering logic to incorrectly identify all ES 7.*.* versions as bad versions for joining which should not be the case.

Additionally, split the test into two separate tests where earlier only one of them was run at random.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-04-23 07:31:41 -07:00
Nick Knize 6e04778d0c
[Versioning] Fix Version.fromString logic for legacy version (#604)
This commit fixes the Version.fromString logic to identify legacy versions. It
also adds an optional "distribution" field to the MainRespose for OpenSearch
version 1.0.0+. Any preceeding versions that do not contain the distribution
label will be handeled as legacy versions appropriately.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-04-22 23:04:44 -05:00
Abbas Hussain 9d73fecbe7
Remove all elastic.co references from javadocs (#586)
Signed-off-by: Abbas Hussain <abbas_10690@yahoo.com>
2021-04-21 10:41:14 +05:30
Robert Muir 5474e8d094
Speed ups to test suite and precommit tasks. (#580)
Use C1 compiler only for short-lived tasks and unit test execution. Tone
down some of the slowest unit tests.

Signed-off-by: Robert Muir <rmuir@apache.org>
2021-04-20 09:02:45 -05:00
Nick Knize 0ba0e7cc26
[Versioning] Rebase to OpenSearch version 1.0.0 (#555)
This commit rebases the versioning to OpenSearch 1.0.0

Co-authored-by: Rabi Panda <adnapibar@gmail.com>

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-04-15 17:06:47 -05:00
Robert Muir bdb7aade9a
TEST BUG: MergeSchedulerSettingsTests fails always on small machines (#559)
MergeSchedulerSettingsTests tweaks the `node.processors` setting: sets it
explicitly to values of `2` and `8`. On a machine with only `4` threads
(e.g. my 2-core thinkpad), the test fails, because it creates unexpected
warnings about `node.processors` being set higher than the number of
cpus.

The problem can be reproduced always, by pretending to be single core:
```
./gradlew ':server:test' --tests "org.opensearch.index.MergeSchedulerSettingsTests.testMaxThreadAndMergeCount" -Dtests.jvm.argline="-XX:ActiveProcessorCount=1"
```

Instead, allow the test to provoke these specific warnings.

Signed-off-by: Robert Muir <rmuir@apache.org>
2021-04-15 13:57:57 -05:00
Nick Knize ee6d15e26a
[License] Add SPDX License Header to security policies (#531)
This commit adds the SPDX license header and modifications copyright to security
policy files.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-04-12 22:59:36 -05:00
Nick Knize 9168f1fb43
[License] Add SPDX and OpenSearch Modification license header (#509)
This commit adds the SPDX Apache-2.0 license header along with an additional
copyright header for all modifications.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-04-09 14:28:18 -05:00
Rabi Panda 70cad29af3
Perform more renaming to OpenSearch. (#470)
This commit performs more renaming to OpenSearch which were missed in the earlier commits.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-03-30 11:05:50 -07:00
Rabi Panda bc45d715d7
Make `:server:check` pass successfully (#471)
* Fix package names in classes of the dummy plugin jars.

The `PluginsServiceTests` uses couple of dummy plugin jars from the resources directory. The jars have classes with imports with package name `org.elasticsearch.*`. This commit recreates the jars after renaming those package names.

* Fix the failing server tests as a result of renaming metadata prefix.

As we changed the metadata prefix in `OpenSearchException` from `es.` to `opensearch.` (commit 13f6d23), the order of the keys in the `HashMap` changed. However, the tests are expecting a value which relies on a certain order . Ideally, these tests should not assume the order.

This commit doesn't rewrite the test but only changes the order so the tests pass.

* Properly rename the data examples to fix test failure.

As part of the commit 0bdd129, we renamed the data examples in used in the test cases. This caused the test failures in `SimpleNestedIT` as it was sorting the results and the rename changed the order of the search result. In `SearchQueryIT`, we missed to rename the term used in the query.

This commit fixes both the issues.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-03-29 08:54:47 -07:00
Rabi Panda 3460a8c213
Fix a few more renaming issues. (#464)
This commit fixes some more missed instances where we can perform the renaming to OpenSearch.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-03-26 12:05:16 -07:00
Harold Wang 5a332413e0
Change OpenSearch Version to OpenSearch version to fix failed test case org.opensearch.plugins.ListPluginsCommandTests.testPluginWithNativeController (#460)
Signed-off-by: Harold Wang <harowang@amazon.com>
2021-03-25 13:51:49 -07:00
Rabi Panda 0bdd1293c1
Use alternate example data in OpenSearch test cases. (#454)
This commit updates some of the sample test data used in test cases in OpenSearch.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-03-25 08:52:07 -07:00
Rabi Panda 2e3055c9e2
Fix more failing tests as a result of renaming (#457)
This commit fixes some more renaming issues and as a result fixes the failing tests,

* :qa:logging-config:test 
* :example-plugins:painless-whitelist:yamlRestTest
* :modules:reindex:test

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-03-24 09:33:05 -07:00
Rabi Panda c79bab46a0
Fix multiple failing server tests. (#453)
This commit fixes some renaming issues which as a result fixes multiple failing unit tests in the server module.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-03-23 15:13:09 -07:00
Rabi Panda 58321fd2fa
Fix checkstyle issue. (#448)
Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-03-22 16:49:38 -07:00
Nick Knize 610531d83e
[Rename] fix painless test (#446)
This commit refactors o.e.painless.test resource to o.opensearch.painless.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-03-22 16:59:09 -05:00
Rabi Panda f50865913e
Fix name of the log appender. (#445)
This commit fixes some name issues leftover from the rename to OpenSearch work.

With this commit, the `gradlew :run` task should work.

Signed-off-by: Rabi Panda <pandarab@amazon.com>
2021-03-22 14:17:24 -07:00
Sarat Vemulapalli 0d02b203fb
[Rename] Fixing lingering rename and ./gradlew run will start (#443)
* Fixing lingering rename and ./gradlew run will start

Signed-off-by: Sarat Vemulapalli <vemsarat@amazon.com>
2021-03-22 13:22:24 -07:00
Rabi Panda 8bba6603da [Rename] Replace more instances of Elasticsearch with OpenSearch. (#432)
This commit replaces more replaceable instances of Elasticsearch with OpenSearch.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-03-21 20:56:34 -05:00
Nick Knize 7051167c83 [Rename] remaining elasticsearch pass 1 (#416)
This commit refactors instances of 'elasticsearch' with opensearch everywhere
except references to issues, and other places needed to test compatibility with
old elasticsearch clusters.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-03-21 20:56:34 -05:00
Rabi Panda 2830b3442f [Rename] Temporarily suppress thirdPartyAudit errors for precommit pass. (#421)
Currently the thirdPartyAudit task is failing for the test:framework module after renaming to OpenSearch. We have created an issue and temporarily suppressed the errors to unblock the precommit.

Issue: https://github.com/opensearch-project/OpenSearch/issues/420

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-03-21 20:56:34 -05:00
Rabi Panda eddfe6760d [Rename] Fix issues for gradle precommit task. (#418)
Fix miscellaneous issues identified during `gradle precommit`. These issues are the side effects of the renaming to OpenSearch work.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-03-21 20:56:34 -05:00
Rabi Panda d1e070c92b [Rename] Fix import issues in tests. (#414)
This commit fixes the import issues in already refactored test packages.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-03-21 20:56:34 -05:00
Harold Wang b97834ce99 [Rename] server/src/test/java/org/elasticsearch/index (#393)
* Refactor module server/src/test/java/org/elasticsearch/index

Signed-off-by: Harold Wang <harowang@amazon.com>

* Update class resolution during refactor

Signed-off-by: Harold Wang <harowang@amazon.com>

* Restore unintended class path changes

Signed-off-by: Harold Wang <harowang@amazon.com>
2021-03-21 20:56:34 -05:00
Harold Wang d6cb553c7a Rename remaining org.elasticsearch.persistent (#413)
Signed-off-by: Harold Wang <harowang@amazon.com>
2021-03-21 20:56:34 -05:00
Nick Knize a0fa1a625e [Rename] remaining ES prefixed classes (#406)
This commit refactors remaining ES classes to OpenSearch prefix throughout the
code base. All references are also refactored.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-03-21 20:56:34 -05:00
Rabi Panda 127243b83b [Rename] Environment variables in entire repository. (#405)
Rename all environment variables with prefix 'ES_' to 'OPENSEARCH_'.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-03-21 20:56:34 -05:00
Rabi Panda df11cc9de4 [Rename] Fix gradle build as part of the renaming process. (#397)
This commit fixes the currently broken gradle build resulted from the renaming work. It reverts a few dependencies and comments out the `opensearch_distibutions` task which is currently failing for some builds. We will address these separately in the future once we have a working build.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-03-21 20:56:34 -05:00
Harold Wang 236de25ffb Rename remaining org.elasticsearch.plugins (#401)
Signed-off-by: Harold Wang <harowang@amazon.com>
2021-03-21 20:56:34 -05:00
Himanshu Setia 8e711ab922 [Rename] Refactor o.e.watcher (#399)
This commit refactors the o.e.watcher package.  References throughout the codebase are also refactored.

Signed-off-by: Himanshu Setia <setiah@amazon.com>
2021-03-21 20:56:34 -05:00
Himanshu Setia bf4e3294c9 [Rename] server test o.e.cluster (#396)
[Rename] server test o.e.cluster

* moving directory to opensearch

Signed-off-by: Himanshu Setia <setiah@amazon.com>

* Fixing imports

Signed-off-by: Himanshu Setia <setiah@amazon.com>

* Fixing more imports

Signed-off-by: Himanshu Setia <setiah@amazon.com>
2021-03-21 20:56:34 -05:00
Rabi Panda 13f6d23e40 [Rename] Property and metadata keys with prefix es. (#389)
Rename all property and metadata keys with prefix 'es.' to 'opensearch.'.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-03-21 20:56:34 -05:00
Nick Knize d99bbfe2f2 [Rename] server/test/o.e.monitor,persistent,plugins,recovery (#388)
This commit refactors the following test packages from the server/test module:

* o.e.monitor
* o.e.persistent
* o.e.plugins
* o.e.recovery

to the o.opensearch namespace. All references throughout the codebase have also
been refactored.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-03-21 20:56:34 -05:00
Nick Knize f75803e1aa [Rename] Second pass clean up of imports and variable names in server module (#382)
This commit cleans up imports, variable names, comments, and other misc usages
of ES with the new OpenSearch name.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-03-21 20:56:34 -05:00
Rabi Panda bd4972c808 [Rename] Fix imports in the server module. (#378)
This PR fixes all import issues in the server module resulting from the earlier refactoring.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-03-21 20:56:34 -05:00
Harold Wang cfd8587e5a Refactor module server/src/test/java/org/elasticsearch/indices (#369)
Signed-off-by: Harold Wang <harowang@amazon.com>
2021-03-21 20:56:34 -05:00
Harold Wang 70e62f4609 [Rename] server/src/test/java/org/elasticsearch/test (#377)
* Refactor module server/src/test/java/org/elasticsearch/test

Signed-off-by: Harold Wang <harowang@amazon.com>
2021-03-21 20:56:34 -05:00
Rabi Panda d099a79fd5 [Rename] Fix imports in the client module. (#380)
Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-03-21 20:56:34 -05:00
Nick Knize 5b46a05702 [Rename] remaining packages and resources in test/fixture (#364)
This commit refactors the remaining o.e.index and o.e.test packages in the
test/fixtures module. References throughout the codebase are also refactored.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-03-21 20:56:34 -05:00
Nick Knize 5bef7cec87 [Rename] env,geo,http,indices,ingest,plugin,upgrade packages from test framework (#363)
This commit refactors the following test framework packages:

* o.e.env
* o.e.geo
* o.e.http
* o.e.indices
* o.e.ingest
* o.e.plugin
* o.e.upgrades

to the o.opensearch namespace. All references throughout the test codebase have
been refactored.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-03-21 20:56:34 -05:00
Nick Knize 12f3233fa5 [Rename] framework/test/o.e.action,bootstrap,cli,client,cluster,common (#361)
This commit refactors the following test packages from the o.e namespace:

* o.e.action
* o.e.bootstrap
* o.e.cli
* o.e.client
* o.e.cluster
* o.e.common

to the o.opensearch namespace. Any references throughout the codebase are also
refactored.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-03-21 20:56:34 -05:00
Harold Wang 6e888a781e Fix a bug by removing merge conflict mark (#357)
Signed-off-by: Harold Wang <harowang@amazon.com>
2021-03-21 20:56:34 -05:00
Rabi Panda 0aa52bd2e8 [Rename] refactor the libs/x-content module. (#354)
Refactor the code in the `libs/x-content` module and any references to those in the entire code base. The refactoring is done as part of the renaming to OpenSearch work.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-03-21 20:56:34 -05:00
Nick Knize 1a726277ed [Rename] server/test/o.e.common (#356)
This commit refactors all classes in the server/test/o.e.common package to the
o.opensearch namespace. All references throughout the codebase have also been
refactored.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-03-21 20:56:34 -05:00
Nick Knize e1e2c397fc [Rename] server/test/resources (#359)
This commit refactors all resources (files, naming, etc.) in the
server/test/resources directory to the new opensearch namespace.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-03-21 20:56:34 -05:00
Harold Wang 182a86ea63 Rename org.elasticsearch.node to org.opensearch.node (#351)
Signed-off-by: Harold Wang <harowang@amazon.com>
2021-03-21 20:56:34 -05:00
Nick Knize 07ca47a256 [Rename] remaining classes in o.e (#352)
This commit refactors the remaining classes from o.e to the o.opensearch
namespace. All references throughout the codebase have been refactored.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-03-21 20:56:34 -05:00
Rabi Panda 972d8ea920 [Rename] refactor the libs/core module. (#350)
Refactor the code in the `libs/core` module and any references to those in the entire code base. The refactoring is done as part of the renaming to OpenSearch work.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-03-21 20:56:34 -05:00
Nick Knize 50c3251d36 [Rename] o.e.common.settings (#336)
This commit refactors o.e.common.settings package to the
o.opensearch.common.setttings namespace. All references throughout the codebase
are refactored.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-03-21 20:56:34 -05:00
Harold Wang 8ee7296fea [Rename] org.elasticsearch.plugins (#348)
* Rename org.elasticsearch.gateway to org.opensearch.gateway

Signed-off-by: Harold Wang <harowang@amazon.com>

* Rename org.elasticsearch.http to org.opensearch.http

Signed-off-by: Harold Wang <harowang@amazon.com>

* Renames org.elasticsearch.plugins to org.opensearch.plugins

Signed-off-by: Harold Wang <harowang@amazon.com>
2021-03-21 20:56:34 -05:00
Rabi Panda 4e60df913f [Rename] refactor remaining of the `o.e.search` package in server module. (#345)
Refactor the remaining classes in the `org.elasticsearch.search` package in the server module, 

- Rename `org.elasticserach.search.aggregations` to `org.opensearch.search.aggregations`
- Rename instances of `org.elasticsearch.search` `org.opensearch.search`

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-03-21 20:56:34 -05:00
Harold Wang ac75d6aee2 [Rename] org.elasticsearch.http (#347)
* Rename org.elasticsearch.gateway to org.opensearch.gateway

Signed-off-by: Harold Wang <harowang@amazon.com>

* Rename org.elasticsearch.http to org.opensearch.http

Signed-off-by: Harold Wang <harowang@amazon.com>
2021-03-21 20:56:34 -05:00
Harold Wang 642f823228 Rename org.elasticsearch.gateway to org.opensearch.gateway (#346)
Signed-off-by: Harold Wang <harowang@amazon.com>
2021-03-21 20:56:34 -05:00
Nick Knize 3fc453eace [Rename] o.e.common.util (#337)
This commit refactors the o.e.common.util package to the
o.opensearch.common.util namespace. All references throughout the codebase have
been refactored.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-03-21 20:56:34 -05:00
Nick Knize b118646bef [Rename] o.e.common.xcontent (#339)
This commit refactors the o.e.common.xcontent package to
o.opensearch.common.xcontent. All references throughout the codebase have been
refactored.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-03-21 20:56:34 -05:00
Rabi Panda e99f000366 [Rename] refactor o.e.search.aggregations.bucket package in the server module. (#326)
Rename `org.elasticserach.search.aggregations.bucket` to `org.opensearch.search.aggregations.bucket` in package names and references.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-03-21 20:56:34 -05:00
Nick Knize f216f2e556 [Rename] o.e.common.logging,lucene (#335)
This commit refactors the following packages:

* o.e.common.logging
* o.e.common.lucene

to the o.opensearch.common parent package. References throughout the codebase
have also been refactored.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-03-21 20:56:34 -05:00
Nick Knize 1664f9e495 [Rename] o.e.action.search (#344)
This commit refactors the o.e.action.search package to o.opensearch.action
namespace. All references throughout the code are also refactored.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-03-21 20:56:34 -05:00
Nick Knize 993a4c72c2 [Rename] o.e.action.delete,explain,fieldcaps,get,index,main,resync,update (#342)
This commit refactors the following:

* o.e.action.delete
* o.e.action.explain
* o.e.action.fieldcaps
* o.e.action.get
* o.e.action.index
* o.e.action.main
* o.e.action.resync
* o.e.action.update

to the o.opensearch namespace. All references throughout the codebase are also
refactored.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-03-21 20:56:34 -05:00
Nick Knize fbb3afea77 [Rename] o.e.action.ingest,termvectors (#343)
This commit refactors o.e.action.ingest and o.e.action.termvectors to
o.opensearch.action namespace. All references throughout the codebase are also
refactored.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-03-21 20:56:34 -05:00
Rabi Panda 91e9ba952f [Rename] refactor o.e.search package top level classes in the server module. (#328)
Rename `org.elasticserach.search` to `org.opensearch.search` in package names and references for top level classes in the search package.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-03-21 20:56:34 -05:00
Rabi Panda d244850fdd [Rename] refactor o.e.search.aggregations.support package in the server module. (#325)
Rename `org.elasticserach.search.aggregations.support` to `org.opensearch.search.aggregations.support` in package names and references.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-03-21 20:56:34 -05:00
Rabi Panda a5d48a00af [Rename] refactor o.e.search.aggregations.metrics package in the server module. (#322)
Rename `org.elasticserach.search.aggregations.metrics` to `org.opensearch.search.aggregations.metrics` in package names and references.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-03-21 20:56:34 -05:00
Nick Knize 946c7bb2dc [Rename] o.e.common subpackages round 1 (#332)
* [Rename] o.e.common subpackages round 1

This commit refactors the following subpackages of o.e.common:

* o.e.common.joda
* o.e.common.lease
* o.e.common.metrics
* o.e.common.network
* o.e.common.path
* o.e.common.recycling
* o.e.common.regex
* o.e.common.rounding
* o.e.common.text
* o.e.common.time
* o.e.common.transport

to the o.opensearch namespace. All references throughout the codebase have been
refactored.

Signed-off-by: Nicholas Knize <nknize@amazon.com>

* fix imports 1

Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Rabi Panda d9d56f5019 [Rename] refactor o.e.search.aggregations.pipeline package in the server module. (#324)
Rename `org.elasticserach.search.aggregations.pipeline` to `org.opensearch.search.aggregations.pipeline` in package names and references.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-03-21 20:56:34 -05:00
Nick Knize 606c8c15ab [Rename] o.e.common.inject subpackages (#331)
* [Rename] o.e.common.inject subpackages

This commit refactors the remaining o.e.common.inject subpackages to the
o.opensearch.common.inject namespace. All references throughout the codebase
have been refactored.

Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Nick Knize 8c2bcbbc8e [Rename] o.e.common.internal (#330)
This commit refactors the o.e.common.internal package to the o.opensearch
namespace. All code references throught the codebase have been refactored.

Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Nick Knize c4565adc9d [Rename] o.e.common.geo, hash, io (#317)
This commit refactors the following packages:

* o.e.common.geo
* o.e.common.hash
* o.e.common.io

into the o.opensearch.common namespace. All references throughout the codebase
have been refactored.

Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Nick Knize 193bd770d3 [Rename] o.e.inject classes (#313)
This commit refactors the classes in the o.e.inject module to the
o.opensearch.inject namespace. References throughout the codebase have also been
refactored.

Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Sarat Vemulapalli d65bccc25d Renaming server/env to OpenSearch (#314)
Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>
2021-03-21 20:56:34 -05:00
Nick Knize 73441879f1 [Rename] o.e.common.cache,collect,component,compress,document (#309)
This commit refactors the following:

* o.e.common.cache
* o.e.common.collect
* o.e.common.component
* o.e.common.compress
* o.e.common.document

to the o.opensearch namespace. All references throughout the codebase are also
refactored

Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Rabi Panda 63edce1243 [Rename] refactor more of o.e.search package in the server module. (#306)
As part of this commit we refactor the following in the o.e.search package:

- rename `org.elasticsearch.search.fetch` to `org.opensearch.search.fetch`
- rename `org.elasticsearch.search.internal` to `org.opensearch.search.internal`
- rename `org.elasticsearch.search.profile` to `org.opensearch.search.profile`
- rename `org.elasticsearch.search.query` to `org.opensearch.search.query`
- rename `org.elasticsearch.search.suggest` to `org.opensearch.search.suggest`
- rename other instances of Elasticsearch to OpenSearch in these packages.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-03-21 20:56:34 -05:00
Nick Knize 0f74cbed1c [Rename] o.e.common.blobstore,breaker,bytes (#307)
This commit refactors the following packages:

* o.e.common.blobstore
* o.e.common.breaker
* o.e.common.bytes

to the o.opensearch.common namespace. All references throughout the codebase
have been refactored.

Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Nick Knize f4343e5bdb [Rename] o.e.discovery (#308)
This commit refactors all classes in o.e.discovery to the o.opensearch.discovery
namespace. All references throughout the codebase are also refactored.

Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Nick Knize dafc0510ea [Rename] o.e.common classes (#305)
This commit refactors classes under o.e.common to o.opensearch.common. All
references throughout the codebase have also been refactored.

Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Nick Knize 8737443c9d [Rename] o.e.bootstrap (#303)
This commit refactors the o.e.bootstrap package to o.opensearch.bootstrap. All
references throughout the code are also refactored.

Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Nick Knize 5ad13ca2f7 [Rename] o.e.cluster (#297)
This commit refactors the remaining o.e.cluster packages to
o.opensearch.cluster. All references throughout the codebase are also
refactored.

Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Nick Knize bbaf705ffc [Rename] o.e.action.support subpackages (#291)
This commit refactors the remaining o.e.action.support subpackages to
o.opensearch.support. All references throughout the codebase are also refactored

Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Harold Wang 51e0ec9c17 [Rename] server/src/main/java/org/opensearch/index/merge, mapper, get, flush, fieldvisitor, fielddata (#301)
* Refactor folder merge, mapper, get, flush, fieldvisitor and fielddata under server/src/main/java/org/opensearch/index

Signed-off-by: Harold Wang <harowang@amazon.com>
2021-03-21 20:56:34 -05:00
Harold Wang d4b2eab4be Refactor query module under server/src/main/java/org/opensearch/index (#300)
Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-03-21 20:56:34 -05:00
Harold Wang a4ca8090f1 [Rename] shard, seqno, search, reindex, refresh and recovery under server/src/main/java/org/opensearch/index (#299)
* Refactor shard, seqno, search, reindex, refresh and recovery under server/src/main/java/org/opensearch/index for OpenSearch renaming

Signed-off-by: Harold Wang <harowang@amazon.com>
2021-03-21 20:56:34 -05:00
Harold Wang 2ec9a0c0d2 [Rename] warmer, translog, term-vectors, store, stats, snapshots and similarity under server/src/main/java/org/opensearch/index (#298)
* Refactor warmer, translog, term-vectors, store, stats, snapshots and similarity under server/src/main/java/org/opensearch/index

Signed-off-by: Harold Wang <harowang@amazon.com>
2021-03-21 20:56:34 -05:00
Rabi Panda f17ba72a98 [Rename] refactor some of the o.e.search packages in the server module. (#294)
Refactoring:

- rename `org.elasticsearch.search.builder` to `org.opensearch.search.builder`
- rename `org.elasticsearch.search.collapse` to `org.opensearch.search.collapse`
- rename `org.elasticsearch.search.dfs` to `org.opensearch.search.dfs`
- rename `org.elasticsearch.search.lookup` to `org.opensearch.search.lookup`
- rename `org.elasticsearch.search.lookup` to `org.opensearch.search.lookup`
- rename `org.elasticsearch.search.rescore` to `org.opensearch.search.rescore`
- rename `org.elasticsearch.search.searchafter` to `org.opensearch.search.searchafter`
- rename `org.elasticsearch.search.slice` to `org.opensearch.search.slice`
- rename `org.elasticsearch.search.sort` to `org.opensearch.search.sort`

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-03-21 20:56:34 -05:00
Rabi Panda a687087b44 [Rename] refactor o.e.transport in the server module. (#284)
Refactor the transport package in the server module to rename the package from `org.elasticsearch.transport` to `org.opensearch.transport`

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-03-21 20:56:34 -05:00
Harold Wang 9f0547e47b [Rename] server/src/main/java/org/opensearch/index/analysis, cache, codec and engine (#295)
* Refactor server/src/main/java/org/opensearch/index/analysis, cache, codec & engine

Signed-off-by: Harold Wang <harowang@amazon.com>
2021-03-21 20:56:34 -05:00
Nick Knize fe2b5d6d39 [Rename] o.e.version (#296)
This commit refactors o.e.Version to o.opensearch.Version. This is retained in a
single commit to serve as a reference for re-versioning the opensearch codebase
from legacy 7.10 to 1.0.

Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Nick Knize 0deb25590d [Rename] server OpenSearch classes (#290)
This commit refactors all OpenSearch classes in the root server package to
o.opensearch. All references throughout the codebase are also refactored.

Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Nick Knize 452f6e1b81 [Rename] server cli and client (#254)
This commit refactors the o.e.cli and o.e.client packages from elasticsearch to
o.opensearch.cli and o.opensearch.client packages in the server module,
respectively.

Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Harold Wang 7dcbe07b04 Rename folder server/src/main/java/org/elasticsearch/index to server/src/main/java/org/opensearch/index (#293)
Signed-off-by: Harold Wang <harowang@amazon.com>
2021-03-21 20:56:34 -05:00
Nick Knize fe7f29f549 [Rename] o.e.cluster.health,metadata,node (#283)
This commit refactors the following subpackages:

* o.e.cluster.health
* o.e.cluster.metadata
* o.e.cluster.node

to o.opensearch.cluster.*. All other references throughout the codebase are
updated.

Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Nick Knize fafa4fc941 [Rename] Refactor ES and Elasticsearch classes in server module bootstrap package (#197)
This commit refactors the heavily used ESPolicy, Elasticsearch (main class), and Elasticsearch 
prefixed test classes used in the bootstrap package under the server module. Refactoring the 
namespace will come in a separate commit.

Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Harold Wang 32b93793be [Rename] http and indices folder under server module (#285)
* Rename http and indices folder under server module

Signed-off-by: Harold Wang <harowang@amazon.com>
2021-03-21 20:56:34 -05:00
Harold Wang e5c3cb6f64 [Rename] server/src/main/java/org/opensearch/gateway (#282)
* Refector server/src/main/java/org/opensearch/gateway as part of Elasticsearch to OpenSearch renaming

Signed-off-by: Harold Wang <harowang@amazon.com>
2021-03-21 20:56:34 -05:00
Rabi Panda 6ee930ac0d [Rename] refactor o.e.repositories in the server module. (#275)
Refactor the repositories package in the server module to rename the package from `org.elasticsearch.repositories` to `org.opensearch.repositories`

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-03-21 20:56:34 -05:00
Nick Knize 2dd77e20aa [Rename] o.e.cluster.ack,action,block,coordination (#278)
This commit refactors the following:

* o.e.cluster.ack
* o.e.cluster.action
* o.e.cluster.block
* o.e.cluster.coordination

to o.opensearch package. all other references are also refactored.

Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Harold Wang c17b34c1dc [Rename] plugins and persistent under server folder (#272)
* Refactor persistent&plugin folder under server

Signed-off-by: Harold Wang <harowang@amazon.com>
2021-03-21 20:56:34 -05:00
Nick Knize f9290161d1 [Rename] o.e.cluster classes (#271)
This commit refactors all classes in o.e.cluster to o.opensearch.cluster.
Refereences throughtout the code base are updated.

Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Rabi Panda ed010c22c8 [Rename] refactor libs/cli module. (#255)
Refactor the `libs/cli` module to rename the package name from `org.elasticsearch.cli` to `org.opensearch.cli` as part of the rename to OpenSearch work.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-03-21 20:56:34 -05:00
Rabi Panda d268d82d85 [Rename] refactor `o.e.usage` package in server module. (#269)
Refactor the `org.elasticsearch.usage` package in the server module to rename it to `org.opensearch.usage`.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-03-21 20:56:34 -05:00
Rabi Panda 16c3b54639 [Rename] refactor o.e.script package in server module. (#250)
Refactor the package`org.elasticsearch.script` in server module to rename it to`org.opensearch.script`.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-03-21 20:56:34 -05:00
Rabi Panda 9eb511dda2 [Rename] refactor libs/geo. (#258)
Refactor the `libs/geo` module to rename the package name from `org.elasticsearch.geometry` to `org.opensearch.geometry` as part of the rename to OpenSearch work.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-03-21 20:56:34 -05:00
Rabi Panda ad22e7f4a2 [Rename] refactor libs/plugin-cli and libs/secure-sm. (#261)
Refactor the libs/plugin-cli and libs/secure-sm modules to rename the package names

- `org.elasticsearch.plugins` to `org.opensearch.plugins`
- `org.elasticsearch.secure_sm` to `org.opensearch.secure_sm`

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-03-21 20:56:34 -05:00
Harold Wang 49d2eeae53 Refactor ingest, monitor and node under server folder (#273)
Signed-off-by: Harold Wang <harowang@amazon.com>
2021-03-21 20:56:34 -05:00
Abbas Hussain bbe308a46e [Rename] server/src/test/java/org/elasticsearch/(discovery,gateway,http,ingest) (#220)
Refactor following code paths as part of the Elasticsearch to OpenSearch renaming effort.

- server/src/test/java/org/elasticsearch/discovery
- server/src/test/java/org/elasticsearch/gateway
- server/src/test/java/org/elasticsearch/http
- server/src/test/java/org/elasticsearch/ingest

Signed-off-by: Abbas Hussain <abbas_10690@yahoo.com>
2021-03-21 20:56:34 -05:00
Rabi Panda a7d8245a47 [Rename] refactor server/tasks package. (#265)
Refactor the server/tasks package to rename the package names from`org.elasticsearch.tasks` to `org.opensearch.tasks`.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-03-21 20:56:34 -05:00
Rabi Panda dc4736dca1 [Rename] refactor server/threadpool package. (#267)
Refactor the server/threadpool package to rename the package names from`org.elasticsearch.threadpool` to `org.opensearch.threadpool`.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-03-21 20:56:34 -05:00
Abbas Hussain d03781ded4 [Rename] server/src/test/java/org/elasticsearch/bootstrap (#217)
Signed-off-by: Abbas Hussain <abbas_10690@yahoo.com>
2021-03-21 20:56:34 -05:00
Abbas Hussain 4aeed1a81a [Rename] server/src/test/java/org/elasticsearch/action (#191)
Signed-off-by: Abbas Hussain <abbas_10690@yahoo.com>
2021-03-21 20:56:34 -05:00
Harold Wang 82f9ff93cb [Rename] plugins (#193)
* [Rename] plugins (#193)

This PR refactors files under "plugins" folders part of the Elasticsearch to OpenSearch renaming effort.

Signed-off-by: Harold Wang <harowang@amazon.com>
2021-03-21 20:56:34 -05:00
Nicholas Knize 1ff852bf50 [Rename] fix remaining o.o.action.support imports
This commit fixes an incorrect import in ClusterHealthRequest after refactoring
o.o.action.support classes.

Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Nicholas Knize e1ce8aea19 [Rename] fix o.o.action.support imports
Some dangling imports are still incorrect after refactoring the
o.o.action.support classes

Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Nick Knize 923ea001f5 [Rename] o.e.action.support classes (#253)
This commit refactors the classes in o.e.action.support to
o.opensearch.action.support. The remaining directories will be refactored in a
separate commit.

Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Rabi Panda 991b3650b6 [Rename] refactor server/snapshots package. (#251)
Refactor `server/snapshots` to rename the package names from `org.elasticsearch.snapshots` to `org.opensearch.snapshots` as part of the rename to OpenSearch work.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-03-21 20:56:34 -05:00
Nick Knize e21c436cea [Rename] o.e.action.bulk (#248)
This commit refactors all classes in o.e.action.bulk to o.opensearch.action.bulk
all references throughout the rest of the codebase are updated.

Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Harold Wang a71f725dd8 [Rename] Rename files under three server sub folders (#195)
Refactor below three folders as part of the Elasticsearch to OpenSearch renaming effort.
. server/src/internalClusterTest
. server/src/main/java11
. server/src/main/resources
. rest-api-spec


Signed-off-by: Harold Wang <harowang@amazon.com>
2021-03-21 20:56:34 -05:00
Rabi Panda 3eee5183d1 [Rename] server/rest (#229)
This commit refactors the `server/rest` package as part of the Elasticsearch to OpenSearch renaming.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-03-21 20:56:34 -05:00
Nicholas Knize ffdc771402 [Rename] Remove unused imports that snuck in
Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Nicholas Knize e9599a20b4 [Rename] add full package name to RestoreInfo and RepositoriesMetadata
This commit adds back the full qualified package name back to javadoc in
RestoreInfo and RepositoriesMetadata.

Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Nick Knize 8aa818e93e [Rename] refactor o.e.action.admin.cluster (#207)
This commit refactors all classes in o.e.action.admin.cluster to 
org.opensearch.action.admin.cluster. References are updated 
throughout the codebase.

Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Nick Knize 1203aa7302 [Rename] refactor o.e.action classes (#203)
This commit refactors top level classes in o.e.action to o.opensearch.action.
References throughout the rest of the codebase have been updated.

Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Nick Knize 0c81a5cf65 [Rename] refactor o.e.action.admin.indices (#209)
This commit refactors o.e.action.admin.indices package to
o.opensearch.action.admin.indices. References through out the codebase have been
updated to reflect the new package location.

Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Abbas Hussain 8c2f6f9d1e [Rename] server/src/test/java/org/elasticsearch/(cli,client,deps,env) (#219)
Signed-off-by: Abbas Hussain <abbas_10690@yahoo.com>
2021-03-21 20:56:34 -05:00
Abbas Hussain 2b8a5d0ca3 [Rename] server/src/test/java/org/elasticsearch/<files-only> (#188)
Signed-off-by: Abbas Hussain <abbas_10690@yahoo.com>
2021-03-21 20:56:34 -05:00
Nick Knize 2aa9906c42 [Rename] ElasticsearchParseException class in server module (#169)
This commit refactors ElasticsearchParseException class in the server module to
OpenSearchParseException. References and usages throughout the rest of the
codebase are fully refactored.

Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Nick Knize 92d138309a [Rename] ElasticsearchMergePolicy class in server module (#181)
This commit refactors ElasticsearchMergePolicy class in the server module to
OpenSearchMergePolicy. References and usages throughout the rest of the codebase
are fully refactored.

Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Nick Knize 2549db3493 [Rename] ElasticsearchConcurrentMergeScheduler class in server module (#179)
This commit refactors ElasticsearchConcurrentMergeScheduler class in the server
module to OpenSearchConcurrentMergeScheduler. References and usages throughout
the rest of the codebase are fully refactored.

Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Nick Knize a08a0edaa3 [Rename] XContentElasticsearchExtension class in server module (#178)
This commit refactors XContentElasticsearchExtension class in the server module
to XContentOpenSearchExtension. References and usages throughout the rest of the
codebase are fully refactored.

Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Nick Knize 84d953b1c6 [Rename] ElasticsearchReaderManager class in server module (#180)
This commit refactors ElasticsearchReaderManager class in the server module to
OpenSearchReaderManager. References and usages throughout the rest of the
codebase are fully refactored.

Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Nick Knize ce7864efdc [Rename] ElasticsearchLeafReader class in server module (#177)
This commit refactors the ElasticsearchleafReader class located in the server
module to OpenSearchLeafReader. References and usages throughout the rest of the
codebase are fully refactored.

Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Nick Knize c42c2101a8 [Rename] ElasticsearchWrapperException class in server module (#174)
This commit refactors the ElasticsearchWrapperException class in the server
module to OpenSearchWrapperException. References and usages throughout the rest
of the codebase are fully refactored.

Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Nick Knize e60906fc11 [Rename] ElasticsearchDirectoryReader class in server module (#176)
This commit refactors the ElasticsearchDirectoryReader class located in the
server module to OpenSearchDirectoryReader. References and usages, along with
method names, throughout the rest of the codebase are fully refactored.

Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Nick Knize bdc3158020 [Rename] ElasticsearchNodeCommand class in server module (#175)
This commit refactors the ElasticsearchNodeCommand class located in the server
module to OpenSearchNodeCommand. References and usages throughout the rest of
the codebase are fully refactored.

Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Nick Knize 7788250e9e [Rename] ElasticsearchTimeoutException class in server module (#173)
This commit refactors the ElasticsearchTimeoutException class in the server
module to OpenSearchTimeoutException. References and usages throught the rest of
the codebase are fully refactored.

Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Nick Knize 64d7e7e9ca [Rename] ElasticsearchStatusException in server module (#172)
This commit refactors the ElasticsearchStatusException in the server module to
OpenSearchStatusException. References and usages throughout the rest of the
codebase are fully refactored.

Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Nick Knize 1015c8e609 [Rename] ElasticsearchSecurityException class in server module (#170)
This commit refactors ElasticsearchSecurityException class in the server module
to OpenSearchSecurityException. References and usages throughout the rest of the
codebase are fully refactored.

Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Nick Knize ff9fd6c91f [Rename] ElasticsearchGenerationException class in server module (#168)
This commit refactors ElasticsearchGenerationException class in the server
module to OpenSearchGenerationException. References and usages throughout the
rest of the codebase are fully refactored.

Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Abbas Hussain 89e67c1646 [Rename] server/src/test/java/org/apache (#187)
This commit refactors all instances of elasticsearch in server/src/test/java/org/apache to opensearch.

Signed-off-by: Abbas Hussain <abbas_10690@yahoo.com>
2021-03-21 20:56:34 -05:00
Nick Knize 27bd8cf5cc [Rename] ElasticsearchCorruptionException class in server module (#167)
This commit refactors the ElasticsearchCorruptionException in the server module
to OpenSearchCorruptionException. References and usages throughtout the rest of
the codebase are fully refactored.

Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Nick Knize e8b5a411a5 [Rename] ElasticsearchClient class in server module (#166)
This commit refactors the ElasticsearchClient class located in the server module to
OpenSearchClient. References and usages throughout the rest of the codebase are
fully refactored.

Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Nick Knize ccceb381db [Rename] ElasticsearchException class in server module (#165)
This commit refactors the ElasticsearchException class located in the server module
to OpenSearchException. References and usages throughout the rest of the
codebase are fully refactored.

Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Nick Knize 5427b38af3 [Rename] server/src/main/java/org/apache (#164)
This commit refactors all instances of elasticsearch in
server/src/main/java/org/apache to opensearch.

Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Tianli Feng 672d975f43
Remove tagline from sever and RHLC (#427)
Signed-off-by: Tianli Feng <ftianli@amazon.com>
2021-03-19 18:17:10 -07:00
Sarat Vemulapalli eff46fb930 Fixing transport deserialization with oss distribution (#218)
Signed-off-by: Sarat Vemulapalli <vemsarat@amazon.com>
Signed-off-by: Peter Nied <petern@amazon.com>
2021-03-13 10:36:16 -06:00
Nicholas Knize abf5850485 Revert "[Rename] server/src/main/java/org/apache (#162)"
This reverts commit c50e8c83a2476ca4ca2f1dd05fa5a608bc0e9ef6
which went should have merged to the rename branch instead of
the main branch.

Signed-off-by: Peter Nied <petern@amazon.com>
2021-03-13 10:36:15 -06:00
Nick Knize 4c709c21f4 [Rename] server/src/main/java/org/apache (#162)
This commit refactors all instances of elasticsearch in
server/src/main/java/org/apache to opensearch.

Signed-off-by: Nicholas Knize <nknize@amazon.com>
Signed-off-by: Peter Nied <petern@amazon.com>
2021-03-13 10:36:15 -06:00
Nick Knize 83e87f7e54 Remove any non oss from build, package, and distribution (#102)
This commit changes the building, packaging, and testing framework to only support OSS on different distributions.

Next steps:

completely remove -oss flag dependencies in package and build tests
move 6.x bwc testing to be an explicit option
remove any references to elastic.co download site (or replace with downloads from the OSS website)

Co-authored-by: Himanshu Setia <setiah@amazon.com>
Co-authored-by: Rabi Panda <pandarab@amazon.com>
Co-authored-by: Himanshu Setia <58999915+setiah@users.noreply.github.com>
Co-authored-by: Sarat Vemulapalli <vemsarat@amazon.com>
Signed-off-by: Peter Nied <petern@amazon.com>
2021-03-13 10:36:14 -06:00
Sarat Vemulapalli 97ed035c1c Fixing Bwc checks for 7.10.3 (#93)
Signed-off-by: Peter Nied <petern@amazon.com>
2021-03-13 10:36:14 -06:00
Nhat Nguyen a37fc3be68 Ensure ReplicationOperation notify listener once (#68256)
ReplicationOperation can notify the listener twice if the primary shard
is demoted after it has completed the primary operation.

Closes #68049

Signed-off-by: Peter Nied <petern@amazon.com>
2021-03-13 10:36:12 -06:00
Rabi Panda da51d8c61f Remove ILM policy from GetDataStreamAction Response. (#63)
Signed-off-by: Peter Nied <petern@amazon.com>
2021-03-13 10:36:12 -06:00
Rabi Panda eb49365800 Remove x-pack from build, distribution and packaging. (#43)
This PR removes references to x-pack from buildSrc, distribution and qa modules.

Signed-off-by: Peter Nied <petern@amazon.com>
2021-03-13 10:36:10 -06:00
Nick Knize 24dc3986ce [TEST] fix DeleteDataStreamRequestTests failure (#37)
This commit fixes DeleteDataStreamRequestTests.testDeleteSnapshottingDataStream unit test failure by passing SnapshotsInProgress.Entry.SUCCESS in the createEntrymethod.

Signed-off-by: Peter Nied <petern@amazon.com>
2021-03-13 10:36:10 -06:00
Nick Knize 6f2cbdf0b8 [PURIFY] Cleanup build and unblock HLRC integration tests (#33)
This commit cleans up the following:

* Remove unused imports
* Remove ILM settings in hlrc testCluster formation
* Comment out security users settings in ElasticsearchNode creation for build-tools tests

Signed-off-by: Peter Nied <petern@amazon.com>
2021-03-13 10:36:10 -06:00
nknize 033f34cfdc [PURIFY] fix GetDataStreamsRequestTests build failure
This fixes the constructor for IndexNameExpressionResolver to pass in
Settings.EMPTY to a ThreadContext used by the resolver.

Signed-off-by: Peter Nied <petern@amazon.com>
2021-03-13 10:36:09 -06:00
Nick Knize 3f168ac85c [PURIFY] Revert "Move data stream transport and rest action to xpack (#59593)" (#28)
This commit reverts commit 2a89e13e43. Relicensing data streams from OSS to XPack.

Signed-off-by: Peter Nied <petern@amazon.com>
2021-03-13 10:36:09 -06:00
Nick Knize 70a07216bb [PURIFY] remove all trace of x-pack watcher (#21)
This commit removes all trace of Elastic licensed watcher

Signed-off-by: Peter Nied <petern@amazon.com>
2021-03-13 10:36:08 -06:00
Nick Knize 4aee8e56db [PURIFY] remove all trace of x-pack index lifecycle management (#20)
This commit removes all trace of Elastic licensed ILM.

Signed-off-by: Peter Nied <petern@amazon.com>
2021-03-13 10:36:08 -06:00
Nick Knize 3769b2c6a4 [PURIFY] remove all trace of x-pack rollups (#17)
This commit removes all trace of Elastic licensed rollups

Signed-off-by: Peter Nied <petern@amazon.com>
2021-03-13 10:36:08 -06:00
Nik Everett 9ba0c53bc8 Drop old assertion in test
Drops an assertion that in 1911 Paris rolled its clocks back past
midnight. This assertion is so far in the past that it isn't
consistently included in the JDK's tzdb. When we upgraded to 15.0.1 it
fell out of my tzdb locally. It doesn't seem to have happened to CI,
oddly, but it just doesn't seem worth keeping.

Closes #67930
2021-01-26 09:27:25 -05:00
Nhat Nguyen 34b7497c0c Ensure IndexingPressure memory is re-adjusted once (#67673)
We have seen a case where the memory of IndexingPressure was
re-adjusted twice. With this commit, we will log that error with a
stack trace so that we can figure out the source of the issue.
2021-01-25 19:34:08 -05:00
James Rodewig 7279f28344
Fix segment typo in tophints aggregator (#67858) (#67927)
Co-authored-by: Howard <danielhuang@tencent.com>
2021-01-25 12:07:27 -05:00
Nik Everett eb9d44d0cf
Fix composite test
Our test for early termination would break if we made many small
segments because none of them would be large enough to trigger the early
termination. This makes sure have only a single segment for these test,
making sure we terminate early.

Closes #62769
2021-01-19 13:54:09 +01:00
Rene Groeschke f02bd9942b
Version Bumb to 7.10.3 2021-01-14 15:43:41 +01:00
Nhat Nguyen 84d8416294 Fix AllocationIdIT test failure on WindowFS (#67179)
This test failed on WindowsFS. We failed to remove the corrupted file if
it's being opened (for a short window by ListShardStore action) and the
pending delete files were clear when we restarted that node.

This commit fixes the issue by shutting down the node before removing
the corrupted file to avoid any access to that file.

Closes #66893
2021-01-13 13:50:06 -05:00
Julie Tibshirani ff67baac38 Make sure shared source always represents the top-level root document. (#66725)
We started passing down the root document's _source when processing
nested hits, to avoid reloading and reparsing the root source for each hit.
Unfortunately the approach did not work when there are multiple layers of
`inner_hits`. In this case, the second-layer inner hit received its immediate
parent's source instead of the root source. This parent source is filtered to
just contain the parts corresponding to the nested document, but the source
parsing logic is designed to always operate on the top-level root source. This
caused failures when loading the second-layer inner hits.

This PR makes sure to always pass the root document's _source when processing
inner hits, even if there are multiple layers.
2021-01-05 14:27:41 -08:00
Lee Hinman e9b798bdb1
[7.10] Make FilterAllocationDecider totally ignore tier-based allocation settings (#67019) (#67034)
Previously we treated attribute filtering for _tier-prefixed attributes a pass-through, meaning
that they were essentially always treated as matching in DiscoveryNodeFilters.match, however, for
exclude settings, this meant that the node was considered to match the node if a _tier* filter was
specified.

This commit prunes these attributes from the DiscoveryNodeFilters when considering the filters for
FilterAllocationDecider so that they are only considered in DataTierAllocationDecider.

Resolves #66679
2021-01-05 12:42:34 -07:00
Yang Wang cb041c747d
[Test] Consistent datetime formatting for java and joda time (#66914) (#66974)
This PR fixes the test failure by ensuring consistent datetime formatting
between java DateTimeFormatter and joda time.
2021-01-05 17:00:57 +11:00
Julie Tibshirani d4039228ae Fix regressions around nested hits and disabled _source. (#66572)
This PR fixes two bugs that can arise when _source is disabled and we fetch nested documents:
* Fix exception when highlighting `inner_hits` with disabled _source.
* Fix exception in nested `top_hits` with disabled _source.
* Add more tests for highlighting `inner_hits`.
2020-12-18 15:21:37 -08:00
Gordon Brown df8c92cfef
Mute tests failing on Debian 8 due to memory reporting (#66648) 2020-12-18 15:27:07 -07:00
Albert Zaharovits 480561dbc3
Store and use only internal security headers (#66365)
For async searches (EQL included) the client's request headers were
erroneously stored in the .tasks index. This might expose the requesting
client's HTTP Authorization header. This PR fixes that by employing the
usual approach to store only the security-internal headers, which carry
the authentication result, instead of the original Authorization header,
which is commonly utilized to redo authentication for scheduled tasks.
2020-12-17 23:40:55 +02:00
Julie Tibshirani 24c0f01543 Ensure all query builder tests consider older versions. (#66401)
This PR removes outdated overrides in some tests that prevent them from testing
older index versions. Also removes an old comment + logic from
AggregatorFactoriesTests.
2020-12-16 11:57:01 -08:00
asce0705 5000ec87ca Fix constructors of NoOpResult (#66269) 2020-12-16 13:37:49 -05:00
Jay Modi 01d54d222b
Fix cat tasks api params in spec and handler (#66294)
This commit fixes the cat tasks api parameter specification and the
handler so that the parameters are consumed during request preparation.

Closes #59493
Backport of #66272
2020-12-14 13:44:09 -07:00
Jim Ferenczi 330de82d59 Fix composite aggregation on unsigned long (#65715)
This commit ensures that the after key is parsed with the doc value formatter.
This is needed for unsigned longs that uses shifted longs internally.

Closes #65685
2020-12-14 16:59:07 +01:00
Armin Braun 7e1fc6dc67
Adjust Cleanup Order of Internal State in SnapshotsService (#66225) (#66244)
In the assertion mentioned in the new comment we first get the `endingSnapshots`
and then check that we don't have a listener that isn't referred to by it so we need
to remove from the listers map before removing from `endingSnapshots` to avoid rare, random
assertion tripping here with concurrent repository operations.
2020-12-14 12:24:39 +01:00
Nhat Nguyen cc674e7d74 Fix TranslogTests#testStats (#66227)
If creating the latest translog file and retrieving a translog stats 
happen within the same millisecond, then the earliestLastModifiedAge
will be zero.

Closes #66092
2020-12-13 10:44:27 -05:00