Java Code Examples for org.elasticsearch.rest.RestStatus#SERVICE_UNAVAILABLE

The following examples show how to use org.elasticsearch.rest.RestStatus#SERVICE_UNAVAILABLE . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TestDeleteElasticsearch5.java    From nifi with Apache License 2.0 6 votes vote down vote up
@Test
public void testDeleteServerFailure() throws IOException {
    restStatus = RestStatus.SERVICE_UNAVAILABLE;
    deleteResponse = new DeleteResponse(null, TYPE1, documentId, 1, true) {

        @Override
        public RestStatus status() {
            return restStatus;
        }

    };
    runner.enqueue(new byte [] {}, new HashMap<String, String>() {{
        put("documentId", documentId);
    }});
    runner.run(1, true, true);

    runner.assertAllFlowFilesTransferred(DeleteElasticsearch5.REL_FAILURE, 1);
    final MockFlowFile out = runner.getFlowFilesForRelationship(DeleteElasticsearch5.REL_FAILURE).get(0);
    assertNotNull(out);
    assertEquals(DeleteElasticsearch5.UNABLE_TO_DELETE_DOCUMENT_MESSAGE,out.getAttribute(DeleteElasticsearch5.ES_ERROR_MESSAGE));
    out.assertAttributeEquals(DeleteElasticsearch5.ES_REST_STATUS, restStatus.toString());
    out.assertAttributeEquals(DeleteElasticsearch5.ES_FILENAME, documentId);
    out.assertAttributeEquals(DeleteElasticsearch5.ES_INDEX, INDEX1);
    out.assertAttributeEquals(DeleteElasticsearch5.ES_TYPE, TYPE1);
}
 
Example 2
Source File: MasterNotDiscoveredException.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
@Override
public RestStatus status() {
    return RestStatus.SERVICE_UNAVAILABLE;
}
 
Example 3
Source File: FlushNotAllowedEngineException.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
@Override
public RestStatus status() {
    return RestStatus.SERVICE_UNAVAILABLE;
}
 
Example 4
Source File: NoNodeAvailableException.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
@Override
public RestStatus status() {
    return RestStatus.SERVICE_UNAVAILABLE;
}
 
Example 5
Source File: ProcessClusterEventTimeoutException.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
@Override
public RestStatus status() {
    return RestStatus.SERVICE_UNAVAILABLE;
}
 
Example 6
Source File: ConcurrentSnapshotExecutionException.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
@Override
public RestStatus status() {
    return RestStatus.SERVICE_UNAVAILABLE;
}
 
Example 7
Source File: UnavailableShardsException.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
@Override
public RestStatus status() {
    return RestStatus.SERVICE_UNAVAILABLE;
}
 
Example 8
Source File: NoShardAvailableActionException.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
@Override
public RestStatus status() {
    return RestStatus.SERVICE_UNAVAILABLE;
}
 
Example 9
Source File: MasterNotDiscoveredException.java    From crate with Apache License 2.0 4 votes vote down vote up
@Override
public RestStatus status() {
    return RestStatus.SERVICE_UNAVAILABLE;
}
 
Example 10
Source File: NoNodeAvailableException.java    From crate with Apache License 2.0 4 votes vote down vote up
@Override
public RestStatus status() {
    return RestStatus.SERVICE_UNAVAILABLE;
}
 
Example 11
Source File: ProcessClusterEventTimeoutException.java    From crate with Apache License 2.0 4 votes vote down vote up
@Override
public RestStatus status() {
    return RestStatus.SERVICE_UNAVAILABLE;
}
 
Example 12
Source File: CircuitBreakingException.java    From crate with Apache License 2.0 4 votes vote down vote up
@Override
public RestStatus status() {
    return RestStatus.SERVICE_UNAVAILABLE;
}
 
Example 13
Source File: ConcurrentSnapshotExecutionException.java    From crate with Apache License 2.0 4 votes vote down vote up
@Override
public RestStatus status() {
    return RestStatus.SERVICE_UNAVAILABLE;
}
 
Example 14
Source File: UnavailableShardsException.java    From crate with Apache License 2.0 4 votes vote down vote up
@Override
public RestStatus status() {
    return RestStatus.SERVICE_UNAVAILABLE;
}
 
Example 15
Source File: NoShardAvailableActionException.java    From crate with Apache License 2.0 4 votes vote down vote up
@Override
public RestStatus status() {
    return RestStatus.SERVICE_UNAVAILABLE;
}