You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by da...@apache.org on 2018/09/11 22:37:18 UTC

[1/3] kudu git commit: [master] fix compilation warning of DCHECK_NOTNULL

Repository: kudu
Updated Branches:
  refs/heads/master f0716cc52 -> ed60c11a3


[master] fix compilation warning of DCHECK_NOTNULL

Fixed compilation warning in case of RELEASE build:

kudu/master/ts_descriptor.cc:103:18: warning:
    expression result unused [-Wunused-value]
  DCHECK_NOTNULL(location);
                 ^~~~~~~~

This patch does not contain any functional changes.

This is a follow-up to dcc39d53d8c36a3f4896ce4c208b855abee8da83.

Change-Id: I768afd0ec34f8127f66ea33338ca29ec337488c5
Reviewed-on: http://gerrit.cloudera.org:8080/11421
Reviewed-by: Adar Dembo <ad...@cloudera.com>
Tested-by: Kudu Jenkins


Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/7856ec91
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/7856ec91
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/7856ec91

Branch: refs/heads/master
Commit: 7856ec9174c16c212ce944983124954fe4d325fa
Parents: f0716cc
Author: Alexey Serbin <as...@cloudera.com>
Authored: Tue Sep 11 13:01:17 2018 -0700
Committer: Alexey Serbin <as...@cloudera.com>
Committed: Tue Sep 11 20:35:18 2018 +0000

----------------------------------------------------------------------
 src/kudu/master/ts_descriptor.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/7856ec91/src/kudu/master/ts_descriptor.cc
