Skip to content
This repository was archived by the owner on Aug 2, 2022. It is now read-only.

Commit 869388c

Browse files
authored
Merge branch 'main' into election
2 parents 342019e + 80fcdfd commit 869388c

File tree

589 files changed

+6221
-2561
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

589 files changed

+6221
-2561
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,28 @@
66

77
*If new tests are added, how long do the new ones take to complete*
88

9-
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
9+
Developer's Certificate of Origin 1.1
10+
11+
By making a contribution to this project, I certify that:
12+
13+
(a) The contribution was created in whole or in part by me and I
14+
have the right to submit it under the open source license
15+
indicated in the file; or
16+
17+
(b) The contribution is based upon previous work that, to the best
18+
of my knowledge, is covered under an appropriate open source
19+
license and I have the right under that license to submit that
20+
work with modifications, whether created in whole or in part
21+
by me, under the same open source license (unless I am
22+
permitted to submit under a different license), as indicated
23+
in the file; or
24+
25+
(c) The contribution was provided directly to me by some other
26+
person who certified (a), (b) or (c) and I have not modified
27+
it.
28+
29+
(d) I understand and agree that this project and the contribution
30+
are public and that a record of the contribution (including all
31+
personal information I submit with it, including my sign-off) is
32+
maintained indefinitely and may be redistributed consistent with
33+
this project or the open source license(s) involved.

build.gradle

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ plugins {
3232
id "de.undercouch.download" version "4.0.4"
3333
id 'com.adarshr.test-logger' version '2.1.0'
3434
id 'org.gradle.test-retry' version '1.2.0'
35+
id 'com.diffplug.spotless' version '5.8.2'
3536
}
3637

