You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by jo...@apache.org on 2018/12/10 23:44:04 UTC

[7/8] impala git commit: Build parquet-reader earlier in test-with-docker

Build parquet-reader earlier in test-with-docker

Test-with-docker builds the Impala container with the '-notests' switch
to save on build time and container size.
Since all EE_TEST suites/shards depend on the parquet-reader tool, all
EE_TEST containers start their life building this tool. This results
in all these containers hammering on CMake and the compiler, sometimes
in parallel.

The patch moves the line building parquet-reader into the "build"
phase of the Docker-based tests. The advantage is twofold:
- parquet-reader is built only once, saving some startup time for all
  the containers running tests
- the build also happens much faster at the end of the "build" phase,
  because the object files are still around and caches are hot
  (test-with-docker.py deletes all .o files before committing the container
  to shrink the container size that needs to be persisted).
  Building parquet-reader at the end of the build phase takes ~20 seconds,
  compared to the 1m20s it takes during the startup of a test container.

Verified by running test-with-docker.py on private infrastructure, and
checking build logs and test results -- still passing on Ubuntu 16.04

Change-Id: Iee141ad8b2a700378133a37498e74ddc306dfd57
Reviewed-on: http://gerrit.cloudera.org:8080/12025
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>


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

Branch: refs/heads/master
Commit: 24445d5bf1ca889bd3edac985a5463743c6f3f8b
Parents: 12ce20b
Author: Laszlo Gaal <la...@cloudera.com>
Authored: Mon Dec 3 17:23:10 2018 +0100
Committer: Impala Public Jenkins <im...@cloudera.com>
Committed: Mon Dec 10 17:54:33 2018 +0000

----------------------------------------------------------------------
 docker/entrypoint.sh | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/impala/blob/24445d5b/docker/entrypoint.sh
----------------------------------------------------------------------
diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh
index 50a38bd..ab750b7 100755
--- a/docker/entrypoint.sh
+++ b/docker/entrypoint.sh
@@ -213,6 +213,13 @@ function build_impdev() {
   # and, this is a first build anyway.
   ./buildall.sh -noclean -format -testdata -notests
 
+  # We make one exception to "-notests":
+  # test_insert_parquet.py, which is used in all the end-to-end test
+  # shards, depends on this binary. We build it here once,
+  # instead of building it during the startup of each container running
+  # a subset of E2E tests. Building it here is also a lot faster.
+  make -j$(nproc) --load-average=$(nproc) parquet-reader
+
   # Dump current memory usage to logs, before shutting things down.
   memory_usage
 
@@ -351,11 +358,6 @@ function test_suite() {
 
   ret=0
 
-  if [[ ${EE_TEST} = true ]]; then
-    # test_insert_parquet.py depends on this binary
-    make -j$(nproc) --load-average=$(nproc) parquet-reader
-  fi
-
   # Run tests.
   (echo ">>> $1: Starting run-all-test") 2> /dev/null
   if ! time -p bash -x bin/run-all-tests.sh; then