Skip to content

Optimizations to spatial join for other geometry types.#1343

Merged
rfecher merged 1 commit intolocationtech:masterfrom
JWileczek:join-optimization
Jul 18, 2018
Merged

Optimizations to spatial join for other geometry types.#1343
rfecher merged 1 commit intolocationtech:masterfrom
JWileczek:join-optimization

Conversation

@JWileczek
Copy link
Copy Markdown
Contributor

Changes include trimming insertion keys, and reducing overall algorithm stages.

@coveralls
Copy link
Copy Markdown

coveralls commented Jun 7, 2018

Coverage Status

Coverage increased (+1.1%) to 48.479% when pulling 49413c3 on JWileczek:join-optimization into 281ea19 on locationtech:master.

Copy link
Copy Markdown
Contributor

@rfecher rfecher left a comment

Choose a reason for hiding this comment

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

a few minor changes requested

}
if (rawGeometryRDD == null) {
JavaPairRDD<ByteArrayId, Tuple2<GeoWaveInputKey, Geometry>> indexedData = geowaveRDD
if (rawGeometryRDD == null || recalculate == true) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can we change this to simply recalculate without the == true

"tornado_tracks");
GeomWithinDistance distancePredicate = new GeomWithinDistance(
0.01);
//GeomIntersects intersectsPredicate = new GeomIntersects();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

no commented out code

log4j.appender.stdout.filter.1.StringToMatch=Error closing output stream
log4j.appender.stdout.filter.1.StringToMatch=Error closing output stream.
log4j.appender.stdout.filter.1.AcceptOnMatch=false
log4j.appender.stdout.filter=org.apache.log4j.varia.DenyAllFilter
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I asked @emacthecav to talk to you about this

import org.slf4j.LoggerFactory;

import com.vividsolutions.jts.geom.Geometry;
import com.vividsolutions.jts.geom.prep.PreparedGeometry;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

added these prepared geometry imports but seemingly never use them (this is the case it seems in a bunch of the classes)

Geometry geom1,
Geometry geom2 ) {
return geom1.distance(geom2) <= radius;
return geom1.distance(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

formatting change, can you run mvn on the commandline to make sure this is right? (do you run the formatter in eclipse IDE because that may be different?)

Geometry geom1,
Geometry geom2 ) {
return geom1.equals(geom2);
return geom1.equals(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

format change, check if this is right

Serializable
{
private JavaPairRDD<GeoWaveInputKey, SimpleFeature> rawRDD = null;
protected JavaPairRDD<GeoWaveInputKey, SimpleFeature> rawRDD = null;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this is minor, but I can't say I see the reasoning for changing this to protected

@JWileczek JWileczek force-pushed the join-optimization branch from 674f201 to 70cef8e Compare June 11, 2018 15:45
import mil.nga.giat.geowave.analytic.spark.RDDOptions;
import mil.nga.giat.geowave.core.store.query.QueryOptions;
import mil.nga.giat.geowave.analytic.spark.sparksql.SimpleFeatureDataFrame;
import mil.nga.giat.geowave.analytic.spark.sparksql.udf.GeomIntersects;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

extra import

log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{dd MMM HH:mm:ss} %p [%c{2}] - %m%n
log4j.appender.stdout.filter.1=org.apache.log4j.varia.StringMatchFilter
log4j.appender.stdout.filter.1.StringToMatch=Error closing output stream.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is this not message not already suppressed with log4j.category.org.apache.thrift=ERROR ?

Copy link
Copy Markdown
Contributor

@rfecher rfecher left a comment

Choose a reason for hiding this comment

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

I made a couple comments that are fairly minor. I can pull this in if you're comfortable with it, or make minor changes.

@JWileczek JWileczek force-pushed the join-optimization branch 2 times, most recently from 5d30395 to 36422b8 Compare June 15, 2018 14:57
@JWileczek JWileczek force-pushed the join-optimization branch from 36422b8 to ba499d3 Compare June 27, 2018 14:46
Squashed commits:
[ba499d3] Optimizations to spatial join for other geometry types.
Changes include trimming insertion keys, and reducing overall algorithm stages.
@JWileczek JWileczek force-pushed the join-optimization branch from ba499d3 to 49413c3 Compare July 16, 2018 12:13

Envelope internalEnvelope = geom.getEnvelopeInternal();
if (internalEnvelope.isNull()) {
return Iterators.emptyIterator();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is that de.javakaffee library only because of this?

// keys
// Flattened output array.
List<Tuple2<ByteArrayId, Tuple2<GeoWaveInputKey, Geometry>>> result = Lists
.newArrayListWithCapacity(insertIds.getSize());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

maybe this too?

log4j.appender.stdout.filter.1=org.apache.log4j.varia.StringMatchFilter
log4j.appender.stdout.filter.1.StringToMatch=Error closing output stream
log4j.appender.stdout.filter.1.AcceptOnMatch=false
log4j.appender.stdout.filter=org.apache.log4j.varia.DenyAllFilter
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

didn't we agree that this effectively suppressed warnings that we were trying to suppress?

@rfecher rfecher merged commit 642f6fb into locationtech:master Jul 18, 2018
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.

3 participants