Skip to content

Commit

Permalink
Remove verbose logging
Browse files Browse the repository at this point in the history
Signed-off-by: Achal Shah <[email protected]>
  • Loading branch information
achals committed Dec 28, 2021
1 parent 7c81e4b commit bf3269f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,10 @@
import feast.serving.config.*;
import io.grpc.Server;
import java.io.IOException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class ServingGuiceApplication {
private static final Logger LOGGER = LoggerFactory.getLogger(ServingGuiceApplication.class);

public static void main(String[] args) throws InterruptedException, IOException {

LOGGER.info("Args: {}", args);
if (args.length == 0) {
throw new RuntimeException(
"Path to application configuration file needs to be specifed via CLI");
Expand Down
34 changes: 1 addition & 33 deletions java/serving/src/test/java/feast/serving/it/ServingBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
import feast.proto.types.ValueProto;
import feast.serving.config.*;
import feast.serving.grpc.OnlineServingGrpcServiceV2;
import feast.serving.registry.RegistryFile;
import feast.serving.service.ServingServiceV2;
import feast.serving.util.DataGenerator;
import io.grpc.*;
import io.grpc.inprocess.InProcessChannelBuilder;
Expand All @@ -45,19 +43,14 @@
import java.nio.file.Files;
import java.nio.file.Paths;
import java.time.Duration;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import org.junit.jupiter.api.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.testcontainers.containers.DockerComposeContainer;
import org.testcontainers.containers.wait.strategy.Wait;
import org.testcontainers.junit.jupiter.Testcontainers;

@Testcontainers
abstract class ServingBase {
public static final Logger logger = LoggerFactory.getLogger(ServingBase.class);

static DockerComposeContainer environment;

ServingServiceGrpc.ServingServiceBlockingStub servingStub;
Expand Down Expand Up @@ -129,22 +122,10 @@ ApplicationProperties applicationProperties() {
new InstrumentationConfig(),
appPropertiesModule);

logger.info("Created Injector");

OnlineServingGrpcServiceV2 onlineServingGrpcServiceV2 =
injector.getInstance(OnlineServingGrpcServiceV2.class);

for (final Map.Entry<Key<?>, Binding<?>> e : injector.getAllBindings().entrySet()) {
logger.info("{}: {}", e.getKey(), e.getValue());
}
logger.info("OnlineServingGrpcService: {}", onlineServingGrpcServiceV2);
logger.info("ServingService: {}", injector.getInstance(ServingServiceV2.class));

serverName = InProcessServerBuilder.generateName();
logger.info("Using server name: {}", serverName);

RegistryFile registryFile = injector.getInstance(RegistryFile.class);
logger.info("Registry File contents: {}", registryFile.getContent());

server =
InProcessServerBuilder.forName(serverName)
Expand All @@ -154,25 +135,12 @@ ApplicationProperties applicationProperties() {
.build();
server.start();

for (final ServerServiceDefinition def : server.getServices()) {
logger.info("Service Descriptor: {}", def.getServiceDescriptor().getName());
}

logger.info("Registered InProcess Server");

channel = InProcessChannelBuilder.forName(serverName).usePlaintext().directExecutor().build();

servingStub =
ServingServiceGrpc.newBlockingStub(channel)
.withDeadlineAfter(5, TimeUnit.SECONDS)
.withWaitForReady();
logger.info("Created Serving Stub: {}", servingStub);

ServingAPIProto.GetFeastServingInfoRequest req =
ServingAPIProto.GetFeastServingInfoRequest.newBuilder().build();
ServingAPIProto.GetFeastServingInfoResponse servingInfoResponse =
servingStub.getFeastServingInfo(req);
logger.info("Got servingInfoResponse: {}", servingInfoResponse);
}

@AfterEach
Expand Down Expand Up @@ -300,7 +268,7 @@ public void shouldGetOnlineFeaturesWithNotFoundStatus() {
}
}

@Disabled
@Test
public void shouldRefreshRegistryAndServeNewFeatures() throws InterruptedException {
updateRegistryFile(
registryProto
Expand Down

0 comments on commit bf3269f

Please sign in to comment.