You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by st...@apache.org on 2020/03/31 20:16:51 UTC

[impala] branch master updated (e8f604a -> 0038487)

This is an automated email from the ASF dual-hosted git repository.

stakiar pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git.


    from e8f604a  IMPALA-9572: Fix DCHECK in nested Parquet scanning
     new 1cfc31c  IMPALA-9555 part 2: [Hive3] Fix test failure introduced by HIVE-22589
     new 208d9d6  IMPALA-9577: [test] Use `system_unsync` time for Kudu test clusters
     new 0038487  IMPALA-9568: Template tuples are initialized multiple times

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 be/src/common/init.cc                              |  2 +-
 be/src/exec/hdfs-scanner.cc                        | 12 ++++++---
 bin/bootstrap_system.sh                            | 31 +++++-----------------
 bin/run-backend-tests.sh                           | 13 ---------
 docker/entrypoint.sh                               |  9 -------
 testdata/cluster/admin                             | 21 ---------------
 .../common/etc/kudu/master.conf.tmpl               |  9 ++++++-
 .../common/etc/kudu/tserver.conf.tmpl              |  9 ++++++-
 .../queries/QueryTest/avro_date.test               | 16 +++++------
 9 files changed, 39 insertions(+), 83 deletions(-)


[impala] 02/03: IMPALA-9577: [test] Use `system_unsync` time for Kudu test clusters

Posted by st...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

stakiar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git

commit 208d9d6896f39a25be00ae4a4ce4679aa5ecd636
Author: Grant Henke <gh...@cloudera.com>
AuthorDate: Fri Mar 27 09:12:13 2020 -0500

    IMPALA-9577: [test] Use `system_unsync` time for Kudu test clusters
    
    Recently Kudu made enhancements to time source configuration and
    adjusted the time source for local clusters/tests to `system_unsync`.
    
    This patch mirrors that behavior in Impala test clusters given there is no
    need to require NTP-synchronized clock for a test where all the
    participating Kudu masters and tablet servers are run at the same node
    using the same local wallclock.
    
    See the Kudu commit here for details:
    https://github.com/apache/kudu/commit/eb2b70d4b96be2fc2fdd6b3625acc284ac5774be
    
    While making this change, I removed all ntp related packages and special
    handling as they should not be needed in a development environment
    any more. I also added curl and gawk which were missing in my
    Docker ubuntu environment and broke my testing.
    
    Testing:
    I tested with the steps below using Docker for Mac:
    
      docker rm impala-dev
      docker volume rm impala
      docker run --privileged --interactive --tty --name impala-dev -v impala:/home -p 25000:25000 -p 25010:25010 -p 25020:25020 ubuntu:16.04 /bin/bash
    
      apt-get update
      apt-get install sudo
      adduser --disabled-password --gecos '' impdev
      echo 'impdev ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
      su - impdev
      cd ~
    
      sudo apt-get --yes install git
      git clone https://git-wip-us.apache.org/repos/asf/impala.git ~/Impala
      cd ~/Impala
      export IMPALA_HOME=`pwd`
      git remote add fork https://github.com/granthenke/impala.git
      git fetch fork
      git checkout kudu-system-time
    
      $IMPALA_HOME/bin/bootstrap_development.sh
    
      source $IMPALA_HOME/bin/impala-config.sh
      (pushd fe && mvn -fae test -Dtest=AnalyzeDDLTest)
      (pushd fe && mvn -fae test -Dtest=AnalyzeKuduDDLTest)
    
      $IMPALA_HOME/bin/start-impala-cluster.py
      ./tests/run-tests.py query_test/test_kudu.py
    
    Change-Id: Id99e5cb58ab988c3ad4f98484be8db193d5eaf99
    Reviewed-on: http://gerrit.cloudera.org:8080/15568
    Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
    Reviewed-by: Alexey Serbin <as...@cloudera.com>
    Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
 bin/bootstrap_system.sh                            | 31 +++++-----------------
 docker/entrypoint.sh                               |  9 -------
 testdata/cluster/admin                             | 21 ---------------
 .../common/etc/kudu/master.conf.tmpl               |  9 ++++++-
 .../common/etc/kudu/tserver.conf.tmpl              |  9 ++++++-
 5 files changed, 22 insertions(+), 57 deletions(-)

diff --git a/bin/bootstrap_system.sh b/bin/bootstrap_system.sh
index 9d043d0..115a9eb 100755
--- a/bin/bootstrap_system.sh
+++ b/bin/bootstrap_system.sh
@@ -187,10 +187,10 @@ function apt-get {
 
 echo ">>> Installing build tools"
 ubuntu apt-get update
-ubuntu apt-get --yes install ccache g++ gcc libffi-dev liblzo2-dev libkrb5-dev \
-        krb5-admin-server krb5-kdc krb5-user libsasl2-dev libsasl2-modules \
-        libsasl2-modules-gssapi-mit libssl-dev make ninja-build ntp \
-        ntpdate python-dev python-setuptools postgresql ssh wget vim-common psmisc \
+ubuntu apt-get --yes install ccache curl gawk g++ gcc libffi-dev liblzo2-dev \
+        libkrb5-dev krb5-admin-server krb5-kdc krb5-user libsasl2-dev \
+        libsasl2-modules libsasl2-modules-gssapi-mit libssl-dev make ninja-build \
+        python-dev python-setuptools postgresql ssh wget vim-common psmisc \
         lsof openjdk-8-jdk openjdk-8-source openjdk-8-dbg apt-utils git ant
 
 if [[ "$UBUNTU" == true ]]; then
@@ -224,8 +224,8 @@ else
   ubuntu18 sudo update-java-alternatives -s java-1.8.0-openjdk-amd64
 fi
 
-redhat sudo yum install -y curl gcc gcc-c++ git krb5-devel krb5-server krb5-workstation \
-        libevent-devel libffi-devel make ntp ntpdate ntp-perl openssl-devel cyrus-sasl \
+redhat sudo yum install -y curl gawk gcc gcc-c++ git krb5-devel krb5-server \
+        krb5-workstation libevent-devel libffi-devel make openssl-devel cyrus-sasl \
         cyrus-sasl-gssapi cyrus-sasl-devel cyrus-sasl-plain \
         python-devel python-setuptools postgresql postgresql-server \
         wget vim-common nscd cmake lzo-devel fuse-devel snappy-devel zlib-devel \
@@ -272,25 +272,6 @@ fi
 
 echo ">>> Configuring system"
 
-ubuntu sudo service ntp stop
-redhat6 sudo service ntpd stop
-redhat7 notindocker sudo service ntpd stop
-sudo ntpdate us.pool.ntp.org
-# If on EC2, use Amazon's ntp servers
-# EC2 nodes expose this IP address internally as a way to gather instance metadata.
-# The assumption is that only AWS nodes do this
-if wget -q -T 1 -t 1 -o /dev/null http://169.254.169.254/latest/dynamic/instance-identity
-then
-  sudo sed -i 's/ubuntu\.pool/amazon\.pool/' /etc/ntp.conf
-fi
-# While it is nice to have ntpd running to keep the clock in sync, that does not work in a
-# --privileged docker container, and a non-privileged container cannot run ntpdate, which
-# is strictly needed by Kudu.
-# TODO: Make privileged docker start ntpd
-ubuntu sudo service ntp start || grep docker /proc/1/cgroup
-redhat6 sudo service ntpd start || grep docker /proc/1/cgroup
-notindocker redhat7 sudo service ntpd start
-
 # IMPALA-3932, IMPALA-3926
 if [[ $UBUNTU = true && ( $DISTRIB_RELEASE = 16.04 || $DISTRIB_RELEASE = 18.04 ) ]]
 then
diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh
index 3f56252..2d55a30 100755
--- a/docker/entrypoint.sh
+++ b/docker/entrypoint.sh
@@ -447,15 +447,6 @@ function shell() {
   mkdir -p logs
   boot_container
   impala_environment
-  # Kudu requires --privileged for the Docker container; see
-  # https://issues.apache.org/jira/browse/KUDU-2000. Because
-  # our goal here is convenience for new developers, we
-  # skip kudu if "ntptime" doesn't work, which is a good
-  # proxy for Kudu won't start.
-  if ! ntptime > /dev/null; then
-    export KUDU_IS_SUPPORTED=false
-    KUDU_MSG="Kudu is not started."
-  fi
   start_minicluster
   bin/start-impala-cluster.py
   cat <<"EOF"
diff --git a/testdata/cluster/admin b/testdata/cluster/admin
index 708599a..dee8dbf 100755
--- a/testdata/cluster/admin
+++ b/testdata/cluster/admin
@@ -329,27 +329,6 @@ function start_cluster {
 
   if [ ${#SUPPORTED_SERVICES[@]} -gt 0 ]; then
     for SERVICE in ${SUPPORTED_SERVICES[@]-}; do
-      # If all of the following are true, we wait for ntp to sync before proceeding:
-      #
-      # 1. Kudu is being started
-      # 2. An internet connection is available (checked by pinging $NTP_CANARY)
-      # 3. ntp-wait is installed (checked by calling ntp-wait with the "--help" flag)
-      if [[ "${SERVICE}" == "kudu" ]]; then
-        NTP_CANARY=pool.ntp.org
-        if ! ping -c 1 -w 5 "${NTP_CANARY}" >/dev/null 2>/dev/null; then
-          echo "WARNING: cannot reach ${NTP_CANARY}; ntp sync recommended for Kudu"
-        else
-          # ntp-wait is in /usr/sbin on both CentOS and Debian-based systems, but regular
-          # users don't always have /usr/sbin in $PATH. Use the absolute path.
-          ntp_wait=$(command -v ntp-wait || echo /usr/sbin/ntp-wait)
-          if [[ ! -x $ntp_wait ]]; then
-            echo "WARNING: ntp-wait not installed; ntp sync recommended for Kudu"
-          elif ! $ntp_wait -v; then
-            echo "ntp-wait failed; cannot start kudu"
-            return 1
-          fi
-        fi
-      fi
       start $SERVICE
     done
 
diff --git a/testdata/cluster/node_templates/common/etc/kudu/master.conf.tmpl b/testdata/cluster/node_templates/common/etc/kudu/master.conf.tmpl
index f272eb7..e4460c1 100644
--- a/testdata/cluster/node_templates/common/etc/kudu/master.conf.tmpl
+++ b/testdata/cluster/node_templates/common/etc/kudu/master.conf.tmpl
@@ -2,8 +2,15 @@
 -fs_data_dirs=${NODE_DIR}/var/lib/kudu/master/data
 -log_dir=${NODE_DIR}/var/log/kudu/master
 
+# The flags below require unsafe flags to be unlocked.
+-unlock_unsafe_flags
+
 # fsync is disabled for additional speed. Sometimes operations are slow on EC2/GCE test
 # machines. Some data loss could occur if the system crashes before the OS has a chance
 # to flush data to disk but that is acceptable for development purposes.
--unlock_unsafe_flags
 -never_fsync
+
+# There is no need to require NTP-synchronized clock for tests where all the
+# participating Kudu masters and tablet servers are run at the same node using the same
+# local wallclock.
+-time_source=system_unsync
diff --git a/testdata/cluster/node_templates/common/etc/kudu/tserver.conf.tmpl b/testdata/cluster/node_templates/common/etc/kudu/tserver.conf.tmpl
index 1c6b4cb..e0512da 100644
--- a/testdata/cluster/node_templates/common/etc/kudu/tserver.conf.tmpl
+++ b/testdata/cluster/node_templates/common/etc/kudu/tserver.conf.tmpl
@@ -4,8 +4,15 @@
 -fs_data_dirs=${NODE_DIR}/var/lib/kudu/ts/data
 -log_dir=${NODE_DIR}/var/log/kudu/ts
 
+# The flags below require unsafe flags to be unlocked.
+-unlock_unsafe_flags
+
 # fsync is disabled for additional speed. Sometimes operations are slow on EC2/GCE test
 # machines. Some data loss could occur if the system crashes before the OS has a chance
 # to flush data to disk but that is acceptable for development purposes.
--unlock_unsafe_flags
 -never_fsync
+
+# There is no need to require NTP-synchronized clock for tests where all the
+# participating Kudu masters and tablet servers are run at the same node using the same
+# local wallclock.
+-time_source=system_unsync


[impala] 01/03: IMPALA-9555 part 2: [Hive3] Fix test failure introduced by HIVE-22589

Posted by st...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

stakiar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git

commit 1cfc31c84fce543b6cf75341a699772ffde5e3bd
Author: Attila Jeges <at...@cloudera.com>
AuthorDate: Tue Mar 31 12:20:21 2020 +0200

    IMPALA-9555 part 2: [Hive3] Fix test failure introduced by HIVE-22589
    
    This patch is a continuation of IMPALA-9555. It makes Avro DATE
    tests more resilient by using regex for expected error messages
    instead of using concrete error messages.
    
    Change-Id: I36340be70a37b75997cf49625a173ec2690ed9b8
    Reviewed-on: http://gerrit.cloudera.org:8080/15618
    Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
    Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
 .../functional-query/queries/QueryTest/avro_date.test    | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/testdata/workloads/functional-query/queries/QueryTest/avro_date.test b/testdata/workloads/functional-query/queries/QueryTest/avro_date.test
index 248872a..8ebf6bf 100644
--- a/testdata/workloads/functional-query/queries/QueryTest/avro_date.test
+++ b/testdata/workloads/functional-query/queries/QueryTest/avro_date.test
@@ -55,8 +55,8 @@ select id_col, date_part, date_col from date_tbl;
 ---- TYPES
 INT,DATE,DATE
 ---- ERRORS
-Problem parsing file __HDFS_FILENAME__ at 309
-Avro file '__HDFS_FILENAME__' is corrupt: out of range date value -719164 at offset 309. The valid date range is -719162..2932896 (0001-01-01..9999-12-31).
+row_regex: .*Problem parsing file __HDFS_FILENAME__ at \d+
+row_regex: .*Avro file '__HDFS_FILENAME__' is corrupt: out of range date value \-?\d+ at offset \d+\. The valid date range is \-719162\.\.2932896 \(0001\-01\-01\.\.9999\-12\-31\)\.
 ====
 ---- HIVE_MAJOR_VERSION
 2
@@ -88,8 +88,8 @@ select date_part, count(date_col) from date_tbl group by date_part;
 ---- TYPES
 DATE, BIGINT
 ---- ERRORS
-Problem parsing file __HDFS_FILENAME__ at 309
-Avro file '__HDFS_FILENAME__' is corrupt: out of range date value -719164 at offset 309. The valid date range is -719162..2932896 (0001-01-01..9999-12-31).
+row_regex: .*Problem parsing file __HDFS_FILENAME__ at \d+
+row_regex: .*Avro file '__HDFS_FILENAME__' is corrupt: out of range date value \-?\d+ at offset \d+\. The valid date range is \-719162\.\.2932896 \(0001\-01\-01\.\.9999\-12\-31\)\.
 ====
 ---- HIVE_MAJOR_VERSION
 2
@@ -117,8 +117,8 @@ select min(date_part), max(date_part), min(date_col), max(date_col) from date_tb
 ---- TYPES
 DATE, DATE, DATE, DATE
 ---- ERRORS
-Problem parsing file __HDFS_FILENAME__ at 309
-Avro file '__HDFS_FILENAME__' is corrupt: out of range date value -719164 at offset 309. The valid date range is -719162..2932896 (0001-01-01..9999-12-31).
+row_regex: .*Problem parsing file __HDFS_FILENAME__ at \d+
+row_regex: .*Avro file '__HDFS_FILENAME__' is corrupt: out of range date value \-?\d+ at offset \d+\. The valid date range is \-719162\.\.2932896 \(0001\-01\-01\.\.9999\-12\-31\)\.
 ====
 ---- HIVE_MAJOR_VERSION
 2
@@ -150,8 +150,8 @@ select date_part, min(date_col), max(date_col) from date_tbl group by date_part;
 ---- TYPES
 DATE, DATE, DATE
 ---- ERRORS
-Problem parsing file __HDFS_FILENAME__ at 309
-Avro file '__HDFS_FILENAME__' is corrupt: out of range date value -719164 at offset 309. The valid date range is -719162..2932896 (0001-01-01..9999-12-31).
+row_regex: .*Problem parsing file __HDFS_FILENAME__ at \d+
+row_regex: .*Avro file '__HDFS_FILENAME__' is corrupt: out of range date value \-?\d+ at offset \d+\. The valid date range is \-719162\.\.2932896 \(0001\-01\-01\.\.9999\-12\-31\)\.
 ====
 ---- QUERY
 select date_part, count(*) from date_tbl group by date_part;


[impala] 03/03: IMPALA-9568: Template tuples are initialized multiple times

Posted by st...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

stakiar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git

commit 0038487267ccba77e6cb17a582039d6b35ff947c
Author: Sahil Takiar <ta...@gmail.com>
AuthorDate: Wed Mar 25 18:02:27 2020 -0700

    IMPALA-9568: Template tuples are initialized multiple times
    
    Template tuples are initialized multiple times, concurrently, which
    leads to a data race reported by TSAN. The template tuples should just
    be initialized once. This patch removes the template tuple
    initialization done in the HDFS scanners and just copies them from the
    HdfsScanNodeBase.
    
    After this patch, data-load is now TSAN clean. I removed the TSAN flag
    'halt_on_error=0' so that TSAN now crashes the process if a TSAN bug is
    discovered. This will allow us to setup a Jenkins job that runs dataload
    + be/ tests, and will crash if any new TSAN bugs are discovered.
    
    Testing:
    * Ran exhaustive tests
    
    Change-Id: I3bd3554b2b919b117a0c9ae86dfc0a75ae4129d2
    Reviewed-on: http://gerrit.cloudera.org:8080/15604
    Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
    Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
 be/src/common/init.cc       |  2 +-
 be/src/exec/hdfs-scanner.cc | 12 ++++++++----
 bin/run-backend-tests.sh    | 13 -------------
 3 files changed, 9 insertions(+), 18 deletions(-)

diff --git a/be/src/common/init.cc b/be/src/common/init.cc
index e59c11b..e8069ef 100644
--- a/be/src/common/init.cc
+++ b/be/src/common/init.cc
@@ -430,7 +430,7 @@ extern "C" const char* __tsan_default_options() {
 #else
          "1 "
 #endif
-         "halt_on_error=0 history_size=7 allocator_may_return_null=1 "
+         "history_size=7 allocator_may_return_null=1 "
          "suppressions=" THREAD_SANITIZER_SUPPRESSIONS;
 }
 #endif
diff --git a/be/src/exec/hdfs-scanner.cc b/be/src/exec/hdfs-scanner.cc
index e1e998a..44ad4b8 100644
--- a/be/src/exec/hdfs-scanner.cc
+++ b/be/src/exec/hdfs-scanner.cc
@@ -107,10 +107,14 @@ Status HdfsScanner::Open(ScannerContext* context) {
     }
   }
 
-  // Initialize the template_tuple_.
-  template_tuple_ = scan_node_->InitTemplateTuple(
-      context_->partition_descriptor()->partition_key_value_evals(),
-      template_tuple_pool_.get(), state_);
+  // Initialize the template_tuple_, it is copied from the template tuple map in the
+  // HdfsScanNodeBase.
+  Tuple* template_tuple =
+      scan_node_->partition_template_tuple_map_[context_->partition_descriptor()->id()];
+  if (template_tuple != nullptr) {
+    template_tuple_ =
+        template_tuple->DeepCopy(*scan_node_->tuple_desc(), template_tuple_pool_.get());
+  }
   template_tuple_map_[scan_node_->tuple_desc()] = template_tuple_;
 
   decompress_timer_ = ADD_TIMER(scan_node_->runtime_profile(), "DecompressionTime");
diff --git a/bin/run-backend-tests.sh b/bin/run-backend-tests.sh
index 5e1d84f..a2df4ea 100755
--- a/bin/run-backend-tests.sh
+++ b/bin/run-backend-tests.sh
@@ -39,18 +39,5 @@ cd ..
 
 export CTEST_OUTPUT_ON_FAILURE=1
 
-# Override default TSAN_OPTIONS so that halt_on_error is set.
-# See be/src/common/init.cc and
-# https://github.com/google/sanitizers/wiki/ThreadSanitizerCppManual#non-instrumented-code
-# for an explanation of what this flag does.
-IGNORE_NONINSTRUMENTED_MODULES="ignore_noninstrumented_modules="
-if [ "${TSAN_FULL+x}" ]; then
-  IGNORE_NONINSTRUMENTED_MODULES+="0"
-else
-  IGNORE_NONINSTRUMENTED_MODULES+="1"
-fi
-export TSAN_OPTIONS="${IGNORE_NONINSTRUMENTED_MODULES} halt_on_error=1 history_size=7
-  allocator_may_return_null=1 suppressions=${IMPALA_HOME}/bin/tsan-suppressions.txt"
-
 export PATH="${IMPALA_TOOLCHAIN}/llvm-${IMPALA_LLVM_VERSION}/bin:${PATH}"
 "${MAKE_CMD:-make}" test ARGS="${BE_TEST_ARGS}"