"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "graylog-storage-elasticsearch7/src/main/java/org/graylog/storage/elasticsearch7/ElasticsearchClient.java" between
graylog2-server-4.0.4.tar.gz and graylog2-server-4.0.5.tar.gz

About: Graylog is a fully integrated log management platform for collecting, indexing, and analyzing both structured and unstructured data from almost any source (builds on MongoDB database and Elasticsearch search engine). Server instance (source code).

ElasticsearchClient.java  (graylog2-server-4.0.4):ElasticsearchClient.java  (graylog2-server-4.0.5)
skipping to change at line 153 skipping to change at line 153
} catch (Exception e) { } catch (Exception e) {
return false; return false;
} }
} }
private boolean isIndexNotFoundException(ElasticsearchException e) { private boolean isIndexNotFoundException(ElasticsearchException e) {
return e.getMessage().contains("index_not_found_exception"); return e.getMessage().contains("index_not_found_exception");
} }
public static RequestOptions withTimeout(RequestOptions requestOptions, Dura tion timeout) { public static RequestOptions withTimeout(RequestOptions requestOptions, Dura tion timeout) {
final RequestConfig requestConfigWithTimeout = RequestConfig.copy(reques final RequestConfig.Builder requestConfigBuilder = (requestOptions == nu
tOptions.getRequestConfig()) ll || requestOptions.getRequestConfig() == null)
? RequestConfig.custom()
: RequestConfig.copy(requestOptions.getRequestConfig());
final RequestConfig requestConfigWithTimeout = requestConfigBuilder
.setSocketTimeout(Math.toIntExact(timeout.toMilliseconds())) .setSocketTimeout(Math.toIntExact(timeout.toMilliseconds()))
.build(); .build();
return requestOptions.toBuilder() final RequestOptions.Builder requestOptionsBuilder = requestOptions == n
ull
? RequestOptions.DEFAULT.toBuilder()
: requestOptions.toBuilder();
return requestOptionsBuilder
.setRequestConfig(requestConfigWithTimeout) .setRequestConfig(requestConfigWithTimeout)
.build(); .build();
} }
} }
 End of changes. 2 change blocks. 
3 lines changed or deleted 10 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)