new Object[]{index, documentType, documentId, response.status()}); flowFile = session.putAttribute(flowFile, ES_ERROR_MESSAGE, UNABLE_TO_DELETE_DOCUMENT_MESSAGE); flowFile = session.putAttribute(flowFile, ES_REST_STATUS, response.status().toString()); context.yield(); if ( response.status() == RestStatus.NOT_FOUND ) {
commaSeparatedIndices,restoreRepositoryName,snapshotN,renamePattern,renameReplacement); logger.info("Restore Status = "+restoreSnapshotResponse.status().toString());
public void runSnapshotBackup() throws Exception { // Create or Get Repository String repositoryName = repository.createOrGetSnapshotRepository(); // StartBackup String snapshotName = getSnapshotName(config.getCommaSeparatedIndicesToBackup(), config.includeIndexNameInSnapshot()); logger.info("Repository Name : <"+repositoryName+"> Snapshot Name : <"+snapshotName+"> \nRunning Snapshot now ... "); Client esTransportClient = ESTransportClient.instance(config).getTransportClient(); Stopwatch snapshotTimer = snapshotDuration.start(); //This is a blocking call. It'll wait until Snapshot is finished. CreateSnapshotResponse createSnapshotResponse = getCreateSnapshotResponse(esTransportClient,repositoryName,snapshotName); logger.info("Snapshot Status = "+createSnapshotResponse.status().toString()); if(createSnapshotResponse.status() == RestStatus.OK) { //TODO Add Servo Monitoring so that it can be verified from dashboard printSnapshotDetails(createSnapshotResponse); snapshotSuccess.incrementAndGet(); } else if (createSnapshotResponse.status() == RestStatus.INTERNAL_SERVER_ERROR) { //TODO Add Servo Monitoring so that it can be verified from dashboard logger.info("Snapshot Completely Failed"); snapshotFailure.incrementAndGet(); } //Stop the timer snapshotTimer.stop(); }
new Object[]{index, documentType, documentId, response.status()}); flowFile = session.putAttribute(flowFile, ES_ERROR_MESSAGE, UNABLE_TO_DELETE_DOCUMENT_MESSAGE); flowFile = session.putAttribute(flowFile, ES_REST_STATUS, response.status().toString()); context.yield(); if ( response.status() == RestStatus.NOT_FOUND ) {