Upgrade to Bazel 3.4.1 (#3576)

* Upgrade to Bazel 3.4.1
* Fixing ArrayToString error
see https://errorprone.info/bugpattern/ArrayToString
* Updating Docker rules and Pkg rules
* Updating `rules_python`
diff --git a/.travis.yml b/.travis.yml
index caa4046..d9c05f7 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -27,7 +27,7 @@
       - libgoogle-perftools-dev
 
 env:
-  - BAZEL_VERSION=3.0.0 ENABLE_HEAPCHECK=1
+  - BAZEL_VERSION=3.4.1 ENABLE_HEAPCHECK=1
 
 before_install:
   # download and install bazel
diff --git a/README.md b/README.md
index 381107f..0df4031 100644
--- a/README.md
+++ b/README.md
@@ -32,7 +32,7 @@
 #### Heron Requirements:
  * Java 11
  * Python 3.6
- * Bazel 3.0.0
+ * Bazel 3.4.1
 
 ## Contact
 
diff --git a/WORKSPACE b/WORKSPACE
index 149ee64..a66fa93 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -158,8 +158,9 @@
 
 http_archive(
     name = "rules_python",
-    sha256 = "aa96a691d3a8177f3215b14b0edc9641787abaaa30363a080165d06ab65e1161",
-    url = "https://github.com/bazelbuild/rules_python/releases/download/0.0.1/rules_python-0.0.1.tar.gz",
+    sha256 = "b5668cde8bb6e3515057ef465a35ad712214962f0b3a314e551204266c7be90c",
+    strip_prefix = "rules_python-0.0.2",
+    url = "https://github.com/bazelbuild/rules_python/releases/download/0.0.2/rules_python-0.0.2.tar.gz",
 )
 
 load("@rules_python//python:repositories.bzl", "py_repositories")
@@ -363,10 +364,11 @@
 # end helm
 
 # for docker image building
-DOCKER_RULES_VERSION = "0.14.1"
+DOCKER_RULES_VERSION = "0.14.4"
+
 http_archive(
     name = "io_bazel_rules_docker",
-    sha256 = "dc97fccceacd4c6be14e800b2a00693d5e8d07f69ee187babfd04a80a9f8e250",
+    sha256 = "4521794f0fba2e20f3bf15846ab5e01d5332e587e9ce81629c7f96c793bb7036",
     strip_prefix = "rules_docker-%s" % DOCKER_RULES_VERSION,
     urls = ["https://github.com/bazelbuild/rules_docker/archive/v%s.tar.gz" % DOCKER_RULES_VERSION],
 )
@@ -375,13 +377,16 @@
     "@io_bazel_rules_docker//repositories:repositories.bzl",
     container_repositories = "repositories",
 )
-
 container_repositories()
 
 load("@io_bazel_rules_docker//repositories:deps.bzl", container_deps = "deps")
 
 container_deps()
 
+load("@io_bazel_rules_docker//repositories:pip_repositories.bzl", "pip_deps")
+
+pip_deps()
+
 load(
     "@io_bazel_rules_docker//container:container.bzl",
     "container_pull",
@@ -394,13 +399,15 @@
     repository = "heron/base",
     tag = "0.5.0",
 )
-
 # end docker image building
 
 http_archive(
     name = "rules_pkg",
-    url = "https://github.com/bazelbuild/rules_pkg/releases/download/0.2.5/rules_pkg-0.2.5.tar.gz",
-    sha256 = "352c090cc3d3f9a6b4e676cf42a6047c16824959b438895a76c2989c6d7c246a",
+    urls = [
+        "https://github.com/bazelbuild/rules_pkg/releases/download/0.2.6/rules_pkg-0.2.6.tar.gz",
+        "https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.2.6/rules_pkg-0.2.6.tar.gz",
+    ],
+    sha256 = "aeca78988341a2ee1ba097641056d168320ecc51372ef7ff8e64b139516a4937",
 )
 load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
 rules_pkg_dependencies()
