kamalcph commented on code in PR #14116:
URL: https://github.com/apache/kafka/pull/14116#discussion_r1308567665


##########
storage/src/test/java/org/apache/kafka/tiered/storage/utils/BrokerLocalStorage.java:
##########
@@ -0,0 +1,162 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.kafka.tiered.storage.utils;
+
+import org.apache.kafka.common.TopicPartition;
+import org.apache.kafka.common.utils.Time;
+import org.apache.kafka.common.utils.Timer;
+import org.apache.kafka.common.utils.Utils;
+import org.apache.kafka.storage.internals.log.LogFileUtils;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.concurrent.TimeUnit;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+
+public final class BrokerLocalStorage {
+
+    private final Integer brokerId;
+    private final File brokerStorageDirectory;
+    private final Integer storageWaitTimeoutSec;
+
+    private final int storagePollPeriodSec = 1;
+    private final Time time = Time.SYSTEM;
+
+    public BrokerLocalStorage(Integer brokerId,
+                              String storageDirname,
+                              Integer storageWaitTimeoutSec) {
+        this.brokerId = brokerId;
+        this.brokerStorageDirectory = new File(storageDirname);
+        this.storageWaitTimeoutSec = storageWaitTimeoutSec;
+    }
+
+    public Integer getBrokerId() {
+        return brokerId;
+    }
+
+    /**
+     * Wait until the first segment offset in Apache Kafka storage for the 
given topic-partition is
+     * equal or greater to the provided offset.

Review Comment:
   ack, typo error. Will update the comment in the next PR.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to