Checkstyle: Adhere to checkstyle in all xpack .java files

In elastic/elasticsearch#1442 checkstyle checks were added, but also some files were freed from this.
If we have support for checkstyle, we should check this for all files and not allow
exceptions. This commit removes the file list to ignore any files and fixes all the
java files.

Original commit: elastic/x-pack-elasticsearch@99e6cbc5be
This commit is contained in:
Alexander Reelsen 2016-02-05 14:35:27 +01:00
parent 878d244a96
commit e6784d5c7d
455 changed files with 3897 additions and 2663 deletions

View File

@ -8,468 +8,4 @@
<!-- Hopefully temporary suppression of LineLength on files that don't pass it. We should remove these when we the
files start to pass. -->
<!-- -->
<suppress files="elasticsearch[/\\]x-pack[/\\]license-plugin[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]license[/\\]plugin[/\\]action[/\\]delete[/\\]DeleteLicenseRequestBuilder.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]license-plugin[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]license[/\\]plugin[/\\]action[/\\]delete[/\\]TransportDeleteLicenseAction.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]license-plugin[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]license[/\\]plugin[/\\]action[/\\]get[/\\]GetLicenseRequestBuilder.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]license-plugin[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]license[/\\]plugin[/\\]action[/\\]get[/\\]TransportGetLicenseAction.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]license-plugin[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]license[/\\]plugin[/\\]action[/\\]put[/\\]PutLicenseResponse.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]license-plugin[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]license[/\\]plugin[/\\]action[/\\]put[/\\]TransportPutLicenseAction.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]license-plugin[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]license[/\\]plugin[/\\]core[/\\]LicensesMetaData.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]license-plugin[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]license[/\\]plugin[/\\]core[/\\]LicensesService.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]license-plugin[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]license[/\\]plugin[/\\]core[/\\]TrialLicense.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]license-plugin[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]license[/\\]plugin[/\\]rest[/\\]RestDeleteLicenseAction.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]license-plugin[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]license[/\\]plugin[/\\]rest[/\\]RestGetLicenseAction.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]license-plugin[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]license[/\\]plugin[/\\]rest[/\\]RestPutLicenseAction.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]InternalClient.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]ShieldPlugin.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]action[/\\]ShieldActionFilter.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]action[/\\]interceptor[/\\]BulkRequestInterceptor.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]action[/\\]interceptor[/\\]FieldAndDocumentLevelSecurityRequestInterceptor.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]action[/\\]interceptor[/\\]UpdateRequestInterceptor.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]action[/\\]realm[/\\]ClearRealmCacheRequestBuilder.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]action[/\\]realm[/\\]TransportClearRealmCacheAction.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]action[/\\]role[/\\]AddRoleRequestBuilder.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]action[/\\]role[/\\]ClearRolesCacheRequestBuilder.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]action[/\\]role[/\\]TransportClearRolesCacheAction.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]action[/\\]role[/\\]TransportDeleteRoleAction.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]action[/\\]role[/\\]TransportGetRolesAction.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]action[/\\]user[/\\]AddUserRequest.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]action[/\\]user[/\\]TransportDeleteUserAction.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]action[/\\]user[/\\]TransportGetUsersAction.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]audit[/\\]index[/\\]IndexAuditTrail.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]audit[/\\]logfile[/\\]LoggingAuditTrail.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]AuthenticationFailureHandler.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]AuthenticationModule.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]InternalAuthenticationService.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]Realms.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]activedirectory[/\\]ActiveDirectoryGroupsResolver.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]activedirectory[/\\]ActiveDirectorySessionFactory.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]esnative[/\\]ESNativeUsersStore.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]esusers[/\\]ESUsersRealm.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]esusers[/\\]FileUserPasswdStore.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]esusers[/\\]FileUserRolesStore.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]esusers[/\\]tool[/\\]ESUsersTool.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]ldap[/\\]LdapRealm.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]ldap[/\\]LdapUserSearchSessionFactory.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]ldap[/\\]support[/\\]AbstractLdapRealm.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]ldap[/\\]support[/\\]LdapLoadBalancing.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]ldap[/\\]support[/\\]LdapUtils.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]ldap[/\\]support[/\\]SessionFactory.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]pki[/\\]PkiRealm.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]support[/\\]CachingUsernamePasswordRealm.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]support[/\\]DnRoleMapper.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]support[/\\]Hasher.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authz[/\\]InternalAuthorizationService.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authz[/\\]RoleDescriptor.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authz[/\\]accesscontrol[/\\]DocumentSubsetReader.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authz[/\\]accesscontrol[/\\]FieldSubsetReader.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authz[/\\]accesscontrol[/\\]OptOutQueryCache.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authz[/\\]accesscontrol[/\\]ShieldIndexSearcherWrapper.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authz[/\\]esnative[/\\]ESNativeRolesStore.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authz[/\\]indicesresolver[/\\]DefaultIndicesAndAliasesResolver.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authz[/\\]permission[/\\]GlobalPermission.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authz[/\\]permission[/\\]IndicesPermission.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authz[/\\]permission[/\\]Role.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authz[/\\]privilege[/\\]ClusterPrivilege.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authz[/\\]privilege[/\\]IndexPrivilege.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authz[/\\]store[/\\]FileRolesStore.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]crypto[/\\]InternalCryptoService.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]crypto[/\\]tool[/\\]SystemKeyTool.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]license[/\\]ShieldLicensee.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]rest[/\\]ShieldRestFilter.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]rest[/\\]action[/\\]RestAuthenticateAction.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]rest[/\\]action[/\\]RestShieldInfoAction.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]ssl[/\\]AbstractSSLService.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]support[/\\]ShieldFiles.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]transport[/\\]ShieldClientTransportService.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]transport[/\\]ShieldServerTransportService.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]transport[/\\]filter[/\\]IPFilter.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]transport[/\\]filter[/\\]ShieldIpFilterRule.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]transport[/\\]netty[/\\]IPFilterNettyUpstreamHandler.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]transport[/\\]netty[/\\]ShieldNettyTransport.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]WatcherLifeCycleService.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]WatcherModule.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]WatcherPlugin.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]WatcherService.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]ActionRegistry.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]ActionStatus.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]ActionWrapper.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]WatcherActionModule.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]email[/\\]DataAttachment.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]email[/\\]EmailAction.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]email[/\\]ExecutableEmailAction.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]email[/\\]service[/\\]Account.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]email[/\\]service[/\\]Email.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]email[/\\]service[/\\]EmailTemplate.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]email[/\\]service[/\\]InternalEmailService.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]email[/\\]service[/\\]Profile.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]email[/\\]service[/\\]attachment[/\\]DataAttachmentParser.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]email[/\\]service[/\\]attachment[/\\]EmailAttachments.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]email[/\\]service[/\\]attachment[/\\]HttpEmailAttachementParser.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]hipchat[/\\]ExecutableHipChatAction.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]hipchat[/\\]HipChatAction.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]hipchat[/\\]HipChatActionFactory.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]hipchat[/\\]service[/\\]HipChatAccount.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]hipchat[/\\]service[/\\]HipChatMessage.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]hipchat[/\\]service[/\\]IntegrationAccount.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]hipchat[/\\]service[/\\]InternalHipChatService.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]hipchat[/\\]service[/\\]SentMessages.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]hipchat[/\\]service[/\\]UserAccount.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]hipchat[/\\]service[/\\]V1Account.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]index[/\\]ExecutableIndexAction.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]index[/\\]IndexAction.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]logging[/\\]LoggingAction.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]pagerduty[/\\]ExecutablePagerDutyAction.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]pagerduty[/\\]PagerDutyActionFactory.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]pagerduty[/\\]service[/\\]IncidentEvent.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]pagerduty[/\\]service[/\\]IncidentEventContext.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]pagerduty[/\\]service[/\\]InternalPagerDutyService.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]pagerduty[/\\]service[/\\]SentEvent.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]slack[/\\]SlackAction.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]slack[/\\]SlackActionFactory.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]slack[/\\]service[/\\]InternalSlackService.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]slack[/\\]service[/\\]message[/\\]Attachment.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]slack[/\\]service[/\\]message[/\\]DynamicAttachments.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]slack[/\\]service[/\\]message[/\\]Field.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]slack[/\\]service[/\\]message[/\\]SlackMessage.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]webhook[/\\]WebhookAction.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]condition[/\\]ConditionBuilders.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]condition[/\\]ConditionRegistry.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]condition[/\\]always[/\\]AlwaysCondition.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]condition[/\\]compare[/\\]AbstractExecutableCompareCondition.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]condition[/\\]compare[/\\]CompareCondition.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]condition[/\\]compare[/\\]array[/\\]ArrayCompareCondition.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]condition[/\\]compare[/\\]array[/\\]ArrayCompareConditionFactory.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]condition[/\\]compare[/\\]array[/\\]ExecutableArrayCompareCondition.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]condition[/\\]never[/\\]NeverCondition.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]condition[/\\]script[/\\]ExecutableScriptCondition.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]condition[/\\]script[/\\]ScriptCondition.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]execution[/\\]AsyncTriggerListener.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]execution[/\\]CurrentExecutions.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]execution[/\\]ExecutionModule.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]execution[/\\]ExecutionService.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]execution[/\\]ManualExecutionContext.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]execution[/\\]SyncTriggerListener.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]execution[/\\]TriggeredWatchStore.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]execution[/\\]WatchExecutionResult.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]history[/\\]HistoryStore.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]input[/\\]InputRegistry.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]input[/\\]chain[/\\]ChainInputFactory.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]input[/\\]http[/\\]ExecutableHttpInput.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]input[/\\]http[/\\]HttpInput.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]input[/\\]http[/\\]HttpInputFactory.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]input[/\\]none[/\\]NoneInput.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]input[/\\]search[/\\]SearchInput.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]input[/\\]simple[/\\]SimpleInput.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]rest[/\\]action[/\\]RestExecuteWatchAction.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]support[/\\]Script.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]support[/\\]WatcherDateTimeUtils.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]support[/\\]WatcherUtils.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]support[/\\]http[/\\]HttpClient.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]support[/\\]http[/\\]HttpRequest.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]support[/\\]http[/\\]HttpRequestTemplate.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]support[/\\]http[/\\]HttpResponse.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]support[/\\]init[/\\]InitializingModule.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]support[/\\]text[/\\]TextTemplate.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]support[/\\]text[/\\]xmustache[/\\]XMustacheScriptEngineService.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]support[/\\]text[/\\]xmustache[/\\]XMustacheTextTemplateEngine.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]support[/\\]xcontent[/\\]WatcherXContentUtils.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]transform[/\\]chain[/\\]ChainTransform.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]transform[/\\]chain[/\\]ChainTransformFactory.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]transform[/\\]chain[/\\]ExecutableChainTransform.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]transform[/\\]script[/\\]ExecutableScriptTransform.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]transform[/\\]script[/\\]ScriptTransform.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]transform[/\\]search[/\\]SearchTransform.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]transport[/\\]actions[/\\]WatcherTransportAction.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]transport[/\\]actions[/\\]ack[/\\]TransportAckWatchAction.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]transport[/\\]actions[/\\]activate[/\\]ActivateWatchRequestBuilder.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]transport[/\\]actions[/\\]activate[/\\]TransportActivateWatchAction.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]transport[/\\]actions[/\\]delete[/\\]DeleteWatchRequestBuilder.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]transport[/\\]actions[/\\]delete[/\\]TransportDeleteWatchAction.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]transport[/\\]actions[/\\]execute[/\\]ExecuteWatchAction.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]transport[/\\]actions[/\\]execute[/\\]ExecuteWatchRequest.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]transport[/\\]actions[/\\]execute[/\\]ExecuteWatchRequestBuilder.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]transport[/\\]actions[/\\]execute[/\\]TransportExecuteWatchAction.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]transport[/\\]actions[/\\]get[/\\]GetWatchRequestBuilder.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]transport[/\\]actions[/\\]get[/\\]TransportGetWatchAction.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]transport[/\\]actions[/\\]put[/\\]TransportPutWatchAction.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]transport[/\\]actions[/\\]service[/\\]TransportWatcherServiceAction.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]transport[/\\]actions[/\\]service[/\\]WatcherServiceRequestBuilder.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]transport[/\\]actions[/\\]stats[/\\]TransportWatcherStatsAction.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]transport[/\\]actions[/\\]stats[/\\]WatcherStatsRequestBuilder.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]trigger[/\\]AbstractTriggerEngine.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]trigger[/\\]TriggerService.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]trigger[/\\]manual[/\\]ManualTrigger.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]trigger[/\\]manual[/\\]ManualTriggerEngine.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]trigger[/\\]manual[/\\]ManualTriggerEvent.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]trigger[/\\]schedule[/\\]Cron.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]trigger[/\\]schedule[/\\]CronSchedule.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]trigger[/\\]schedule[/\\]DailySchedule.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]trigger[/\\]schedule[/\\]HourlySchedule.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]trigger[/\\]schedule[/\\]ScheduleModule.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]trigger[/\\]schedule[/\\]ScheduleRegistry.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]trigger[/\\]schedule[/\\]ScheduleTriggerEngine.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]trigger[/\\]schedule[/\\]ScheduleTriggerEvent.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]trigger[/\\]schedule[/\\]engine[/\\]SchedulerScheduleTriggerEngine.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]trigger[/\\]schedule[/\\]engine[/\\]TickerScheduleTriggerEngine.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]trigger[/\\]schedule[/\\]support[/\\]DayTimes.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]trigger[/\\]schedule[/\\]support[/\\]MonthTimes.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]trigger[/\\]schedule[/\\]support[/\\]WeekTimes.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]trigger[/\\]schedule[/\\]support[/\\]YearTimes.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]watch[/\\]Watch.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]watch[/\\]WatchLockService.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]watch[/\\]WatchStatus.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]marvel[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]marvel[/\\]MarvelPlugin.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]marvel[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]marvel[/\\]agent[/\\]AgentService.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]marvel[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]marvel[/\\]agent[/\\]collector[/\\]AbstractCollector.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]marvel[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]marvel[/\\]agent[/\\]collector[/\\]cluster[/\\]ClusterStateCollector.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]marvel[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]marvel[/\\]agent[/\\]collector[/\\]cluster[/\\]ClusterStatsCollector.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]marvel[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]marvel[/\\]agent[/\\]collector[/\\]indices[/\\]IndexRecoveryCollector.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]marvel[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]marvel[/\\]agent[/\\]collector[/\\]indices[/\\]IndexStatsCollector.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]marvel[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]marvel[/\\]agent[/\\]collector[/\\]indices[/\\]IndicesStatsCollector.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]marvel[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]marvel[/\\]agent[/\\]collector[/\\]node[/\\]NodeStatsCollector.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]marvel[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]marvel[/\\]agent[/\\]collector[/\\]node[/\\]NodeStatsMarvelDoc.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]marvel[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]marvel[/\\]agent[/\\]exporter[/\\]Exporter.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]marvel[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]marvel[/\\]agent[/\\]exporter[/\\]http[/\\]HttpExporter.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]marvel[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]marvel[/\\]agent[/\\]exporter[/\\]local[/\\]LocalBulk.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]marvel[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]marvel[/\\]agent[/\\]exporter[/\\]local[/\\]LocalExporter.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]marvel[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]marvel[/\\]agent[/\\]settings[/\\]MarvelSettings.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]marvel[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]marvel[/\\]cleaner[/\\]CleanerService.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]license-plugin[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]license[/\\]plugin[/\\]AbstractLicensesConsumerPluginIntegrationTestCase.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]license-plugin[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]license[/\\]plugin[/\\]AbstractLicensesIntegrationTestCase.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]license-plugin[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]license[/\\]plugin[/\\]LicensesServiceNodeTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]license-plugin[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]license[/\\]plugin[/\\]LicensesTransportTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]license-plugin[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]license[/\\]plugin[/\\]TestUtils.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]license-plugin[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]license[/\\]plugin[/\\]consumer[/\\]TestPluginServiceBase.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]license-plugin[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]license[/\\]plugin[/\\]core[/\\]LicensesAcknowledgementTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]license-plugin[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]license[/\\]plugin[/\\]core[/\\]LicensesExpirationCallbackTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]license-plugin[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]license[/\\]plugin[/\\]core[/\\]LicensesExpiryNotificationTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]integration[/\\]AbstractPrivilegeTestCase.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]integration[/\\]BulkUpdateTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]integration[/\\]ClearRealmsCacheTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]integration[/\\]ClearRolesCacheTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]integration[/\\]ClusterPrivilegeTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]integration[/\\]DocumentAndFieldLevelSecurityTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]integration[/\\]DocumentLevelSecurityRandomTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]integration[/\\]DocumentLevelSecurityTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]integration[/\\]FieldLevelSecurityRandomTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]integration[/\\]FieldLevelSecurityTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]integration[/\\]IndexPrivilegeTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]integration[/\\]IndicesPermissionsWithAliasesWildcardsAndRegexsTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]integration[/\\]MultipleIndicesPermissionsTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]integration[/\\]PermissionPrecedenceTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]integration[/\\]ScrollIdSigningTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]integration[/\\]SearchGetAndSuggestPermissionsTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]integration[/\\]SettingsFilterTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]integration[/\\]ShieldClearScrollTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]integration[/\\]ldap[/\\]AbstractAdLdapRealmTestCase.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]ShieldF.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]ShieldPluginEnabledDisabledTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]ShieldPluginTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]VersionCompatibilityTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]action[/\\]ShieldActionFilterTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]action[/\\]ShieldActionMapperTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]audit[/\\]AuditTrailModuleTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]audit[/\\]index[/\\]IndexAuditTrailEnabledTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]audit[/\\]index[/\\]IndexAuditTrailTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]audit[/\\]index[/\\]IndexAuditTrailUpdateMappingTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]audit[/\\]index[/\\]RemoteIndexAuditTrailStartingTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]audit[/\\]logfile[/\\]LoggingAuditTrailTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]AnonymousUserTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]AuthenticationModuleTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]InternalAuthenticationServiceTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]RealmsTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]RunAsIntegTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]activedirectory[/\\]ActiveDirectoryGroupsResolverTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]activedirectory[/\\]ActiveDirectoryRealmTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]activedirectory[/\\]ActiveDirectorySessionFactoryTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]esnative[/\\]ESNativeTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]esusers[/\\]FileUserRolesStoreTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]ldap[/\\]LdapSessionFactoryTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]ldap[/\\]LdapUserSearchSessionFactoryTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]ldap[/\\]OpenLdapTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]ldap[/\\]SearchGroupsResolverTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]ldap[/\\]UserAttributeGroupsResolverTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]ldap[/\\]support[/\\]LdapLoadBalancingTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]ldap[/\\]support[/\\]LdapTestCase.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]ldap[/\\]support[/\\]SessionFactoryLoadBalancingTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]pki[/\\]PkiAuthenticationTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]pki[/\\]PkiOptionalClientAuthTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]pki[/\\]PkiRealmTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]pki[/\\]PkiWithoutClientAuthenticationTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]pki[/\\]PkiWithoutSSLTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]support[/\\]CachingUsernamePasswordRealmTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authc[/\\]support[/\\]UsernamePasswordTokenTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authz[/\\]AnalyzeTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authz[/\\]IndexAliasesTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authz[/\\]InternalAuthorizationServiceTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authz[/\\]RoleDescriptorTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authz[/\\]accesscontrol[/\\]DocumentSubsetReaderTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authz[/\\]accesscontrol[/\\]FieldDataCacheWithFieldSubsetReaderTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authz[/\\]accesscontrol[/\\]FieldSubsetReaderTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authz[/\\]accesscontrol[/\\]ShieldIndexSearcherWrapperIntegrationTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authz[/\\]accesscontrol[/\\]ShieldIndexSearcherWrapperUnitTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authz[/\\]indicesresolver[/\\]DefaultIndicesResolverTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authz[/\\]permission[/\\]PermissionTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]authz[/\\]store[/\\]FileRolesStoreTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]license[/\\]ShieldLicenseStateTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]rest[/\\]action[/\\]RestAuthenticateActionTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]support[/\\]ValidationTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]transport[/\\]ServerTransportFilterIntegrationTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]transport[/\\]ServerTransportFilterTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]transport[/\\]TransportFilterTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]transport[/\\]filter[/\\]IPFilterTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]transport[/\\]filter[/\\]IpFilteringIntegrationTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]transport[/\\]netty[/\\]HandshakeWaitingHandlerTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]transport[/\\]netty[/\\]IPFilterNettyUpstreamHandlerTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]transport[/\\]netty[/\\]ShieldNettyHttpServerTransportTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]transport[/\\]netty[/\\]ShieldNettyTransportTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]transport[/\\]netty[/\\]SslHostnameVerificationTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]transport[/\\]ssl[/\\]SslClientAuthTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]transport[/\\]ssl[/\\]SslIntegrationTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]transport[/\\]ssl[/\\]SslMultiPortTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]test[/\\]ShieldIntegTestCase.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]test[/\\]ShieldSettingsSource.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]transport[/\\]KnownActionsTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]shield[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]transport[/\\]ShieldServerTransportServiceTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]WatcherF.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]WatcherPluginDisableTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]WatcherPluginTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]WatcherServiceTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]email[/\\]EmailActionTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]email[/\\]service[/\\]AccountTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]email[/\\]service[/\\]EmailTemplateTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]email[/\\]service[/\\]HtmlSanitizerTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]email[/\\]service[/\\]InternalEmailServiceTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]email[/\\]service[/\\]ManualPublicSmtpServersTester.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]email[/\\]service[/\\]attachment[/\\]EmailAttachmentParsersTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]email[/\\]service[/\\]attachment[/\\]HttpEmailAttachementParserTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]hipchat[/\\]service[/\\]IntegrationAccountTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]hipchat[/\\]service[/\\]InternalHipChatServiceTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]hipchat[/\\]service[/\\]UserAccountTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]pagerduty[/\\]PagerDutyActionTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]pagerduty[/\\]service[/\\]PagerDutyServiceTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]slack[/\\]SlackActionTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]slack[/\\]service[/\\]SlackServiceTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]slack[/\\]service[/\\]message[/\\]SlackMessageTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]throttler[/\\]AckThrottlerTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]throttler[/\\]ActionThrottleTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]throttler[/\\]PeriodThrottlerTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]webhook[/\\]WebhookActionTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]webhook[/\\]WebhookIntegrationTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]condition[/\\]compare[/\\]CompareConditionSearchTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]condition[/\\]compare[/\\]CompareConditionTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]condition[/\\]compare[/\\]array[/\\]ArrayCompareConditionSearchTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]condition[/\\]compare[/\\]array[/\\]ArrayCompareConditionTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]condition[/\\]script[/\\]ScriptConditionSearchTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]condition[/\\]script[/\\]ScriptConditionTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]execution[/\\]ExecutionServiceTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]execution[/\\]ManualExecutionTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]execution[/\\]TriggeredWatchStoreLifeCycleTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]execution[/\\]TriggeredWatchStoreTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]history[/\\]HistoryStoreSettingsTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]history[/\\]HistoryStoreTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]history[/\\]HistoryTemplateTimeMappingsTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]history[/\\]HistoryTemplateTransformMappingsTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]input[/\\]chain[/\\]ChainInputTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]input[/\\]http[/\\]HttpInputTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]license[/\\]LicenseTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]shield[/\\]BasicShieldTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]support[/\\]DynamicIndexNameIntegrationTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]support[/\\]FilterXContentTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]support[/\\]WatcherDateTimeUtilsTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]support[/\\]WatcherIndexTemplateRegistryTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]support[/\\]WatcherUtilsTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]support[/\\]concurrent[/\\]FairKeyedLockTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]support[/\\]text[/\\]TextTemplateTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]support[/\\]text[/\\]xmustache[/\\]XMustacheScriptEngineTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]support[/\\]text[/\\]xmustache[/\\]XMustacheTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]test[/\\]AbstractWatcherIntegrationTestCase.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]test[/\\]WatcherTestUtils.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]test[/\\]bench[/\\]ScheduleEngineTriggerBenchmark.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]test[/\\]bench[/\\]WatcherExecutorServiceBenchmark.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]test[/\\]bench[/\\]WatcherScheduleEngineBenchmark.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]test[/\\]integration[/\\]BootStrapTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]test[/\\]integration[/\\]ExecutionVarsIntegrationTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]test[/\\]integration[/\\]HttpSecretsIntegrationTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]test[/\\]integration[/\\]NoMasterNodeTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]test[/\\]integration[/\\]WatchMetadataTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]test[/\\]integration[/\\]WatcherSettingsFilterTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]transform[/\\]TransformIntegrationTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]transform[/\\]chain[/\\]ChainTransformTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]transport[/\\]action[/\\]ack[/\\]WatchAckTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]transport[/\\]action[/\\]execute[/\\]ExecuteWatchTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]transport[/\\]action[/\\]stats[/\\]SlowWatchStatsTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]transport[/\\]action[/\\]stats[/\\]WatcherStatsTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]trigger[/\\]ScheduleTriggerEngineMock.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]trigger[/\\]schedule[/\\]CronScheduleTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]trigger[/\\]schedule[/\\]IntervalScheduleTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]trigger[/\\]schedule[/\\]WeeklyScheduleTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]watch[/\\]WatchStoreTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]watch[/\\]WatchTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]marvel[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]marvel[/\\]MarvelF.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]marvel[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]marvel[/\\]agent[/\\]collector[/\\]AbstractCollectorTestCase.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]marvel[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]marvel[/\\]agent[/\\]collector[/\\]cluster[/\\]ClusterStateCollectorTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]marvel[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]marvel[/\\]agent[/\\]collector[/\\]cluster[/\\]ClusterStatsCollectorTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]marvel[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]marvel[/\\]agent[/\\]collector[/\\]indices[/\\]IndexRecoveryCollectorTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]marvel[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]marvel[/\\]agent[/\\]collector[/\\]indices[/\\]IndexStatsCollectorTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]marvel[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]marvel[/\\]agent[/\\]collector[/\\]node[/\\]NodeStatsCollectorTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]marvel[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]marvel[/\\]agent[/\\]collector[/\\]shards[/\\]ShardsCollectorTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]marvel[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]marvel[/\\]agent[/\\]exporter[/\\]ExportersTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]marvel[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]marvel[/\\]agent[/\\]exporter[/\\]http[/\\]HttpExporterTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]marvel[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]marvel[/\\]agent[/\\]exporter[/\\]local[/\\]LocalExporterTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]marvel[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]marvel[/\\]agent[/\\]renderer[/\\]cluster[/\\]ClusterInfoTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]marvel[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]marvel[/\\]agent[/\\]renderer[/\\]cluster[/\\]ClusterStateTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]marvel[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]marvel[/\\]agent[/\\]renderer[/\\]indices[/\\]IndexRecoveryRendererTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]marvel[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]marvel[/\\]agent[/\\]renderer[/\\]indices[/\\]IndexRecoveryTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]marvel[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]marvel[/\\]agent[/\\]renderer[/\\]indices[/\\]IndexStatsRendererTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]marvel[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]marvel[/\\]agent[/\\]renderer[/\\]node[/\\]MultiNodesStatsTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]marvel[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]marvel[/\\]agent[/\\]renderer[/\\]shards[/\\]ShardsRendererTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]marvel[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]marvel[/\\]agent[/\\]renderer[/\\]shards[/\\]ShardsTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]marvel[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]marvel[/\\]cleaner[/\\]AbstractIndicesCleanerTestCase.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]marvel[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]marvel[/\\]cleaner[/\\]CleanerServiceTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]marvel[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]marvel[/\\]cleaner[/\\]local[/\\]LocalIndicesCleanerTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]marvel[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]marvel[/\\]license[/\\]LicenseIntegrationTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]marvel[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]marvel[/\\]shield[/\\]MarvelInternalClientTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]marvel[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]marvel[/\\]support[/\\]VersionUtilsTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]marvel[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]marvel[/\\]test[/\\]MarvelIntegTestCase.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]license[/\\]base[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]license[/\\]core[/\\]License.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]license[/\\]base[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]license[/\\]core[/\\]LicenseSerializationTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]license[/\\]base[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]license[/\\]core[/\\]TestUtils.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]license[/\\]found-plugin[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]license[/\\]plugin[/\\]core[/\\]FoundLicensesService.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]license[/\\]licensor[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]license[/\\]licensor[/\\]tools[/\\]KeyPairGeneratorTool.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]license[/\\]licensor[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]license[/\\]licensor[/\\]LicenseVerificationTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]license[/\\]licensor[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]license[/\\]licensor[/\\]TestUtils.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]license[/\\]licensor[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]license[/\\]licensor[/\\]tools[/\\]KeyPairGenerationToolTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]license[/\\]licensor[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]license[/\\]licensor[/\\]tools[/\\]LicenseGenerationToolTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]license[/\\]plugin-api[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]license[/\\]plugin[/\\]core[/\\]AbstractLicenseeComponent.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]license[/\\]plugin-api[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]license[/\\]plugin[/\\]core[/\\]LicenseUtils.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]qa[/\\]messy-test-watcher-with-groovy[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]messy[/\\]tests[/\\]ExecutionVarsIntegrationTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]qa[/\\]messy-test-watcher-with-groovy[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]messy[/\\]tests[/\\]GroovyManualExecutionTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]qa[/\\]messy-test-watcher-with-groovy[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]messy[/\\]tests[/\\]GroovyScriptConditionIT.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]qa[/\\]messy-test-watcher-with-groovy[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]messy[/\\]tests[/\\]HistoryTemplateTransformMappingsTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]qa[/\\]messy-test-watcher-with-groovy[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]messy[/\\]tests[/\\]MessyTestUtils.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]qa[/\\]messy-test-watcher-with-groovy[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]messy[/\\]tests[/\\]ScriptConditionSearchTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]qa[/\\]messy-test-watcher-with-groovy[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]messy[/\\]tests[/\\]ScriptConditionTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]qa[/\\]messy-test-watcher-with-groovy[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]messy[/\\]tests[/\\]TransformIntegrationTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]qa[/\\]messy-test-xpack-with-mustache[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]messy[/\\]tests[/\\]BasicWatcherTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]qa[/\\]messy-test-xpack-with-mustache[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]messy[/\\]tests[/\\]EmailAttachmentTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]qa[/\\]messy-test-xpack-with-mustache[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]messy[/\\]tests[/\\]SearchInputTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]qa[/\\]messy-test-xpack-with-mustache[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]messy[/\\]tests[/\\]SearchTransformTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]qa[/\\]messy-test-xpack-with-mustache[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]messy[/\\]tests[/\\]ShieldCachePermissionTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]qa[/\\]messy-test-xpack-with-mustache[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]messy[/\\]tests[/\\]package-info.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]qa[/\\]shield-audit-tests[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]audit[/\\]IndexAuditIT.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]qa[/\\]shield-client-tests[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]shield[/\\]qa[/\\]ShieldTransportClientIT.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]qa[/\\]shield-example-realm[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]example[/\\]realm[/\\]CustomRealmTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]shield[/\\]ShieldSecretService.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]support[/\\]init[/\\]proxy[/\\]ScriptServiceProxy.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]support[/\\]text[/\\]DefaultTextTemplateEngine.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]trigger[/\\]schedule[/\\]tool[/\\]CronEvalTool.java" checks="LineLength" />
<suppress files="x-plugins[/\\]elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]script[/\\]MockMustacheScriptEngine.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]actions[/\\]email[/\\]EmailAttachmentTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]x-pack[/\\]watcher[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]watcher[/\\]test[/\\]integration[/\\]BasicWatcherTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]qa[/\\]messy-test-xpack-with-mustache[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]messy[/\\]tests[/\\]PagerDutyServiceTests.java" checks="LineLength" />
<suppress files="elasticsearch[/\\]qa[/\\]messy-test-xpack-with-mustache[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]messy[/\\]tests[/\\]SlackServiceTests.java" checks="LineLength" />
<suppress files="x-plugins[/\\]elasticsearch[/\\]qa[/\\]smoke-test-watcher-with-mustache[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]smoketest[/\\]WatcherTemplateIT.java" checks="LineLength" />
</suppressions>

