Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Low level Rest Client #18735

Merged
merged 109 commits into from
Jun 22, 2016
Merged
Show file tree
Hide file tree
Changes from 62 commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
3efbe95
RestClient prototype
s1monw Feb 22, 2016
c9c33a7
Fix checkstyle issues, setup thirdPartyAudit checks and enable forbid…
javanna Apr 8, 2016
5970723
clarify why jarhell and dependency license check are disabled, add ok…
javanna Apr 11, 2016
6ae8be5
Introduce notion of Transport, Connection and ConnectionPool
javanna Apr 28, 2016
2589235
remove Verb enum
javanna May 4, 2016
94cf843
get rid of retry timeout exception
javanna May 4, 2016
f6a5a0a
get rid of Node abstraction
javanna May 4, 2016
ce663e9
get rid of connection selector predicate
javanna May 4, 2016
a472544
move sniff related stuff to sniff package
javanna May 4, 2016
062a216
merge Connection and StatefulConnection into one class, remove generi…
javanna May 6, 2016
bd29dc1
Remove Transport class, move all of it within RestClient class
javanna May 6, 2016
9ffdea9
remove Scheme enum
javanna May 6, 2016
d7c4176
add some javadocs to connection pool classes
javanna May 6, 2016
e85ed3e
remove pinging from static connection pool, can be replaced by a low …
javanna May 6, 2016
e77ab87
return the response as part of ElasticsearchResponseException
javanna May 6, 2016
530ad22
prevent unclosed response entities in ElasticsearchResponseException,…
javanna May 6, 2016
e7fe397
add missing parentheses
javanna May 6, 2016
17a21f0
add curl format trace logging for requests and responses
javanna May 9, 2016
e040d2f
remove ConnectionPool interface
javanna May 9, 2016
9569ebc
add builders for simple creation of RestClient and SniffingConnection…
javanna May 9, 2016
599dad5
remove streams and java 8 only api, build with source and target 1.7
javanna May 9, 2016
b38ef34
remove streams leftover
javanna May 10, 2016
cdffc3d
remove notion of connection pool, turn around dependency between Rest…
javanna May 13, 2016
85a7721
simplify Connection class
javanna May 13, 2016
c0a72c1
add support for headers: default ones and per request
javanna May 13, 2016
2d7a781
fix usage of deprecated apis
javanna May 17, 2016
2735897
use versions from versions.properties
javanna May 17, 2016
3890842
add project substitution for org.elasticsearch:client so that we can …
javanna May 17, 2016
1d06916
adapt params argument, they can only be Strings in performRequest method
javanna May 18, 2016
16ab491
add getFirstHeader method to ElasticsearchResponse
javanna May 18, 2016
9a38d81
Expose whole ElasticsearchResponse within ElasticsearchResponseException
javanna May 18, 2016
6d3f6c7
support missing OPTIONS method, it is supported in elasticsearch core
javanna May 18, 2016
325b723
[TEST] add rest client test dependency and replace usage of HttpReque…
javanna May 18, 2016
eae914a
Replace rest test client with low level RestClient
javanna May 19, 2016
c70e08c
include response body in ElasticsearchResponseException error message
javanna May 20, 2016
e81aad9
remove usage of deprecated api
javanna May 20, 2016
6490355
make host state immutable
javanna May 25, 2016
29b1f8d
make some classes and methods package private
javanna May 27, 2016
7f4807b
add some javadocs
javanna May 27, 2016
044a97c
move client sniffer to its own project
javanna May 27, 2016
3745305
[TEST] be more specific around http method used for sniffing
javanna May 30, 2016
51e487f
[TEST] remove okhttp test dependency
javanna May 30, 2016
83c6e73
add support for PATCH and TRACE methods
javanna May 31, 2016
c9db111
add javadocs on closing responses
javanna Jun 1, 2016
6d66fbd
add toString to DeadHostState class
javanna Jun 1, 2016
35dbdee
check hosts is not null nor empty earlier, remove check from nextHost
javanna Jun 1, 2016
47e5204
[TEST] add setHosts test and rename RestClientBuilderTests to RestCli…
javanna Jun 2, 2016
24ea585
don't use setDefaultHeaders from HttpClient
javanna Jun 3, 2016
9ed2d61
[TEST] rename restClientTests back to RestClientBuilderTests
javanna Jun 3, 2016
4572b69
[TEST] add RestClient unit tests
javanna Jun 3, 2016
13a27a3
[TEST] add RestClient integration test
javanna Jun 3, 2016
4fa824f
[TEST] add a lot of forgotten try with resources to wrap Elasticsearc…
javanna Jun 3, 2016
f5825b8
[TEST] restore needed LogManager.reset to prevent logging to sysout
javanna Jun 3, 2016
23a94bb
[TEST] create standard RestClient at first request and reuse it
javanna Jun 3, 2016
c48b7a7
[TEST] create standard RestClient at first request and reuse it
javanna Jun 3, 2016
29eee32
[TEST] expand RequestLoggerTests to all the supported http methods
javanna Jun 3, 2016
f17f0f9
rename ElasticsearchResponse#getFirstHeader to getHeader
javanna Jun 3, 2016
b891c46
[TEST] remove status matcher and hasStatus assertion
javanna Jun 3, 2016
b15279b
Allow to pass socket facttry registry to createDefaultHttpClient method
javanna Jun 3, 2016
f2318ed
Build: add missing licenses, SHAs and enable dependency licenses check
javanna Jun 3, 2016
56e689e
[TEST] remove unused method
javanna Jun 3, 2016
05e26a4
raise default socket timeout to 10s and default connect timeout to 1s
javanna Jun 3, 2016
a461dd8
Build: add hamcrest and securemock to version.properties
javanna Jun 6, 2016
467dfbd
use TimeUnit and long to keep track of time
javanna Jun 6, 2016
1f7f6e2
wrap log statement with logger.isDebugEnabled
javanna Jun 6, 2016
2cf04c0
wrap entity only when not repeatable and improve RequestLoggerTests
javanna Jun 6, 2016
791db1f
remove TODO around using /_cat/nodes rather than /_nodes, test compat…
javanna Jun 8, 2016
a78fe13
require RestClient when creating Sniffer.Builder
javanna Jun 8, 2016
04d620d
require hosts when creating RestClient.Builder
javanna Jun 8, 2016
be5e2e1
Decouple HostsSniffer from Sniffer
javanna Jun 9, 2016
437c4f2
rename ElasticsearchResponse to Response and ElasticsearchResponseExc…
javanna Jun 9, 2016
85606e8
renamed all time intervals arguments and members to include the time …
javanna Jun 9, 2016
c028bf9
rename deadUntil to deadUntilNanos
javanna Jun 9, 2016
742f9c6
nextHost to return Iterable<HttpHost> rather than Iterator
javanna Jun 9, 2016
853ea93
add comments on retries
javanna Jun 9, 2016
cbdffc7
s/elasticsearchResponse/response
javanna Jun 9, 2016
de8b9fd
use switch for status codes and add comments
javanna Jun 9, 2016
9a4971d
fix line length
javanna Jun 9, 2016
d8c0fad
fix failing tests
javanna Jun 9, 2016
3474a14
fix line length
javanna Jun 9, 2016
33bdab1
Build: temporarily disable dependency licenses check (till our own ge…
javanna Jun 9, 2016
bd77335
[TEST] add SuppresForbidden annotation for client project
javanna Jun 9, 2016
cf6e713
Merge branch 'master' into feature/http_client
javanna Jun 9, 2016
f38ce72
make forbiddenApisTest work for client and client-sniffer
javanna Jun 9, 2016
2856ab0
Build: enable dependency licenses check for client-sniffer, exclude o…
javanna Jun 9, 2016
0af9d2c
Build: add animalsniffer to detect usage of java8 apis in client and …
javanna Jun 10, 2016
a5e329e
[TEST] use animalsniffer annotation @IgnoreJRERequirement (similar to…
javanna Jun 10, 2016
9cbfa98
Merge branch 'master' into feature/http_client
javanna Jun 10, 2016
432efc7
catch Exception rather than Throwable
javanna Jun 10, 2016
6db90da
[TEST] Remove usage of @SuppressForbidden due to sun HttpServer usage…
javanna Jun 10, 2016
3d7186c
make DeadHostState final
javanna Jun 10, 2016
656422c
move shutdownNow within try block
javanna Jun 10, 2016
777d438
[TEST] use jdk-internal bundled signature (rather than the previously…
javanna Jun 10, 2016
50b6f4c
Build: changed forbidden-apis targetCompatibility to 1.7 for client a…
javanna Jun 13, 2016
3cd201e
[TEST] add comment on using animal-sniffer suppress annotation
javanna Jun 13, 2016
8f7b7fb
added comments to clarify RequestLogger and DeadHostState
javanna Jun 13, 2016
116805b
remove TODO around copying hosts when rotating the collection, it's n…
javanna Jun 13, 2016
caa6c96
Build: make client and client-sniffer depend on lucene-test version 5…
javanna Jun 14, 2016
1932f6b
Rename RequestLogger#log methods to distinguish between the two
javanna Jun 14, 2016
cf93e90
remove message parameter from RequestLogger methods
javanna Jun 14, 2016
70fb67c
Build: targetCompatibility and sourceCompatibility are enough to make…
javanna Jun 14, 2016
7c8013f
Build: remove explicit targetCompatibility from forbiddenapis config
javanna Jun 15, 2016
ace3a7b
Merge branch 'master' into feature/http_client
javanna Jun 15, 2016
8c60374
Build: do not load integ test class if --skip-integ-tests-in-disguise…
javanna Jun 17, 2016
af93533
Merge branch 'master' into feature/http_client
javanna Jun 17, 2016
cb4bfcb
Take SniffOnFailureListener out of Sniffer and make FailureListener f…
javanna Jun 21, 2016
886cb37
Merge branch 'master' into feature/http_client
javanna Jun 21, 2016
f0b6abe
rename onSuccess to onResponse
javanna Jun 21, 2016
490d9c8
Merge branch 'master' into feature/http_client
javanna Jun 22, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ subprojects {
ext.projectSubstitutions = [
"org.elasticsearch:rest-api-spec:${version}": ':rest-api-spec',
"org.elasticsearch:elasticsearch:${version}": ':core',
"org.elasticsearch:client:${version}": ':client',
"org.elasticsearch:client-sniffer:${version}": ':client-sniffer',
"org.elasticsearch.test:framework:${version}": ':test:framework',
"org.elasticsearch.distribution.integ-test-zip:elasticsearch:${version}": ':distribution:integ-test-zip',
"org.elasticsearch.distribution.zip:elasticsearch:${version}": ':distribution:zip',
Expand Down
5 changes: 0 additions & 5 deletions buildSrc/src/main/resources/checkstyle_suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1049,7 +1049,6 @@
<suppress files="core[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]monitor[/\\]jvm[/\\]JvmGcMonitorServiceSettingsTests.java" checks="LineLength" />
<suppress files="core[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]monitor[/\\]os[/\\]OsProbeTests.java" checks="LineLength" />
<suppress files="core[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]nodesinfo[/\\]NodeInfoStreamingTests.java" checks="LineLength" />
<suppress files="core[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]options[/\\]detailederrors[/\\]DetailedErrorsEnabledIT.java" checks="LineLength" />
<suppress files="core[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]plugins[/\\]PluginInfoTests.java" checks="LineLength" />
<suppress files="core[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]plugins[/\\]PluginsServiceTests.java" checks="LineLength" />
<suppress files="core[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]recovery[/\\]FullRollingRestartIT.java" checks="LineLength" />
Expand Down Expand Up @@ -1312,17 +1311,13 @@
<suppress files="test[/\\]framework[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]test[/\\]engine[/\\]MockEngineSupport.java" checks="LineLength" />
<suppress files="test[/\\]framework[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]test[/\\]hamcrest[/\\]ElasticsearchAssertions.java" checks="LineLength" />
<suppress files="test[/\\]framework[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]test[/\\]junit[/\\]listeners[/\\]LoggingListener.java" checks="LineLength" />
<suppress files="test[/\\]framework[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]test[/\\]rest[/\\]ESRestTestCase.java" checks="LineLength" />
<suppress files="test[/\\]framework[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]test[/\\]rest[/\\]RestTestExecutionContext.java" checks="LineLength" />
<suppress files="test[/\\]framework[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]test[/\\]rest[/\\]client[/\\]http[/\\]HttpRequestBuilder.java" checks="LineLength" />
<suppress files="test[/\\]framework[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]test[/\\]rest[/\\]json[/\\]JsonPath.java" checks="LineLength" />
<suppress files="test[/\\]framework[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]test[/\\]rest[/\\]parser[/\\]GreaterThanEqualToParser.java" checks="LineLength" />
<suppress files="test[/\\]framework[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]test[/\\]rest[/\\]parser[/\\]GreaterThanParser.java" checks="LineLength" />
<suppress files="test[/\\]framework[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]test[/\\]rest[/\\]parser[/\\]LessThanOrEqualToParser.java" checks="LineLength" />
<suppress files="test[/\\]framework[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]test[/\\]rest[/\\]parser[/\\]LessThanParser.java" checks="LineLength" />
<suppress files="test[/\\]framework[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]test[/\\]rest[/\\]parser[/\\]RestTestSuiteParseContext.java" checks="LineLength" />
<suppress files="test[/\\]framework[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]test[/\\]rest[/\\]parser[/\\]RestTestSuiteParser.java" checks="LineLength" />
<suppress files="test[/\\]framework[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]test[/\\]rest[/\\]section[/\\]DoSection.java" checks="LineLength" />
<suppress files="test[/\\]framework[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]test[/\\]rest[/\\]section[/\\]GreaterThanAssertion.java" checks="LineLength" />
<suppress files="test[/\\]framework[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]test[/\\]rest[/\\]section[/\\]GreaterThanEqualToAssertion.java" checks="LineLength" />
<suppress files="test[/\\]framework[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]test[/\\]rest[/\\]section[/\\]LengthAssertion.java" checks="LineLength" />
Expand Down
80 changes: 80 additions & 0 deletions client-sniffer/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/*
* Licensed to Elasticsearch under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

import org.elasticsearch.gradle.precommit.PrecommitTasks
import org.gradle.api.JavaVersion

apply plugin: 'elasticsearch.build'

targetCompatibility = JavaVersion.VERSION_1_7
sourceCompatibility = JavaVersion.VERSION_1_7

dependencies {
compile "org.elasticsearch:client:${version}"
compile "org.apache.httpcomponents:httpclient:${versions.httpclient}"
compile "org.apache.httpcomponents:httpcore:${versions.httpcore}"
compile "commons-codec:commons-codec:${versions.commonscodec}"
compile "commons-logging:commons-logging:${versions.commonslogging}"
compile "com.fasterxml.jackson.core:jackson-core:${versions.jackson}"

testCompile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}"
testCompile "junit:junit:${versions.junit}"
testCompile "org.hamcrest:hamcrest-all:1.3"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May as well stick this in version.properties too?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

testCompile "org.apache.lucene:lucene-test-framework:${versions.lucene}"
testCompile "org.apache.lucene:lucene-core:${versions.lucene}"
testCompile "org.apache.lucene:lucene-codecs:${versions.lucene}"
testCompile "org.elasticsearch:securemock:1.2"
}

//TODO compiling from 1.8 with target 1.7 and source 1.7 is best effort, not enough to ensure we are java 7 compatible
compileJava.options.compilerArgs << '-target' << '1.7' << '-source' << '1.7' << '-Xlint:all,-path,-serial,-options'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't forbiddenapis not also use version 1.7 signatures? With Java 9 it might otherwise fail, because there could be signatures in 1.8 that don't resolve in Java 7.

targetCompatibility = 1.7

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes you are right, thanks @uschindler !

compileTestJava.options.compilerArgs << '-target' << '1.7' << '-source' << '1.7'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The targe and source should already be added by setting project.targetCompatibility and project.sourceCompatibility?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense, I will remove the compilerArgs then


forbiddenApisMain {
//client does not depend on core, so only jdk signatures should be checked
signaturesURLs = [PrecommitTasks.getResource('/forbidden/jdk-signatures.txt')]
}

//TODO would be nice to just exclude the classes where we use com.sun.net.httpserver.* classes
//excludes don't seem to work though and we don't want to have our own @SuppressForbidden
forbiddenApisTest.enabled=false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not adding a @SuppressForbidden doesn't the lucene one work in org.apache.lucene.util?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because then this would have to have a dependency on lucene core?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh it does for test...it should work.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as I wrote in the comment, I tried it and it didn't work for me. Not sure why. I will look into this again and ping Ryan for help.


//forbiddenApisTest {
//client does not depend on core, so only jdk signatures should be checked
//signaturesURLs = [PrecommitTasks.getResource('/forbidden/jdk-signatures.txt')]
//}

//JarHell is part of es core, which we don't want to pull in
jarHell.enabled=false
//NamingConventionCheck is part of test-framework, which we don't want to pull in as it depends on es core
namingConventions.enabled=false

thirdPartyAudit.excludes = [
//commons-logging optional dependencies
'org.apache.avalon.framework.logger.Logger',
'org.apache.log.Hierarchy',
'org.apache.log.Logger',
'org.apache.log4j.Category',
'org.apache.log4j.Level',
'org.apache.log4j.Logger',
'org.apache.log4j.Priority',
//commons-logging provided dependencies
'javax.servlet.ServletContextEvent',
'javax.servlet.ServletContextListener'
]
1 change: 1 addition & 0 deletions client-sniffer/licenses/client-5.0.0-SNAPSHOT.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4ba4746aa38f81ec7e8341da8c86784bf5384046
202 changes: 202 additions & 0 deletions client-sniffer/licenses/client-LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

1. Definitions.

"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.

"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.

"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.

"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.

"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.

"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.

"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).

"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.

"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."

"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.

2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.

3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.

4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:

(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and

(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and

(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and

(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.

You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.

5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.

6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.

7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.

8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.

9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
5 changes: 5 additions & 0 deletions client-sniffer/licenses/client-NOTICE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Elasticsearch
Copyright 2009-2016 Elasticsearch

This product includes software developed by The Apache Software
Foundation (http://www.apache.org/).
1 change: 1 addition & 0 deletions client-sniffer/licenses/commons-codec-1.10.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4b95f4897fa13f2cd904aee711aeafc0c5295cd8
Loading