Skip to content

Initial gRPC work for vector query service#1269

Merged
rfecher merged 1 commit intomasterfrom
beckerr_grpc_service_query
Jan 9, 2018
Merged

Initial gRPC work for vector query service#1269
rfecher merged 1 commit intomasterfrom
beckerr_grpc_service_query

Conversation

@richard3d
Copy link
Copy Markdown
Contributor

This work includes a package for shading the parts of gRPC/protobuf 3 that conflict with imports from 2.5

@coveralls
Copy link
Copy Markdown

coveralls commented Dec 18, 2017

Coverage Status

Coverage increased (+0.02%) to 49.003% when pulling 67290f4 on beckerr_grpc_service_query into 64d2d57 on master.

@richard3d richard3d force-pushed the beckerr_grpc_service_query branch from 67290f4 to fa78aef Compare December 19, 2017 01:16
@coveralls
Copy link
Copy Markdown

coveralls commented Dec 19, 2017

Coverage Status

Coverage increased (+0.01%) to 48.992% when pulling fa78aef on beckerr_grpc_service_query into 64d2d57 on master.

4 similar comments
@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.01%) to 48.992% when pulling fa78aef on beckerr_grpc_service_query into 64d2d57 on master.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.01%) to 48.992% when pulling fa78aef on beckerr_grpc_service_query into 64d2d57 on master.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.01%) to 48.992% when pulling fa78aef on beckerr_grpc_service_query into 64d2d57 on master.

@coveralls
Copy link
Copy Markdown

coveralls commented Dec 19, 2017

Coverage Status

Coverage increased (+0.01%) to 48.992% when pulling fa78aef on beckerr_grpc_service_query into 64d2d57 on master.

@richard3d richard3d force-pushed the beckerr_grpc_service_query branch from fa78aef to 24a935c Compare December 20, 2017 13:29
@@ -0,0 +1,624 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
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.

do we have a good reason to include generated code? I'm 99.9% against including generated code in version control, unless there's something that necessitates it.

Comment thread services/grpc/pom.xml Outdated
<version>${project.version}</version>
</dependency>
</dependencies>
<!-- <build>
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.

cleanup commented out blocks

server.blockUntilShutdown();
}
catch (final Exception e) {
LOGGER.error(e.getMessage());
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.

log the stack trace

responseObserver.onCompleted();
}
catch (final Exception e) {
LOGGER.error(e.getMessage());
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.

log the exception (stack trace)

JTSFactoryFinder.getGeometryFactory()).read(geomDefinition);
}
catch (final Exception e) {
LOGGER.error(e.getMessage());
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.

same


final ByteArrayId adapterId = new ByteArrayId(
request.getBaseParams().getAdapterId().toByteArray());
final ByteArrayId indexId = new ByteArrayId(
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.

indexID and adapter ID are typically optional params on a query

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Leaving these parameters as discussed. They are indeed optional as well when invoking the gRPC call.

@coveralls
Copy link
Copy Markdown

coveralls commented Dec 20, 2017

Coverage Status

Coverage increased (+0.01%) to 48.995% when pulling 24a935c on beckerr_grpc_service_query into 64d2d57 on master.

Comment thread geowave-grpc-protobuf-shaded/pom.xml Outdated
<modelVersion>4.0.0</modelVersion>
<groupId>mil.nga.giat</groupId>
<artifactId>geowave-grpc-protobuf-shaded</artifactId>
<version>0.0.1-SNAPSHOT</version>
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.

also, I think we should version this with geowave versions (just make it use the geowave parent)

@richard3d richard3d force-pushed the beckerr_grpc_service_query branch from 24a935c to 6d7e3d5 Compare December 21, 2017 02:33
@coveralls
Copy link
Copy Markdown

coveralls commented Dec 21, 2017

Coverage Status

Coverage increased (+0.003%) to 48.985% when pulling 6d7e3d5 on beckerr_grpc_service_query into 64d2d57 on master.

@richard3d richard3d force-pushed the beckerr_grpc_service_query branch from 6d7e3d5 to bc8e6e7 Compare December 21, 2017 14:47
@coveralls
Copy link
Copy Markdown

coveralls commented Dec 21, 2017

Coverage Status

Coverage increased (+0.02%) to 49.006% when pulling bc8e6e7 on beckerr_grpc_service_query into 64d2d57 on master.

@@ -0,0 +1,23 @@
package mil.nga.giat.geowave.service.grpc.protobuf.util;
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 used anywhere?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It is used by gRPC clients when making a call through the stub. Otherwise, we have another reliance on protobuf's ByteString (this is part of the shade/relocation strategy). In the future I believe we should actually look at using a shaded version of hbase Kent and I came across. It shades it's usage of protobuf 2.5 - that way anything moving forward can just include protobuf 3 no problem. At the moment we are kinda doing things backward (everything using protobuf 3 needs to shade at the moment).

Comment thread geowave-grpc-protobuf-shaded/pom.xml Outdated
<version>0.9.7-SNAPSHOT</version>
</parent>
<artifactId>geowave-grpc-protobuf-shaded</artifactId>
<version>0.0.1-SNAPSHOT</version>
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.

remove this line

LOGGER.error("Exception encountered:", e.getStackTrace().toString());
}

final QueryOptions options = new QueryOptions(
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.

are we handling empty strings for adapter/index IDs?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes if the string is empty I set the variable to null actually that way the type is explicit instead of accidentally passing in empty string like we discussed.

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.

oh, missed it on line 205-208

Comment thread services/grpc/pom.xml
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
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.

yikes, new versions of guava are scary - but if this is tested with HBase we should be good

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I agree but we need the newer version for gRPC, so far it works ok with hbase.

"ignored"); // the name is not used in this case
}
catch (final Exception e) {
LOGGER.error("Exception encountered:", e.getStackTrace().toString());
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 had meant something like LOGGER.error("Exception encountered reading geometry", e);

@richard3d richard3d force-pushed the beckerr_grpc_service_query branch from bc8e6e7 to 67614e6 Compare December 22, 2017 20:39
@coveralls
Copy link
Copy Markdown

coveralls commented Dec 22, 2017

Coverage Status

Coverage increased (+0.01%) to 48.995% when pulling 67614e6 on beckerr_grpc_service_query into 64d2d57 on master.

3 similar comments
@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.01%) to 48.995% when pulling 67614e6 on beckerr_grpc_service_query into 64d2d57 on master.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.01%) to 48.995% when pulling 67614e6 on beckerr_grpc_service_query into 64d2d57 on master.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.01%) to 48.995% when pulling 67614e6 on beckerr_grpc_service_query into 64d2d57 on master.

Comment thread services/grpc/pom.xml Outdated
<dependency>
<groupId>mil.nga.giat</groupId>
<artifactId>geowave-grpc-protobuf-shaded</artifactId>
<version>0.0.1-SNAPSHOT</version>
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.

shouldn't this be ${project.version} now that the shaded artifact is part of the same versioning as the rest of geowave?

@richard3d richard3d force-pushed the beckerr_grpc_service_query branch from 67614e6 to 76293ba Compare January 8, 2018 16:05
@coveralls
Copy link
Copy Markdown

coveralls commented Jan 8, 2018

Coverage Status

Coverage increased (+0.01%) to 48.993% when pulling 76293ba on beckerr_grpc_service_query into 64d2d57 on master.

@rfecher rfecher merged commit b06a11b into master Jan 9, 2018
@rfecher rfecher deleted the beckerr_grpc_service_query branch January 9, 2018 14:00
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