diff --git a/docker/compile/Dockerfile.centos7 b/docker/compile/Dockerfile.centos7
index 66c9dbe..02f74ae 100644
--- a/docker/compile/Dockerfile.centos7
+++ b/docker/compile/Dockerfile.centos7
@@ -19,7 +19,6 @@
 
 # This is passed to the heron build command via the --config flag
 ENV TARGET_PLATFORM centos
-ENV bazelVersion 3.0.0
 
 RUN yum -y upgrade
 RUN yum -y install \
@@ -49,6 +48,8 @@
 
 ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk
 
+ENV bazelVersion 3.4.1
+
 RUN wget -O /tmp/bazel.sh https://github.com/bazelbuild/bazel/releases/download/$bazelVersion/bazel-$bazelVersion-installer-linux-x86_64.sh \
       && chmod +x /tmp/bazel.sh \
       && /tmp/bazel.sh
diff --git a/docker/compile/Dockerfile.debian10 b/docker/compile/Dockerfile.debian10
index 57cabcb..f1f9649 100644
--- a/docker/compile/Dockerfile.debian10
+++ b/docker/compile/Dockerfile.debian10
@@ -19,7 +19,6 @@
 
 # This is passed to the heron build command via the --config flag
 ENV TARGET_PLATFORM debian
-ENV bazelVersion 3.0.0
 
 RUN apt-get update && apt-get -y install \
       ant \
@@ -43,6 +42,8 @@
       wget \
       zip
 
+ENV bazelVersion 3.4.1
+
 RUN wget -O /tmp/bazel.sh https://github.com/bazelbuild/bazel/releases/download/$bazelVersion/bazel-$bazelVersion-installer-linux-x86_64.sh \
       && chmod +x /tmp/bazel.sh \
       && /tmp/bazel.sh
diff --git a/docker/compile/Dockerfile.debian9 b/docker/compile/Dockerfile.debian9
index 4d727d0..7c64975 100644
--- a/docker/compile/Dockerfile.debian9
+++ b/docker/compile/Dockerfile.debian9
@@ -19,7 +19,6 @@
 
 # This is passed to the heron build command via the --config flag
 ENV TARGET_PLATFORM debian
-ENV bazelVersion 3.0.0
 
 RUN apt-get update && apt-get -y install \
       ant \
@@ -42,6 +41,8 @@
       wget \
       zip
 
+ENV bazelVersion 3.4.1
+
 RUN wget -O /tmp/bazel.sh https://github.com/bazelbuild/bazel/releases/download/$bazelVersion/bazel-$bazelVersion-installer-linux-x86_64.sh \
       && chmod +x /tmp/bazel.sh \
       && /tmp/bazel.sh
diff --git a/docker/compile/Dockerfile.ubuntu14.04 b/docker/compile/Dockerfile.ubuntu14.04
index f640816..6ad88b8 100644
--- a/docker/compile/Dockerfile.ubuntu14.04
+++ b/docker/compile/Dockerfile.ubuntu14.04
@@ -19,7 +19,6 @@
 
 # This is passed to the heron build command via the --config flag
 ENV TARGET_PLATFORM ubuntu
-ENV bazelVersion 3.0.0
 
 RUN apt-get update && apt-get install -y software-properties-common
 
@@ -48,6 +47,8 @@
 
 ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64
 
+ENV bazelVersion 3.4.1
+
 RUN wget -O /tmp/bazel.sh https://github.com/bazelbuild/bazel/releases/download/$bazelVersion/bazel-$bazelVersion-installer-linux-x86_64.sh \
       && chmod +x /tmp/bazel.sh \
       && /tmp/bazel.sh
diff --git a/docker/compile/Dockerfile.ubuntu16.04 b/docker/compile/Dockerfile.ubuntu16.04
index 39ad02b..ee5c3dd 100644
--- a/docker/compile/Dockerfile.ubuntu16.04
+++ b/docker/compile/Dockerfile.ubuntu16.04
@@ -19,7 +19,6 @@
 
 # This is passed to the heron build command via the --config flag
 ENV TARGET_PLATFORM ubuntu
