Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
jowg-amazon committed Aug 18, 2022
1 parent 2f2fd2d commit 32b2f78
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -409,12 +409,12 @@ object ManagedIndexRunner :
if (validationServiceEnabled) {
val validationResult = validationService.validate(action.type, stepContext.metadata.index)
if (validationResult.validationStatus == Validate.ValidationStatus.RE_VALIDATING) {
logger.info("Revalidate")
logger.warn("Validation Status is: RE_VALIDATING")
publishErrorNotification(policy, managedIndexMetaData)
return
}
if (validationResult.validationStatus == Validate.ValidationStatus.FAILED) {
logger.info("Fail forever")
logger.warn("Validation Status is: FAILED")
publishErrorNotification(policy, managedIndexMetaData)
disableManagedIndexConfig(managedIndexConfig)
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,6 @@ class TransportExplainAction @Inject constructor(
val state = policy.getStateToExecute(managedIndexMetadata!!)
val action = state?.getActionToExecute(managedIndexMetadata!!, indexMetadataProvider)
var actionName = action?.type
log.info("Inside Explain API")
log.info("Next Action")
log.info(actionName)
if (actionName == null) {
actionName = "nothing"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ class ValidateForceMerge(

@Suppress("ReturnSuppressCount", "ReturnCount")
override fun execute(indexName: String): Validate {
logger.info("inside force merge")
if (!dataSizeNotLarge(indexName)) {
return this
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ class ValidateRollover(
// returns a Validate object with updated validation and step status
@Suppress("ReturnSuppressCount", "ReturnCount")
override fun execute(indexName: String): Validate {
logger.info("inside rollover")
val (rolloverTarget, isDataStream) = getRolloverTargetOrUpdateInfo(indexName)
rolloverTarget ?: return this

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ import java.time.temporal.ChronoUnit
import java.util.Locale

class ValidateRolloverIT : IndexStateManagementRestTestCase() {
// check test case for no rollover alias (without datastream)

private val testIndexName = javaClass.simpleName.lowercase(Locale.ROOT)

// status: PASSED
Expand Down
8 changes: 4 additions & 4 deletions worksheets/ism/delete.http
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
###
### delete policy
PUT localhost:9200/_opendistro/_ism/policies/exampledelete
Content-Type: application/json

Expand All @@ -24,10 +24,10 @@ Content-Type: application/json
}
}

###
### delete index
PUT http://localhost:9200/testdelete
Content-Type: application/json

###
GET localhost:9200/_plugins/_ism/explain/testdelete?pretty
### explain api call
GET localhost:9200/_plugins/_ism/explain/testdelete?validate_action=true
Accept: application/json
6 changes: 3 additions & 3 deletions worksheets/ism/rollover.http
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ PUT http://localhost:9200/testnoalias
Content-Type: application/json

### explain API
GET localhost:9200/_plugins/_ism/explain/testnoalias?validate_action=false
GET localhost:9200/_plugins/_ism/explain/testnoalias?validate_action=true
Accept: application/json

### delete index
Expand Down Expand Up @@ -119,11 +119,11 @@ Content-Type: application/json
}

### call explain API
GET localhost:9200/_plugins/_ism/explain/log-000002?pretty
GET localhost:9200/_plugins/_ism/explain/log-000002?validate_action=true
Accept: application/json

### call explain API
GET localhost:9200/_plugins/_ism/explain/log-000003?pretty
GET localhost:9200/_plugins/_ism/explain/log-000003?validate_action=true
Accept: application/json

### delete index
Expand Down

0 comments on commit 32b2f78

Please sign in to comment.