From 87515ea28412f1a6d4c07f0a8cb5ff5179476481 Mon Sep 17 00:00:00 2001 From: Jakob Edding <15202881+JakobEdding@users.noreply.github.com> Date: Wed, 17 Apr 2024 18:59:54 +0200 Subject: [PATCH 1/4] Apply formatting --- .../bakdata/kserve/client/KServeClient.java | 104 +++++++++--------- .../kserve/client/KServeClientV1Test.java | 24 ++-- .../kserve/client/KServeClientV2Test.java | 21 ++-- 3 files changed, 75 insertions(+), 74 deletions(-) diff --git a/src/main/java/com/bakdata/kserve/client/KServeClient.java b/src/main/java/com/bakdata/kserve/client/KServeClient.java index 1b44925..b893f38 100644 --- a/src/main/java/com/bakdata/kserve/client/KServeClient.java +++ b/src/main/java/com/bakdata/kserve/client/KServeClient.java @@ -1,7 +1,7 @@ /* * MIT License * - * Copyright (c) 2022 bakdata + * Copyright (c) 2024 bakdata GmbH * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -30,6 +30,11 @@ import io.github.resilience4j.core.IntervalFunction; import io.github.resilience4j.retry.Retry; import io.github.resilience4j.retry.RetryConfig; +import java.io.IOException; +import java.net.HttpURLConnection; +import java.time.Duration; +import java.util.Optional; +import java.util.concurrent.Callable; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import okhttp3.HttpUrl; @@ -41,17 +46,11 @@ import okhttp3.Response; import org.jetbrains.annotations.NotNull; -import java.io.IOException; -import java.net.HttpURLConnection; -import java.time.Duration; -import java.util.Optional; -import java.util.concurrent.Callable; - /** *

An abstract client base class to make requests to a KServe inference service.

* It builds the request, handles the response and deals with various errors from the inference service. It - * automatically retries requests in case they time out, e.g. due to the inference service being scaled to zero at - * the time of the request. The exponential random back-off retry mechanism can be configured using the following + * automatically retries requests in case they time out, e.g. due to the inference service being scaled to zero at the + * time of the request. The exponential random back-off retry mechanism can be configured using the following * environment variables: *