-ENV bazelVersion 3.0.0
 
 RUN apt-get update && apt-get install -y software-properties-common
 
@@ -50,6 +49,8 @@
 
 ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64
 
+ENV bazelVersion 3.4.1
+
 RUN wget -O /tmp/bazel.sh https://github.com/bazelbuild/bazel/releases/download/$bazelVersion/bazel-$bazelVersion-installer-linux-x86_64.sh \
       && chmod +x /tmp/bazel.sh \
       && /tmp/bazel.sh
diff --git a/docker/compile/Dockerfile.ubuntu18.04 b/docker/compile/Dockerfile.ubuntu18.04
index a15848b..ba164fd 100644
--- a/docker/compile/Dockerfile.ubuntu18.04
+++ b/docker/compile/Dockerfile.ubuntu18.04
@@ -19,7 +19,6 @@
 
 # This is passed to the heron build command via the --config flag
 ENV TARGET_PLATFORM ubuntu
-ENV bazelVersion 3.0.0
 
 RUN apt-get update && apt-get -y install \
       ant \
@@ -44,6 +43,8 @@
 
 ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64
 
+ENV bazelVersion 3.4.1
+
 RUN wget -O /tmp/bazel.sh https://github.com/bazelbuild/bazel/releases/download/$bazelVersion/bazel-$bazelVersion-installer-linux-x86_64.sh \
       && chmod +x /tmp/bazel.sh \
       && /tmp/bazel.sh
diff --git a/docker/compile/Dockerfile.ubuntu20.04 b/docker/compile/Dockerfile.ubuntu20.04
index e5a0cd4..e4662cd 100644
--- a/docker/compile/Dockerfile.ubuntu20.04
+++ b/docker/compile/Dockerfile.ubuntu20.04
@@ -19,7 +19,6 @@
 
 # This is passed to the heron build command via the --config flag
 ENV TARGET_PLATFORM ubuntu
-ENV bazelVersion 3.0.0
 
 ARG DEBIAN_FRONTEND=noninteractive
 
@@ -46,6 +45,8 @@
 
 ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64
 
+ENV bazelVersion 3.4.1
+
 RUN wget -O /tmp/bazel.sh https://github.com/bazelbuild/bazel/releases/download/$bazelVersion/bazel-$bazelVersion-installer-linux-x86_64.sh \
       && chmod +x /tmp/bazel.sh \
       && /tmp/bazel.sh
diff --git a/docker/test/Dockerfile.centos7 b/docker/test/Dockerfile.centos7
index d2ad420..376f591 100644
--- a/docker/test/Dockerfile.centos7
+++ b/docker/test/Dockerfile.centos7
@@ -19,7 +19,6 @@
 
 # This is passed to the heron build command via the --config flag
 ENV TARGET_PLATFORM centos
-ENV bazelVersion 3.0.0
 
 RUN yum -y upgrade
 RUN yum -y install \
@@ -48,6 +47,8 @@
 
 ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk
 
+ENV bazelVersion 3.4.1
+
 RUN wget -O /tmp/bazel.sh https://github.com/bazelbuild/bazel/releases/download/$bazelVersion/bazel-$bazelVersion-installer-linux-x86_64.sh \
       && chmod +x /tmp/bazel.sh \
       && /tmp/bazel.sh
diff --git a/docker/test/Dockerfile.ubuntu18.04 b/docker/test/Dockerfile.ubuntu18.04
index a62a77a..1e8d504 100644
--- a/docker/test/Dockerfile.ubuntu18.04
+++ b/docker/test/Dockerfile.ubuntu18.04
@@ -19,7 +19,6 @@
 
 # This is passed to the heron build command via the --config flag
 ENV TARGET_PLATFORM ubuntu
-ENV bazelVersion 3.0.0
 
 RUN apt-get update && apt-get -y install \
       g++ \
@@ -41,6 +40,8 @@
 
 ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64
 
