Repository: hbase Updated Branches: refs/heads/branch-2 59830b007 -> 492c0fcd2
HBASE-20838 Include hbase-server in precommit test if CommonFSUtils is changed Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/492c0fcd Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/492c0fcd Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/492c0fcd Branch: refs/heads/branch-2 Commit: 492c0fcd2e4380a21928985b274d4818f80acb41 Parents: 59830b0 Author: Yu Li <l...@apache.org> Authored: Thu Jul 12 10:14:36 2018 +0800 Committer: Yu Li <l...@apache.org> Committed: Thu Jul 12 10:17:38 2018 +0800 ---------------------------------------------------------------------- dev-support/hbase-personality.sh | 12 ++++++++++++ .../org/apache/hadoop/hbase/util/CommonFSUtils.java | 4 ++++ 2 files changed, 16 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/492c0fcd/dev-support/hbase-personality.sh ---------------------------------------------------------------------- diff --git a/dev-support/hbase-personality.sh b/dev-support/hbase-personality.sh index da96019..6d1b87f 100755 --- a/dev-support/hbase-personality.sh +++ b/dev-support/hbase-personality.sh @@ -179,6 +179,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 ]] && [[ ! "${MODULES[*]}" =~ \. ]]; then + MODULES+=("hbase-server") + fi + break + fi + done fi for module in "${MODULES[@]}"; do http://git-wip-us.apache.org/repos/asf/hbase/blob/492c0fcd/hbase-common/src/main/java/org/apache/hadoop/hbase/util/CommonFSUtils.java ---------------------------------------------------------------------- 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. + * <p/> + * 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 + * <a href="https://issues.apache.org/jira/browse/HBASE-20838">HBASE-20838</a> for more details. */ @InterfaceAudience.Private public abstract class CommonFSUtils {