3738
application {
@@ -87,6 +88,26 @@ checkstyle {
8788
configFile file("configs/checkstyle/checkstyle.xml")
8889
}
8990

91+
apply plugin: 'com.diffplug.spotless'
92+
93+
spotless {
94+
java {
95+
licenseHeaderFile(file('license-header'))
96+
97+
// only apply formatting rules to updated files
98+
// ratchetFrom 'origin/master'
99+
100+
// googleJavaFormat()
101+
// importOrder()
102+
// removeUnusedImports()
103+
// trimTrailingWhitespace()
104+
// endWithNewLine()
105+
106+
// add support for spotless:off and spotless:on tags to exclude sections of code
107+
// toggleOffOn()
108+
}
109+
}
110+
90111
tasks.withType(Checkstyle) {
91112
reports {
92113
xml.enabled false
@@ -226,6 +247,7 @@ sourceCompatibility = 1.8
226247
targetCompatibility = 1.8
227248

228249
compileJava {
250+
dependsOn spotlessApply
229251
JavaVersion targetVersion = JavaVersion.toVersion(targetCompatibility);
230252
if (targetVersion.isJava9Compatible()) {
231253
options.compilerArgs += ["--add-exports", "jdk.attach/sun.tools.attach=ALL-UNNAMED"]

configs/checkstyle/checkstyle.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,6 @@
208208
<!--
209209
<module name="VariableDeclarationUsageDistance"/>
210210
-->
211-
<module name="CustomImportOrder">
212-
<property name="sortImportsInGroupAlphabetically" value="true"/>
213-
<property name="separateLineBetweenGroups" value="true"/>
214-
<property name="customImportOrderRules" value="STATIC###THIRD_PARTY_PACKAGE"/>
215-
</module>
216211
<module name="MethodParamPad"/>
217212
<module name="NoWhitespaceBefore">
218213
<property name="tokens"

license-header

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/*
2+
* Copyright $YEAR Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+

pa_config/rca.conf

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -70,27 +70,7 @@
7070

7171
"muted-rcas": [
7272
"HotShardRca",
73-
"HotShardClusterRca",
74-
// Calculating temperature heat along 4 parameters for Heap dimension
75-
"HeapAllocRateByShardTemperatureCalculator",
76-
"HeapAllocRateByShardAvgTemperatureCalculator",
77-
"HeapAllocRateShardIndependentTemperatureCalculator",
78-
"HeapAllocRateTotalTemperatureCalculator",
79-
// Calculating temperature heat along 4 parameters for CPU dimension
80-
"CpuUtilByShardsMetricBasedTemperatureCalculator",
81-
"AvgCpuUtilByShardsMetricBasedTemperatureCalculator",
82-
"ShardIndependentTemperatureCalculatorCpuUtilMetric",
83-
"TotalCpuUtilForTotalNodeMetric",
84-
// Calculating temperature heat along 3 parameters for Shard Size dimension
85-
"ShardSizeMetricBasedTemperatureCalculator",
86-
"ShardSizeAvgTemperatureCalculator",
87-
"ShardTotalDiskUsageTemperatureCalculator",
88-
// Calculating normalized temperature heat along all the dimensions
89-
"CpuUtilDimensionTemperatureRca",
90-
"HeapAllocRateTemperatureRca",
91-
"ShardSizeDimensionTemperatureRca",
92-
"NodeTemperatureRca",
93-
"ClusterTemperatureRca"
73+
"HotShardClusterRca"
9474
],
9575
"muted-deciders": [],
9676
"muted-actions": [],

pa_config/rca_idle_master.conf

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -81,27 +81,7 @@
8181

8282
"muted-rcas": [
8383
"HotShardRca",
84-
"HotShardClusterRca",
85-
// Calculating temperature heat along 4 parameters for Heap dimension
86-
"HeapAllocRateByShardTemperatureCalculator",
87-
"HeapAllocRateByShardAvgTemperatureCalculator",
88-
"HeapAllocRateShardIndependentTemperatureCalculator",
89-
"HeapAllocRateTotalTemperatureCalculator",
90-
// Calculating temperature heat along 4 parameters for CPU dimension
91-
"CpuUtilByShardsMetricBasedTemperatureCalculator",
92-
"AvgCpuUtilByShardsMetricBasedTemperatureCalculator",
93-
"ShardIndependentTemperatureCalculatorCpuUtilMetric",
94-
"TotalCpuUtilForTotalNodeMetric",
95-
// Calculating temperature heat along 3 parameters for Shard Size dimension
96-
"ShardSizeMetricBasedTemperatureCalculator",
97-
"ShardSizeAvgTemperatureCalculator",
98-
"ShardTotalDiskUsageTemperatureCalculator",
99-
// Calculating normalized temperature heat along all the dimensions
100-
"CpuUtilDimensionTemperatureRca",
101-
"HeapAllocRateTemperatureRca",
102-
"ShardSizeDimensionTemperatureRca",
103-
"NodeTemperatureRca",
104-
"ClusterTemperatureRca"
84+
"HotShardClusterRca"
10585
],
10686
"muted-deciders": [],
10787
"muted-actions": [],

pa_config/rca_master.conf

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -81,27 +81,7 @@
8181

8282
"muted-rcas": [
8383
"HotShardRca",
84-
"HotShardClusterRca",
85-
// Calculating temperature heat along 4 parameters for Heap dimension
86-
"HeapAllocRateByShardTemperatureCalculator",
87-
"HeapAllocRateByShardAvgTemperatureCalculator",
88-
"HeapAllocRateShardIndependentTemperatureCalculator",
89-
"HeapAllocRateTotalTemperatureCalculator",
90-
// Calculating temperature heat along 4 parameters for CPU dimension
91-
"CpuUtilByShardsMetricBasedTemperatureCalculator",
92-
"AvgCpuUtilByShardsMetricBasedTemperatureCalculator",
93-
"ShardIndependentTemperatureCalculatorCpuUtilMetric",
94-
"TotalCpuUtilForTotalNodeMetric",
95-
// Calculating temperature heat along 3 parameters for Shard Size dimension
96-
"ShardSizeMetricBasedTemperatureCalculator",
97-
"ShardSizeAvgTemperatureCalculator",
98-
"ShardTotalDiskUsageTemperatureCalculator",
99-
// Calculating normalized temperature heat along all the dimensions
100-
"CpuUtilDimensionTemperatureRca",
101-
"HeapAllocRateTemperatureRca",
102-
"ShardSizeDimensionTemperatureRca",
103-
"NodeTemperatureRca",
104-
"ClusterTemperatureRca"
84+
"HotShardClusterRca"
10585
],
10686
"muted-deciders": [],
10787
"muted-actions": [],

src/main/java/com/amazon/opendistro/elasticsearch/performanceanalyzer/AppContext.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License").
55
* You may not use this file except in compliance with the License.
6-
* A copy of the License is located at
6+
* A copy of the License is located at
77
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
8+
* http://www.apache.org/licenses/LICENSE-2.0
99
*
10-
* or in the "license" file accompanying this file. This file is distributed
11-
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12-
* express or implied. See the License for the specific language governing
13-
* permissions and limitations under the License.
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
1414
*/
1515

1616
package com.amazon.opendistro.elasticsearch.performanceanalyzer;

src/main/java/com/amazon/opendistro/elasticsearch/performanceanalyzer/CertificateUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
* You may not use this file except in compliance with the License.
66
* A copy of the License is located at
77
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
8+
* http://www.apache.org/licenses/LICENSE-2.0
99
*
1010
* or in the "license" file accompanying this file. This file is distributed
1111
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
1212
* express or implied. See the License for the specific language governing
13-
* permissions and limitations under the License.
13+
* permissions and limitations under the License.
1414
*/
1515

1616
package com.amazon.opendistro.elasticsearch.performanceanalyzer;

src/main/java/com/amazon/opendistro/elasticsearch/performanceanalyzer/ClientServers.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
116
package com.amazon.opendistro.elasticsearch.performanceanalyzer;
217

318
import com.amazon.opendistro.elasticsearch.performanceanalyzer.net.NetClient;

0 commit comments

Comments
 (0)