+ENV bazelVersion 3.4.1
+
 RUN wget -O /tmp/bazel.sh https://github.com/bazelbuild/bazel/releases/download/$bazelVersion/bazel-$bazelVersion-installer-linux-x86_64.sh \
       && chmod +x /tmp/bazel.sh \
       && /tmp/bazel.sh
diff --git a/eco/src/java/org/apache/heron/eco/builder/ObjectBuilder.java b/eco/src/java/org/apache/heron/eco/builder/ObjectBuilder.java
index 9101963..168a7f6 100644
--- a/eco/src/java/org/apache/heron/eco/builder/ObjectBuilder.java
+++ b/eco/src/java/org/apache/heron/eco/builder/ObjectBuilder.java
@@ -24,6 +24,7 @@
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 
 import org.slf4j.Logger;
@@ -220,7 +221,7 @@
     }
     if (eligibleCount > 1) {
       LOG.warn("Found multiple invokable methods for class, method, given arguments {} "
-          + new Object[]{target, methodName, args});
+          + Arrays.toString(new Object[]{target, methodName, args}));
     }
     return retval;
   }
diff --git a/scripts/ci/setup_bazel.sh b/scripts/ci/setup_bazel.sh
index 95077ee..2b41426 100644
--- a/scripts/ci/setup_bazel.sh
+++ b/scripts/ci/setup_bazel.sh
@@ -29,7 +29,7 @@
     exit 1
 fi
 BAZEL_OS=$1
-BAZEL_VERSION=3.0.0
+BAZEL_VERSION=3.4.1
 
 # Install Bazel
 BAZEL_INSTALLER=bazel-$BAZEL_VERSION-installer-$BAZEL_OS-x86_64.sh
diff --git a/vagrant/init.sh b/vagrant/init.sh
index bb764b3..5b793bb 100644
--- a/vagrant/init.sh
+++ b/vagrant/init.sh
@@ -43,7 +43,7 @@
     service marathon start
 }
 
-bazelVersion=3.0.0
+bazelVersion=3.4.1
 bazel_install() {
     apt-get install -y automake cmake gcc g++ zlib1g-dev zip pkg-config wget libssl-dev libunwind-dev
     mkdir -p /opt/bazel
diff --git a/website2/docs/compiling-osx.md b/website2/docs/compiling-osx.md
index 3750a09..24bb9c2 100644
--- a/website2/docs/compiling-osx.md
+++ b/website2/docs/compiling-osx.md
@@ -34,7 +34,7 @@
 
 ### Step 2 -- Install Bazel
 ```bash
-wget -O /tmp/bazel.sh https://github.com/bazelbuild/bazel/releases/download/3.0.0/bazel-3.0.0-installer-darwin-x86_64.sh
+wget -O /tmp/bazel.sh https://github.com/bazelbuild/bazel/releases/download/3.4.1/bazel-3.4.1-installer-darwin-x86_64.sh
 chmod +x /tmp/bazel.sh
 /tmp/bazel.sh --user
 ```
diff --git a/website2/website/scripts/Dockerfile.ubuntu18.04 b/website2/website/scripts/Dockerfile.ubuntu18.04
index f247083..7d23b4b 100644
--- a/website2/website/scripts/Dockerfile.ubuntu18.04
+++ b/website2/website/scripts/Dockerfile.ubuntu18.04
@@ -19,7 +19,7 @@
 
 # This is passed to the heron build command via the --config flag
 ENV TARGET_PLATFORM ubuntu
-ENV bazelVersion 3.0.0
+ENV bazelVersion 3.4.1
 
 
 RUN apt-get update && apt-get -y install \
diff --git a/website2/website/scripts/replace.js b/website2/website/scripts/replace.js
index 1c58625..b193329 100755
--- a/website2/website/scripts/replace.js
+++ b/website2/website/scripts/replace.js
@@ -38,7 +38,7 @@
     '0.20.0-incubating': '0.14.1',
     '0.20.1-incubating': '0.26.0',
     '0.20.2-incubating': '0.26.0',
-    'latest': '3.0.0',
+    'latest': '3.4.1',
 }
 
 function replaceBazel(version) {