From b911debdca186b334775ae51dc84eb608bc57fe0 Mon Sep 17 00:00:00 2001 From: "zbq.dean" Date: Wed, 11 Sep 2019 13:50:19 +0800 Subject: [PATCH] HBASE-22890 Verify the file integrity in persistent IOEngine --- .../hbase/io/hfile/bucket/FileIOEngine.java | 2 +- .../io/hfile/bucket/PersistentIOEngine.java | 20 ++++++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/FileIOEngine.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/FileIOEngine.java index 4dbcbf293d19..f559d14ea140 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/FileIOEngine.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/FileIOEngine.java @@ -45,7 +45,7 @@ * IO engine that stores data to a file on the local file system. */ @InterfaceAudience.Private -public class FileIOEngine implements IOEngine, PersistentIOEngine { +public class FileIOEngine implements PersistentIOEngine { private static final Log LOG = LogFactory.getLog(FileIOEngine.class); public static final String FILE_DELIMITER = ","; private static final DuFileCommand du = new DuFileCommand(new String[] {"du", ""}); diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/PersistentIOEngine.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/PersistentIOEngine.java index bb2edfbfa23a..95841bb4df4d 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/PersistentIOEngine.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/PersistentIOEngine.java @@ -1,3 +1,21 @@ +/** + * Copyright The Apache Software Foundation + * + * 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.hadoop.hbase.io.hfile.bucket; import java.io.IOException; @@ -10,7 +28,7 @@ * for {@link BucketCache} */ @InterfaceAudience.Private -public interface PersistentIOEngine { +public interface PersistentIOEngine extends IOEngine { /** * Read the persistence checksum from persistence path