diff --git a/.gitignore b/.gitignore index 79f0b4012..037f7a3e3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,8 @@ .gradle/ build/ out/ -.idea/ +.idea/* +!.idea/copyright *.ipr *.iws .DS_Store diff --git a/.idea/copyright/OpenSearch.xml b/.idea/copyright/OpenSearch.xml new file mode 100644 index 000000000..dadc9ed84 --- /dev/null +++ b/.idea/copyright/OpenSearch.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml new file mode 100644 index 000000000..5f45523cc --- /dev/null +++ b/.idea/copyright/profiles_settings.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/build-tools/coverage.gradle b/build-tools/coverage.gradle index d24749dc8..33a12c8c7 100644 --- a/build-tools/coverage.gradle +++ b/build-tools/coverage.gradle @@ -1,3 +1,8 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + /* * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * diff --git a/build-tools/pkgbuild.gradle b/build-tools/pkgbuild.gradle index 7aaa7fe43..ee9c92b4e 100644 --- a/build-tools/pkgbuild.gradle +++ b/build-tools/pkgbuild.gradle @@ -1,3 +1,8 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + /* * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * diff --git a/src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/IndexStateManagementHistory.kt b/src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/IndexStateManagementHistory.kt index 336dc60cc..fd51d9a09 100644 --- a/src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/IndexStateManagementHistory.kt +++ b/src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/IndexStateManagementHistory.kt @@ -107,7 +107,7 @@ class IndexStateManagementHistory( override fun onMaster() { try { // try to rollover immediately as we might be restarting the cluster - rolloverHistoryIndex() + if (historyEnabled) rolloverHistoryIndex() // schedule the next rollover for approx MAX_AGE later scheduledRollover = threadPool.scheduleWithFixedDelay( { rolloverAndDeleteHistoryIndex() }, diff --git a/src/main/kotlin/org/opensearch/indexmanagement/util/DummyFileForLicenseCheck.java b/src/main/kotlin/org/opensearch/indexmanagement/util/DummyFileForLicenseCheck.java new file mode 100644 index 000000000..4a9a3dc52 --- /dev/null +++ b/src/main/kotlin/org/opensearch/indexmanagement/util/DummyFileForLicenseCheck.java @@ -0,0 +1,12 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +package org.opensearch.indexmanagement.util; + +/* + * Need to have a java file, so licenseHeaders task can function + */ +public class DummyFileForLicenseCheck { +} diff --git a/src/main/kotlin/org/opensearch/indexmanagement/util/ScheduledJobUtils.kt b/src/main/kotlin/org/opensearch/indexmanagement/util/ScheduledJobUtils.kt index c7d3e1405..e1ab18187 100644 --- a/src/main/kotlin/org/opensearch/indexmanagement/util/ScheduledJobUtils.kt +++ b/src/main/kotlin/org/opensearch/indexmanagement/util/ScheduledJobUtils.kt @@ -1,3 +1,8 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + /* * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. *