apurtell commented on code in PR #2133:
URL: https://github.com/apache/phoenix/pull/2133#discussion_r2069096022


##########
phoenix-core-server/src/main/java/org/apache/phoenix/replication/log/LogFileReaderContext.java:
##########
@@ -0,0 +1,158 @@
+/*
+ * 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.phoenix.replication.log;
+
+import java.io.IOException;
+import java.util.concurrent.atomic.AtomicLong;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.Path;
+
+/**
+ * Context for LogFileReader. Uses Builder pattern.
+ */
[email protected](value = { "EI_EXPOSE_REP", 
"EI_EXPOSE_REP2" },
+    justification = "Intentional")
+public class LogFileReaderContext {
+
+    /** Configuration key for skipping corrupt blocks */
+    public static final String LOGFILE_SKIP_CORRUPT_BLOCKS =
+        "phoenix.replication.logfile.skip.corrupt.blocks";
+    /** Default for skipping corrupt blocks */
+    public static final boolean DEFAULT_LOGFILE_SKIP_CORRUPT_BLOCKS = true;
+
+    private final Configuration conf;
+    private FileSystem fs;
+    private Path path;
+    private LogFileCodec codec;
+    private long fileSize = -1;
+    private boolean isSkipCorruptBlocks;
+    private AtomicLong blocksRead = new AtomicLong();

Review Comment:
   I had this idea that the context might be visible to multiple threads even 
if the reader is single threaded. But sure I can make this change.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to