diff --git a/extra/modules/greenbids-real-time-data/src/main/java/org/prebid/server/hooks/modules/greenbids/real/time/data/config/DatabaseReaderFactory.java b/extra/modules/greenbids-real-time-data/src/main/java/org/prebid/server/hooks/modules/greenbids/real/time/data/config/DatabaseReaderFactory.java index f5e68c20443..b0d19d2d229 100644 --- a/extra/modules/greenbids-real-time-data/src/main/java/org/prebid/server/hooks/modules/greenbids/real/time/data/config/DatabaseReaderFactory.java +++ b/extra/modules/greenbids-real-time-data/src/main/java/org/prebid/server/hooks/modules/greenbids/real/time/data/config/DatabaseReaderFactory.java @@ -2,7 +2,6 @@ import com.google.cloud.storage.Blob; import com.google.cloud.storage.Storage; -import com.google.cloud.storage.StorageOptions; import io.vertx.core.Promise; import io.vertx.core.Vertx; import com.maxmind.geoip2.DatabaseReader; @@ -11,8 +10,6 @@ import java.io.FileOutputStream; import java.io.IOException; -import java.io.InputStream; -import java.net.URL; import java.nio.file.Files; import java.nio.file.Path; import java.util.Optional; @@ -49,16 +46,6 @@ public void initialize(Promise initializePromise) { } databaseReaderRef.set(new DatabaseReader.Builder(databasePath.toFile()).build()); - - System.out.println( - "DatabaseReaderFactory/initialize: \n" + - " gcsBucketName: " + gcsBucketName + "\n" + - " geoLiteCountryPath: " + geoLiteCountryPath + "\n" + - " blob: " + blob + "\n" + - " databasePath: " + databasePath + "\n" + - " gcsBucketName: " + gcsBucketName - ); - } catch (IOException e) { throw new PreBidException("Failed to initialize DatabaseReader from URL", e); } @@ -67,9 +54,9 @@ public void initialize(Promise initializePromise) { .onComplete(initializePromise); } - private Blob getBlob(String blobName) { + private Blob getBlob(String geoLiteCountryPath) { return Optional.ofNullable(storage.get(gcsBucketName)) - .map(bucket -> bucket.get(blobName)) + .map(bucket -> bucket.get(geoLiteCountryPath)) .orElseThrow(() -> new PreBidException("Bucket not found: " + gcsBucketName)); }