You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by li...@apache.org on 2018/07/12 02:19:23 UTC

hbase git commit: HBASE-20838 Include hbase-server in precommit test if CommonFSUtils is changed

Repository: hbase
Updated Branches:
  refs/heads/master 51527f551 -> c55acb0b0


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/c55acb0b
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/c55acb0b
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/c55acb0b

Branch: refs/heads/master
Commit: c55acb0b0363525f8d3ff52cbcbd05f3bbdb20a4
Parents: 51527f5
Author: Yu Li <li...@apache.org>
Authored: Thu Jul 12 10:14:36 2018 +0800
Committer: Yu Li <li...@apache.org>
Committed: Thu Jul 12 10:16:11 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/c55acb0b/dev-support/hbase-personality.sh
----------------------------------------------------------------------
diff --git a/dev-support/hbase-personality.sh b/dev-support/hbase-personality.sh
index 8004167..1ca32ee 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 ]] && [[ ! "${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/c55acb0b/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 {