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

Several GeoPoint Cleanups #14021

Merged
merged 787 commits into from Oct 8, 2015
Merged

Several GeoPoint Cleanups #14021

merged 787 commits into from Oct 8, 2015

Conversation

s1monw
Copy link
Contributor

@s1monw s1monw commented Oct 8, 2015

this PR includes #13632 as well as several tests and cleanups related to it.

javanna and others added 30 commits September 25, 2015 10:20
Queries that can include scripts make now use of the mock script engine
Move ShardPercolateService creation into IndexShard
…n parameter

Before the refactoring we didn't check any invalid settings for strategy and relation
in the GeoShapeQueryBuilder. However, using SpatialStrategy.TERM and ShapeRelation.INTERSECTS
together is invalid and we tried to protect against that in the validate() method.

This PR moves these checks to setter for strategy and relation and adds tests for the new
behaviour.

Relates to elastic#10217
There is no need to have term vectors service on the shard level where it's
created for every shard. This commit moves it to a higher level which makes
shard creation slightly simpler and reduces the number of long living objects.
…_level

Move ShardTermVectorService to be on indices level as TermVectorService
TermsLookupQueryBuilder was left around only for bw comp reasons, but TermsQueryBuilder is its replacement. We can remove it now that it is clear query refactoring goes in master (3.0).
…p_query_builder

Java api: remove TermsLookupQueryBuilder
"now" is not affected by "time_zone" in range queries
…ions

These classes are really duplicates and are just here for historical reasons.
We don't need these anymore since the same classes exist in lucene today.
This also removes the guice injection for DeletionPolicy and make them shard private.
Remove ES internal deletion policies in favour of Lucenes implementations
Today we use reflection where it's not needed anymore since java8 can
pass ctors around. This commit replaces runtime checks with compile time
checks which is always preferrable.
currently ByteSizeValue.parse("1GB") is not equal to ByteSizeValue.parse("1024MB")

Closes elastic#13784
This commit adds explicit ids for managing ElasticsearchException
serialization. By adding explicit ids and unit tests for them, the ids
are less brittle and breakage can be more clearly detected.
Instead just log the same thing we print to the startup console for that case (magic logic),
it sucks to do this, but guice exceptions are too much.

All other non-guice exceptions will still be fully logged.

Closes elastic#13782
…from_es_exception

Remove reflection hacks from ElasticsearchException
rjernst and others added 25 commits October 7, 2015 12:52
We previously removed the ability to specify metadata fields inside
documents in elastic#11074, but the backcompat left leniency that allowed this
to still occur. This change locks down parsing so any metadata field
found while parsing a document results in an exception. This only
affects 2.0+ indexes; backcompat is maintained.

closes elastic#13740
When running in GCE platform, an instance has access to:

http://metadata.google.internal/computeMetadata/v1/instance/network-interfaces/0/ip

Which gives back the private IP address, for example `10.240.0.2`.

http://metadata.google.internal/computeMetadata/v1/instance/network-interfaces/0/externalIp

Gives back the public Ip address, for example `130.211.108.21`.

As we have for `ec2`, we can support new network host settings:

* `_gce:privateIp:X_`: The private IP address of the machine for a given network interface.
* `_gce:hostname_`: The hostname of the machine.
* `_gce_`: Same as `_gce:privateIp:0_` (recommended).

Closes elastic#13605.
Closes elastic#13590.

BTW resolveIfPossible now throws IOException so code is also updated for ec2 discovery and
some basic tests have been added.
Mappings: Enforce metadata fields are not passed in documents
Currently it's not possible to specify a timeout for nodes operations (such as node info, node stats, cluster stats and hot threads) via REST-based APIs.
This commit removes and now forbids all uses of
com.google.common.net.InetAddresses across the codebase. This is one of
the few remaining steps in the eventual removal of Guava as a
dependency.

Relates elastic#13224
Remove and forbid use of com.google.common.net.InetAddresses
Long running TransportNodesAction requests can retain old cluster states in memory for much longer than needed. This can cause nodes with frequent cluster state updates and long running requests to run out of memory.
This commit removes and now forbids all uses of
com.google.common.collect.EvictingQueue across the codebase. This is
one of the few remaining steps in the eventual removal of Guava as a
dependency.

Relates elastic#13224
Remove and forbid use of com.google.common.collect.EvictingQueue
Follow up azure and aws splits, we need to be consistent and rename `cloud-gce` to `discovery-gce`.
Don't pull translog from shadow engine
When shard becomes active again, immediately increase its indexing buffer instead of waiting for up to 30 seconds while indexing with a tiny (500 KB) indexing buffer.
If the plugin manager cannot successfully install a plugin, ensure
that every directory is cleaned up again. This includes

plugins/foo
config/foo
bin/foo

Closes elastic#12749
…stem

Two test methods didnt have the required check for permissions, so they were
not skipped under windows, leading to CI failures.
GeoPoint now has native support in StreamOutput/StreamInput
impementing Writable is not necessary. This also adds tests
for XContentBuilder rendering GeoPoint
@s1monw s1monw added the review label Oct 8, 2015
default:
throw new IOException("Can't read unknown type [" + type + "]");
}
}

public GeoPoint readGeoPoint() throws IOException {
Copy link
Contributor

Choose a reason for hiding this comment

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

can you add minimal javadocs like for writeGeoPoint?

@jpountz
Copy link
Contributor

jpountz commented Oct 8, 2015

LGTM

@s1monw s1monw merged commit 666c172 into elastic:master Oct 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet