diff --git a/API/pom.xml b/API/pom.xml index a9b2311..cdf5098 100644 --- a/API/pom.xml +++ b/API/pom.xml @@ -41,6 +41,11 @@ grpc-stub ${grpc.version} + + io.grpc + grpc-services + ${grpc.version} + diff --git a/service/src/main/java/crawlercommons/urlfrontier/service/URLFrontierServer.java b/service/src/main/java/crawlercommons/urlfrontier/service/URLFrontierServer.java index 0c338a9..5634fd2 100644 --- a/service/src/main/java/crawlercommons/urlfrontier/service/URLFrontierServer.java +++ b/service/src/main/java/crawlercommons/urlfrontier/service/URLFrontierServer.java @@ -4,6 +4,7 @@ package crawlercommons.urlfrontier.service; import crawlercommons.urlfrontier.service.rocksdb.RocksDBService; +import io.grpc.protobuf.services.ProtoReflectionService; import io.grpc.Server; import io.grpc.ServerBuilder; import io.prometheus.client.exporter.HTTPServer; @@ -170,7 +171,10 @@ public void start() throws Exception { } } - this.server = ServerBuilder.forPort(port).addService(service).build(); + this.server = ServerBuilder.forPort(port) + .addService(service) + .addService(ProtoReflectionService.newInstance()) + .build(); server.start(); LOG.info( "Started URLFrontierServer [{}] on port {} as {}",