ivankelly commented on a change in pull request #1651: PIP-17:  provide 
DataBlockHeader and BlockAwareSegmentInputStream implementation
URL: https://github.com/apache/incubator-pulsar/pull/1651#discussion_r184607284
 
 

 ##########
 File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/s3offload/DataBlockHeader.java
 ##########
 @@ -0,0 +1,78 @@
+/**
+ * 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.pulsar.broker.s3offload;
+
+import java.io.IOException;
+import java.io.InputStream;
+import 
org.apache.bookkeeper.common.annotation.InterfaceAudience.LimitedPrivate;
+import org.apache.bookkeeper.common.annotation.InterfaceStability.Unstable;
+import org.apache.pulsar.broker.s3offload.impl.DataBlockHeaderImpl;
+
+/**
+ * The data block header in code storage for each data block
+ *
+ * Currently, It is in format:
+ * [ magic_word -- int ][ block_len -- int ][ block_entry_count -- int ][ 
first_entry_id  -- long]
+ *
+ * with the size: 4 + 4 + 4 + 8 = 20 Bytes
+ */
+@Unstable
+@LimitedPrivate
+public interface DataBlockHeader {
 
 Review comment:
   DataBlockHeader doesn't depend on BlockAwareSegmentInputStream though. I 
would really prefer PR to be broken into the smallest logical units for review. 
It helps the reviewer focus on a single issue, and allows the reviewer to see 
clearly what is being tested and what is not. Otherwise, people have a tendency 
to skip over the tests in review. It does mean there's be more roundtrips per 
line of code, since ironically smaller PRs tend to get more comments, but this 
should be fairly easy to manage with git worktree.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to