diff --git a/dev-support/hbase-personality.sh b/dev-support/hbase-personality.sh index 8004167..7561184 100755 --- a/dev-support/hbase-personality.sh +++ b/dev-support/hbase-personality.sh @@ -180,6 +180,18 @@ function personality_modules if [ -n "${BUILD_ID}" ]; then extra="${extra} -Dbuild.id=${BUILD_ID}" fi + + # If the set of changed files includes CommonFSUtils then add the hbase-server + # module to the set of modules (if not already included) to be tested + for f in ${CHANGED_FILES[@]} + do + if [[ "${f}" =~ "CommonFSUtils" ]]; then + if [[ ! "${MODULES[*]}" =~ hbase-server ]]; then + MODULES+=("hbase-server") + fi + break + fi + done fi for module in "${MODULES[@]}"; do diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/CommonFSUtils.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/CommonFSUtils.java index 76a3601..2e480e6 100644 --- a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/CommonFSUtils.java +++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/CommonFSUtils.java @@ -51,6 +51,10 @@ import org.apache.hbase.thirdparty.com.google.common.collect.Lists; /** * Utility methods for interacting with the underlying file system. + *

+ * Note that {@link #setStoragePolicy(FileSystem, Path, String)} is tested in TestFSUtils and + * pre-commit will run the hbase-server tests if there's code change in this class. See + * HBASE-20838 for more details. */ @InterfaceAudience.Private public abstract class CommonFSUtils {