----------------------------------------------------------------------
diff --git a/src/kudu/master/ts_descriptor.cc b/src/kudu/master/ts_descriptor.cc
index a360ccb..409cc85 100644
--- a/src/kudu/master/ts_descriptor.cc
+++ b/src/kudu/master/ts_descriptor.cc
@@ -100,7 +100,7 @@ bool IsValidLocation(const string& location) {
 Status GetLocationFromLocationMappingCmd(const string& cmd,
                                          const string& host,
                                          string* location) {
-  DCHECK_NOTNULL(location);
+  DCHECK(location);
   vector<string> argv = strings::Split(cmd, " ", strings::SkipEmpty());
   if (argv.empty()) {
     return Status::RuntimeError("invalid empty location mapping command");


[3/3] kudu git commit: move KUDU_NO_EXPORT attribute on methods

Posted by da...@apache.org.
move KUDU_NO_EXPORT attribute on methods

The original location was ineffective due to a bug in older versions of
GCC, [1] appears to be the best tracking issue. Adding the annotation at
the end of the method signature silences the warnings on GCC 4.8, and
maintains symbol hiding as checked with nm.

[1]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30361

Change-Id: Id0ebdf97263065e14e7a43cf9fcfa7cb26953f57
Reviewed-on: http://gerrit.cloudera.org:8080/11415
Reviewed-by: Adar Dembo <ad...@cloudera.com>
Tested-by: Kudu Jenkins


Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/ed60c11a
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/ed60c11a
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/ed60c11a

Branch: refs/heads/master
Commit: ed60c11a3e2fa78e32edbb4f5d3cf844d23d8f00
Parents: d91a252
Author: Dan Burkert <da...@apache.org>
Authored: Mon Sep 10 16:36:13 2018 -0700
Committer: Dan Burkert <da...@apache.org>
Committed: Tue Sep 11 22:32:50 2018 +0000

----------------------------------------------------------------------
 src/kudu/client/client.h | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/ed60c11a/src/kudu/client/client.h
----------------------------------------------------------------------
diff --git a/src/kudu/client/client.h b/src/kudu/client/client.h
index bfc2c2b..795aae5 100644
--- a/src/kudu/client/client.h
+++ b/src/kudu/client/client.h
@@ -347,8 +347,8 @@ class KUDU_EXPORT KuduClient : public sp::enable_shared_from_this<KuduClient> {
   ///   Whether to apply the deletion to external catalogs, such as the Hive Metastore,
   ///   which the Kudu master has been configured to integrate with.
   /// @return Operation status.
-  Status KUDU_NO_EXPORT DeleteTableInCatalogs(const std::string& table_name,
-                                              bool modify_external_catalogs);
+  Status DeleteTableInCatalogs(const std::string& table_name,
+                               bool modify_external_catalogs) KUDU_NO_EXPORT;
 
   /// Create a KuduTableAlterer object.
   ///
@@ -445,8 +445,8 @@ class KUDU_EXPORT KuduClient : public sp::enable_shared_from_this<KuduClient> {
   /// @param [out] tablet
   ///   Tablet information. The caller takes ownership of the tablet.
   /// @return Status object for the operation.
-  Status KUDU_NO_EXPORT GetTablet(const std::string& tablet_id,
-                                  KuduTablet** tablet);
+  Status GetTablet(const std::string& tablet_id,
+                   KuduTablet** tablet) KUDU_NO_EXPORT;
 
   /// @endcond
 
@@ -547,12 +547,12 @@ class KUDU_EXPORT KuduClient : public sp::enable_shared_from_this<KuduClient> {
   // @return the configured Hive Metastore URIs on the most recently connected to
   //    leader master, or an empty string if the Hive Metastore integration is not
   //    enabled.
-  std::string KUDU_NO_EXPORT GetHiveMetastoreUris() const;
+  std::string GetHiveMetastoreUris() const KUDU_NO_EXPORT;
 
   // @return the configured Hive Metastore SASL (Kerberos) configuration on the most
   //    recently connected to leader master, or an arbitrary value if the Hive
   //    Metastore integration is not enabled.
-  bool KUDU_NO_EXPORT GetHiveMetastoreSaslEnabled() const;
+  bool GetHiveMetastoreSaslEnabled() const KUDU_NO_EXPORT;
 
   // @return a unique ID which identifies the Hive Metastore instance, if the
   //    cluster is configured with the Hive Metastore integration, or an
@@ -561,7 +561,7 @@ class KUDU_EXPORT KuduClient : public sp::enable_shared_from_this<KuduClient> {
   // @note this is provided on a best-effort basis, as not all Hive Metastore
   //    versions which Kudu is compatible with include the necessary APIs. See
   //    HIVE-16452 for more info.
-  std::string KUDU_NO_EXPORT GetHiveMetastoreUuid() const;
+  std::string GetHiveMetastoreUuid() const KUDU_NO_EXPORT;
 
  private:
   class KUDU_NO_EXPORT Data;
@@ -1214,7 +1214,7 @@ class KUDU_EXPORT KuduTableAlterer {
   /// @param [in] modify_external_catalogs
   ///   Whether to apply the alteration to external catalogs.
   /// @return Raw pointer to this alterer object.
-  KuduTableAlterer* KUDU_NO_EXPORT modify_external_catalogs(bool modify_external_catalogs);
+  KuduTableAlterer* modify_external_catalogs(bool modify_external_catalogs) KUDU_NO_EXPORT;
 
   /// @return Status of the ALTER TABLE operation. The return value
   ///   may indicate an error in the alter operation,


[2/3] kudu git commit: build: add option to ignore test failures

Posted by da...@apache.org.
build: add option to ignore test failures

Sometimes when running build-and-test.sh, we may not care about the
failure of any given test, so long as the tests ran, e.g. if running
only for the sake of reporting the results of the tests. As such, this
patch adds an option to ignore test failures during runs of
build-and-test.sh.

I tested this by injecting errors into a test and doing a
build-and-test.sh run with the new ERROR_ON_TEST_FAILURE=1, verifying
that it still returns an error; and with ERROR_ON_TEST_FAILURE=0,
verifying that it returns no error. I also broke the build and verified
that, despite ERROR_ON_TEST_FAILURE=0, it returns an error.

Change-Id: I27ecacd499423755dbf742bb70db6a7f1e5c9db7
Reviewed-on: http://gerrit.cloudera.org:8080/11399
Reviewed-by: Adar Dembo <ad...@cloudera.com>
Tested-by: Kudu Jenkins
Reviewed-by: Grant Henke <gr...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/d91a2525
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/d91a2525
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/d91a2525

Branch: refs/heads/master
Commit: d91a2525060d52bc27661b2b5978a288a71bcec2
Parents: 7856ec9
Author: Andrew Wong <aw...@cloudera.com>
Authored: Thu Sep 6 18:10:45 2018 -0700
Committer: Andrew Wong <aw...@cloudera.com>
Committed: Tue Sep 11 21:24:22 2018 +0000

----------------------------------------------------------------------
 build-support/jenkins/build-and-test.sh | 33 ++++++++++++++++++----------
 1 file changed, 21 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/d91a2525/build-support/jenkins/build-and-test.sh
----------------------------------------------------------------------
diff --git a/build-support/jenkins/build-and-test.sh b/build-support/jenkins/build-and-test.sh
index d1a3e42..312ff65 100755
--- a/build-support/jenkins/build-and-test.sh
+++ b/build-support/jenkins/build-and-test.sh
@@ -82,6 +82,9 @@
 #
 #   GRADLE_FLAGS       Default: ""
 #     Extra flags which are passed to 'gradle' when running Gradle commands.
+#
+#   ERROR_ON_TEST_FAILURE    Default: 1
+#     Whether test failures will cause this script to return an error.
 
 # If a commit messages contains a line that says 'DONT_BUILD', exit
 # immediately.
@@ -121,6 +124,7 @@ BUILD_MAVEN=${BUILD_MAVEN:-0}
 BUILD_GRADLE=${BUILD_GRADLE:-1}
 BUILD_PYTHON=${BUILD_PYTHON:-1}
 BUILD_PYTHON3=${BUILD_PYTHON3:-1}
+ERROR_ON_TEST_FAILURE=${ERROR_ON_TEST_FAILURE:-1}
 
 # Ensure that the test data directory is usable.
 mkdir -p "$TEST_TMPDIR"
@@ -329,6 +333,7 @@ if [ "$RUN_FLAKY_ONLY" == "1" ] ; then
   BUILD_JAVA=0
 fi
 
+TESTS_FAILED=0
 EXIT_STATUS=0
 FAILURES=""
 
@@ -350,7 +355,7 @@ if [ "$ENABLE_DIST_TEST" == "1" ]; then
 fi
 
 if ! $THIRDPARTY_BIN/ctest -j$NUM_PROCS $EXTRA_TEST_FLAGS ; then
-  EXIT_STATUS=1
+  TESTS_FAILED=1
   FAILURES="$FAILURES"$'C++ tests failed\n'
 fi
 
@@ -388,7 +393,7 @@ if [ "$BUILD_JAVA" == "1" ]; then
     EXTRA_MVN_FLAGS="$EXTRA_MVN_FLAGS -Dmaven.javadoc.skip"
     EXTRA_MVN_FLAGS="$EXTRA_MVN_FLAGS $MVN_FLAGS"
     if ! mvn $EXTRA_MVN_FLAGS clean verify ; then
-      EXIT_STATUS=1
+      TESTS_FAILED=1
       FAILURES="$FAILURES"$'Java Maven build/test failed\n'
     fi
   fi
@@ -418,7 +423,7 @@ if [ "$BUILD_JAVA" == "1" ]; then
     else
       # TODO: Run `gradle check` in BUILD_TYPE DEBUG when static code analysis is fixed
       if ! ./gradlew $EXTRA_GRADLE_FLAGS clean test ; then
-        EXIT_STATUS=1
+        TESTS_FAILED=1
         FAILURES="$FAILURES"$'Java Gradle build/test failed\n'
       fi
     fi
@@ -501,7 +506,7 @@ if [ "$BUILD_PYTHON" == "1" ]; then
   if ! python setup.py test \
       --addopts="kudu --junit-xml=$TEST_LOGDIR/python_client.xml" \
       2> $TEST_LOGDIR/python_client.log ; then
-    EXIT_STATUS=1
+    TESTS_FAILED=1
     FAILURES="$FAILURES"$'Python tests failed\n'
   fi
 
@@ -559,7 +564,7 @@ if [ "$BUILD_PYTHON3" == "1" ]; then
   if ! python setup.py test \
       --addopts="kudu --junit-xml=$TEST_LOGDIR/python3_client.xml" \
       2> $TEST_LOGDIR/python3_client.log ; then
-    EXIT_STATUS=1
+    TESTS_FAILED=1
     FAILURES="$FAILURES"$'Python 3 tests failed\n'
   fi
 
@@ -574,7 +579,7 @@ if [ "$ENABLE_DIST_TEST" == "1" ]; then
   echo ------------------------------------------------------------
   C_DIST_TEST_ID=`cat $BUILD_ROOT/c-dist-test-job-id`
   if ! $DIST_TEST_HOME/bin/client watch $C_DIST_TEST_ID ; then
-    EXIT_STATUS=1
+    TESTS_FAILED=1
     FAILURES="$FAILURES"$'Distributed C++ tests failed\n'
   fi
   DT_DIR=$TEST_LOGDIR/dist-test-out
@@ -594,7 +599,7 @@ if [ "$ENABLE_DIST_TEST" == "1" ]; then
     echo ------------------------------------------------------------
     JAVA_DIST_TEST_ID=`cat $BUILD_ROOT/java-dist-test-job-id`
     if ! $DIST_TEST_HOME/bin/client watch $JAVA_DIST_TEST_ID ; then
-      EXIT_STATUS=1
+      TESTS_FAILED=1
       FAILURES="$FAILURES"$'Distributed Java tests failed\n'
     fi
     DT_DIR=$TEST_LOGDIR/java-dist-test-out
@@ -610,7 +615,7 @@ if [ "$ENABLE_DIST_TEST" == "1" ]; then
   fi
 fi
 
-if [ $EXIT_STATUS != 0 ]; then
+if [ "$TESTS_FAILED" != "0" -o "$EXIT_STATUS" != "0" ]; then
   echo
   echo Tests failed, making sure we have XML files for all tests.
   echo ------------------------------------------------------------
@@ -626,10 +631,8 @@ if [ $EXIT_STATUS != 0 ]; then
       zcat $GTEST_OUTFILE | $SOURCE_ROOT/build-support/parse_test_failure.py -x > $GTEST_XMLFILE
     fi
   done
-fi
-
-# If all tests passed, ensure that they cleaned up their test output.
-if [ $EXIT_STATUS == 0 ]; then
+else
+  # If all tests passed, ensure that they cleaned up their test output.
   TEST_TMPDIR_CONTENTS=$(ls $TEST_TMPDIR)
   if [ -n "$TEST_TMPDIR_CONTENTS" ]; then
     echo "All tests passed, yet some left behind their test output."
@@ -652,4 +655,10 @@ if [ -n "$FAILURES" ]; then
   echo
 fi
 
+# If any of the tests failed and we are honoring test failures, set the exit
+# status to 1. Note that it may have already been set to 1 above.
+if [ "$ERROR_ON_TEST_FAILURE" == "1" -a "$TESTS_FAILED" == "1" ]; then
+  EXIT_STATUS=1
+fi
+
 exit $EXIT_STATUS