View File

@ -235,7 +235,8 @@ public class License implements ToXContent {
public static License readLicense(StreamInput in) throws IOException {
int version = in.readVInt(); // Version for future extensibility
if (version > VERSION_CURRENT) {
throw new ElasticsearchException("Unknown license version found, please upgrade all nodes to the latest elasticsearch-license plugin");
throw new ElasticsearchException("Unknown license version found, please upgrade all nodes to the latest elasticsearch-license" +
" plugin");
}
Builder builder = builder();
builder.version(version);
@ -394,7 +395,8 @@ public class License implements ToXContent {
if (version == 0) {
throw new ElasticsearchException("malformed signature for license [" + builder.uid + "]");
} else if (version > VERSION_CURRENT) {
throw new ElasticsearchException("Unknown license version found, please upgrade all nodes to the latest elasticsearch-license plugin");
throw new ElasticsearchException("Unknown license version found, please upgrade all nodes to the latest " +
"elasticsearch-license plugin");
}
// signature version is the source of truth
builder.version(version);

View File

@ -32,7 +32,7 @@ public class LicenseSerializationTests extends ESTestCase {
}
public void testLicensesFields() throws Exception {
TestUtils.LicenseSpec randomLicenseSpec = TestUtils.generateRandomLicenseSpec(License.VERSION_START);//randomIntBetween(License.VERSION_START, License.VERSION_CURRENT));
TestUtils.LicenseSpec randomLicenseSpec = TestUtils.generateRandomLicenseSpec(License.VERSION_START);
String licenseSpecsSource = TestUtils.generateLicenseSpecString(randomLicenseSpec);
final License fromSource = License.fromSource(licenseSpecsSource.getBytes(StandardCharsets.UTF_8));
TestUtils.assertLicenseSpec(randomLicenseSpec, fromSource);

View File

@ -67,7 +67,8 @@ public class TestUtils {
if (datesInMillis) {
long issueDateInMillis = dateMath("now", now);
long expiryDateInMillis = dateMath("now+10d/d", now);
return new LicenseSpec(version, uid, feature, issueDateInMillis, expiryDateInMillis, type, subscriptionType, issuedTo, issuer, maxNodes);
return new LicenseSpec(version, uid, feature, issueDateInMillis, expiryDateInMillis, type, subscriptionType, issuedTo, issuer,
maxNodes);
} else {
String issueDate = dateMathString("now", now);
String expiryDate = dateMathString("now+10d/d", now);
@ -161,7 +162,8 @@ public class TestUtils {
public final int maxNodes;
public LicenseSpec(String issueDate, String expiryDate) {
this(License.VERSION_CURRENT, UUID.randomUUID().toString(), "feature", issueDate, expiryDate, "trial", "none", "customer", "elasticsearch", 5);
this(License.VERSION_CURRENT, UUID.randomUUID().toString(), "feature", issueDate, expiryDate, "trial", "none", "customer",
"elasticsearch", 5);
}
public LicenseSpec(int version, String uid, String feature, long issueDateInMillis, long expiryDateInMillis, String type,

View File

@ -16,7 +16,8 @@ import java.util.Collections;
import java.util.List;
@Singleton
public class FoundLicensesService extends AbstractLifecycleComponent<FoundLicensesService> implements LicenseeRegistry, LicensesManagerService {
public class FoundLicensesService extends AbstractLifecycleComponent<FoundLicensesService> implements LicenseeRegistry,
LicensesManagerService {
@Inject
public FoundLicensesService(Settings settings) {

View File

@ -75,7 +75,8 @@ public class KeyPairGeneratorTool extends CliTool {
@Override
public ExitStatus execute(Settings settings, Environment env) throws Exception {
KeyPair keyPair = generateKeyPair(privateKeyPath, publicKeyPath);
terminal.println(Terminal.Verbosity.VERBOSE, "generating key pair [public key: " + publicKeyPath + ", private key: " + privateKeyPath + "]");
terminal.println(Terminal.Verbosity.VERBOSE, "generating key pair [public key: " + publicKeyPath + ", private key: "
+ privateKeyPath + "]");
return (keyPair != null) ? ExitStatus.OK : ExitStatus.CANT_CREATE;
}

View File

@ -35,7 +35,8 @@ public class LicenseVerificationTests extends ESTestCase {
}
public void testGeneratedLicenses() throws Exception {
assertThat(LicenseVerifier.verifyLicense(TestUtils.generateSignedLicense(TimeValue.timeValueHours(2 * 24), pubKeyPath, priKeyPath), Files.readAllBytes(pubKeyPath)), equalTo(true));
assertThat(LicenseVerifier.verifyLicense(TestUtils.generateSignedLicense(TimeValue.timeValueHours(2 * 24), pubKeyPath, priKeyPath),
Files.readAllBytes(pubKeyPath)), equalTo(true));
}
public void testLicenseTampering() throws Exception {
@ -51,7 +52,8 @@ public class LicenseVerificationTests extends ESTestCase {
}
public void testRandomLicenseVerification() throws Exception {
TestUtils.LicenseSpec licenseSpec = TestUtils.generateRandomLicenseSpec(randomIntBetween(License.VERSION_START, License.VERSION_CURRENT));
TestUtils.LicenseSpec licenseSpec = TestUtils.generateRandomLicenseSpec(
randomIntBetween(License.VERSION_START, License.VERSION_CURRENT));
License generatedLicense = generateSignedLicense(licenseSpec, pubKeyPath, priKeyPath);
assertThat(LicenseVerifier.verifyLicense(generatedLicense, Files.readAllBytes(pubKeyPath)), equalTo(true));
}

View File

@ -90,7 +90,8 @@ public class TestUtils {
if (datesInMillis) {
long issueDateInMillis = dateMath("now", now);
long expiryDateInMillis = dateMath("now+10d/d", now);
return new LicenseSpec(version, uid, feature, issueDateInMillis, expiryDateInMillis, type, subscriptionType, issuedTo, issuer, maxNodes);
return new LicenseSpec(version, uid, feature, issueDateInMillis, expiryDateInMillis, type, subscriptionType, issuedTo, issuer,
maxNodes);
} else {
String issueDate = dateMathString("now", now);
String expiryDate = dateMathString("now+10d/d", now);

View File

@ -44,14 +44,16 @@ public class KeyPairGenerationToolTests extends CliToolTestCase {
Files.delete(tempFile2);
assertThat(Files.exists(tempFile2), equalTo(false));
Command command = keyPairGeneratorTool.parse(KeyPairGeneratorTool.NAME, new String[] {"--privateKeyPath", tempFile.toAbsolutePath().toString(),
Command command = keyPairGeneratorTool.parse(KeyPairGeneratorTool.NAME, new String[] {
"--privateKeyPath", tempFile.toAbsolutePath().toString(),
"--publicKeyPath", nonExistentFilePath });
assertThat(command, instanceOf(Command.Exit.class));
Command.Exit exitCommand = (Command.Exit) command;
assertThat(exitCommand.status(), equalTo(ExitStatus.USAGE));
command = keyPairGeneratorTool.parse(KeyPairGeneratorTool.NAME, new String[] {"--publicKeyPath", tempFile.toAbsolutePath().toString(),
command = keyPairGeneratorTool.parse(KeyPairGeneratorTool.NAME, new String[] {
"--publicKeyPath", tempFile.toAbsolutePath().toString(),
"--privateKeyPath", nonExistentFilePath });
assertThat(command, instanceOf(Command.Exit.class));
@ -70,7 +72,8 @@ public class KeyPairGenerationToolTests extends CliToolTestCase {
assertThat(Files.exists(publicKeyFilePath), equalTo(false));
assertThat(Files.exists(privateKeyFilePath), equalTo(false));
Command command = keyPairGeneratorTool.parse(KeyPairGeneratorTool.NAME, new String[] { "--privateKeyPath", privateKeyFilePath.toString(),
Command command = keyPairGeneratorTool.parse(KeyPairGeneratorTool.NAME, new String[] {
"--privateKeyPath", privateKeyFilePath.toString(),
"--publicKeyPath", publicKeyFilePath.toString() });
assertThat(command, instanceOf(KeyGenerator.class));

View File

@ -122,7 +122,8 @@ public class LicenseGenerationToolTests extends CliToolTestCase {
TestUtils.assertLicenseSpec(licenseSpec, outputLicense);
}
private String runLicenseGenerationTool(Path pubKeyPath, Path priKeyPath, License licenseSpec, ExitStatus expectedExitStatus) throws Exception {
private String runLicenseGenerationTool(Path pubKeyPath, Path priKeyPath, License licenseSpec,
ExitStatus expectedExitStatus) throws Exception {
CaptureOutputTerminal outputTerminal = new CaptureOutputTerminal();
Settings settings = Settings.builder().put("path.home", createTempDir("LicenseGenerationToolTests")).build();
LicenseGenerator licenseGenerator = new LicenseGenerator(outputTerminal, pubKeyPath, priKeyPath, licenseSpec);

View File

@ -14,7 +14,8 @@ import java.util.concurrent.CopyOnWriteArrayList;
/**
* A supporting base class for injectable Licensee components.
*/
public abstract class AbstractLicenseeComponent<T extends AbstractLicenseeComponent<T>> extends AbstractLifecycleComponent<T> implements Licensee {
public abstract class AbstractLicenseeComponent<T extends AbstractLicenseeComponent<T>> extends AbstractLifecycleComponent<T>
implements Licensee {
private final String id;
private final LicenseeRegistry clientService;

View File

@ -20,7 +20,8 @@ public class LicenseUtils {
* exception's rest header
*/
public static ElasticsearchSecurityException newComplianceException(String feature) {
ElasticsearchSecurityException e = new ElasticsearchSecurityException("current license is non-compliant for [{}]", RestStatus.UNAUTHORIZED, feature);
ElasticsearchSecurityException e = new ElasticsearchSecurityException("current license is non-compliant for [{}]",
RestStatus.UNAUTHORIZED, feature);
e.addHeader(EXPIRED_FEATURE_HEADER, feature);
return e;
}

View File

@ -58,11 +58,13 @@ public class ExecutionVarsIntegrationTests extends AbstractWatcherIntegrationTes
.transform(scriptTransform("ctx.vars.watch_transform_value = ctx.vars.condition_value + 5; return ctx.payload;"))
.addAction(
"a1",
scriptTransform("ctx.vars.a1_transform_value = ctx.vars.watch_transform_value + 10; ctx.payload.a1_transformed_value = ctx.vars.a1_transform_value; return ctx.payload;"),
scriptTransform("ctx.vars.a1_transform_value = ctx.vars.watch_transform_value + 10; ctx.payload" +
".a1_transformed_value = ctx.vars.a1_transform_value; return ctx.payload;"),
loggingAction("_text"))
.addAction(
"a2",
scriptTransform("ctx.vars.a2_transform_value = ctx.vars.watch_transform_value + 20; ctx.payload.a2_transformed_value = ctx.vars.a2_transform_value; return ctx.payload;"),
scriptTransform("ctx.vars.a2_transform_value = ctx.vars.watch_transform_value + 20; ctx.payload" +
".a2_transformed_value = ctx.vars.a2_transform_value; return ctx.payload;"),
loggingAction("_text")))
.get();
@ -123,11 +125,13 @@ public class ExecutionVarsIntegrationTests extends AbstractWatcherIntegrationTes
.transform(scriptTransform("ctx.vars.watch_transform_value = ctx.vars.condition_value + 5; return ctx.payload;"))
.addAction(
"a1",
scriptTransform("ctx.vars.a1_transform_value = ctx.vars.watch_transform_value + 10; ctx.payload.a1_transformed_value = ctx.vars.a1_transform_value; return ctx.payload;"),
scriptTransform("ctx.vars.a1_transform_value = ctx.vars.watch_transform_value + 10; ctx.payload" +
".a1_transformed_value = ctx.vars.a1_transform_value; return ctx.payload;"),
loggingAction("_text"))
.addAction(
"a2",
scriptTransform("ctx.vars.a2_transform_value = ctx.vars.watch_transform_value + 20; ctx.payload.a2_transformed_value = ctx.vars.a2_transform_value; return ctx.payload;"),
scriptTransform("ctx.vars.a2_transform_value = ctx.vars.watch_transform_value + 20; ctx.payload" +
".a2_transformed_value = ctx.vars.a2_transform_value; return ctx.payload;"),
loggingAction("_text")))
.get();

View File

@ -69,7 +69,9 @@ public class GroovyManualExecutionTests extends AbstractWatcherIntegrationTestCa
.addAction("log", loggingAction("foobar"));
Watch watch = watchParser().parse("_id", false, watchBuilder.buildAsBytes(XContentType.JSON));
ManualExecutionContext.Builder ctxBuilder = ManualExecutionContext.builder(watch, false, new ManualTriggerEvent("_id", new ScheduleTriggerEvent(new DateTime(DateTimeZone.UTC), new DateTime(DateTimeZone.UTC))), new TimeValue(1, TimeUnit.HOURS));
ManualExecutionContext.Builder ctxBuilder = ManualExecutionContext.builder(watch, false, new ManualTriggerEvent("_id",
new ScheduleTriggerEvent(new DateTime(DateTimeZone.UTC), new DateTime(DateTimeZone.UTC))),
new TimeValue(1, TimeUnit.HOURS));
WatchRecord record = executionService().execute(ctxBuilder.build());
assertThat(record.result().executionDurationMs(), greaterThanOrEqualTo(100L));
}
@ -112,7 +114,8 @@ public class GroovyManualExecutionTests extends AbstractWatcherIntegrationTestCa
}
long endJoin = System.currentTimeMillis();
TimeValue tv = new TimeValue(10 * (numberOfThreads+1), TimeUnit.SECONDS);
assertThat("Shouldn't take longer than [" + tv.getSeconds() + "] seconds for all the threads to stop", (endJoin - startJoin), lessThan(tv.getMillis()));
assertThat("Shouldn't take longer than [" + tv.getSeconds() + "] seconds for all the threads to stop", (endJoin - startJoin),
lessThan(tv.getMillis()));
}
}

View File

@ -70,7 +70,8 @@ public class GroovyScriptConditionIT extends AbstractWatcherIntegrationTestCase
.get();
for (int seconds = 0; seconds < 60; seconds += 5) {
client().prepareIndex(".marvel", "cluster_stats").setTimestamp("2005-01-01T00:00:" + String.format(Locale.ROOT, "%02d", seconds)).setSource("status", randomFrom("green", "yellow")).get();
client().prepareIndex(".marvel", "cluster_stats").setTimestamp("2005-01-01T00:00:" +
String.format(Locale.ROOT, "%02d", seconds)).setSource("status", randomFrom("green", "yellow")).get();
}
refresh();
@ -78,7 +79,8 @@ public class GroovyScriptConditionIT extends AbstractWatcherIntegrationTestCase
SearchRequestBuilder builder = client().prepareSearch(".marvel")
.addAggregation(
AggregationBuilders
.dateHistogram("minutes").field("_timestamp").interval(TimeUnit.MILLISECONDS.convert(5, TimeUnit.SECONDS)).order(Histogram.Order.COUNT_DESC)
.dateHistogram("minutes").field("_timestamp").interval(TimeUnit.MILLISECONDS.convert(5, TimeUnit.SECONDS))
.order(Histogram.Order.COUNT_DESC)
.subAggregation(AggregationBuilders.terms("status").field("status").size(3)));
SearchResponse unmetResponse = builder.get();
@ -98,7 +100,8 @@ public class GroovyScriptConditionIT extends AbstractWatcherIntegrationTestCase
assertFalse(condition.execute(unmetContext).met());
for (int seconds = 0; seconds < 60; seconds += 5) {
client().prepareIndex(".marvel", "cluster_stats").setTimestamp("2005-01-01T00:01:" + String.format(Locale.ROOT, "%02d", seconds)).setSource("status", randomFrom("red")).get();
client().prepareIndex(".marvel", "cluster_stats").setTimestamp("2005-01-01T00:01:" +
String.format(Locale.ROOT, "%02d", seconds)).setSource("status", randomFrom("red")).get();
}
refresh();

View File

@ -106,8 +106,10 @@ public class HistoryTemplateTransformMappingsTests extends AbstractWatcherIntegr
try {
Map<String, Object> source = metadata.getSourceAsMap();
logger.info("checking index [{}] with metadata:\n[{}]", metadatas.key, metadata.source().toString());
assertThat(extractValue("properties.result.properties.transform.properties.payload.enabled", source), is((Object) false));
assertThat(extractValue("properties.result.properties.actions.properties.transform.properties.payload.enabled", source), is((Object) false));
assertThat(extractValue("properties.result.properties.transform.properties.payload.enabled", source),
is((Object) false));
String path = "properties.result.properties.actions.properties.transform.properties.payload.enabled";
assertThat(extractValue(path, source), is((Object) false));
} catch (IOException e) {
throw new RuntimeException(e);
}

View File

@ -44,6 +44,7 @@ public final class MessyTestUtils {
ScriptContextRegistry scriptContextRegistry = new ScriptContextRegistry(Arrays.asList(ScriptServiceProxy.INSTANCE));
ScriptSettings scriptSettings = new ScriptSettings(scriptEngineRegistry, scriptContextRegistry);
return ScriptServiceProxy.of(new ScriptService(settings, new Environment(settings), engineServiceSet, new ResourceWatcherService(settings, tp), scriptEngineRegistry, scriptContextRegistry, scriptSettings));
return ScriptServiceProxy.of(new ScriptService(settings, new Environment(settings), engineServiceSet,
new ResourceWatcherService(settings, tp), scriptEngineRegistry, scriptContextRegistry, scriptSettings));
}
}

View File

@ -71,10 +71,13 @@ public class ScriptConditionSearchTests extends AbstractWatcherIntegrationTestCa
refresh();
SearchResponse response = client().prepareSearch("my-index")
.addAggregation(AggregationBuilders.dateHistogram("rate").field("_timestamp").interval(DateHistogramInterval.HOUR).order(Histogram.Order.COUNT_DESC))
.addAggregation(AggregationBuilders.dateHistogram("rate").field("_timestamp")
.interval(DateHistogramInterval.HOUR).order(Histogram.Order.COUNT_DESC))
.get();
ExecutableScriptCondition condition = new ExecutableScriptCondition(new ScriptCondition(Script.inline("ctx.payload.aggregations.rate.buckets[0]?.doc_count >= 5").build()), logger, scriptService);
ExecutableScriptCondition condition = new ExecutableScriptCondition(
new ScriptCondition(Script.inline("ctx.payload.aggregations.rate.buckets[0]?.doc_count >= 5").build()),
logger, scriptService);
WatchExecutionContext ctx = mockExecutionContext("_name", new Payload.XContent(response));
assertFalse(condition.execute(ctx).met());
@ -83,7 +86,8 @@ public class ScriptConditionSearchTests extends AbstractWatcherIntegrationTestCa
refresh();
response = client().prepareSearch("my-index")
.addAggregation(AggregationBuilders.dateHistogram("rate").field("_timestamp").interval(DateHistogramInterval.HOUR).order(Histogram.Order.COUNT_DESC))
.addAggregation(AggregationBuilders.dateHistogram("rate").field("_timestamp").interval(DateHistogramInterval.HOUR)
.order(Histogram.Order.COUNT_DESC))
.get();
ctx = mockExecutionContext("_name", new Payload.XContent(response));
@ -91,12 +95,14 @@ public class ScriptConditionSearchTests extends AbstractWatcherIntegrationTestCa
}
public void testExecuteAccessHits() throws Exception {
ExecutableScriptCondition condition = new ExecutableScriptCondition(new ScriptCondition(Script.inline("ctx.payload.hits?.hits[0]?._score == 1.0").build()), logger, scriptService);
ExecutableScriptCondition condition = new ExecutableScriptCondition(new ScriptCondition(
Script.inline("ctx.payload.hits?.hits[0]?._score == 1.0").build()), logger, scriptService);
InternalSearchHit hit = new InternalSearchHit(0, "1", new Text("type"), null);
hit.score(1f);
hit.shard(new SearchShardTarget("a", new Index("a", "testUUID"), 0));
InternalSearchResponse internalSearchResponse = new InternalSearchResponse(new InternalSearchHits(new InternalSearchHit[]{hit}, 1L, 1f), null, null, null, false, false);
InternalSearchResponse internalSearchResponse = new InternalSearchResponse(new InternalSearchHits(
new InternalSearchHit[]{hit}, 1L, 1f), null, null, null, false, false);
SearchResponse response = new SearchResponse(internalSearchResponse, "", 3, 3, 500L, new ShardSearchFailure[0]);
WatchExecutionContext ctx = mockExecutionContext("_watch_name", new Payload.XContent(response));

View File

@ -60,7 +60,8 @@ public class ScriptConditionTests extends ESTestCase {
public void testExecute() throws Exception {
ScriptServiceProxy scriptService = getScriptServiceProxy(tp);
ExecutableScriptCondition condition = new ExecutableScriptCondition(new ScriptCondition(Script.inline("ctx.payload.hits.total > 1").build()), logger, scriptService);
ExecutableScriptCondition condition = new ExecutableScriptCondition(
new ScriptCondition(Script.inline("ctx.payload.hits.total > 1").build()), logger, scriptService);
SearchResponse response = new SearchResponse(InternalSearchResponse.empty(), "", 3, 3, 500L, new ShardSearchFailure[0]);
WatchExecutionContext ctx = mockExecutionContext("_name", new Payload.XContent(response));
assertFalse(condition.execute(ctx).met());
@ -68,7 +69,8 @@ public class ScriptConditionTests extends ESTestCase {
public void testExecuteMergedParams() throws Exception {
ScriptServiceProxy scriptService = getScriptServiceProxy(tp);
Script script = Script.inline("ctx.payload.hits.total > threshold").lang(Script.DEFAULT_LANG).params(singletonMap("threshold", 1)).build();
Script script = Script.inline("ctx.payload.hits.total > threshold")
.lang(Script.DEFAULT_LANG).params(singletonMap("threshold", 1)).build();
ExecutableScriptCondition executable = new ExecutableScriptCondition(new ScriptCondition(script), logger, scriptService);
SearchResponse response = new SearchResponse(InternalSearchResponse.empty(), "", 3, 3, 500L, new ShardSearchFailure[0]);
WatchExecutionContext ctx = mockExecutionContext("_name", new Payload.XContent(response));
@ -162,7 +164,8 @@ public class ScriptConditionTests extends ESTestCase {
public void testScriptConditionThrowException() throws Exception {
ScriptServiceProxy scriptService = getScriptServiceProxy(tp);
ExecutableScriptCondition condition = new ExecutableScriptCondition(new ScriptCondition(Script.inline("assert false").build()), logger, scriptService);
ExecutableScriptCondition condition = new ExecutableScriptCondition(
new ScriptCondition(Script.inline("assert false").build()), logger, scriptService);
SearchResponse response = new SearchResponse(InternalSearchResponse.empty(), "", 3, 3, 500L, new ShardSearchFailure[0]);
WatchExecutionContext ctx = mockExecutionContext("_name", new Payload.XContent(response));
ScriptCondition.Result result = condition.execute(ctx);
@ -174,7 +177,8 @@ public class ScriptConditionTests extends ESTestCase {
public void testScriptConditionReturnObject() throws Exception {
ScriptServiceProxy scriptService = getScriptServiceProxy(tp);
ExecutableScriptCondition condition = new ExecutableScriptCondition(new ScriptCondition(Script.inline("return new Object()").build()), logger, scriptService);
ExecutableScriptCondition condition = new ExecutableScriptCondition(
new ScriptCondition(Script.inline("return new Object()").build()), logger, scriptService);
SearchResponse response = new SearchResponse(InternalSearchResponse.empty(), "", 3, 3, 500L, new ShardSearchFailure[0]);
WatchExecutionContext ctx = mockExecutionContext("_name", new Payload.XContent(response));
ScriptCondition.Result result = condition.execute(ctx);
@ -186,7 +190,9 @@ public class ScriptConditionTests extends ESTestCase {
public void testScriptConditionAccessCtx() throws Exception {
ScriptServiceProxy scriptService = getScriptServiceProxy(tp);
ExecutableScriptCondition condition = new ExecutableScriptCondition(new ScriptCondition(Script.inline("ctx.trigger.scheduled_time.getMillis() < new Date().time ").build()), logger, scriptService);
ExecutableScriptCondition condition = new ExecutableScriptCondition(
new ScriptCondition(Script.inline("ctx.trigger.scheduled_time.getMillis() < new Date().time ").build()),
logger, scriptService);
SearchResponse response = new SearchResponse(InternalSearchResponse.empty(), "", 3, 3, 500L, new ShardSearchFailure[0]);
WatchExecutionContext ctx = mockExecutionContext("_name", new DateTime(DateTimeZone.UTC), new Payload.XContent(response));
Thread.sleep(10);

View File

@ -78,7 +78,8 @@ public class TransformIntegrationTests extends AbstractWatcherIntegrationTestCas
script = Script.inline("return [key3 : ctx.payload.key1 + ctx.payload.key2]").lang("groovy").build();
} else if (randomBoolean()) {
logger.info("testing script transform with an indexed script");
client().preparePutIndexedScript("groovy", "_id", "{\"script\" : \"return [key3 : ctx.payload.key1 + ctx.payload.key2]\"}").get();
client().preparePutIndexedScript("groovy", "_id", "{\"script\" : \"return [key3 : ctx.payload.key1 + ctx.payload.key2]\"}")
.get();
script = Script.indexed("_id").lang("groovy").build();
} else {
logger.info("testing script transform with a file script");
@ -135,8 +136,10 @@ public class TransformIntegrationTests extends AbstractWatcherIntegrationTestCas
index("my-payload-index", "payload", "mytestresult");
refresh();
SearchRequest inputRequest = WatcherTestUtils.newInputSearchRequest("my-condition-index").source(searchSource().query(matchAllQuery()));
SearchRequest transformRequest = WatcherTestUtils.newInputSearchRequest("my-payload-index").source(searchSource().query(matchAllQuery()));
SearchRequest inputRequest = WatcherTestUtils.newInputSearchRequest("my-condition-index")
.source(searchSource().query(matchAllQuery()));
SearchRequest transformRequest = WatcherTestUtils.newInputSearchRequest("my-payload-index")
.source(searchSource().query(matchAllQuery()));
PutWatchResponse putWatchResponse = watcherClient().preparePutWatch("_id1")
.setSource(watchBuilder()
@ -194,7 +197,8 @@ public class TransformIntegrationTests extends AbstractWatcherIntegrationTestCas
.trigger(schedule(interval("5s")))
.input(simpleInput(MapBuilder.<String, Object>newMapBuilder().put("key1", 10).put("key2", 10)))
.condition(alwaysCondition())
.addAction("_id", chainTransform(scriptTransform(script1), scriptTransform(script2)), indexAction("output2", "type")))
.addAction("_id", chainTransform(scriptTransform(script1), scriptTransform(script2)),
indexAction("output2", "type")))
.get();
assertThat(putWatchResponse.isCreated(), is(true));

View File

@ -79,7 +79,8 @@ public class PagerDutyServiceTests extends AbstractWatcherIntegrationTestCase {
public void testSendTriggerEvent() throws Exception {
PagerDutyService service = getInstanceFromMaster(PagerDutyService.class);
IncidentEvent event = new IncidentEvent("#testIncidentEvent()", null, null, "PagerDutyServiceTests", "_client_url", "_account", true, new IncidentEventContext[] {
IncidentEvent event = new IncidentEvent("#testIncidentEvent()", null, null, "PagerDutyServiceTests", "_client_url", "_account",
true, new IncidentEventContext[] {
IncidentEventContext.link("_href", "_text"),
IncidentEventContext.image("_src", "_href", "_alt")
});

View File

@ -100,8 +100,10 @@ public class SearchInputTests extends ESIntegTestCase {
throw new RuntimeException("failed to create config dir");
}
try (InputStream stream = SearchInputTests.class.getResourceAsStream("/org/elasticsearch/watcher/input/search/config/scripts/test_disk_template.mustache");
OutputStream out = Files.newOutputStream(scriptPath.resolve("test_disk_template.mustache"))) {
String path = "/org/elasticsearch/watcher/input/search/config/scripts/test_disk_template.mustache";
try (InputStream stream = SearchInputTests.class.getResourceAsStream("/org/elasticsearch/watcher/input/search/config/scripts" +
"/test_disk_template.mustache");
OutputStream out = Files.newOutputStream(scriptPath.resolve("test_disk_template.mustache"))) {
Streams.copy(stream, out);
} catch (IOException e) {
throw new RuntimeException("failed to copy mustache template");
@ -122,14 +124,16 @@ public class SearchInputTests extends ESIntegTestCase {
public void testExecute() throws Exception {
SearchSourceBuilder searchSourceBuilder = searchSource().query(
boolQuery().must(matchQuery("event_type", "a")).must(rangeQuery("_timestamp").from("{{ctx.trigger.scheduled_time}}||-30s").to("{{ctx.trigger.triggered_time}}")));
boolQuery().must(matchQuery("event_type", "a")).must(rangeQuery("_timestamp")
.from("{{ctx.trigger.scheduled_time}}||-30s").to("{{ctx.trigger.triggered_time}}")));
SearchRequest request = client()
.prepareSearch()
.setSearchType(ExecutableSearchInput.DEFAULT_SEARCH_TYPE)
.request()
.source(searchSourceBuilder);
ExecutableSearchInput searchInput = new ExecutableSearchInput(new SearchInput(request, null, null, null), logger, ClientProxy.of(client()), null);
ExecutableSearchInput searchInput = new ExecutableSearchInput(new SearchInput(request, null, null, null), logger,
ClientProxy.of(client()), null);
WatchExecutionContext ctx = new TriggeredExecutionContext(
new Watch("test-watch",
new ScheduleTrigger(new IntervalSchedule(new IntervalSchedule.Interval(1, IntervalSchedule.Interval.Unit.MINUTES))),
@ -190,7 +194,8 @@ public class SearchInputTests extends ESIntegTestCase {
public void testSearchIndexedTemplate() throws Exception {
WatchExecutionContext ctx = createContext();
PutIndexedScriptRequest indexedScriptRequest = client().preparePutIndexedScript("mustache","test-template", TEMPLATE_QUERY).request();
PutIndexedScriptRequest indexedScriptRequest = client().preparePutIndexedScript("mustache","test-template",
TEMPLATE_QUERY).request();
assertThat(client().putIndexedScript(indexedScriptRequest).actionGet().isCreated(), is(true));
Map<String, Object> params = new HashMap<>();
@ -228,7 +233,8 @@ public class SearchInputTests extends ESIntegTestCase {
public void testDifferentSearchType() throws Exception {
SearchSourceBuilder searchSourceBuilder = searchSource().query(
boolQuery().must(matchQuery("event_type", "a")).must(rangeQuery("_timestamp").from("{{ctx.trigger.scheduled_time}}||-30s").to("{{ctx.trigger.triggered_time}}"))
boolQuery().must(matchQuery("event_type", "a")).must(rangeQuery("_timestamp")
.from("{{ctx.trigger.scheduled_time}}||-30s").to("{{ctx.trigger.triggered_time}}"))
);
SearchType searchType = getRandomSupportedSearchType();
@ -238,7 +244,8 @@ public class SearchInputTests extends ESIntegTestCase {
.request()
.source(searchSourceBuilder);
ExecutableSearchInput searchInput = new ExecutableSearchInput(new SearchInput(request, null, null, null), logger, ClientProxy.of(client()), null);
ExecutableSearchInput searchInput = new ExecutableSearchInput(new SearchInput(request, null, null, null), logger,
ClientProxy.of(client()), null);
WatchExecutionContext ctx = new TriggeredExecutionContext(
new Watch("test-watch",
new ScheduleTrigger(new IntervalSchedule(new IntervalSchedule.Interval(1, IntervalSchedule.Interval.Unit.MINUTES))),
@ -266,7 +273,8 @@ public class SearchInputTests extends ESIntegTestCase {
.setSearchType(ExecutableSearchInput.DEFAULT_SEARCH_TYPE)
.request()
.source(searchSource()
.query(boolQuery().must(matchQuery("event_type", "a")).must(rangeQuery("_timestamp").from("{{ctx.trigger.scheduled_time}}||-30s").to("{{ctx.trigger.triggered_time}}"))));
.query(boolQuery().must(matchQuery("event_type", "a")).must(rangeQuery("_timestamp")
.from("{{ctx.trigger.scheduled_time}}||-30s").to("{{ctx.trigger.triggered_time}}"))));
TimeValue timeout = randomBoolean() ? TimeValue.timeValueSeconds(randomInt(10)) : null;
XContentBuilder builder = jsonBuilder().value(new SearchInput(request, null, timeout, null));

View File

@ -114,8 +114,9 @@ public class SearchTransformTests extends ESIntegTestCase {
throw new RuntimeException("failed to create config dir");
}
try (InputStream stream = SearchTransformTests.class.getResourceAsStream("/org/elasticsearch/watcher/transform/search/config/scripts/test_disk_template.mustache");
OutputStream out = Files.newOutputStream(scriptPath.resolve("test_disk_template.mustache"))) {
String path = "/org/elasticsearch/watcher/transform/search/config/scripts/test_disk_template.mustache";
try (InputStream stream = SearchTransformTests.class.getResourceAsStream(path);
OutputStream out = Files.newOutputStream(scriptPath.resolve("test_disk_template.mustache"))) {
Streams.copy(stream, out);
} catch (IOException e) {
throw new RuntimeException("failed to copy mustache template");
@ -253,7 +254,8 @@ public class SearchTransformTests extends ESIntegTestCase {
SearchTransform searchTransform = TransformBuilders.searchTransform(request).build();
ExecutableSearchTransform transform = new ExecutableSearchTransform(searchTransform, logger, ClientProxy.of(client()), null);
ScheduleTriggerEvent event = new ScheduleTriggerEvent("_name", parseDate("2015-01-04T00:00:00", UTC), parseDate("2015-01-01T00:00:00", UTC));
ScheduleTriggerEvent event = new ScheduleTriggerEvent("_name", parseDate("2015-01-04T00:00:00", UTC),
parseDate("2015-01-01T00:00:00", UTC));
WatchExecutionContext ctx = mockExecutionContext("_name", parseDate("2015-01-04T00:00:00", UTC), event, EMPTY_PAYLOAD);
Payload payload = simplePayload("value", "val_3");
@ -316,7 +318,8 @@ public class SearchTransformTests extends ESIntegTestCase {
parser.nextToken();
IndicesQueriesRegistry indicesQueryRegistry = internalCluster().getInstance(IndicesQueriesRegistry.class);
SearchTransformFactory transformFactory = new SearchTransformFactory(Settings.EMPTY, ClientProxy.of(client()), indicesQueryRegistry);
SearchTransformFactory transformFactory = new SearchTransformFactory(Settings.EMPTY, ClientProxy.of(client()),
indicesQueryRegistry);
ExecutableSearchTransform executable = transformFactory.parseExecutable("_id", parser);
assertThat(executable, notNullValue());
@ -477,7 +480,8 @@ public class SearchTransformTests extends ESIntegTestCase {
ensureGreen("test-search-index");
SearchTransform searchTransform = TransformBuilders.searchTransform(request).build();
ExecutableSearchTransform executableSearchTransform = new ExecutableSearchTransform(searchTransform, logger, ClientProxy.of(client()), null);
ExecutableSearchTransform executableSearchTransform = new ExecutableSearchTransform(searchTransform, logger,
ClientProxy.of(client()), null);
return executableSearchTransform.execute(ctx, Payload.Simple.EMPTY);
}

View File

@ -95,7 +95,8 @@ public class ShieldCachePermissionTests extends ShieldIntegTestCase {
// Repeat with unauthorized user!!!!
try {
response = client().filterWithHeader(Collections.singletonMap("Authorization", basicAuthHeaderValue(READ_ONE_IDX_USER, new SecuredString("changeme".toCharArray()))))
response = client().filterWithHeader(Collections.singletonMap("Authorization", basicAuthHeaderValue(READ_ONE_IDX_USER,
new SecuredString("changeme".toCharArray()))))
.prepareSearch("data").setTypes("a").setQuery(QueryBuilders.constantScoreQuery(
QueryBuilders.termsLookupQuery("token", new TermsLookup("tokens", "tokens", "1", "tokens"))))
.execute().actionGet();
@ -108,16 +109,19 @@ public class ShieldCachePermissionTests extends ShieldIntegTestCase {
public void testThatScriptServiceDoesntLeakData() {
SearchResponse response = client().prepareSearch("data").setTypes("a")
.setTemplate(new Template("testTemplate", ScriptService.ScriptType.INDEXED, MustacheScriptEngineService.NAME, null, Collections.<String, Object>singletonMap("name", "token")))
.setTemplate(new Template("testTemplate", ScriptService.ScriptType.INDEXED, MustacheScriptEngineService.NAME, null,
Collections.<String, Object>singletonMap("name", "token")))
.execute().actionGet();
assertThat(response.isTimedOut(), is(false));
assertThat(response.getHits().hits().length, is(1));
// Repeat with unauthorized user!!!!
try {
response = client().filterWithHeader(Collections.singletonMap("Authorization", basicAuthHeaderValue(READ_ONE_IDX_USER, new SecuredString("changeme".toCharArray()))))
response = client().filterWithHeader(Collections.singletonMap("Authorization", basicAuthHeaderValue(READ_ONE_IDX_USER,
new SecuredString("changeme".toCharArray()))))
.prepareSearch("data").setTypes("a")
.setTemplate(new Template("testTemplate", ScriptService.ScriptType.INDEXED, MustacheScriptEngineService.NAME, null, Collections.<String, Object>singletonMap("name", "token")))
.setTemplate(new Template("testTemplate", ScriptService.ScriptType.INDEXED, MustacheScriptEngineService.NAME, null,
Collections.<String, Object>singletonMap("name", "token")))
.execute().actionGet();
fail("search phase exception should have been thrown! response was:\n" + response.toString());
} catch (SearchPhaseExecutionException e) {

View File

@ -71,14 +71,16 @@ public class SlackServiceTests extends AbstractWatcherIntegrationTestCase {
.put(super.nodeSettings(nodeOrdinal))
// this is for the `test-watcher-integration` group level integration in HipChat
.put("watcher.actions.slack.service.account.test_account.url", "https://hooks.slack.com/services/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")
.put("watcher.actions.slack.service.account.test_account.url",
"https://hooks.slack.com/services/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")
.build();
}
public void testSendMessage() throws Exception {
SlackService service = getInstanceFromMaster(SlackService.class);
Attachment[] attachments = new Attachment[] {
new Attachment("fallback", randomFrom("good", "warning", "danger"), "pretext", "author_name", null, null, "title", null, "_text", null, null, null)
new Attachment("fallback", randomFrom("good", "warning", "danger"), "pretext", "author_name", null, null,
"title", null, "_text", null, null, null)
};
SlackMessage message = new SlackMessage(
"SlackServiceTests",

View File

@ -21,8 +21,11 @@
*/
// renames that took place:
// renamed: x-pack/watcher/src/test/java/org/elasticsearch/watcher/input/search/SearchInputTests.java -> qa/messy-test-xpack-with-mustache/src/test/java/org/elasticsearch/messy/tests/SearchInputTests.java
// renamed: x-pack/watcher/src/test/java/org/elasticsearch/watcher/transform/search/SearchTransformTests.java -> qa/messy-test-xpack-with-mustache/src/test/java/org/elasticsearch/messy/tests/SearchTransformTests.java
// renamed: x-pack/shield/src/test/java/org/elasticsearch/integration/ShieldCachePermissionTests.java -> qa/messy-test-xpack-with-mustache/src/test/java/org/elasticsearch/messy/tests/ShieldCachePermissionTests.java
// renamed: x-pack/watcher/src/test/java/org/elasticsearch/watcher/input/search/SearchInputTests.java ->
// qa/messy-test-xpack-with-mustache/src/test/java/org/elasticsearch/messy/tests/SearchInputTests.java
// renamed: x-pack/watcher/src/test/java/org/elasticsearch/watcher/transform/search/SearchTransformTests.java ->
// qa/messy-test-xpack-with-mustache/src/test/java/org/elasticsearch/messy/tests/SearchTransformTests.java
// renamed: x-pack/shield/src/test/java/org/elasticsearch/integration/ShieldCachePermissionTests.java ->
// qa/messy-test-xpack-with-mustache/src/test/java/org/elasticsearch/messy/tests/ShieldCachePermissionTests.java
package org.elasticsearch.messy.tests;

View File

@ -37,12 +37,14 @@ public class IndexAuditIT extends ESIntegTestCase {
return false;
}
client().admin().indices().prepareRefresh().get();
return client().prepareSearch(".shield_audit_log*").setQuery(QueryBuilders.matchQuery("principal", USER)).get().getHits().totalHits() > 0;
return client().prepareSearch(".shield_audit_log*").setQuery(QueryBuilders.matchQuery("principal", USER))
.get().getHits().totalHits() > 0;
}, 5L, TimeUnit.SECONDS);
assertThat(found, is(true));
SearchResponse searchResponse = client().prepareSearch(".shield_audit_log*").setQuery(QueryBuilders.matchQuery("principal", USER)).get();
SearchResponse searchResponse = client().prepareSearch(".shield_audit_log*").setQuery(
QueryBuilders.matchQuery("principal", USER)).get();
assertThat(searchResponse.getHits().getHits().length, greaterThan(0));
assertThat((String) searchResponse.getHits().getAt(0).sourceAsMap().get("principal"), is(USER));
}

View File

@ -90,7 +90,8 @@ public class ShieldTransportClientIT extends ESIntegTestCase {
// this checks that the transport client is really running in a limited state
ClusterHealthResponse response;
if (useTransportUser) {
response = client.filterWithHeader(Collections.singletonMap("Authorization", basicAuthHeaderValue("test_user", new SecuredString("changeme".toCharArray()))))
response = client.filterWithHeader(Collections.singletonMap("Authorization",
basicAuthHeaderValue("test_user", new SecuredString("changeme".toCharArray()))))
.admin().cluster().prepareHealth().get();
} else {
response = client.admin().cluster().prepareHealth().get();

View File

@ -20,7 +20,8 @@ public class CustomRealmTests extends ESTestCase {
public void testAuthenticate() {
Settings globalSettings = Settings.builder().put("path.home", createTempDir()).build();
CustomRealm realm = new CustomRealm(new RealmConfig("test", Settings.EMPTY, globalSettings));
UsernamePasswordToken token = new UsernamePasswordToken(CustomRealm.KNOWN_USER, new SecuredString(CustomRealm.KNOWN_PW.toCharArray()));
SecuredString password = new SecuredString(CustomRealm.KNOWN_PW.toCharArray());
UsernamePasswordToken token = new UsernamePasswordToken(CustomRealm.KNOWN_USER, password);
User user = realm.authenticate(token);
assertThat(user, notNullValue());
assertThat(user.roles(), equalTo(CustomRealm.ROLES));
@ -30,7 +31,8 @@ public class CustomRealmTests extends ESTestCase {
public void testAuthenticateBadUser() {
Settings globalSettings = Settings.builder().put("path.home", createTempDir()).build();
CustomRealm realm = new CustomRealm(new RealmConfig("test", Settings.EMPTY, globalSettings));
UsernamePasswordToken token = new UsernamePasswordToken(CustomRealm.KNOWN_USER + "1", new SecuredString(CustomRealm.KNOWN_PW.toCharArray()));
SecuredString password = new SecuredString(CustomRealm.KNOWN_PW.toCharArray());
UsernamePasswordToken token = new UsernamePasswordToken(CustomRealm.KNOWN_USER + "1", password);
User user = realm.authenticate(token);
assertThat(user, nullValue());
}

View File

@ -52,11 +52,13 @@ public class WatcherTemplateIT extends ESTestCase {
ScriptEngineRegistry scriptEngineRegistry = new ScriptEngineRegistry(
Arrays.asList(
new ScriptEngineRegistry.ScriptEngineRegistration(MustacheScriptEngineService.class, MustacheScriptEngineService.TYPES)
new ScriptEngineRegistry.ScriptEngineRegistration(MustacheScriptEngineService.class,
MustacheScriptEngineService.TYPES)
)
);
ScriptSettings scriptSettings = new ScriptSettings(scriptEngineRegistry, registry);
ScriptService scriptService = new ScriptService(setting, environment, engines, resourceWatcherService, scriptEngineRegistry, registry, scriptSettings);
ScriptService scriptService = new ScriptService(setting, environment, engines, resourceWatcherService, scriptEngineRegistry,
registry, scriptSettings);
engine = new DefaultTextTemplateEngine(Settings.EMPTY, ScriptServiceProxy.of(scriptService));
}

View File

@ -8,7 +8,8 @@ package org.elasticsearch.license.plugin.action.delete;
import org.elasticsearch.action.support.master.AcknowledgedRequestBuilder;
import org.elasticsearch.client.ElasticsearchClient;
public class DeleteLicenseRequestBuilder extends AcknowledgedRequestBuilder<DeleteLicenseRequest, DeleteLicenseResponse, DeleteLicenseRequestBuilder> {
public class DeleteLicenseRequestBuilder extends AcknowledgedRequestBuilder<DeleteLicenseRequest, DeleteLicenseResponse,
DeleteLicenseRequestBuilder> {
/**
* Creates new get licenses request builder

View File

@ -26,9 +26,11 @@ public class TransportDeleteLicenseAction extends TransportMasterNodeAction<Dele
private final LicensesService licensesService;
@Inject
public TransportDeleteLicenseAction(Settings settings, TransportService transportService, ClusterService clusterService, LicensesService licensesService,
ThreadPool threadPool, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver) {
super(settings, DeleteLicenseAction.NAME, transportService, clusterService, threadPool, actionFilters, indexNameExpressionResolver, DeleteLicenseRequest::new);
public TransportDeleteLicenseAction(Settings settings, TransportService transportService, ClusterService clusterService,
LicensesService licensesService, ThreadPool threadPool, ActionFilters actionFilters,
IndexNameExpressionResolver indexNameExpressionResolver) {
super(settings, DeleteLicenseAction.NAME, transportService, clusterService, threadPool, actionFilters,
indexNameExpressionResolver, DeleteLicenseRequest::new);
this.licensesService = licensesService;
}
@ -48,7 +50,8 @@ public class TransportDeleteLicenseAction extends TransportMasterNodeAction<Dele
}
@Override
protected void masterOperation(final DeleteLicenseRequest request, ClusterState state, final ActionListener<DeleteLicenseResponse> listener) throws ElasticsearchException {
protected void masterOperation(final DeleteLicenseRequest request, ClusterState state, final ActionListener<DeleteLicenseResponse>
listener) throws ElasticsearchException {
licensesService.removeLicense(request, new ActionListener<ClusterStateUpdateResponse>() {
@Override
public void onResponse(ClusterStateUpdateResponse clusterStateUpdateResponse) {

View File

@ -8,7 +8,8 @@ package org.elasticsearch.license.plugin.action.get;
import org.elasticsearch.action.support.master.MasterNodeReadOperationRequestBuilder;
import org.elasticsearch.client.ElasticsearchClient;
public class GetLicenseRequestBuilder extends MasterNodeReadOperationRequestBuilder<GetLicenseRequest, GetLicenseResponse, GetLicenseRequestBuilder> {
public class GetLicenseRequestBuilder extends MasterNodeReadOperationRequestBuilder<GetLicenseRequest, GetLicenseResponse,
GetLicenseRequestBuilder> {
/**
* Creates new get licenses request builder

View File

@ -25,9 +25,11 @@ public class TransportGetLicenseAction extends TransportMasterNodeReadAction<Get
private final LicensesManagerService licensesManagerService;
@Inject
public TransportGetLicenseAction(Settings settings, TransportService transportService, ClusterService clusterService, LicensesManagerService licensesManagerService,
ThreadPool threadPool, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver) {
super(settings, GetLicenseAction.NAME, transportService, clusterService, threadPool, actionFilters, indexNameExpressionResolver, GetLicenseRequest::new);
public TransportGetLicenseAction(Settings settings, TransportService transportService, ClusterService clusterService,
LicensesManagerService licensesManagerService, ThreadPool threadPool, ActionFilters actionFilters,
IndexNameExpressionResolver indexNameExpressionResolver) {
super(settings, GetLicenseAction.NAME, transportService, clusterService, threadPool, actionFilters, indexNameExpressionResolver,
GetLicenseRequest::new);
this.licensesManagerService = licensesManagerService;
}
@ -47,7 +49,8 @@ public class TransportGetLicenseAction extends TransportMasterNodeReadAction<Get
}
@Override
protected void masterOperation(final GetLicenseRequest request, ClusterState state, final ActionListener<GetLicenseResponse> listener) throws ElasticsearchException {
protected void masterOperation(final GetLicenseRequest request, ClusterState state, final ActionListener<GetLicenseResponse>
listener) throws ElasticsearchException {
listener.onResponse(new GetLicenseResponse(licensesManagerService.getLicense()));
}
}

View File

@ -26,7 +26,8 @@ public class PutLicenseResponse extends AcknowledgedResponse implements ToXConte
PutLicenseResponse() {
}
public PutLicenseResponse(boolean acknowledged, LicensesStatus status, String acknowledgeHeader, Map<String, String[]> acknowledgeMessages) {
public PutLicenseResponse(boolean acknowledged, LicensesStatus status, String acknowledgeHeader,
Map<String, String[]> acknowledgeMessages) {
super(acknowledged);
this.status = status;
this.acknowledgeHeader = acknowledgeHeader;

View File

@ -28,8 +28,10 @@ public class TransportPutLicenseAction extends TransportMasterNodeAction<PutLice
@Inject
public TransportPutLicenseAction(Settings settings, TransportService transportService, ClusterService clusterService,
LicensesService licensesService, ThreadPool threadPool, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver) {
super(settings, PutLicenseAction.NAME, transportService, clusterService, threadPool, actionFilters, indexNameExpressionResolver, PutLicenseRequest::new);
LicensesService licensesService, ThreadPool threadPool, ActionFilters actionFilters,
IndexNameExpressionResolver indexNameExpressionResolver) {
super(settings, PutLicenseAction.NAME, transportService, clusterService, threadPool, actionFilters, indexNameExpressionResolver,
PutLicenseRequest::new);
this.licensesService = licensesService;
}
@ -49,7 +51,8 @@ public class TransportPutLicenseAction extends TransportMasterNodeAction<PutLice
}
@Override
protected void masterOperation(final PutLicenseRequest request, ClusterState state, final ActionListener<PutLicenseResponse> listener) throws ElasticsearchException {
protected void masterOperation(final PutLicenseRequest request, ClusterState state, final ActionListener<PutLicenseResponse>
listener) throws ElasticsearchException {
licensesService.registerLicense(request, new ActionListener<LicensesUpdateResponse>() {
@Override
public void onResponse(LicensesUpdateResponse licensesUpdateResponse) {

View File

@ -46,14 +46,14 @@ public class LicensesMetaData extends AbstractDiffable<MetaData.Custom> implemen
* ever existed in the cluster state
*/
public static final License LICENSE_TOMBSTONE = License.builder()
.type("trial")
.issuer("elasticsearch")
.uid("TOMBSTONE")
.issuedTo("")
.maxNodes(0)
.issueDate(0)
.expiryDate(0)
.build();
.type("trial")
.issuer("elasticsearch")
.uid("TOMBSTONE")
.issuedTo("")
.maxNodes(0)
.issueDate(0)
.expiryDate(0)
.build();
public static final LicensesMetaData PROTO = new LicensesMetaData(null);
@ -115,7 +115,8 @@ public class LicensesMetaData extends AbstractDiffable<MetaData.Custom> implemen
if (parser.currentToken().isValue()) {
// trial license
byte[] data = decrypt(Base64.decode(parser.text()));
try (XContentParser trialLicenseParser = XContentFactory.xContent(XContentType.JSON).createParser(data)) {
try (XContentParser trialLicenseParser =
XContentFactory.xContent(XContentType.JSON).createParser(data)) {
trialLicenseParser.nextToken();
License pre20TrialLicense = License.fromXContent(trialLicenseParser);
pre20Licenses.add(TrialLicense.create(License.builder().fromPre20LicenseSpec(pre20TrialLicense)));
@ -183,7 +184,8 @@ public class LicensesMetaData extends AbstractDiffable<MetaData.Custom> implemen
streamOutput.writeVInt(0); // no signed license
streamOutput.writeVInt(1); // one trial license
XContentBuilder contentBuilder = XContentFactory.contentBuilder(XContentType.JSON);
license.toXContent(contentBuilder, new ToXContent.MapParams(Collections.singletonMap(License.LICENSE_SPEC_VIEW_MODE, "true")));
license.toXContent(contentBuilder,
new ToXContent.MapParams(Collections.singletonMap(License.LICENSE_SPEC_VIEW_MODE, "true")));
streamOutput.writeString(Base64.encodeBytes(encrypt(contentBuilder.bytes().toBytes())));
}
} else {

View File

@ -79,7 +79,8 @@ import java.util.concurrent.atomic.AtomicReference;
* Registered listeners are notified using {@link #notifyAndSchedule(LicensesMetaData)}
*/
@Singleton
public class LicensesService extends AbstractLifecycleComponent<LicensesService> implements ClusterStateListener, LicensesManagerService, LicenseeRegistry {
public class LicensesService extends AbstractLifecycleComponent<LicensesService> implements ClusterStateListener, LicensesManagerService,
LicenseeRegistry {
public static final String REGISTER_TRIAL_LICENSE_ACTION_NAME = "internal:plugin/license/cluster/register_trial_license";
@ -131,7 +132,8 @@ public class LicensesService extends AbstractLifecycleComponent<LicensesService>
private static final FormatDateTimeFormatter DATE_FORMATTER = Joda.forPattern("EEEE, MMMMM dd, yyyy", Locale.ROOT);
private static final String ACKNOWLEDGEMENT_HEADER = "This license update requires acknowledgement. To acknowledge the license, please read the following messages and update the license again, this time with the \"acknowledge=true\" parameter:";
private static final String ACKNOWLEDGEMENT_HEADER = "This license update requires acknowledgement. To acknowledge the license, " +
"please read the following messages and update the license again, this time with the \"acknowledge=true\" parameter:";
@Inject
public LicensesService(Settings settings, ClusterService clusterService, ThreadPool threadPool, TransportService transportService) {
@ -148,98 +150,100 @@ public class LicensesService extends AbstractLifecycleComponent<LicensesService>
private void populateExpirationCallbacks() {
expirationCallbacks.add(new ExpirationCallback.Pre(days(7), days(30), days(1)) {
@Override
public void on(License license) {
String general = LoggerMessageFormat.format(null, "\n" +
"#\n" +
"# License will expire on [{}]. If you have a new license, please update it.\n" +
"# Otherwise, please reach out to your support contact.\n" +
"# ", DATE_FORMATTER.printer().print(license.expiryDate()));
if (!registeredLicensees.isEmpty()) {
StringBuilder builder = new StringBuilder(general);
builder.append(System.lineSeparator());
builder.append("# Commercial plugins operate with reduced functionality on license expiration:");
for (InternalLicensee licensee : registeredLicensees) {
if (licensee.expirationMessages().length > 0) {
builder.append(System.lineSeparator());
builder.append("# - ");
builder.append(licensee.id());
for (String message : licensee.expirationMessages()) {
builder.append(System.lineSeparator());
builder.append("# - ");
builder.append(message);
@Override
public void on(License license) {
String general = LoggerMessageFormat.format(null, "\n" +
"#\n" +
"# License will expire on [{}]. If you have a new license, please update it.\n" +
"# Otherwise, please reach out to your support contact.\n" +
"# ", DATE_FORMATTER.printer().print(license.expiryDate()));
if (!registeredLicensees.isEmpty()) {
StringBuilder builder = new StringBuilder(general);
builder.append(System.lineSeparator());
builder.append("# Commercial plugins operate with reduced functionality on license " +
"expiration:");
for (InternalLicensee licensee : registeredLicensees) {
if (licensee.expirationMessages().length > 0) {
builder.append(System.lineSeparator());
builder.append("# - ");
builder.append(licensee.id());
for (String message : licensee.expirationMessages()) {
builder.append(System.lineSeparator());
builder.append("# - ");
builder.append(message);
}
}
}
logger.error(builder.toString());
} else {
logger.error(general);
}
}
}
}
logger.error(builder.toString());
} else {
logger.error(general);
}
}
}
);
expirationCallbacks.add(new ExpirationCallback.Pre(days(0), days(7), TimeValue.timeValueMinutes(10)) {
@Override
public void on(License license) {
String general = LoggerMessageFormat.format(null, "\n" +
"#\n" +
"# License will expire on [{}]. If you have a new license, please update it.\n" +
"# Otherwise, please reach out to your support contact.\n" +
"# ", DATE_FORMATTER.printer().print(license.expiryDate()));
if (!registeredLicensees.isEmpty()) {
StringBuilder builder = new StringBuilder(general);
builder.append(System.lineSeparator());
builder.append("# Commercial plugins operate with reduced functionality on license expiration:");
for (InternalLicensee licensee : registeredLicensees) {
if (licensee.expirationMessages().length > 0) {
builder.append(System.lineSeparator());
builder.append("# - ");
builder.append(licensee.id());
for (String message : licensee.expirationMessages()) {
builder.append(System.lineSeparator());
builder.append("# - ");
builder.append(message);
@Override
public void on(License license) {
String general = LoggerMessageFormat.format(null, "\n" +
"#\n" +
"# License will expire on [{}]. If you have a new license, please update it.\n" +
"# Otherwise, please reach out to your support contact.\n" +
"# ", DATE_FORMATTER.printer().print(license.expiryDate()));
if (!registeredLicensees.isEmpty()) {
StringBuilder builder = new StringBuilder(general);
builder.append(System.lineSeparator());
builder.append("# Commercial plugins operate with reduced functionality on license " +
"expiration:");
for (InternalLicensee licensee : registeredLicensees) {
if (licensee.expirationMessages().length > 0) {
builder.append(System.lineSeparator());
builder.append("# - ");
builder.append(licensee.id());
for (String message : licensee.expirationMessages()) {
builder.append(System.lineSeparator());
builder.append("# - ");
builder.append(message);
}
}
}
logger.error(builder.toString());
} else {
logger.error(general);
}
}
}
}
logger.error(builder.toString());
} else {
logger.error(general);
}
}
}
);
expirationCallbacks.add(new ExpirationCallback.Post(days(0), null, TimeValue.timeValueMinutes(10)) {
@Override
public void on(License license) {
// logged when grace period begins
String general = LoggerMessageFormat.format(null, "\n" +
"#\n" +
"# LICENSE EXPIRED ON [{}]. IF YOU HAVE A NEW LICENSE, PLEASE\n" +
"# UPDATE IT. OTHERWISE, PLEASE REACH OUT TO YOUR SUPPORT CONTACT.\n" +
"# ", DATE_FORMATTER.printer().print(license.expiryDate()));
if (!registeredLicensees.isEmpty()) {
StringBuilder builder = new StringBuilder(general);
builder.append(System.lineSeparator());
builder.append("# COMMERCIAL PLUGINS OPERATING WITH REDUCED FUNCTIONALITY");
for (InternalLicensee licensee : registeredLicensees) {
if (licensee.expirationMessages().length > 0) {
builder.append(System.lineSeparator());
builder.append("# - ");
builder.append(licensee.id());
for (String message : licensee.expirationMessages()) {
builder.append(System.lineSeparator());
builder.append("# - ");
builder.append(message);
@Override
public void on(License license) {
// logged when grace period begins
String general = LoggerMessageFormat.format(null, "\n" +
"#\n" +
"# LICENSE EXPIRED ON [{}]. IF YOU HAVE A NEW LICENSE, PLEASE\n" +
"# UPDATE IT. OTHERWISE, PLEASE REACH OUT TO YOUR SUPPORT CONTACT.\n" +
"# ", DATE_FORMATTER.printer().print(license.expiryDate()));
if (!registeredLicensees.isEmpty()) {
StringBuilder builder = new StringBuilder(general);
builder.append(System.lineSeparator());
builder.append("# COMMERCIAL PLUGINS OPERATING WITH REDUCED FUNCTIONALITY");
for (InternalLicensee licensee : registeredLicensees) {
if (licensee.expirationMessages().length > 0) {
builder.append(System.lineSeparator());
builder.append("# - ");
builder.append(licensee.id());
for (String message : licensee.expirationMessages()) {
builder.append(System.lineSeparator());
builder.append("# - ");
builder.append(message);
}
}
}
logger.error(builder.toString());
} else {
logger.error(general);
}
}
}
}
logger.error(builder.toString());
} else {
logger.error(general);
}
}
}
);
}
@ -259,10 +263,12 @@ public class LicensesService extends AbstractLifecycleComponent<LicensesService>
final LicensesMetaData currentMetaData = clusterService.state().metaData().custom(LicensesMetaData.TYPE);
final License currentLicense = getLicense(currentMetaData);
Map<String, String[]> acknowledgeMessages = new HashMap<>(registeredLicensees.size() + 1);
if (currentLicense != null && !License.isAutoGeneratedLicense(currentLicense.signature()) // when current license is not an auto-generated license
if (currentLicense != null && !License.isAutoGeneratedLicense(currentLicense.signature()) // when current license is not
// an auto-generated license
&& currentLicense.issueDate() > newLicense.issueDate()) { // and has a later issue date
acknowledgeMessages.put("license",
new String[] { "The new license is older than the currently installed license. Are you sure you want to override the current license?" });
new String[]{"The new license is older than the currently installed license. Are you sure you want to " +
"override the current license?"});
}
for (InternalLicensee licensee : registeredLicensees) {
String[] listenerAcknowledgeMessages = licensee.acknowledgmentMessages(currentLicense, newLicense);
@ -272,11 +278,13 @@ public class LicensesService extends AbstractLifecycleComponent<LicensesService>
}
if (!acknowledgeMessages.isEmpty()) {
// needs acknowledgement
listener.onResponse(new LicensesUpdateResponse(false, LicensesStatus.VALID, ACKNOWLEDGEMENT_HEADER, acknowledgeMessages));
listener.onResponse(new LicensesUpdateResponse(false, LicensesStatus.VALID, ACKNOWLEDGEMENT_HEADER,
acknowledgeMessages));
return;
}
}
clusterService.submitStateUpdateTask("register license [" + newLicense.uid() + "]", new AckedClusterStateUpdateTask<LicensesUpdateResponse>(request, listener) {
clusterService.submitStateUpdateTask("register license [" + newLicense.uid() + "]", new
AckedClusterStateUpdateTask<LicensesUpdateResponse>(request, listener) {
@Override
protected LicensesUpdateResponse newResponse(boolean acknowledged) {
return new LicensesUpdateResponse(acknowledged, LicensesStatus.VALID);
@ -317,7 +325,8 @@ public class LicensesService extends AbstractLifecycleComponent<LicensesService>
this(acknowledged, status, null, Collections.<String, String[]>emptyMap());
}
public LicensesUpdateResponse(boolean acknowledged, LicensesStatus status, String acknowledgementHeader, Map<String, String[]> acknowledgeMessages) {
public LicensesUpdateResponse(boolean acknowledged, LicensesStatus status, String acknowledgementHeader,
Map<String, String[]> acknowledgeMessages) {
super(acknowledged);
this.status = status;
this.acknowledgeMessages = acknowledgeMessages;
@ -341,7 +350,8 @@ public class LicensesService extends AbstractLifecycleComponent<LicensesService>
* Remove license from the cluster state metadata
*/
public void removeLicense(final DeleteLicenseRequest request, final ActionListener<ClusterStateUpdateResponse> listener) {
clusterService.submitStateUpdateTask("delete license", new AckedClusterStateUpdateTask<ClusterStateUpdateResponse>(request, listener) {
clusterService.submitStateUpdateTask("delete license",
new AckedClusterStateUpdateTask<ClusterStateUpdateResponse>(request, listener) {
@Override
protected ClusterStateUpdateResponse newResponse(boolean acknowledged) {
return new ClusterStateUpdateResponse(acknowledged);
@ -564,7 +574,8 @@ public class LicensesService extends AbstractLifecycleComponent<LicensesService>
logger.debug("schedule [{}] after [{}]", expirationCallback, delay);
}
}
logger.debug("scheduled expiry callbacks for [{}] expiring after [{}]", license.uid(), TimeValue.timeValueMillis(expiryDuration));
logger.debug("scheduled expiry callbacks for [{}] expiring after [{}]", license.uid(),
TimeValue.timeValueMillis(expiryDuration));
}
}
}
@ -625,15 +636,15 @@ public class LicensesService extends AbstractLifecycleComponent<LicensesService>
public static abstract class ExpirationCallback {
public enum Orientation { PRE, POST }
public enum Orientation {PRE, POST}
public static abstract class Pre extends ExpirationCallback {
/**
* Callback schedule prior to license expiry
*
* @param min latest relative time to execute before license expiry
* @param max earliest relative time to execute before license expiry
* @param min latest relative time to execute before license expiry
* @param max earliest relative time to execute before license expiry
* @param frequency interval between execution
*/
public Pre(TimeValue min, TimeValue max, TimeValue frequency) {
@ -662,8 +673,8 @@ public class LicensesService extends AbstractLifecycleComponent<LicensesService>
/**
* Callback schedule after license expiry
*
* @param min earliest relative time to execute after license expiry
* @param max latest relative time to execute after license expiry
* @param min earliest relative time to execute after license expiry
* @param max latest relative time to execute after license expiry
* @param frequency interval between execution
*/
public Post(TimeValue min, TimeValue max, TimeValue frequency) {
@ -685,9 +696,9 @@ public class LicensesService extends AbstractLifecycleComponent<LicensesService>
public TimeValue delay(long expiryDuration) {
final long delay;
if (expiryDuration >= 0L) {
delay = expiryDuration + min.getMillis();
delay = expiryDuration + min.getMillis();
} else {
delay = (-1L * expiryDuration) - min.getMillis();
delay = (-1L * expiryDuration) - min.getMillis();
}
if (delay > 0L) {
return TimeValue.timeValueMillis(delay);
@ -721,7 +732,8 @@ public class LicensesService extends AbstractLifecycleComponent<LicensesService>
@Override
public String toString() {
return LoggerMessageFormat.format(null, "ExpirationCallback:(orientation [{}], min [{}], max [{}], freq [{}])", orientation.name(), min, max, frequency);
return LoggerMessageFormat.format(null, "ExpirationCallback:(orientation [{}], min [{}], max [{}], freq [{}])",
orientation.name(), min, max, frequency);
}
}
@ -851,10 +863,12 @@ public class LicensesService extends AbstractLifecycleComponent<LicensesService>
public void setGracePeriodDuration(TimeValue gracePeriodDuration) {
this.gracePeriodDuration = gracePeriodDuration;
}
// only for adding expiration callbacks for tests
public void setExpirationCallbacks(List<ExpirationCallback> expirationCallbacks) {
this.expirationCallbacks = expirationCallbacks;
}
// TODO - temporary hack for tests, should be removed once we introduce `ClockMock`
public void setTrialLicenseDuration(TimeValue trialLicenseDuration) {
this.trialLicenseDuration = trialLicenseDuration;

View File

@ -57,7 +57,8 @@ public class TrialLicense {
final License expectedLicense;
try (XContentParser parser = XContentFactory.xContent(XContentType.JSON).createParser(decrypt(content))) {
parser.nextToken();
expectedLicense = License.builder().fromLicenseSpec(License.fromXContent(parser), license.signature()).version(-version).build();
expectedLicense = License.builder().fromLicenseSpec(License.fromXContent(parser),
license.signature()).version(-version).build();
}
return license.equals(expectedLicense);
} catch (IOException e) {

View File

@ -10,7 +10,6 @@ import org.elasticsearch.common.inject.Inject;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.license.plugin.action.delete.DeleteLicenseAction;
import org.elasticsearch.license.plugin.action.delete.DeleteLicenseRequest;
import org.elasticsearch.license.plugin.action.delete.DeleteLicenseResponse;
import org.elasticsearch.rest.BaseRestHandler;
import org.elasticsearch.rest.RestChannel;
import org.elasticsearch.rest.RestController;
@ -29,6 +28,6 @@ public class RestDeleteLicenseAction extends BaseRestHandler {
@Override
public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) {
client.admin().cluster().execute(DeleteLicenseAction.INSTANCE, new DeleteLicenseRequest(), new AcknowledgedRestListener<DeleteLicenseResponse>(channel));
client.admin().cluster().execute(DeleteLicenseAction.INSTANCE, new DeleteLicenseRequest(), new AcknowledgedRestListener<>(channel));
}
}

View File

@ -50,23 +50,24 @@ public class RestGetLicenseAction extends BaseRestHandler {
final ToXContent.Params params = new ToXContent.DelegatingMapParams(overrideParams, request);
GetLicenseRequest getLicenseRequest = new GetLicenseRequest();
getLicenseRequest.local(request.paramAsBoolean("local", getLicenseRequest.local()));
client.admin().cluster().execute(GetLicenseAction.INSTANCE, getLicenseRequest, new RestBuilderListener<GetLicenseResponse>(channel) {
@Override
public RestResponse buildResponse(GetLicenseResponse response, XContentBuilder builder) throws Exception {
// Default to pretty printing, but allow ?pretty=false to disable
if (!request.hasParam("pretty")) {
builder.prettyPrint().lfAtEnd();
}
builder.startObject();
if (response.license() != null) {
builder.startObject("license");
response.license().toInnerXContent(builder, params);
builder.endObject();
}
builder.endObject();
return new BytesRestResponse(OK, builder);
}
});
client.admin().cluster().execute(GetLicenseAction.INSTANCE, getLicenseRequest,
new RestBuilderListener<GetLicenseResponse>(channel) {
@Override
public RestResponse buildResponse(GetLicenseResponse response, XContentBuilder builder) throws Exception {
// Default to pretty printing, but allow ?pretty=false to disable
if (!request.hasParam("pretty")) {
builder.prettyPrint().lfAtEnd();
}
builder.startObject();
if (response.license() != null) {
builder.startObject("license");
response.license().toInnerXContent(builder, params);
builder.endObject();
}
builder.endObject();
return new BytesRestResponse(OK, builder);
}
});
}
}

View File

@ -39,14 +39,15 @@ public class RestPutLicenseAction extends BaseRestHandler {
PutLicenseRequest putLicenseRequest = new PutLicenseRequest();
putLicenseRequest.license(request.content().toUtf8());
putLicenseRequest.acknowledge(request.paramAsBoolean("acknowledge", false));
client.admin().cluster().execute(PutLicenseAction.INSTANCE, putLicenseRequest, new RestBuilderListener<PutLicenseResponse>(channel) {
@Override
public RestResponse buildResponse(PutLicenseResponse response, XContentBuilder builder) throws Exception {
builder.startObject();
response.toXContent(builder, ToXContent.EMPTY_PARAMS);
builder.endObject();
return new BytesRestResponse(RestStatus.OK, builder);
}
});
client.admin().cluster().execute(PutLicenseAction.INSTANCE, putLicenseRequest,
new RestBuilderListener<PutLicenseResponse>(channel) {
@Override
public RestResponse buildResponse(PutLicenseResponse response, XContentBuilder builder) throws Exception {
builder.startObject();
response.toXContent(builder, ToXContent.EMPTY_PARAMS);
builder.endObject();
return new BytesRestResponse(RestStatus.OK, builder);
}
});
}
}

View File

@ -26,7 +26,8 @@ import static org.elasticsearch.test.ESIntegTestCase.Scope.TEST;
/**
* Framework to test licensing plugin integration for existing/new consumer plugins
* see {@link org.elasticsearch.license.plugin.LicensesEagerConsumerPluginIntegrationTests} and {@link org.elasticsearch.license.plugin.LicensesLazyConsumerPluginIntegrationTests}
* see {@link org.elasticsearch.license.plugin.LicensesEagerConsumerPluginIntegrationTests}
* and {@link org.elasticsearch.license.plugin.LicensesLazyConsumerPluginIntegrationTests}
* for example usage
*/
@ClusterScope(scope = TEST, numDataNodes = 2, numClientNodes = 0, transportClientRatio = 0.0)

View File

@ -92,7 +92,8 @@ public abstract class AbstractLicensesIntegrationTestCase extends ESIntegTestCas
protected void putLicense(TimeValue expiryDuration) throws Exception {
License license1 = generateSignedLicense(expiryDuration);
final PutLicenseResponse putLicenseResponse = new PutLicenseRequestBuilder(client().admin().cluster(), PutLicenseAction.INSTANCE).setLicense(license1).get();
final PutLicenseResponse putLicenseResponse = new PutLicenseRequestBuilder(client().admin().cluster(),
PutLicenseAction.INSTANCE).setLicense(license1).get();
assertThat(putLicenseResponse.isAcknowledged(), equalTo(true));
assertThat(putLicenseResponse.status(), equalTo(LicensesStatus.VALID));
}
@ -119,7 +120,8 @@ public abstract class AbstractLicensesIntegrationTestCase extends ESIntegTestCas
assertConsumerPluginNotification(consumerPluginServices, state, timeoutInSec);
}
protected void assertConsumerPluginNotification(final List<TestPluginServiceBase> consumerPluginServices, final LicenseState state, int timeoutInSec) throws InterruptedException {
protected void assertConsumerPluginNotification(final List<TestPluginServiceBase> consumerPluginServices, final LicenseState state,
int timeoutInSec) throws InterruptedException {
assertThat("At least one instance has to be present", consumerPluginServices.size(), greaterThan(0));
boolean success = awaitBusy(() -> {
for (TestPluginServiceBase pluginService : consumerPluginServices) {

View File

@ -10,7 +10,6 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.license.plugin.consumer.EagerLicenseRegistrationConsumerPlugin;
import org.elasticsearch.license.plugin.consumer.EagerLicenseRegistrationPluginService;
import org.elasticsearch.license.plugin.core.LicenseState;
import org.elasticsearch.node.Node;
import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.xpack.XPackPlugin;
@ -43,7 +42,8 @@ public class LicensesServiceNodeTests extends AbstractLicensesIntegrationTestCas
}
public void testPluginStatus() throws Exception {
final Iterable<EagerLicenseRegistrationPluginService> testPluginServices = internalCluster().getDataNodeInstances(EagerLicenseRegistrationPluginService.class);
final Iterable<EagerLicenseRegistrationPluginService> testPluginServices =
internalCluster().getDataNodeInstances(EagerLicenseRegistrationPluginService.class);
assertTrue(awaitBusy(() -> {
for (EagerLicenseRegistrationPluginService pluginService : testPluginServices) {
if (pluginService.state() != LicenseState.ENABLED) {

View File

@ -35,7 +35,8 @@ public class LicensesTransportTests extends AbstractLicensesIntegrationTestCase
}
public void testEmptyGetLicense() throws Exception {
final ActionFuture<GetLicenseResponse> getLicenseFuture = new GetLicenseRequestBuilder(client().admin().cluster(), GetLicenseAction.INSTANCE).execute();
final ActionFuture<GetLicenseResponse> getLicenseFuture =
new GetLicenseRequestBuilder(client().admin().cluster(), GetLicenseAction.INSTANCE).execute();
final GetLicenseResponse getLicenseResponse = getLicenseFuture.get();
assertNotNull(getLicenseResponse.license());
assertThat(getLicenseResponse.license().operationMode(), equalTo(License.OperationMode.TRIAL));
@ -45,8 +46,8 @@ public class LicensesTransportTests extends AbstractLicensesIntegrationTestCase
License signedLicense = generateSignedLicense(TimeValue.timeValueMinutes(2));
// put license
PutLicenseRequestBuilder putLicenseRequestBuilder = new PutLicenseRequestBuilder(client().admin().cluster(), PutLicenseAction.INSTANCE)
.setLicense(signedLicense);
PutLicenseRequestBuilder putLicenseRequestBuilder =
new PutLicenseRequestBuilder(client().admin().cluster(), PutLicenseAction.INSTANCE).setLicense(signedLicense);
PutLicenseResponse putLicenseResponse = putLicenseRequestBuilder.get();
assertThat(putLicenseResponse.isAcknowledged(), equalTo(true));
assertThat(putLicenseResponse.status(), equalTo(LicensesStatus.VALID));
@ -61,8 +62,8 @@ public class LicensesTransportTests extends AbstractLicensesIntegrationTestCase
String licenseString = TestUtils.dumpLicense(signedLicense);
// put license source
PutLicenseRequestBuilder putLicenseRequestBuilder = new PutLicenseRequestBuilder(client().admin().cluster(), PutLicenseAction.INSTANCE)
.setLicense(licenseString);
PutLicenseRequestBuilder putLicenseRequestBuilder =
new PutLicenseRequestBuilder(client().admin().cluster(), PutLicenseAction.INSTANCE).setLicense(licenseString);
PutLicenseResponse putLicenseResponse = putLicenseRequestBuilder.get();
assertThat(putLicenseResponse.isAcknowledged(), equalTo(true));
assertThat(putLicenseResponse.status(), equalTo(LicensesStatus.VALID));
@ -113,8 +114,8 @@ public class LicensesTransportTests extends AbstractLicensesIntegrationTestCase
public void testPutLicensesSimple() throws Exception {
License basicSignedLicense = generateSignedLicense("basic", TimeValue.timeValueMinutes(5));
PutLicenseRequestBuilder putLicenseRequestBuilder = new PutLicenseRequestBuilder(client().admin().cluster(), PutLicenseAction.INSTANCE)
.setLicense(basicSignedLicense);
PutLicenseRequestBuilder putLicenseRequestBuilder =
new PutLicenseRequestBuilder(client().admin().cluster(), PutLicenseAction.INSTANCE).setLicense(basicSignedLicense);
PutLicenseResponse putLicenseResponse = putLicenseRequestBuilder.get();
assertThat(putLicenseResponse.status(), equalTo(LicensesStatus.VALID));
GetLicenseResponse getLicenseResponse = new GetLicenseRequestBuilder(client().admin().cluster(), GetLicenseAction.INSTANCE).get();
@ -131,15 +132,16 @@ public class LicensesTransportTests extends AbstractLicensesIntegrationTestCase
public void testRemoveLicensesSimple() throws Exception {
License goldLicense = generateSignedLicense("gold", TimeValue.timeValueMinutes(5));
PutLicenseRequestBuilder putLicenseRequestBuilder = new PutLicenseRequestBuilder(client().admin().cluster(), PutLicenseAction.INSTANCE)
.setLicense(goldLicense);
PutLicenseRequestBuilder putLicenseRequestBuilder =
new PutLicenseRequestBuilder(client().admin().cluster(), PutLicenseAction.INSTANCE).setLicense(goldLicense);
PutLicenseResponse putLicenseResponse = putLicenseRequestBuilder.get();
assertThat(putLicenseResponse.isAcknowledged(), equalTo(true));
assertThat(putLicenseResponse.status(), equalTo(LicensesStatus.VALID));
GetLicenseResponse getLicenseResponse = new GetLicenseRequestBuilder(client().admin().cluster(), GetLicenseAction.INSTANCE).get();
assertThat(getLicenseResponse.license(), equalTo(goldLicense));
// delete all licenses
DeleteLicenseRequestBuilder deleteLicenseRequestBuilder = new DeleteLicenseRequestBuilder(client().admin().cluster(), DeleteLicenseAction.INSTANCE);
DeleteLicenseRequestBuilder deleteLicenseRequestBuilder =
new DeleteLicenseRequestBuilder(client().admin().cluster(), DeleteLicenseAction.INSTANCE);
DeleteLicenseResponse deleteLicenseResponse = deleteLicenseRequestBuilder.get();
assertThat(deleteLicenseResponse.isAcknowledged(), equalTo(true));
// get licenses (expected no licenses)

View File

@ -5,7 +5,6 @@
*/
package org.elasticsearch.license.plugin;
import org.apache.lucene.util.CollectionUtil;
import org.elasticsearch.action.ActionListener;
import org.elasticsearch.client.Client;
import org.elasticsearch.cluster.block.ClusterBlock;
@ -31,9 +30,6 @@ import org.elasticsearch.license.plugin.core.LicensesStatus;
import org.junit.Assert;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Comparator;
import java.util.List;
import java.util.Set;
import java.util.UUID;
@ -72,28 +68,6 @@ public class TestUtils {
return getResourcePath("/public.key");
}
public static void isSame(Collection<License> firstLicenses, Collection<License> secondLicenses) {
// check if the effective licenses have the same feature set
assertThat(firstLicenses.size(), equalTo(secondLicenses.size()));
List<License> license1 = new ArrayList<>(firstLicenses);
CollectionUtil.timSort(license1, new Comparator<License>() {
@Override
public int compare(License o1, License o2) {
return Long.compare(o1.expiryDate(), o2.expiryDate());
}
});
List<License> license2 = new ArrayList<>(secondLicenses);
CollectionUtil.timSort(license2, new Comparator<License>() {
@Override
public int compare(License o1, License o2) {
return Long.compare(o1.expiryDate(), o2.expiryDate());
}
});
assertThat(license1, equalTo(license2));
}
public static String dumpLicense(License license) throws Exception {
XContentBuilder builder = XContentFactory.contentBuilder(XContentType.JSON);
builder.startObject();
@ -160,7 +134,8 @@ public class TestUtils {
assertThat("awaiting no pending tasks for too long", success, equalTo(true));
}
public static void registerAndAckSignedLicenses(final LicensesService licensesService, License license, final LicensesStatus expectedStatus) {
public static void registerAndAckSignedLicenses(final LicensesService licensesService, License license,
final LicensesStatus expectedStatus) {
PutLicenseRequest putLicenseRequest = new PutLicenseRequest().license(license);
final CountDownLatch latch = new CountDownLatch(1);
final AtomicReference<LicensesStatus> status = new AtomicReference<>();

View File

@ -21,7 +21,8 @@ import org.elasticsearch.license.plugin.core.LicensesService;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicReference;
public abstract class TestPluginServiceBase extends AbstractLifecycleComponent<TestPluginServiceBase> implements ClusterStateListener, Licensee {
public abstract class TestPluginServiceBase extends AbstractLifecycleComponent<TestPluginServiceBase>
implements ClusterStateListener, Licensee {
private LicensesService licensesClientService;
private final ClusterService clusterService;
@ -29,7 +30,8 @@ public abstract class TestPluginServiceBase extends AbstractLifecycleComponent<T
public final AtomicBoolean registered = new AtomicBoolean(false);
private AtomicReference<LicenseState> state = new AtomicReference<>(LicenseState.DISABLED);
public TestPluginServiceBase(boolean eagerLicenseRegistration, Settings settings, LicensesService licensesClientService, ClusterService clusterService) {
public TestPluginServiceBase(boolean eagerLicenseRegistration, Settings settings, LicensesService licensesClientService,
ClusterService clusterService) {
super(settings);
this.eagerLicenseRegistration = eagerLicenseRegistration;
this.licensesClientService = licensesClientService;

View File

@ -65,7 +65,8 @@ public class LicensesAcknowledgementTests extends ESSingleNodeTestCase {
putLicenseRequest = new PutLicenseRequest().license(signedLicense).acknowledge(true);
// ensure license was installed and no acknowledgment message was returned
licensee.setAcknowledgementMessages(new String[0]);
licensesService.registerLicense(putLicenseRequest, new AssertingLicensesUpdateResponse(true, LicensesStatus.VALID, Collections.<String, String[]>emptyMap(), latch));
licensesService.registerLicense(putLicenseRequest, new AssertingLicensesUpdateResponse(true, LicensesStatus.VALID,
Collections.<String, String[]>emptyMap(), latch));
if (!latch.await(5, TimeUnit.SECONDS)) {
fail("waiting too long for a response to license registration");
}
@ -117,7 +118,8 @@ public class LicensesAcknowledgementTests extends ESSingleNodeTestCase {
// ensure license was installed and no acknowledgment message was returned
licensee1.setAcknowledgementMessages(new String[0]);
licensee2.setAcknowledgementMessages(new String[0]);
licensesService.registerLicense(putLicenseRequest, new AssertingLicensesUpdateResponse(true, LicensesStatus.VALID, Collections.<String, String[]>emptyMap(), latch));
licensesService.registerLicense(putLicenseRequest, new AssertingLicensesUpdateResponse(true, LicensesStatus.VALID,
Collections.<String, String[]>emptyMap(), latch));
if (!latch.await(5, TimeUnit.SECONDS)) {
fail("waiting too long for a response to license registration");
}
@ -132,7 +134,8 @@ public class LicensesAcknowledgementTests extends ESSingleNodeTestCase {
private final Map<String, String[]> expectedAckMessages;
private final CountDownLatch latch;
public AssertingLicensesUpdateResponse(boolean expectedAcknowledgement, LicensesStatus expectedStatus, Map<String, String[]> expectedAckMessages, CountDownLatch latch) {
public AssertingLicensesUpdateResponse(boolean expectedAcknowledgement, LicensesStatus expectedStatus,
Map<String, String[]> expectedAckMessages, CountDownLatch latch) {
this.expectedAcknowledgement = expectedAcknowledgement;
this.expectedStatus = expectedStatus;
this.expectedAckMessages = expectedAckMessages;

View File

@ -15,6 +15,7 @@ import java.util.Arrays;
import java.util.Collections;
import java.util.concurrent.atomic.AtomicInteger;
import static org.elasticsearch.common.unit.TimeValue.timeValueMillis;
import static org.hamcrest.Matchers.equalTo;
public class LicensesExpirationCallbackTests extends ESSingleNodeTestCase {
@ -33,7 +34,7 @@ public class LicensesExpirationCallbackTests extends ESSingleNodeTestCase {
TimeValue min = TimeValue.timeValueSeconds(postExpirySeconds - randomIntBetween(1, 3));
TimeValue max = TimeValue.timeValueSeconds(postExpirySeconds + randomIntBetween(1, 10));
final LicensesService.ExpirationCallback.Post post = new LicensesService.ExpirationCallback.Post(min, max, TimeValue.timeValueMillis(10)) {
final LicensesService.ExpirationCallback.Post post = new LicensesService.ExpirationCallback.Post(min, max, timeValueMillis(10)) {
@Override
public void on(License license) {
}
@ -48,7 +49,7 @@ public class LicensesExpirationCallbackTests extends ESSingleNodeTestCase {
TimeValue postExpiryDuration = TimeValue.timeValueSeconds(postExpirySeconds);
TimeValue min = TimeValue.timeValueSeconds(postExpirySeconds - randomIntBetween(1, 3));
final LicensesService.ExpirationCallback.Post post = new LicensesService.ExpirationCallback.Post(min, null, TimeValue.timeValueMillis(10)) {
final LicensesService.ExpirationCallback.Post post = new LicensesService.ExpirationCallback.Post(min, null, timeValueMillis(10)) {
@Override
public void on(License license) {
}
@ -62,7 +63,7 @@ public class LicensesExpirationCallbackTests extends ESSingleNodeTestCase {
TimeValue expiryDuration = TimeValue.timeValueSeconds(expirySeconds);
TimeValue max = TimeValue.timeValueSeconds(expirySeconds + randomIntBetween(1, 10));
final LicensesService.ExpirationCallback.Pre pre = new LicensesService.ExpirationCallback.Pre(null, max, TimeValue.timeValueMillis(10)) {
final LicensesService.ExpirationCallback.Pre pre = new LicensesService.ExpirationCallback.Pre(null, max, timeValueMillis(10)) {
@Override
public void on(License license) {
}
@ -77,7 +78,7 @@ public class LicensesExpirationCallbackTests extends ESSingleNodeTestCase {
TimeValue min = TimeValue.timeValueSeconds(expirySeconds - randomIntBetween(0, 3));
TimeValue max = TimeValue.timeValueSeconds(expirySeconds + randomIntBetween(1, 10));
final LicensesService.ExpirationCallback.Pre pre = new LicensesService.ExpirationCallback.Pre(min, max, TimeValue.timeValueMillis(10)) {
final LicensesService.ExpirationCallback.Pre pre = new LicensesService.ExpirationCallback.Pre(min, max, timeValueMillis(10)) {
@Override
public void on(License license) {
}
@ -91,8 +92,9 @@ public class LicensesExpirationCallbackTests extends ESSingleNodeTestCase {
final LicensesService licensesService = getInstanceFromNode(LicensesService.class);
licensesService.setTrialLicenseDuration(TimeValue.timeValueSeconds(5));
AtomicInteger counter = new AtomicInteger(0);
// 2000, 1600, 1200
licensesService.setExpirationCallbacks(Collections.singletonList(
preCallbackLatch(TimeValue.timeValueSeconds(1), TimeValue.timeValueSeconds(2), TimeValue.timeValueMillis(400), counter)) // 2000, 1600, 1200
preCallbackLatch(TimeValue.timeValueSeconds(1), TimeValue.timeValueSeconds(2), timeValueMillis(400), counter))
);
licensesService.start();
TestUtils.AssertingLicensee licensee = new TestUtils.AssertingLicensee("testPreExpirationNotification", logger);
@ -106,8 +108,9 @@ public class LicensesExpirationCallbackTests extends ESSingleNodeTestCase {
final LicensesService licensesService = getInstanceFromNode(LicensesService.class);
licensesService.setTrialLicenseDuration(TimeValue.timeValueSeconds(3));
AtomicInteger counter = new AtomicInteger(0);
// 700, 1700, 2700
licensesService.setExpirationCallbacks(Collections.singletonList(
postCallbackLatch(TimeValue.timeValueMillis(700), TimeValue.timeValueSeconds(3), TimeValue.timeValueSeconds(1), counter)) // 700, 1700, 2700
postCallbackLatch(timeValueMillis(700), TimeValue.timeValueSeconds(3), TimeValue.timeValueSeconds(1), counter))
);
licensesService.start();
TestUtils.AssertingLicensee licensee = new TestUtils.AssertingLicensee("testPostExpirationNotification", logger);
@ -125,8 +128,10 @@ public class LicensesExpirationCallbackTests extends ESSingleNodeTestCase {
AtomicInteger postCounter = new AtomicInteger(0);
AtomicInteger preCounter = new AtomicInteger(0);
licensesService.setExpirationCallbacks(Arrays.asList(
preCallbackLatch(TimeValue.timeValueSeconds(1), TimeValue.timeValueSeconds(2), TimeValue.timeValueMillis(400), preCounter), // 2000, 1600, 1200
postCallbackLatch(TimeValue.timeValueMillis(100), TimeValue.timeValueSeconds(2), TimeValue.timeValueMillis(400), postCounter)) // 100, 500, 900, 1300, 1700
// 2000, 1600, 1200
preCallbackLatch(TimeValue.timeValueSeconds(1), TimeValue.timeValueSeconds(2), timeValueMillis(400), preCounter),
// 100, 500, 900, 1300, 1700
postCallbackLatch(timeValueMillis(100), TimeValue.timeValueSeconds(2), timeValueMillis(400), postCounter))
);
licensesService.start();
TestUtils.AssertingLicensee licensee = new TestUtils.AssertingLicensee("testMultipleExpirationNotification", logger);
@ -140,7 +145,8 @@ public class LicensesExpirationCallbackTests extends ESSingleNodeTestCase {
licensesService.stop();
}
private static LicensesService.ExpirationCallback preCallbackLatch(TimeValue min, TimeValue max, TimeValue frequency, final AtomicInteger count) {
private static LicensesService.ExpirationCallback preCallbackLatch(TimeValue min, TimeValue max, TimeValue frequency,
final AtomicInteger count) {
return new LicensesService.ExpirationCallback.Pre(min, max, frequency) {
@Override
public void on(License license) {
@ -149,7 +155,8 @@ public class LicensesExpirationCallbackTests extends ESSingleNodeTestCase {
};
}
private static LicensesService.ExpirationCallback postCallbackLatch(TimeValue min, TimeValue max, TimeValue frequency, final AtomicInteger count) {
private static LicensesService.ExpirationCallback postCallbackLatch(TimeValue min, TimeValue max, TimeValue frequency,
final AtomicInteger count) {
return new LicensesService.ExpirationCallback.Post(min, max, frequency) {
@Override
public void on(License license) {

View File

@ -154,7 +154,8 @@ public class LicensesExpiryNotificationTests extends ESSingleNodeTestCase {
registerAndAckSignedLicenses(licensesService, generateSignedLicense("gold", TimeValue.timeValueSeconds(2)), LicensesStatus.VALID);
// second signed license enabled, grace and expired
success = awaitBusy(() ->licensee.licenseStates.size() == 5);
assertLicenseStates(licensee, LicenseState.ENABLED, LicenseState.ENABLED, LicenseState.ENABLED, LicenseState.GRACE_PERIOD, LicenseState.DISABLED);
assertLicenseStates(licensee, LicenseState.ENABLED, LicenseState.ENABLED, LicenseState.ENABLED, LicenseState.GRACE_PERIOD,
LicenseState.DISABLED);
assertTrue(dumpLicensingStates(licensee.licenseStates), success);
licensesService.stop();
}
@ -177,7 +178,8 @@ public class LicensesExpiryNotificationTests extends ESSingleNodeTestCase {
registerAndAckSignedLicenses(licensesService, generateSignedLicense("basic", TimeValue.timeValueSeconds(2)), LicensesStatus.VALID);
// trial license: enabled, grace, disabled, signed license: enabled, grace, disabled
success = awaitBusy(() -> licensee.licenseStates.size() == 6);
assertLicenseStates(licensee, LicenseState.ENABLED, LicenseState.GRACE_PERIOD, LicenseState.DISABLED, LicenseState.ENABLED, LicenseState.GRACE_PERIOD, LicenseState.DISABLED);
assertLicenseStates(licensee, LicenseState.ENABLED, LicenseState.GRACE_PERIOD, LicenseState.DISABLED, LicenseState.ENABLED,
LicenseState.GRACE_PERIOD, LicenseState.DISABLED);
assertTrue(dumpLicensingStates(licensee.licenseStates), success);
licensesService.stop();
}

View File

@ -39,8 +39,10 @@ public class MarvelPlugin extends Plugin {
public static final String NAME = "marvel";
public static final String ENABLED = NAME + ".enabled";
public static final Setting<String> INDEX_MARVEL_VERSION_SETTING = new Setting<>("index.marvel.plugin.version", "", Function.identity(), false, Setting.Scope.INDEX);
public static final Setting<String> INDEX_MARVEL_TEMPLATE_VERSION_SETTING = new Setting<>("index.marvel.template.version", "", Function.identity(), false, Setting.Scope.INDEX);
public static final Setting<String> INDEX_MARVEL_VERSION_SETTING =
new Setting<>("index.marvel.plugin.version", "", Function.identity(), false, Setting.Scope.INDEX);
public static final Setting<String> INDEX_MARVEL_TEMPLATE_VERSION_SETTING =
new Setting<>("index.marvel.template.version", "", Function.identity(), false, Setting.Scope.INDEX);
public static final String TRIBE_NAME_SETTING = "tribe.name";
private final Settings settings;

View File

@ -177,7 +177,8 @@ public class AgentService extends AbstractLifecycleComponent<AgentService> {
if (collecting) {
Collection<MarvelDoc> docs = collector.collect();
if (docs != null) {
logger.trace("bulk [{}] - adding [{}] collected docs from [{}] collector", bulk, docs.size(), collector.name());
logger.trace("bulk [{}] - adding [{}] collected docs from [{}] collector", bulk, docs.size(),
collector.name());
bulk.add(docs);
} else {
logger.trace("bulk [{}] - skipping collected docs from [{}] collector", bulk, collector.name());

View File

@ -146,4 +146,4 @@ public abstract class AbstractCollector<T> extends AbstractLifecycleComponent<T>
return index;
}
}
}
}

View File

@ -87,7 +87,8 @@ public class ClusterStateCollector extends AbstractCollector<ClusterStateCollect
results.add(clusterStateNodeDoc);
// Adds a document for every node in the marvel data index (type "node")
DiscoveryNodeMarvelDoc discoveryNodeDoc = new DiscoveryNodeMarvelDoc(dataIndexNameResolver.resolve(timestamp), NODE_TYPE, node.getId());
DiscoveryNodeMarvelDoc discoveryNodeDoc = new DiscoveryNodeMarvelDoc(dataIndexNameResolver.resolve(timestamp), NODE_TYPE,
node.getId());
discoveryNodeDoc.setClusterUUID(clusterUUID);
discoveryNodeDoc.setTimestamp(timestamp);
discoveryNodeDoc.setSourceNode(node);

View File

@ -86,7 +86,8 @@ public class ClusterStatsCollector extends AbstractCollector<ClusterStatsCollect
DiscoveryNode sourceNode = localNode();
// Adds a cluster info document
ClusterInfoMarvelDoc clusterInfoDoc = new ClusterInfoMarvelDoc(dataIndexNameResolver.resolve(timestamp), CLUSTER_INFO_TYPE, clusterUUID);
String resolvedIndex = dataIndexNameResolver.resolve(timestamp);
ClusterInfoMarvelDoc clusterInfoDoc = new ClusterInfoMarvelDoc(resolvedIndex, CLUSTER_INFO_TYPE, clusterUUID);
clusterInfoDoc.setClusterUUID(clusterUUID);
clusterInfoDoc.setTimestamp(timestamp);
clusterInfoDoc.setSourceNode(sourceNode);

View File

@ -19,7 +19,6 @@ import org.elasticsearch.marvel.agent.exporter.MarvelDoc;
import org.elasticsearch.marvel.agent.settings.MarvelSettings;
import org.elasticsearch.marvel.license.MarvelLicensee;
import org.elasticsearch.shield.InternalClient;
import org.elasticsearch.shield.ShieldPlugin;
import java.util.ArrayList;
import java.util.Arrays;
@ -27,6 +26,8 @@ import java.util.Collection;
import java.util.Collections;
import java.util.List;
import static org.elasticsearch.shield.ShieldPlugin.shieldEnabled;
/**
* Collector for the Recovery API.
* <p>
@ -72,7 +73,7 @@ public class IndexRecoveryCollector extends AbstractCollector<IndexRecoveryColle
results.add(indexRecoveryDoc);
}
} catch (IndexNotFoundException e) {
if (ShieldPlugin.shieldEnabled(settings) && IndexNameExpressionResolver.isAllIndices(Arrays.asList(marvelSettings.indices()))) {
if (shieldEnabled(settings) && IndexNameExpressionResolver.isAllIndices(Arrays.asList(marvelSettings.indices()))) {
logger.debug("collector [{}] - unable to collect data for missing index [{}]", name(), e.getIndex());
} else {
throw e;

View File

@ -21,7 +21,6 @@ import org.elasticsearch.marvel.agent.exporter.MarvelDoc;
import org.elasticsearch.marvel.agent.settings.MarvelSettings;
import org.elasticsearch.marvel.license.MarvelLicensee;
import org.elasticsearch.shield.InternalClient;
import org.elasticsearch.shield.ShieldPlugin;
import java.util.ArrayList;
import java.util.Arrays;
@ -29,6 +28,8 @@ import java.util.Collection;
import java.util.Collections;
import java.util.List;
import static org.elasticsearch.shield.ShieldPlugin.shieldEnabled;
/**
* Collector for indices statistics.
* <p>
@ -86,7 +87,7 @@ public class IndexStatsCollector extends AbstractCollector<IndexStatsCollector>
results.add(indexStatsDoc);
}
} catch (IndexNotFoundException e) {
if (ShieldPlugin.shieldEnabled(settings) && IndexNameExpressionResolver.isAllIndices(Arrays.asList(marvelSettings.indices()))) {
if (shieldEnabled(settings) && IndexNameExpressionResolver.isAllIndices(Arrays.asList(marvelSettings.indices()))) {
logger.debug("collector [{}] - unable to collect data for missing index [{}]", name(), e.getIndex());
} else {
throw e;

View File

@ -19,12 +19,13 @@ import org.elasticsearch.marvel.agent.exporter.MarvelDoc;
import org.elasticsearch.marvel.agent.settings.MarvelSettings;
import org.elasticsearch.marvel.license.MarvelLicensee;
import org.elasticsearch.shield.InternalClient;
import org.elasticsearch.shield.ShieldPlugin;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import static org.elasticsearch.shield.ShieldPlugin.shieldEnabled;
/**
* Collector for indices statistics.
* <p>
@ -71,7 +72,7 @@ public class IndicesStatsCollector extends AbstractCollector<IndicesStatsCollect
return Collections.singletonList(indicesStatsDoc);
} catch (IndexNotFoundException e) {
if (ShieldPlugin.shieldEnabled(settings) && IndexNameExpressionResolver.isAllIndices(Arrays.asList(marvelSettings.indices()))) {
if (shieldEnabled(settings) && IndexNameExpressionResolver.isAllIndices(Arrays.asList(marvelSettings.indices()))) {
logger.debug("collector [{}] - unable to collect data for missing index [{}]", name(), e.getIndex());
return Collections.emptyList();
}

View File

@ -44,9 +44,9 @@ public class NodeStatsCollector extends AbstractCollector<NodeStatsCollector> {
private final DiskThresholdDecider diskThresholdDecider;
@Inject
public NodeStatsCollector(Settings settings, ClusterService clusterService, MarvelSettings marvelSettings, MarvelLicensee marvelLicensee,
InternalClient client, DiscoveryService discoveryService, NodeEnvironment nodeEnvironment,
DiskThresholdDecider diskThresholdDecider) {
public NodeStatsCollector(Settings settings, ClusterService clusterService, MarvelSettings marvelSettings,
MarvelLicensee marvelLicensee, InternalClient client, DiscoveryService discoveryService,
NodeEnvironment nodeEnvironment, DiskThresholdDecider diskThresholdDecider) {
super(settings, NAME, clusterService, discoveryService, marvelSettings, marvelLicensee);
this.client = client;
this.nodeEnvironment = nodeEnvironment;

View File

@ -137,7 +137,8 @@ public abstract class Exporter {
try {
indexTimeFormatter = DateTimeFormat.forPattern(indexTimeFormat).withZoneUTC();
} catch (IllegalArgumentException e) {
throw new SettingsException("invalid marvel index name time format [" + indexTimeFormat + "] set for [" + settingFQN(INDEX_NAME_TIME_FORMAT_SETTING) + "]", e);
throw new SettingsException("invalid marvel index name time format [" + indexTimeFormat + "] set for [" +
settingFQN(INDEX_NAME_TIME_FORMAT_SETTING) + "]", e);
}
}
@ -151,7 +152,8 @@ public abstract class Exporter {
@Override
public String resolve(long timestamp) {
return MarvelSettings.MARVEL_INDICES_PREFIX + String.valueOf(MarvelTemplateUtils.TEMPLATE_VERSION) + "-" + indexTimeFormatter.print(timestamp);
return MarvelSettings.MARVEL_INDICES_PREFIX + String.valueOf(MarvelTemplateUtils.TEMPLATE_VERSION) + "-" +
indexTimeFormatter.print(timestamp);
}
@Override

View File

@ -122,7 +122,8 @@ public class HttpExporter extends Exporter {
auth = resolveAuth(config.settings());
connectionTimeout = config.settings().getAsTime(CONNECTION_TIMEOUT_SETTING, TimeValue.timeValueMillis(6000));
connectionReadTimeout = config.settings().getAsTime(CONNECTION_READ_TIMEOUT_SETTING, TimeValue.timeValueMillis(connectionTimeout.millis() * 10));
connectionReadTimeout = config.settings().getAsTime(CONNECTION_READ_TIMEOUT_SETTING,
TimeValue.timeValueMillis(connectionTimeout.millis() * 10));
// HORRIBLE!!! We can't use settings.getAsTime(..) !!!
// WE MUST FIX THIS IN CORE...
@ -241,7 +242,8 @@ public class HttpExporter extends Exporter {
for (String actionKey : actions.keySet()) {
Map<String, Object> action = (Map<String, Object>) actions.get(actionKey);
if (action.get("error") != null) {
logger.error("{} failure (index:[{}] type: [{}]): {}", actionKey, action.get("_index"), action.get("_type"), action.get("error"));
logger.error("{} failure (index:[{}] type: [{}]): {}", actionKey, action.get("_index"), action.get("_type"),
action.get("error"));
}
}
}
@ -269,7 +271,8 @@ public class HttpExporter extends Exporter {
}
supportedClusterVersion = remoteVersion.onOrAfter(MIN_SUPPORTED_CLUSTER_VERSION);
if (!supportedClusterVersion) {
logger.error("remote cluster version [" + remoteVersion + "] is not supported, please use a cluster with minimum version [" + MIN_SUPPORTED_CLUSTER_VERSION + "]");
logger.error("remote cluster version [{}] is not supported, please use a cluster with minimum version [{}]",
remoteVersion, MIN_SUPPORTED_CLUSTER_VERSION);
continue;
}
} catch (ElasticsearchException e) {
@ -447,7 +450,8 @@ public class HttpExporter extends Exporter {
return true;
}
} catch (Exception e) {
logger.error("http exporter [{}] - failed to verify the marvel template [{}] on [{}]:\n{}", name(), templateName, host, e.getMessage());
logger.error("http exporter [{}] - failed to verify the marvel template [{}] on [{}]:\n{}", name(), templateName, host,
e.getMessage());
return false;
} finally {
if (connection != null) {
@ -481,7 +485,8 @@ public class HttpExporter extends Exporter {
logger.info("http exporter [{}] - marvel template [{}] updated to version [{}]", name(), template, templateVersion);
return true;
} catch (IOException e) {
logger.error("http exporter [{}] - failed to update marvel template [{}] on host [{}]:\n{}", name(), template, host, e.getMessage());
logger.error("http exporter [{}] - failed to update marvel template [{}] on host [{}]:\n{}", name(), template, host,
e.getMessage());
return false;
} finally {
if (connection != null) {
@ -546,8 +551,10 @@ public class HttpExporter extends Exporter {
try {
String protocol = settings.get(SSL_PROTOCOL_SETTING, "TLS");
String trustStore = settings.get(SSL_TRUSTSTORE_SETTING, System.getProperty("javax.net.ssl.trustStore"));
String trustStorePassword = settings.get(SSL_TRUSTSTORE_PASSWORD_SETTING, System.getProperty("javax.net.ssl.trustStorePassword"));
String trustStoreAlgorithm = settings.get(SSL_TRUSTSTORE_ALGORITHM_SETTING, System.getProperty("ssl.TrustManagerFactory.algorithm"));
String trustStorePassword = settings.get(SSL_TRUSTSTORE_PASSWORD_SETTING,
System.getProperty("javax.net.ssl.trustStorePassword"));
String trustStoreAlgorithm = settings.get(SSL_TRUSTSTORE_ALGORITHM_SETTING,
System.getProperty("ssl.TrustManagerFactory.algorithm"));
if (trustStore == null) {
throw new SettingsException("missing required setting [" + SSL_TRUSTSTORE_SETTING + "]");
@ -647,8 +654,8 @@ public class HttpExporter extends Exporter {
} catch (InterruptedException e) {
// ignore, if closed, good....
} catch (Throwable t) {
logger.debug("error in keep alive thread, shutting down (will be restarted after a successful connection has been made) {}",
ExceptionsHelper.detailedMessage(t));
logger.debug("error in keep alive thread, shutting down (will be restarted after a successful connection has been " +
"made) {}", ExceptionsHelper.detailedMessage(t));
return;
}
}

View File

@ -60,7 +60,7 @@ public class LocalBulk extends ExportBulk {
// Get the appropriate renderer in order to render the MarvelDoc
Renderer renderer = renderers.getRenderer(marvelDoc);
assert renderer != null : "unable to render marvel document of type [" + marvelDoc.getType() + "]. no renderer found in registry";
assert renderer != null : "unable to render marvel document of type [" + marvelDoc.getType() + "]. no renderer registered";
if (renderer == null) {
logger.warn("local exporter [{}] - unable to render marvel document of type [{}]: no renderer found in registry",
@ -139,8 +139,9 @@ public class LocalBulk extends ExportBulk {
BulkItemResponse item = items[i];
if (item.isFailed()) {
sb.append("\n[").append(i)
.append("]: index [").append(item.getIndex()).append("], type [").append(item.getType()).append("], id [").append(item.getId())
.append("], message [").append(item.getFailureMessage()).append("]");
.append("]: index [").append(item.getIndex()).append("], type [").append(item.getType())
.append("], id [").append(item.getId()).append("], message [").append(item.getFailureMessage())
.append("]");
}
}
return sb.toString();

View File

@ -19,7 +19,6 @@ import org.elasticsearch.cluster.ClusterState;
import org.elasticsearch.cluster.ClusterStateListener;
import org.elasticsearch.cluster.block.ClusterBlockLevel;
import org.elasticsearch.cluster.metadata.IndexMetaData;
import org.elasticsearch.common.Strings;
import org.elasticsearch.common.collect.ImmutableOpenMap;
import org.elasticsearch.common.inject.Inject;
import org.elasticsearch.common.regex.Regex;
@ -38,6 +37,8 @@ import org.joda.time.DateTimeZone;
import java.util.HashSet;
import java.util.Set;
import static org.elasticsearch.common.Strings.collectionToCommaDelimitedString;
/**
*
*/
@ -56,7 +57,8 @@ public class LocalExporter extends Exporter implements ClusterStateListener, Cle
/** Version number of built-in templates **/
private final Integer templateVersion;
public LocalExporter(Exporter.Config config, Client client, ClusterService clusterService, RendererRegistry renderers, CleanerService cleanerService) {
public LocalExporter(Exporter.Config config, Client client, ClusterService clusterService, RendererRegistry renderers,
CleanerService cleanerService) {
super(TYPE, config);
this.client = client;
this.clusterService = clusterService;
@ -163,7 +165,8 @@ public class LocalExporter extends Exporter implements ClusterStateListener, Cle
// Install the index template for timestamped indices first, so that other nodes can ship data
if (!templateInstalled) {
logger.debug("local exporter [{}] - could not find existing marvel template for timestamped indices, installing a new one", name());
logger.debug("local exporter [{}] - could not find existing marvel template for timestamped indices, installing a new one",
name());
putTemplate(templateName, MarvelTemplateUtils.loadTimestampedIndexTemplate());
// we'll get that template on the next cluster state update
return null;
@ -250,7 +253,8 @@ public class LocalExporter extends Exporter implements ClusterStateListener, Cle
cleanerService.validateRetention(exporterRetention);
retention = exporterRetention;
} catch (IllegalArgumentException e) {
logger.warn("local exporter [{}] - unable to use custom history duration [{}]: {}", name(), exporterRetention, e.getMessage());
logger.warn("local exporter [{}] - unable to use custom history duration [{}]: {}", name(), exporterRetention,
e.getMessage());
}
}
@ -299,8 +303,9 @@ public class LocalExporter extends Exporter implements ClusterStateListener, Cle
}
private void deleteIndices(Set<String> indices) {
logger.trace("local exporter [{}] - deleting {} indices: {}", name(), indices.size(), Strings.collectionToCommaDelimitedString(indices));
client.admin().indices().delete(new DeleteIndexRequest(indices.toArray(new String[indices.size()])), new ActionListener<DeleteIndexResponse>() {
logger.trace("local exporter [{}] - deleting {} indices: {}", name(), indices.size(), collectionToCommaDelimitedString(indices));
client.admin().indices().delete(new DeleteIndexRequest(indices.toArray(new String[indices.size()])),
new ActionListener<DeleteIndexResponse>() {
@Override
public void onResponse(DeleteIndexResponse response) {
if (response.isAcknowledged()) {

View File

@ -26,23 +26,32 @@ public class MarvelSettings extends AbstractComponent {
public static final TimeValue MAX_LICENSE_GRACE_PERIOD = TimeValue.timeValueHours(7 * 24);
/** Sampling interval between two collections (default to 10s) */
public static final Setting<TimeValue> INTERVAL_SETTING = Setting.timeSetting(PREFIX + "interval", TimeValue.timeValueSeconds(10), true, Setting.Scope.CLUSTER);
public static final Setting<TimeValue> INTERVAL_SETTING =
Setting.timeSetting(PREFIX + "interval", TimeValue.timeValueSeconds(10), true, Setting.Scope.CLUSTER);
/** Timeout value when collecting index statistics (default to 10m) */
public static final Setting<TimeValue> INDEX_STATS_TIMEOUT_SETTING = Setting.timeSetting(PREFIX + "index.stats.timeout", TimeValue.timeValueSeconds(10), true, Setting.Scope.CLUSTER);
public static final Setting<TimeValue> INDEX_STATS_TIMEOUT_SETTING =
Setting.timeSetting(PREFIX + "index.stats.timeout", TimeValue.timeValueSeconds(10), true, Setting.Scope.CLUSTER);
/** Timeout value when collecting total indices statistics (default to 10m) */
public static final Setting<TimeValue> INDICES_STATS_TIMEOUT_SETTING = Setting.timeSetting(PREFIX + "indices.stats.timeout", TimeValue.timeValueSeconds(10), true, Setting.Scope.CLUSTER);
public static final Setting<TimeValue> INDICES_STATS_TIMEOUT_SETTING =
Setting.timeSetting(PREFIX + "indices.stats.timeout", TimeValue.timeValueSeconds(10), true, Setting.Scope.CLUSTER);
/** List of indices names whose stats will be exported (default to all indices) */
public static final Setting<List<String>> INDICES_SETTING = Setting.listSetting(PREFIX + "indices", Collections.emptyList(), Function.identity(), true, Setting.Scope.CLUSTER);
public static final Setting<List<String>> INDICES_SETTING =
Setting.listSetting(PREFIX + "indices", Collections.emptyList(), Function.identity(), true, Setting.Scope.CLUSTER);
/** Timeout value when collecting the cluster state (default to 10m) */
public static final Setting<TimeValue> CLUSTER_STATE_TIMEOUT_SETTING = Setting.timeSetting(PREFIX + "cluster.state.timeout", TimeValue.timeValueSeconds(10), true, Setting.Scope.CLUSTER);
public static final Setting<TimeValue> CLUSTER_STATE_TIMEOUT_SETTING =
Setting.timeSetting(PREFIX + "cluster.state.timeout", TimeValue.timeValueSeconds(10), true, Setting.Scope.CLUSTER);
/** Timeout value when collecting the recovery information (default to 10m) */
public static final Setting<TimeValue> CLUSTER_STATS_TIMEOUT_SETTING = Setting.timeSetting(PREFIX + "cluster.stats.timeout", TimeValue.timeValueSeconds(10), true, Setting.Scope.CLUSTER);
public static final Setting<TimeValue> CLUSTER_STATS_TIMEOUT_SETTING =
Setting.timeSetting(PREFIX + "cluster.stats.timeout", TimeValue.timeValueSeconds(10), true, Setting.Scope.CLUSTER);
/** Timeout value when collecting the recovery information (default to 10m) */
public static final Setting<TimeValue> INDEX_RECOVERY_TIMEOUT_SETTING = Setting.timeSetting(PREFIX + "index.recovery.timeout", TimeValue.timeValueSeconds(10), true, Setting.Scope.CLUSTER);
public static final Setting<TimeValue> INDEX_RECOVERY_TIMEOUT_SETTING =
Setting.timeSetting(PREFIX + "index.recovery.timeout", TimeValue.timeValueSeconds(10), true, Setting.Scope.CLUSTER);
/** Flag to indicate if only active recoveries should be collected (default to false: all recoveries are collected) */
public static final Setting<Boolean> INDEX_RECOVERY_ACTIVE_ONLY_SETTING = Setting.boolSetting(PREFIX + "index.recovery.active_only", false, true, Setting.Scope.CLUSTER) ;
public static final Setting<Boolean> INDEX_RECOVERY_ACTIVE_ONLY_SETTING =
Setting.boolSetting(PREFIX + "index.recovery.active_only", false, true, Setting.Scope.CLUSTER) ;
/** List of collectors allowed to collect data (default to all)*/
public static final Setting<List<String>> COLLECTORS_SETTING = Setting.listSetting(PREFIX + "collectors", Collections.emptyList(), Function.identity(), false, Setting.Scope.CLUSTER);
public static final Setting<List<String>> COLLECTORS_SETTING =
Setting.listSetting(PREFIX + "collectors", Collections.emptyList(), Function.identity(), false, Setting.Scope.CLUSTER);
private TimeValue indexStatsTimeout;
private TimeValue indicesStatsTimeout;

View File

@ -28,7 +28,8 @@ import java.util.concurrent.ScheduledFuture;
public class CleanerService extends AbstractLifecycleComponent<CleanerService> {
public static final String HISTORY_DURATION = "history.duration";
public static final Setting<TimeValue> HISTORY_SETTING = Setting.timeSetting("marvel." + HISTORY_DURATION, TimeValue.timeValueHours(7 * 24), true, Setting.Scope.CLUSTER);
public static final Setting<TimeValue> HISTORY_SETTING = Setting.timeSetting("marvel." + HISTORY_DURATION,
TimeValue.timeValueHours(7 * 24), true, Setting.Scope.CLUSTER);
private final MarvelLicensee licensee;
private final ThreadPool threadPool;
@ -38,7 +39,8 @@ public class CleanerService extends AbstractLifecycleComponent<CleanerService> {
private volatile IndicesCleaner runnable;
private volatile TimeValue retention;
CleanerService(Settings settings, ClusterSettings clusterSettings, MarvelLicensee licensee, ThreadPool threadPool, ExecutionScheduler executionScheduler) {
CleanerService(Settings settings, ClusterSettings clusterSettings, MarvelLicensee licensee, ThreadPool threadPool,
ExecutionScheduler executionScheduler) {
super(settings);
this.licensee = licensee;
this.threadPool = threadPool;
@ -93,7 +95,8 @@ public class CleanerService extends AbstractLifecycleComponent<CleanerService> {
throw new IllegalArgumentException("invalid history duration setting value");
}
if (!licensee.allowUpdateRetention()) {
throw new IllegalArgumentException("license does not allow the history duration setting to be updated to value [" + retention + "]");
throw new IllegalArgumentException("license does not allow the history duration setting to be updated to value ["
+ retention + "]");
}
}

View File

@ -40,7 +40,8 @@ public class MarvelF {
}
final CountDownLatch latch = new CountDownLatch(1);
final Node node = new MockNode(settings.build(), Version.CURRENT, Arrays.asList(XPackPlugin.class, XPackPlugin.class, XPackPlugin.class));
final Node node = new MockNode(settings.build(), Version.CURRENT,
Arrays.asList(XPackPlugin.class, XPackPlugin.class, XPackPlugin.class));
Runtime.getRuntime().addShutdownHook(new Thread() {
@Override

View File

@ -40,6 +40,8 @@ import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import static org.elasticsearch.common.unit.TimeValue.timeValueMinutes;
@ClusterScope(scope = ESIntegTestCase.Scope.SUITE, randomDynamicTemplates = false, transportClientRatio = 0.0)
public class AbstractCollectorTestCase extends MarvelIntegTestCase {
@ -93,7 +95,8 @@ public class AbstractCollectorTestCase extends MarvelIntegTestCase {
.maxNodes(Integer.MAX_VALUE)
.signature("_signature")
.type("trial")
.uid(String.valueOf(RandomizedTest.systemPropertyAsInt(SysGlobals.CHILDVM_SYSPROP_JVM_ID, 0)) + System.identityHashCode(AbstractCollectorTestCase.class))
.uid(String.valueOf(RandomizedTest.systemPropertyAsInt(SysGlobals.CHILDVM_SYSPROP_JVM_ID, 0)) +
System.identityHashCode(AbstractCollectorTestCase.class))
.build();
}
@ -111,7 +114,7 @@ public class AbstractCollectorTestCase extends MarvelIntegTestCase {
}
protected static void beginGracefulPeriod() {
long expiryDate = System.currentTimeMillis() + TimeValue.timeValueMinutes(10).millis();
long expiryDate = System.currentTimeMillis() + timeValueMinutes(10).millis();
long issueDate = expiryDate - randomDaysInMillis();
final License license = createTestingLicense(issueDate, expiryDate);
@ -124,7 +127,7 @@ public class AbstractCollectorTestCase extends MarvelIntegTestCase {
}
protected static void endGracefulPeriod() {
long expiryDate = System.currentTimeMillis() - MarvelSettings.MAX_LICENSE_GRACE_PERIOD.millis() - TimeValue.timeValueMinutes(10).millis();
long expiryDate = System.currentTimeMillis() - MarvelSettings.MAX_LICENSE_GRACE_PERIOD.millis() - timeValueMinutes(10).millis();
long issueDate = expiryDate - randomDaysInMillis();
final License license = createTestingLicense(issueDate, expiryDate);
@ -169,14 +172,12 @@ public class AbstractCollectorTestCase extends MarvelIntegTestCase {
}
public boolean waitForNoBlocksOnNode(final String nodeId) throws Exception {
return assertBusy(new Callable<Boolean>() {
@Override
public Boolean call() throws Exception {
ClusterBlocks clusterBlocks = client(nodeId).admin().cluster().prepareState().setLocal(true).execute().actionGet().getState().blocks();
assertTrue(clusterBlocks.global().isEmpty());
assertTrue(clusterBlocks.indices().values().isEmpty());
return true;
}
return assertBusy(() -> {
ClusterBlocks clusterBlocks =
client(nodeId).admin().cluster().prepareState().setLocal(true).execute().actionGet().getState().blocks();
assertTrue(clusterBlocks.global().isEmpty());
assertTrue(clusterBlocks.indices().values().isEmpty());
return true;
}, 30L, TimeUnit.SECONDS);
}

View File

@ -91,7 +91,8 @@ public class ClusterStateCollectorTests extends AbstractCollectorTestCase {
assertThat(marvelDoc, instanceOf(ClusterStateMarvelDoc.class));
ClusterStateMarvelDoc clusterStateMarvelDoc = (ClusterStateMarvelDoc) marvelDoc;
assertThat(clusterStateMarvelDoc.getClusterUUID(), equalTo(client().admin().cluster().prepareState().setMetaData(true).get().getState().metaData().clusterUUID()));
assertThat(clusterStateMarvelDoc.getClusterUUID(),
equalTo(client().admin().cluster().prepareState().setMetaData(true).get().getState().metaData().clusterUUID()));
assertThat(clusterStateMarvelDoc.getTimestamp(), greaterThan(0L));
assertThat(clusterStateMarvelDoc.getType(), equalTo(ClusterStateCollector.TYPE));
assertThat(clusterStateMarvelDoc.getSourceNode(), notNullValue());
@ -157,7 +158,7 @@ public class ClusterStateCollectorTests extends AbstractCollectorTestCase {
}
private void assertMarvelDocs(Collection<MarvelDoc> results, final int nbShards) {
assertThat("expecting 1 document for the cluster state and 2 documents per node", results, hasSize(1 + internalCluster().size() * 2));
assertThat("expecting 1 document for cluster state and 2 documents per node", results, hasSize(1 + internalCluster().size() * 2));
final ClusterState clusterState = securedClient().admin().cluster().prepareState().get().getState();
final String clusterUUID = clusterState.getMetaData().clusterUUID();
@ -170,7 +171,8 @@ public class ClusterStateCollectorTests extends AbstractCollectorTestCase {
assertThat(marvelDoc.getClusterUUID(), equalTo(clusterUUID));
assertThat(marvelDoc.getTimestamp(), greaterThan(0L));
assertThat(marvelDoc.getSourceNode(), notNullValue());
assertThat(marvelDoc, anyOf(instanceOf(ClusterStateMarvelDoc.class), instanceOf(ClusterStateNodeMarvelDoc.class), instanceOf(DiscoveryNodeMarvelDoc.class)));
assertThat(marvelDoc, anyOf(instanceOf(ClusterStateMarvelDoc.class), instanceOf(ClusterStateNodeMarvelDoc.class),
instanceOf(DiscoveryNodeMarvelDoc.class)));
if (marvelDoc instanceof ClusterStateMarvelDoc) {
ClusterStateMarvelDoc clusterStateMarvelDoc = (ClusterStateMarvelDoc) marvelDoc;
@ -185,7 +187,8 @@ public class ClusterStateCollectorTests extends AbstractCollectorTestCase {
} else if (marvelDoc instanceof DiscoveryNodeMarvelDoc) {
DiscoveryNodeMarvelDoc discoveryNodeMarvelDoc = (DiscoveryNodeMarvelDoc) marvelDoc;
assertThat(discoveryNodeMarvelDoc.getIndex(), equalTo(MarvelSettings.MARVEL_DATA_INDEX_PREFIX + MarvelTemplateUtils.TEMPLATE_VERSION));
assertThat(discoveryNodeMarvelDoc.getIndex(),
equalTo(MarvelSettings.MARVEL_DATA_INDEX_PREFIX + MarvelTemplateUtils.TEMPLATE_VERSION));
assertThat(discoveryNodeMarvelDoc.getId(), not(isEmptyOrNullString()));
assertNotNull(discoveryNodeMarvelDoc.getNode());
discoveryNodes.add(discoveryNodeMarvelDoc);

View File

@ -39,18 +39,22 @@ public class ClusterStatsCollectorTests extends AbstractCollectorTestCase {
assertThat(marvelDoc, instanceOf(ClusterInfoMarvelDoc.class));
ClusterInfoMarvelDoc clusterInfoMarvelDoc = (ClusterInfoMarvelDoc) marvelDoc;
assertThat(clusterInfoMarvelDoc.getClusterUUID(), equalTo(client().admin().cluster().prepareState().setMetaData(true).get().getState().metaData().clusterUUID()));
assertThat(clusterInfoMarvelDoc.getClusterUUID(),
equalTo(client().admin().cluster().prepareState().setMetaData(true).get().getState().metaData().clusterUUID()));
assertThat(clusterInfoMarvelDoc.getTimestamp(), greaterThan(0L));
assertThat(clusterInfoMarvelDoc.getType(), equalTo(ClusterStatsCollector.CLUSTER_INFO_TYPE));
assertThat(clusterInfoMarvelDoc.getSourceNode(), notNullValue());
assertThat(clusterInfoMarvelDoc.getClusterName(), equalTo(client().admin().cluster().prepareState().setMetaData(true).get().getClusterName().value()));
assertThat(clusterInfoMarvelDoc.getVersion(), equalTo(client().admin().cluster().prepareNodesInfo().get().getNodes()[0].getVersion().toString()));
assertThat(clusterInfoMarvelDoc.getClusterName(),
equalTo(client().admin().cluster().prepareState().setMetaData(true).get().getClusterName().value()));
assertThat(clusterInfoMarvelDoc.getVersion(),
equalTo(client().admin().cluster().prepareNodesInfo().get().getNodes()[0].getVersion().toString()));
assertThat(clusterInfoMarvelDoc.getLicense(), notNullValue());
assertNotNull(clusterInfoMarvelDoc.getClusterStats());
assertThat(clusterInfoMarvelDoc.getClusterStats().getNodesStats().getCounts().getTotal(), equalTo(internalCluster().getNodeNames().length));
assertThat(clusterInfoMarvelDoc.getClusterStats().getNodesStats().getCounts().getTotal(),
equalTo(internalCluster().getNodeNames().length));
// Check cluster stats document
marvelDoc = results.stream().filter(o -> o instanceof ClusterStatsMarvelDoc).findFirst().get();
@ -58,13 +62,15 @@ public class ClusterStatsCollectorTests extends AbstractCollectorTestCase {
assertThat(marvelDoc, instanceOf(ClusterStatsMarvelDoc.class));
ClusterStatsMarvelDoc clusterStatsMarvelDoc = (ClusterStatsMarvelDoc) marvelDoc;
assertThat(clusterStatsMarvelDoc.getClusterUUID(), equalTo(client().admin().cluster().prepareState().setMetaData(true).get().getState().metaData().clusterUUID()));
assertThat(clusterStatsMarvelDoc.getClusterUUID(),
equalTo(client().admin().cluster().prepareState().setMetaData(true).get().getState().metaData().clusterUUID()));
assertThat(clusterStatsMarvelDoc.getTimestamp(), greaterThan(0L));
assertThat(clusterStatsMarvelDoc.getType(), equalTo(ClusterStatsCollector.CLUSTER_STATS_TYPE));
assertThat(clusterStatsMarvelDoc.getSourceNode(), notNullValue());
assertNotNull(clusterStatsMarvelDoc.getClusterStats());
assertThat(clusterStatsMarvelDoc.getClusterStats().getNodesStats().getCounts().getTotal(), equalTo(internalCluster().getNodeNames().length));
assertThat(clusterStatsMarvelDoc.getClusterStats().getNodesStats().getCounts().getTotal(),
equalTo(internalCluster().getNodeNames().length));
}
public void testClusterStatsCollectorWithLicensing() {

View File

@ -101,7 +101,8 @@ public class IndexRecoveryCollectorTests extends AbstractCollectorTestCase {
assertThat(marvelDoc, instanceOf(IndexRecoveryMarvelDoc.class));
IndexRecoveryMarvelDoc indexRecoveryMarvelDoc = (IndexRecoveryMarvelDoc) marvelDoc;
assertThat(indexRecoveryMarvelDoc.getClusterUUID(), equalTo(client().admin().cluster().prepareState().setMetaData(true).get().getState().metaData().clusterUUID()));
assertThat(indexRecoveryMarvelDoc.getClusterUUID(),
equalTo(client().admin().cluster().prepareState().setMetaData(true).get().getState().metaData().clusterUUID()));
assertThat(indexRecoveryMarvelDoc.getTimestamp(), greaterThan(0L));
assertThat(indexRecoveryMarvelDoc.getType(), equalTo(IndexRecoveryCollector.TYPE));
assertThat(indexRecoveryMarvelDoc.getSourceNode(), notNullValue());
@ -166,7 +167,8 @@ public class IndexRecoveryCollectorTests extends AbstractCollectorTestCase {
}
public void testEmptyCluster() throws Exception {
final String node = internalCluster().startNode(settingsBuilder().put(MarvelSettings.INDICES_SETTING.getKey(), Strings.EMPTY_ARRAY));
final String node = internalCluster().startNode(settingsBuilder().put(MarvelSettings.INDICES_SETTING.getKey(),
Strings.EMPTY_ARRAY));
waitForNoBlocksOnNode(node);
try {

View File

@ -98,7 +98,8 @@ public class IndexStatsCollectorTests extends AbstractCollectorTestCase {
assertThat(marvelDoc, instanceOf(IndexStatsMarvelDoc.class));
IndexStatsMarvelDoc indexStatsMarvelDoc = (IndexStatsMarvelDoc) marvelDoc;
assertThat(indexStatsMarvelDoc.getClusterUUID(), equalTo(client().admin().cluster().prepareState().setMetaData(true).get().getState().metaData().clusterUUID()));
assertThat(indexStatsMarvelDoc.getClusterUUID(),
equalTo(client().admin().cluster().prepareState().setMetaData(true).get().getState().metaData().clusterUUID()));
assertThat(indexStatsMarvelDoc.getTimestamp(), greaterThan(0L));
assertThat(indexStatsMarvelDoc.getType(), equalTo(IndexStatsCollector.TYPE));
assertThat(indexStatsMarvelDoc.getSourceNode(), notNullValue());

View File

@ -43,12 +43,14 @@ public class NodeStatsCollectorTests extends AbstractCollectorTestCase {
assertThat(marvelDoc, instanceOf(NodeStatsMarvelDoc.class));
NodeStatsMarvelDoc nodeStatsMarvelDoc = (NodeStatsMarvelDoc) marvelDoc;
assertThat(nodeStatsMarvelDoc.getClusterUUID(), equalTo(client().admin().cluster().prepareState().setMetaData(true).get().getState().metaData().clusterUUID()));
assertThat(nodeStatsMarvelDoc.getClusterUUID(),
equalTo(client().admin().cluster().prepareState().setMetaData(true).get().getState().metaData().clusterUUID()));
assertThat(nodeStatsMarvelDoc.getTimestamp(), greaterThan(0L));
assertThat(nodeStatsMarvelDoc.getType(), equalTo(NodeStatsCollector.TYPE));
assertThat(nodeStatsMarvelDoc.getSourceNode(), notNullValue());
assertThat(nodeStatsMarvelDoc.getNodeId(), equalTo(internalCluster().getInstance(DiscoveryService.class, node).localNode().id()));
assertThat(nodeStatsMarvelDoc.getNodeId(),
equalTo(internalCluster().getInstance(DiscoveryService.class, node).localNode().id()));
assertThat(nodeStatsMarvelDoc.isNodeMaster(), equalTo(node.equals(internalCluster().getMasterName())));
assertThat(nodeStatsMarvelDoc.isMlockall(), equalTo(BootstrapInfo.isMemoryLocked()));
assertNotNull(nodeStatsMarvelDoc.isDiskThresholdDeciderEnabled());

View File

@ -69,7 +69,8 @@ public class ShardsCollectorTests extends AbstractCollectorTestCase {
assertThat(shardMarvelDoc.getClusterUUID(), equalTo(clusterState.metaData().clusterUUID()));
assertThat(shardMarvelDoc.getTimestamp(), greaterThan(0L));
assertThat(shardMarvelDoc.getType(), equalTo(ShardsCollector.TYPE));
assertThat(shardMarvelDoc.getId(), equalTo(ShardsCollector.id(clusterState.stateUUID(), ((ShardMarvelDoc) marvelDoc).getShardRouting())));
assertThat(shardMarvelDoc.getId(),
equalTo(ShardsCollector.id(clusterState.stateUUID(), ((ShardMarvelDoc) marvelDoc).getShardRouting())));
assertThat(shardMarvelDoc.getSourceNode(), notNullValue());
assertThat(shardMarvelDoc.getClusterStateUUID(), equalTo(clusterState.stateUUID()));
@ -130,7 +131,8 @@ public class ShardsCollectorTests extends AbstractCollectorTestCase {
assertThat(shardMarvelDoc.getClusterUUID(), equalTo(clusterState.metaData().clusterUUID()));
assertThat(shardMarvelDoc.getTimestamp(), greaterThan(0L));
assertThat(shardMarvelDoc.getType(), equalTo(ShardsCollector.TYPE));
assertThat(shardMarvelDoc.getId(), equalTo(ShardsCollector.id(clusterState.stateUUID(), ((ShardMarvelDoc) marvelDoc).getShardRouting())));
assertThat(shardMarvelDoc.getId(),
equalTo(ShardsCollector.id(clusterState.stateUUID(), ((ShardMarvelDoc) marvelDoc).getShardRouting())));
assertThat(shardMarvelDoc.getClusterStateUUID(), equalTo(clusterState.stateUUID()));
ShardRouting shardRouting = shardMarvelDoc.getShardRouting();

View File

@ -57,8 +57,10 @@ public class ExportersTests extends ESTestCase {
clusterService = mock(ClusterService.class);
// we always need to have the local exporter as it serves as the default one
factories.put(LocalExporter.TYPE, new LocalExporter.Factory(new InternalClient.Insecure(client), clusterService, mock(RendererRegistry.class), mock(CleanerService.class)));
clusterSettings = new ClusterSettings(Settings.EMPTY, new HashSet<>(Arrays.asList(MarvelSettings.COLLECTORS_SETTING, MarvelSettings.INTERVAL_SETTING, Exporters.EXPORTERS_SETTING)));
factories.put(LocalExporter.TYPE, new LocalExporter.Factory(new InternalClient.Insecure(client), clusterService,
mock(RendererRegistry.class), mock(CleanerService.class)));
clusterSettings = new ClusterSettings(Settings.EMPTY, new HashSet<>(Arrays.asList(MarvelSettings.COLLECTORS_SETTING,
MarvelSettings.INTERVAL_SETTING, Exporters.EXPORTERS_SETTING)));
exporters = new Exporters(Settings.EMPTY, factories, clusterService, clusterSettings);
}

View File

@ -236,7 +236,8 @@ public class HttpExporterTests extends MarvelIntegTestCase {
assertNotNull("Unable to start the second mock web server", secondWebServer);
assertAcked(client().admin().cluster().prepareUpdateSettings().setTransientSettings(
Settings.builder().putArray("marvel.agent.exporters._http.host", secondWebServer.getHostName() + ":" + secondWebServer.getPort())).get());
Settings.builder().putArray("marvel.agent.exporters._http.host",
secondWebServer.getHostName() + ":" + secondWebServer.getPort())).get());
// a new exporter is created on update, so we need to re-fetch it
exporter = getExporter(agentNode);
@ -429,7 +430,8 @@ public class HttpExporterTests extends MarvelIntegTestCase {
Version resolved = exporter.loadRemoteClusterVersion(host);
assertTrue(resolved.equals(Version.CURRENT));
final Version expected = randomFrom(Version.CURRENT, Version.V_0_18_0, Version.V_1_1_0, Version.V_1_2_5, Version.V_1_4_5, Version.V_1_6_0);
final Version expected = randomFrom(Version.CURRENT, Version.V_0_18_0, Version.V_1_1_0, Version.V_1_2_5,
Version.V_1_4_5, Version.V_1_6_0);
enqueueGetClusterVersionResponse(expected);
resolved = exporter.loadRemoteClusterVersion(host);
assertTrue(resolved.equals(expected));
@ -472,7 +474,8 @@ public class HttpExporterTests extends MarvelIntegTestCase {
}
private void enqueueGetClusterVersionResponse(MockWebServer mockWebServer, Version v) throws IOException {
mockWebServer.enqueue(new MockResponse().setResponseCode(200).setBody(jsonBuilder().startObject().startObject("version").field("number", v.number()).endObject().endObject().bytes().toUtf8()));
mockWebServer.enqueue(new MockResponse().setResponseCode(200).setBody(
jsonBuilder().startObject().startObject("version").field("number", v.number()).endObject().endObject().bytes().toUtf8()));
}
private void enqueueResponse(int responseCode, String body) throws IOException {

View File

@ -121,12 +121,14 @@ public class LocalExporterTests extends MarvelIntegTestCase {
LocalExporter exporter = getLocalExporter("_local");
// first lets test that the index resolver works with time
String indexName = MarvelSettings.MARVEL_INDICES_PREFIX + MarvelTemplateUtils.TEMPLATE_VERSION + "-" + DateTimeFormat.forPattern(timeFormat).withZoneUTC().print(time);
String indexName = MarvelSettings.MARVEL_INDICES_PREFIX + MarvelTemplateUtils.TEMPLATE_VERSION + "-" +
DateTimeFormat.forPattern(timeFormat).withZoneUTC().print(time);
assertThat(exporter.indexNameResolver().resolve(time), equalTo(indexName));
// now lets test that the index name resolver works with a doc
MarvelDoc doc = newRandomMarvelDoc();
indexName = MarvelSettings.MARVEL_INDICES_PREFIX + MarvelTemplateUtils.TEMPLATE_VERSION + "-" + DateTimeFormat.forPattern(timeFormat).withZoneUTC().print(doc.getTimestamp());
indexName = MarvelSettings.MARVEL_INDICES_PREFIX + MarvelTemplateUtils.TEMPLATE_VERSION + "-" +
DateTimeFormat.forPattern(timeFormat).withZoneUTC().print(doc.getTimestamp());
assertThat(exporter.indexNameResolver().resolve(doc), equalTo(indexName));
logger.debug("--> exporting a random marvel document");
@ -137,10 +139,12 @@ public class LocalExporterTests extends MarvelIntegTestCase {
timeFormat = randomFrom("dd", "dd.MM.YYYY", "dd.MM");
updateClusterSettings(Settings.builder().put("marvel.agent.exporters._local.index.name.time_format", timeFormat));
exporter = getLocalExporter("_local"); // we need to get it again.. as it was rebuilt
indexName = MarvelSettings.MARVEL_INDICES_PREFIX + MarvelTemplateUtils.TEMPLATE_VERSION + "-" + DateTimeFormat.forPattern(timeFormat).withZoneUTC().print(doc.getTimestamp());
indexName = MarvelSettings.MARVEL_INDICES_PREFIX + MarvelTemplateUtils.TEMPLATE_VERSION + "-" +
DateTimeFormat.forPattern(timeFormat).withZoneUTC().print(doc.getTimestamp());
assertThat(exporter.indexNameResolver().resolve(doc), equalTo(indexName));
logger.debug("--> exporting the document again (this time with the the new index name time format [{}], expecting index name [{}]", timeFormat, indexName);
logger.debug("--> exporting the document again (this time with the the new index name time format [{}], expecting index name [{}]",
timeFormat, indexName);
exporter.export(Collections.singletonList(doc));
awaitIndexExists(indexName);
}

View File

@ -31,6 +31,7 @@ import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.instanceOf;
import static org.hamcrest.Matchers.isEmptyOrNullString;
import static org.hamcrest.Matchers.not;
import static org.hamcrest.core.Is.is;
@ClusterScope(scope = TEST)
public class ClusterInfoTests extends MarvelIntegTestCase {
@ -77,8 +78,8 @@ public class ClusterInfoTests extends MarvelIntegTestCase {
assertThat(response.getId(), equalTo(clusterUUID));
Map<String, Object> source = response.getSource();
assertThat((String) source.get(ClusterInfoRenderer.Fields.CLUSTER_NAME.underscore().toString()), equalTo(cluster().getClusterName()));
assertThat((String) source.get(ClusterInfoRenderer.Fields.VERSION.underscore().toString()), equalTo(Version.CURRENT.toString()));
assertThat(source.get(ClusterInfoRenderer.Fields.CLUSTER_NAME.underscore().toString()), is(cluster().getClusterName()));
assertThat(source.get(ClusterInfoRenderer.Fields.VERSION.underscore().toString()), is(Version.CURRENT.toString()));
Object licenseObj = source.get(ClusterInfoRenderer.Fields.LICENSE.underscore().toString());
assertThat(licenseObj, instanceOf(Map.class));
@ -123,11 +124,12 @@ public class ClusterInfoTests extends MarvelIntegTestCase {
assertHitCount(client().prepareSearch().setSize(0)
.setIndices(dataIndex)
.setTypes(ClusterStatsCollector.CLUSTER_INFO_TYPE)
.setQuery(QueryBuilders.boolQuery()
.should(QueryBuilders.matchQuery(License.XFields.STATUS.underscore().toString(), License.Status.ACTIVE.label()))
.should(QueryBuilders.matchQuery(License.XFields.STATUS.underscore().toString(), License.Status.INVALID.label()))
.should(QueryBuilders.matchQuery(License.XFields.STATUS.underscore().toString(), License.Status.EXPIRED.label()))
.minimumNumberShouldMatch(1)
.setQuery(
QueryBuilders.boolQuery()
.should(QueryBuilders.matchQuery(License.XFields.STATUS.underscore().toString(), License.Status.ACTIVE.label()))
.should(QueryBuilders.matchQuery(License.XFields.STATUS.underscore().toString(), License.Status.INVALID.label()))
.should(QueryBuilders.matchQuery(License.XFields.STATUS.underscore().toString(), License.Status.EXPIRED.label()))
.minimumNumberShouldMatch(1)
).get(), 0L);
}
}

View File

@ -24,6 +24,7 @@ import org.junit.Before;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import static org.elasticsearch.index.query.QueryBuilders.matchQuery;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount;
import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
@ -93,7 +94,7 @@ public class ClusterStateTests extends MarvelIntegTestCase {
logger.debug("--> ensure that the 'nodes' attributes of the cluster state document is not indexed");
assertHitCount(client().prepareSearch().setSize(0)
.setTypes(ClusterStateCollector.TYPE)
.setQuery(QueryBuilders.matchQuery("cluster_state.nodes." + nodes.masterNodeId() + ".name", nodes.masterNode().name())).get(), 0L);
.setQuery(matchQuery("cluster_state.nodes." + nodes.masterNodeId() + ".name", nodes.masterNode().name())).get(), 0L);
}
public void testClusterStateNodes() throws Exception {
@ -113,7 +114,8 @@ public class ClusterStateTests extends MarvelIntegTestCase {
AbstractRenderer.Fields.TIMESTAMP.underscore().toString(),
ClusterStateNodeRenderer.Fields.STATE_UUID.underscore().toString(),
ClusterStateNodeRenderer.Fields.NODE.underscore().toString(),
ClusterStateNodeRenderer.Fields.NODE.underscore().toString() + "." + ClusterStateNodeRenderer.Fields.ID.underscore().toString(),
ClusterStateNodeRenderer.Fields.NODE.underscore().toString() + "." +
ClusterStateNodeRenderer.Fields.ID.underscore().toString(),
};
for (SearchHit searchHit : response.getHits().getHits()) {
@ -134,7 +136,8 @@ public class ClusterStateTests extends MarvelIntegTestCase {
awaitMarvelDocsCount(greaterThanOrEqualTo(nbNodes), ClusterStateCollector.NODE_TYPE);
logger.debug("--> searching for marvel documents of type [{}]", ClusterStateCollector.NODE_TYPE);
SearchResponse response = client().prepareSearch(MarvelSettings.MARVEL_DATA_INDEX_PREFIX + "*").setTypes(ClusterStateCollector.NODE_TYPE).get();
SearchResponse response = client().prepareSearch(MarvelSettings.MARVEL_DATA_INDEX_PREFIX + "*")
.setTypes(ClusterStateCollector.NODE_TYPE).get();
assertThat(response.getHits().getTotalHits(), greaterThanOrEqualTo(nbNodes));
logger.debug("--> checking that every document contains the expected fields");
@ -144,8 +147,10 @@ public class ClusterStateTests extends MarvelIntegTestCase {
DiscoveryNodeRenderer.Fields.NODE.underscore().toString(),
DiscoveryNodeRenderer.Fields.NODE.underscore().toString() + "." + DiscoveryNodeRenderer.Fields.ID.underscore().toString(),
DiscoveryNodeRenderer.Fields.NODE.underscore().toString() + "." + DiscoveryNodeRenderer.Fields.NAME.underscore().toString(),
DiscoveryNodeRenderer.Fields.NODE.underscore().toString() + "." + DiscoveryNodeRenderer.Fields.ATTRIBUTES.underscore().toString(),
DiscoveryNodeRenderer.Fields.NODE.underscore().toString() + "." + DiscoveryNodeRenderer.Fields.TRANSPORT_ADDRESS.underscore().toString(),
DiscoveryNodeRenderer.Fields.NODE.underscore().toString() + "." +
DiscoveryNodeRenderer.Fields.ATTRIBUTES.underscore().toString(),
DiscoveryNodeRenderer.Fields.NODE.underscore().toString() + "." +
DiscoveryNodeRenderer.Fields.TRANSPORT_ADDRESS.underscore().toString(),
};
for (SearchHit searchHit : response.getHits().getHits()) {
@ -168,8 +173,8 @@ public class ClusterStateTests extends MarvelIntegTestCase {
.setIndices(dataIndex)
.setTypes(ClusterStateCollector.NODE_TYPE)
.setQuery(QueryBuilders.boolQuery()
.should(QueryBuilders.matchQuery("node.id", nodeId))
.should(QueryBuilders.matchQuery("node.name", nodeName))).get(), 0);
.should(matchQuery("node.id", nodeId))
.should(matchQuery("node.name", nodeName))).get(), 0);
}
logger.debug("--> cluster state nodes successfully collected");

View File

@ -35,7 +35,8 @@ public class IndexRecoveryRendererTests extends ESTestCase {
List<RecoveryState> shards = new ArrayList<>();
// Shard 0
RecoveryState shard0 = new RecoveryState(new ShardId(indexName, "testUUID", 0), true, RecoveryState.Type.PRIMARY_RELOCATION, source, target);
RecoveryState shard0 = new RecoveryState(new ShardId(indexName, "testUUID", 0), true, RecoveryState.Type.PRIMARY_RELOCATION,
source, target);
shards.add(shard0);
// Shard 1

View File

@ -84,7 +84,8 @@ public class IndexRecoveryTests extends MarvelIntegTestCase {
AbstractRenderer.Fields.CLUSTER_UUID.underscore().toString(),
AbstractRenderer.Fields.TIMESTAMP.underscore().toString(),
IndexRecoveryRenderer.Fields.INDEX_RECOVERY.underscore().toString(),
IndexRecoveryRenderer.Fields.INDEX_RECOVERY.underscore().toString() + "." + IndexRecoveryRenderer.Fields.SHARDS.underscore().toString(),
IndexRecoveryRenderer.Fields.INDEX_RECOVERY.underscore().toString() + "." +
IndexRecoveryRenderer.Fields.SHARDS.underscore().toString(),
};
for (SearchHit searchHit : response.getHits().getHits()) {

View File

@ -49,16 +49,16 @@ public class IndexStatsRendererTests extends ESTestCase {
return stats;
}
@Override
public CommonStats getPrimaries() {
// Primaries will be filtered out by the renderer
CommonStats stats = new CommonStats();
stats.docs = new DocsStats(345678L, randomLong());
stats.store = new StoreStats(randomLong(), randomLong());
stats.indexing = new IndexingStats(new IndexingStats.Stats(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, true, randomLong()), null);
return stats;
}
});
@Override
public CommonStats getPrimaries() {
// Primaries will be filtered out by the renderer
CommonStats stats = new CommonStats();
stats.docs = new DocsStats(345678L, randomLong());
stats.store = new StoreStats(randomLong(), randomLong());
stats.indexing = new IndexingStats(new IndexingStats.Stats(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, true, randomLong()), null);
return stats;
}
});
logger.debug("--> rendering the document");
Renderer renderer = new IndexStatsRenderer();

View File

@ -63,7 +63,8 @@ public class MultiNodesStatsTests extends MarvelIntegTestCase {
n = randomIntBetween(1, 2);
logger.debug("--> starting {} client only nodes", n);
InternalTestCluster.Async<List<String>> clientNodes = internalCluster().startNodesAsync(n, settingsBuilder().put("node.client", true).build());
InternalTestCluster.Async<List<String>> clientNodes = internalCluster().startNodesAsync(n,
settingsBuilder().put("node.client", true).build());
clientNodes.get();
nodes += n;
@ -101,7 +102,8 @@ public class MultiNodesStatsTests extends MarvelIntegTestCase {
assertThat(((StringTerms) aggregation).getBuckets().size(), equalTo(nbNodes));
for (String nodeName : internalCluster().getNodeNames()) {
StringTerms.Bucket bucket = (StringTerms.Bucket) ((StringTerms) aggregation).getBucketByKey(internalCluster().clusterService(nodeName).localNode().getId());
StringTerms.Bucket bucket = (StringTerms.Bucket) ((StringTerms) aggregation)
.getBucketByKey(internalCluster().clusterService(nodeName).localNode().getId());
// At least 1 doc must exist per node, but it can be more than 1
// because the first node may have already collected many node stats documents
// whereas the last node just started to collect node stats.

View File

@ -56,6 +56,7 @@ public class ShardsRendererTests extends ESSingleNodeTestCase {
marvelDoc.setClusterStateUUID("my-state-uuid");
String result = RendererTestUtils.renderAsJSON(marvelDoc, new ShardsRenderer());
RendererTestUtils.assertJSONStructureAndValues(result, "{\"cluster_uuid\":\"my-cluster-uuid\",\"timestamp\":\"2015-07-22T15:54:02.979Z\",\"state_uuid\":\"my-state-uuid\"}");
RendererTestUtils.assertJSONStructureAndValues(result, "{\"cluster_uuid\":\"my-cluster-uuid\",\"timestamp\":\"2015-07-22T15:54:02" +
".979Z\",\"state_uuid\":\"my-state-uuid\"}");
}
}

View File

@ -91,7 +91,8 @@ public class ShardsTests extends MarvelIntegTestCase {
*/
public void testNotAnalyzedFields() throws Exception {
final String indexName = INDEX_PREFIX + randomInt();
assertAcked(prepareCreate(indexName).setSettings(IndexMetaData.SETTING_NUMBER_OF_SHARDS, 1, IndexMetaData.SETTING_NUMBER_OF_REPLICAS, 0));
assertAcked(prepareCreate(indexName)
.setSettings(IndexMetaData.SETTING_NUMBER_OF_SHARDS, 1, IndexMetaData.SETTING_NUMBER_OF_REPLICAS, 0));
updateMarvelInterval(3L, TimeUnit.SECONDS);
waitForMarvelIndices();

View File

@ -129,7 +129,8 @@ public abstract class AbstractIndicesCleanerTestCase extends MarvelIntegTestCase
public void testRetentionAsGlobalSetting() throws Exception {
final int max = 10;
final int retention = randomIntBetween(1, max);
internalCluster().startNode(Settings.builder().put(CleanerService.HISTORY_SETTING.getKey(), String.format(Locale.ROOT, "%dd", retention)));
internalCluster().startNode(Settings.builder().put(CleanerService.HISTORY_SETTING.getKey(),
String.format(Locale.ROOT, "%dd", retention)));
final DateTime now = now();
for (int i = 0; i < max; i++) {
@ -148,7 +149,8 @@ public abstract class AbstractIndicesCleanerTestCase extends MarvelIntegTestCase
// Default retention is between 3 and max days
final int defaultRetention = randomIntBetween(3, max);
internalCluster().startNode(Settings.builder().put(CleanerService.HISTORY_SETTING.getKey(), String.format(Locale.ROOT, "%dd", defaultRetention)));
internalCluster().startNode(Settings.builder().put(CleanerService.HISTORY_SETTING.getKey(),
String.format(Locale.ROOT, "%dd", defaultRetention)));
final DateTime now = now();
for (int i = 0; i < max; i++) {
@ -163,7 +165,8 @@ public abstract class AbstractIndicesCleanerTestCase extends MarvelIntegTestCase
// Updates the retention setting for the exporter
Exporters exporters = internalCluster().getInstance(Exporters.class);
for (Exporter exporter : exporters) {
Settings transientSettings = Settings.builder().put("marvel.agent.exporters." + exporter.name() + "." + CleanerService.HISTORY_DURATION, String.format(Locale.ROOT, "%dd", exporterRetention)).build();
Settings transientSettings = Settings.builder().put("marvel.agent.exporters." + exporter.name() + "." +
CleanerService.HISTORY_DURATION, String.format(Locale.ROOT, "%dd", exporterRetention)).build();
assertAcked(client().admin().cluster().prepareUpdateSettings().setTransientSettings(transientSettings));
}

View File

@ -132,7 +132,8 @@ public class CleanerServiceTests extends ESTestCase {
logger.debug("--> creates a cleaner service that cleans every second");
MarvelLicensee licensee = mock(MarvelLicensee.class);
when(licensee.cleaningEnabled()).thenReturn(true);
CleanerService service = new CleanerService(Settings.EMPTY, clusterSettings, licensee, threadPool, new TestExecutionScheduler(1_000));
CleanerService service = new CleanerService(Settings.EMPTY, clusterSettings, licensee, threadPool,
new TestExecutionScheduler(1_000));
logger.debug("--> registers cleaning listener");
TestListener listener = new TestListener(latch);

View File

@ -52,8 +52,8 @@ public class LocalIndicesCleanerTests extends AbstractIndicesCleanerTestCase {
@Override
public void run() {
try {
assertThat(client().admin().indices().prepareGetSettings(MarvelSettings.MARVEL_INDICES_PREFIX + "*").get().getIndexToSettings().size(),
equalTo(count));
assertThat(client().admin().indices().prepareGetSettings(MarvelSettings.MARVEL_INDICES_PREFIX + "*")
.get().getIndexToSettings().size(), equalTo(count));
} catch (IndexNotFoundException e) {
if (shieldEnabled) {
assertThat(0, equalTo(count));

View File

@ -138,7 +138,8 @@ public class LicenseIntegrationTests extends MarvelIntegTestCase {
public void enable() {
for (Licensee licensee : licensees) {
licensee.onChange(new Licensee.Status(License.OperationMode.BASIC, randomBoolean() ? LicenseState.ENABLED : LicenseState.GRACE_PERIOD));
licensee.onChange(new Licensee.Status(License.OperationMode.BASIC,
randomBoolean() ? LicenseState.ENABLED : LicenseState.GRACE_PERIOD));
}
}

View File

@ -48,13 +48,15 @@ public class MarvelInternalClientTests extends MarvelIntegTestCase {
assertAccessIsAllowed(internalClient.admin().indices().prepareDelete(MarvelSettings.MARVEL_INDICES_PREFIX));
assertAccessIsAllowed(internalClient.admin().indices().prepareCreate(MarvelSettings.MARVEL_INDICES_PREFIX + "test"));
assertAccessIsAllowed(internalClient.admin().indices().preparePutTemplate("foo").setSource(MarvelTemplateUtils.loadTimestampedIndexTemplate()));
assertAccessIsAllowed(internalClient.admin().indices().preparePutTemplate("foo")
.setSource(MarvelTemplateUtils.loadTimestampedIndexTemplate()));
assertAccessIsAllowed(internalClient.admin().indices().prepareGetTemplates("foo"));
}
public void testDeniedAccess() {
InternalClient internalClient = internalCluster().getInstance(InternalClient.class);
assertAcked(internalClient.admin().indices().preparePutTemplate("foo").setSource(MarvelTemplateUtils.loadDataIndexTemplate()).get());
assertAcked(internalClient.admin().indices().preparePutTemplate("foo")
.setSource(MarvelTemplateUtils.loadDataIndexTemplate()).get());
if (shieldEnabled) {
assertAccessIsDenied(internalClient.admin().indices().prepareDeleteTemplate("foo"));

View File

@ -16,7 +16,8 @@ import static org.hamcrest.Matchers.equalTo;
public class VersionUtilsTests extends ESTestCase {
public void testParseVersion() {
List<Version> versions = randomSubsetOf(9, Version.V_0_18_0, Version.V_0_19_0, Version.V_1_0_1, Version.V_1_2_3, Version.V_1_3_2, Version.V_1_4_6, Version.V_1_6_3, Version.V_1_7_2, Version.V_2_0_0);
List<Version> versions = randomSubsetOf(9, Version.V_0_18_0, Version.V_0_19_0, Version.V_1_0_1, Version.V_1_2_3, Version.V_1_3_2,
Version.V_1_4_6, Version.V_1_6_3, Version.V_1_7_2, Version.V_2_0_0);
for (Version version : versions) {
String output = createOutput(VersionUtils.VERSION_NUMBER_FIELD, version.number());
assertThat(VersionUtils.parseVersion(output.getBytes(StandardCharsets.UTF_8)), equalTo(version));

View File

@ -353,7 +353,8 @@ public abstract class MarvelIntegTestCase extends ESIntegTestCase {
}
protected void updateMarvelInterval(long value, TimeUnit timeUnit) {
assertAcked(client().admin().cluster().prepareUpdateSettings().setTransientSettings(Settings.builder().put(MarvelSettings.INTERVAL_SETTING.getKey(), value, timeUnit)));
assertAcked(client().admin().cluster().prepareUpdateSettings().setTransientSettings(
Settings.builder().put(MarvelSettings.INTERVAL_SETTING.getKey(), value, timeUnit)));
}
/** Shield related settings */
@ -383,7 +384,10 @@ public abstract class MarvelIntegTestCase extends ESIntegTestCase {
public static final String ROLES =
"test:\n" + // a user for the test infra.
" cluster: cluster:monitor/nodes/info, cluster:monitor/nodes/stats, cluster:monitor/state, cluster:monitor/health, cluster:monitor/stats, cluster:monitor/task, cluster:admin/settings/update, cluster:admin/repository/delete, cluster:monitor/nodes/liveness, indices:admin/template/get, indices:admin/template/put, indices:admin/template/delete\n" +
" cluster: cluster:monitor/nodes/info, cluster:monitor/nodes/stats, cluster:monitor/state, " +
"cluster:monitor/health, cluster:monitor/stats, cluster:monitor/task, cluster:admin/settings/update, " +
"cluster:admin/repository/delete, cluster:monitor/nodes/liveness, indices:admin/template/get, " +
"indices:admin/template/put, indices:admin/template/delete\n" +
" indices:\n" +
" '*': all\n" +
"\n" +

View File

@ -55,7 +55,8 @@ public abstract class InternalClient extends FilterClient {
}
@Override
protected <Request extends ActionRequest<Request>, Response extends ActionResponse, RequestBuilder extends ActionRequestBuilder<Request, Response, RequestBuilder>> void doExecute(
protected <Request extends ActionRequest<Request>, Response extends ActionResponse, RequestBuilder extends
ActionRequestBuilder<Request, Response, RequestBuilder>> void doExecute(
Action<Request, Response, RequestBuilder> action, Request request, ActionListener<Response> listener) {
try (ThreadContext.StoredContext ctx = threadPool().getThreadContext().stashContext()) {

View File

@ -286,11 +286,13 @@ public class ShieldPlugin extends Plugin {
}
String username = userSetting.substring(0, i);
String password = userSetting.substring(i + 1);
settingsBuilder.put(authHeaderSettingName, UsernamePasswordToken.basicAuthHeaderValue(username, new SecuredString(password.toCharArray())));
settingsBuilder.put(authHeaderSettingName, UsernamePasswordToken.basicAuthHeaderValue(username, new SecuredString(password
.toCharArray())));
}
/*
We inject additional settings on each tribe client if the current node is a tribe node, to make sure that every tribe has shield installed and enabled too:
We inject additional settings on each tribe client if the current node is a tribe node, to make sure that every tribe has shield
installed and enabled too:
- if shield is loaded on the tribe node we make sure it is also loaded on every tribe, by making it mandatory there
(this means that the tribe node will fail at startup if shield is not loaded on any tribe due to missing mandatory plugin)
- if shield is loaded and enabled on the tribe node, we make sure it is also enabled on every tribe, by forcibly enabling it
@ -305,14 +307,16 @@ public class ShieldPlugin extends Plugin {
for (Map.Entry<String, Settings> tribeSettings : tribesSettings.entrySet()) {
String tribePrefix = "tribe." + tribeSettings.getKey() + ".";
//we copy over existing mandatory plugins under additional settings, as they would get overridden otherwise (arrays don't get merged)
// we copy over existing mandatory plugins under additional settings, as they would get overridden otherwise (arrays don't get
// merged)
String[] existingMandatoryPlugins = tribeSettings.getValue().getAsArray("plugin.mandatory", null);
if (existingMandatoryPlugins == null) {
//shield is mandatory on every tribe if installed and enabled on the tribe node
settingsBuilder.putArray(tribePrefix + "plugin.mandatory", NAME);
} else {
if (!isShieldMandatory(existingMandatoryPlugins)) {
throw new IllegalStateException("when [plugin.mandatory] is explicitly configured, [" + NAME + "] must be included in this list");
throw new IllegalStateException("when [plugin.mandatory] is explicitly configured, [" + NAME + "] must be included in" +
" this list");
}
}
@ -320,7 +324,8 @@ public class ShieldPlugin extends Plugin {
if (settings.get(tribeEnabledSetting) != null) {
boolean enabled = shieldEnabled(tribeSettings.getValue());
if (!enabled) {
throw new IllegalStateException("tribe setting [" + tribeEnabledSetting + "] must be set to true but the value is [" + settings.get(tribeEnabledSetting) + "]");
throw new IllegalStateException("tribe setting [" + tribeEnabledSetting + "] must be set to true but the value is ["
+ settings.get(tribeEnabledSetting) + "]");
}
} else {
//shield must be enabled on every tribe if it's enabled on the tribe node
@ -379,7 +384,8 @@ public class ShieldPlugin extends Plugin {
queryCacheImplementation = settings.get(IndexModule.INDEX_QUERY_CACHE_TYPE_SETTING.getKey());
}
if (OPT_OUT_QUERY_CACHE.equals(queryCacheImplementation) == false) {
throw new IllegalStateException("shield does not support a user specified query cache. remove the setting [" + IndexModule.INDEX_QUERY_CACHE_TYPE_SETTING.getKey() + "] with value [" + queryCacheImplementation + "]");
throw new IllegalStateException("shield does not support a user specified query cache. remove the setting [" + IndexModule
.INDEX_QUERY_CACHE_TYPE_SETTING.getKey() + "] with value [" + queryCacheImplementation + "]");
}
}
}

View File

@ -63,9 +63,9 @@ public class ShieldActionFilter extends AbstractComponent implements ActionFilte
private final ThreadContext threadContext;
@Inject
public ShieldActionFilter(Settings settings, AuthenticationService authcService, AuthorizationService authzService, CryptoService cryptoService,
AuditTrail auditTrail, ShieldLicenseState licenseState, ShieldActionMapper actionMapper, Set<RequestInterceptor> requestInterceptors,
ThreadPool threadPool) {
public ShieldActionFilter(Settings settings, AuthenticationService authcService, AuthorizationService authzService,
CryptoService cryptoService, AuditTrail auditTrail, ShieldLicenseState licenseState,
ShieldActionMapper actionMapper, Set<RequestInterceptor> requestInterceptors, ThreadPool threadPool) {
super(settings);
this.authcService = authcService;
this.authzService = authzService;
@ -81,8 +81,8 @@ public class ShieldActionFilter extends AbstractComponent implements ActionFilte
public void apply(Task task, String action, ActionRequest request, ActionListener listener, ActionFilterChain chain) {
/**
A functional requirement - when the license of shield is disabled (invalid/expires), shield will continue
to operate normally, except all read operations will be blocked.
A functional requirement - when the license of shield is disabled (invalid/expires), shield will continue
to operate normally, except all read operations will be blocked.
*/
if (!licenseState.statsAndHealthEnabled() && LICENSE_EXPIRATION_ACTION_MATCHER.test(action)) {
logger.error("blocking [{}] operation due to expired license. Cluster health, cluster stats and indices stats \n" +
@ -208,13 +208,15 @@ public class ShieldActionFilter extends AbstractComponent implements ActionFilte
private final ActionListener innerListener;
private final ThreadContext.StoredContext threadContext;
private SigningListener(ShieldActionFilter filter, ActionListener innerListener, @Nullable ThreadContext.StoredContext threadContext) {
private SigningListener(ShieldActionFilter filter, ActionListener innerListener,
@Nullable ThreadContext.StoredContext threadContext) {
this.filter = filter;
this.innerListener = innerListener;
this.threadContext = threadContext;
}
@Override @SuppressWarnings("unchecked")
@Override
@SuppressWarnings("unchecked")
public void onResponse(Response response) {
if (threadContext != null) {
threadContext.restore();

View File

@ -34,7 +34,7 @@ public class BulkRequestInterceptor extends AbstractComponent implements Request
}
public void intercept(BulkRequest request, User user) {
IndicesAccessControl indicesAccessControl= threadContext.getTransient(InternalAuthorizationService.INDICES_PERMISSIONS_KEY);
IndicesAccessControl indicesAccessControl = threadContext.getTransient(InternalAuthorizationService.INDICES_PERMISSIONS_KEY);
for (IndicesRequest indicesRequest : request.subRequests()) {
for (String index : indicesRequest.indices()) {
IndicesAccessControl.IndexAccessControl indexAccessControl = indicesAccessControl.getIndexPermissions(index);
@ -42,17 +42,20 @@ public class BulkRequestInterceptor extends AbstractComponent implements Request
boolean fls = indexAccessControl.getFields() != null;
boolean dls = indexAccessControl.getQueries() != null;
if (fls || dls) {
logger.debug("intercepted request for index [{}] with field level or document level security enabled, disabling features", index);
logger.debug("intercepted request for index [{}] with field level or document level security enabled, disabling " +
"features", index);
if (indicesRequest instanceof UpdateRequest) {
throw new ElasticsearchSecurityException("Can't execute an bulk request with update requests embedded if field or document level security is enabled", RestStatus.BAD_REQUEST);
throw new ElasticsearchSecurityException("Can't execute an bulk request with update requests embedded if " +
"field or document level security is enabled", RestStatus.BAD_REQUEST);
}
}
}
logger.trace("intercepted request for index [{}] with neither field level or document level security not enabled, doing nothing", index);
logger.trace("intercepted request for index [{}] with neither field level or document level security not enabled, doing " +
"nothing", index);
}
}
}
@Override
public boolean supports(TransportRequest request) {
return request instanceof BulkRequest;

View File

@ -23,7 +23,8 @@ import java.util.List;
* Base class for interceptors that disables features when field level security is configured for indices a request
* is going to execute on.
*/
public abstract class FieldAndDocumentLevelSecurityRequestInterceptor<Request> extends AbstractComponent implements RequestInterceptor<Request> {
public abstract class FieldAndDocumentLevelSecurityRequestInterceptor<Request> extends AbstractComponent implements
RequestInterceptor<Request> {
private final ThreadContext threadContext;
@ -39,7 +40,8 @@ public abstract class FieldAndDocumentLevelSecurityRequestInterceptor<Request> e
} else if (request instanceof IndicesRequest) {
indicesRequests = Collections.singletonList((IndicesRequest) request);
} else {
throw new IllegalArgumentException(LoggerMessageFormat.format("Expected a request of type [{}] or [{}] but got [{}] instead", CompositeIndicesRequest.class, IndicesRequest.class, request.getClass()));
throw new IllegalArgumentException(LoggerMessageFormat.format("Expected a request of type [{}] or [{}] but got [{}] instead",
CompositeIndicesRequest.class, IndicesRequest.class, request.getClass()));
}
IndicesAccessControl indicesAccessControl = threadContext.getTransient(InternalAuthorizationService.INDICES_PERMISSIONS_KEY);
for (IndicesRequest indicesRequest : indicesRequests) {
@ -49,12 +51,14 @@ public abstract class FieldAndDocumentLevelSecurityRequestInterceptor<Request> e
boolean fls = indexAccessControl.getFields() != null;
boolean dls = indexAccessControl.getQueries() != null;
if (fls || dls) {
logger.debug("intercepted request for index [{}] with field level or document level security enabled, disabling features", index);
logger.debug("intercepted request for index [{}] with field level or document level security enabled, " +
"disabling features", index);
disableFeatures(request);
return;
}
}
logger.trace("intercepted request for index [{}] with neither field level or document level security not enabled, doing nothing", index);
logger.trace("intercepted request for index [{}] with neither field level or document level security not enabled, "
+ "doing nothing", index);
}
}
}

View File

@ -15,7 +15,7 @@ import org.elasticsearch.transport.TransportRequest;
/**
* A request interceptor that fails update request if field or document level security is enabled.
*
* <p>
* It can be dangerous for users if document where to be update via a role that has fls or dls enabled,
* because only the fields that a role can see would be used to perform the update and without knowing the user may
* remove the other fields, not visible for him, from the document being updated.
@ -29,7 +29,8 @@ public class UpdateRequestInterceptor extends FieldAndDocumentLevelSecurityReque
@Override
protected void disableFeatures(UpdateRequest updateRequest) {
throw new ElasticsearchSecurityException("Can't execute an update request if field or document level security is enabled", RestStatus.BAD_REQUEST);
throw new ElasticsearchSecurityException("Can't execute an update request if field or document level security is enabled",
RestStatus.BAD_REQUEST);
}
@Override

View File

@ -11,7 +11,8 @@ import org.elasticsearch.client.ElasticsearchClient;
/**
*
*/
public class ClearRealmCacheRequestBuilder extends NodesOperationRequestBuilder<ClearRealmCacheRequest, ClearRealmCacheResponse, ClearRealmCacheRequestBuilder> {
public class ClearRealmCacheRequestBuilder extends NodesOperationRequestBuilder<ClearRealmCacheRequest, ClearRealmCacheResponse,
ClearRealmCacheRequestBuilder> {
public ClearRealmCacheRequestBuilder(ElasticsearchClient client) {
this(client, ClearRealmCacheAction.INSTANCE);
@ -25,7 +26,7 @@ public class ClearRealmCacheRequestBuilder extends NodesOperationRequestBuilder<
* Sets the realms for which caches will be evicted. When not set all the caches of all realms will be
* evicted.
*
* @param realms The realm names
* @param realms The realm names
*/
public ClearRealmCacheRequestBuilder realms(String... realms) {
request.realms(realms);

View File

@ -26,7 +26,8 @@ import java.util.concurrent.atomic.AtomicReferenceArray;
/**
*
*/
public class TransportClearRealmCacheAction extends TransportNodesAction<ClearRealmCacheRequest, ClearRealmCacheResponse, ClearRealmCacheRequest.Node, ClearRealmCacheResponse.Node> {
public class TransportClearRealmCacheAction extends TransportNodesAction<ClearRealmCacheRequest, ClearRealmCacheResponse,
ClearRealmCacheRequest.Node, ClearRealmCacheResponse.Node> {
private final Realms realms;

Some files were not shown because too many files have changed in this diff Show More