You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by bh...@apache.org on 2018/03/29 03:40:26 UTC
[2/6] impala git commit: Revert "IMPALA-6759: align stress test
memory estimation parse pattern"
Revert "IMPALA-6759: align stress test memory estimation parse pattern"
This reverts commit 25218487533f6bf6959c32ff4ee38b77e0ab30b5.
Project: http://git-wip-us.apache.org/repos/asf/impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/impala/commit/2c0926e2
Tree: http://git-wip-us.apache.org/repos/asf/impala/tree/2c0926e2
Diff: http://git-wip-us.apache.org/repos/asf/impala/diff/2c0926e2
Branch: refs/heads/master
Commit: 2c0926e2de22ecafafc460f2b31ca2423b8f7e98
Parents: 2521848
Author: Michael Brown <mi...@cloudera.com>
Authored: Wed Mar 28 15:28:48 2018 -0700
Committer: Michael Brown <mi...@cloudera.com>
Committed: Wed Mar 28 15:28:48 2018 -0700
----------------------------------------------------------------------
fe/src/main/java/org/apache/impala/common/PrintUtils.java | 2 --
tests/stress/concurrent_select.py | 8 +++-----
tests/util/parse_util.py | 2 --
3 files changed, 3 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/impala/blob/2c0926e2/fe/src/main/java/org/apache/impala/common/PrintUtils.java
----------------------------------------------------------------------
diff --git a/fe/src/main/java/org/apache/impala/common/PrintUtils.java b/fe/src/main/java/org/apache/impala/common/PrintUtils.java
index 9f75134..77d77dd 100644
--- a/fe/src/main/java/org/apache/impala/common/PrintUtils.java
+++ b/fe/src/main/java/org/apache/impala/common/PrintUtils.java
@@ -39,8 +39,6 @@ public class PrintUtils {
public static String printBytes(long bytes) {
double result = bytes;
// Avoid String.format() due to IMPALA-1572 which happens on JDK7 but not JDK6.
- // IMPALA-6759: Please update tests/stress/concurrent_select.py MEM_ESTIMATE_PATTERN
- // if you add additional unit prefixes.
if (bytes >= PETABYTE) return new DecimalFormat(".00PB").format(result / PETABYTE);
if (bytes >= TERABYTE) return new DecimalFormat(".00TB").format(result / TERABYTE);
if (bytes >= GIGABYTE) return new DecimalFormat(".00GB").format(result / GIGABYTE);
http://git-wip-us.apache.org/repos/asf/impala/blob/2c0926e2/tests/stress/concurrent_select.py
----------------------------------------------------------------------
diff --git a/tests/stress/concurrent_select.py b/tests/stress/concurrent_select.py
index a4bffd9..fa8541c 100755
--- a/tests/stress/concurrent_select.py
+++ b/tests/stress/concurrent_select.py
@@ -98,10 +98,8 @@ MEM_LIMIT_EQ_THRESHOLD_PC = 0.975
MEM_LIMIT_EQ_THRESHOLD_MB = 50
# Regex to extract the estimated memory from an explain plan.
-# The unit prefixes can be found in
-# fe/src/main/java/org/apache/impala/common/PrintUtils.java
MEM_ESTIMATE_PATTERN = re.compile(
- r"Per-Host Resource Estimates: Memory=(\d+.?\d*)(P|T|G|M|K)?B")
+ r"Per-Host Resource Estimates: Memory=(\d+.?\d*)(T|G|M|K)?B")
PROFILES_DIR = "profiles"
RESULT_HASHES_DIR = "result_hashes"
@@ -1361,8 +1359,8 @@ def match_memory_estimate(explain_lines):
explain_lines: list of str
Returns:
- 2-tuple str of memory limit in decimal string and units (one of 'P', 'T', 'G', 'M',
- 'K', '' bytes)
+ 2-tuple str of memory limit in decimal string and units (one of 'T', 'G', 'M', 'K',
+ '' bytes)
Raises:
Exception if no match found
http://git-wip-us.apache.org/repos/asf/impala/blob/2c0926e2/tests/util/parse_util.py
----------------------------------------------------------------------
diff --git a/tests/util/parse_util.py b/tests/util/parse_util.py
index 202d3d3..ad40b68 100644
--- a/tests/util/parse_util.py
+++ b/tests/util/parse_util.py
@@ -65,8 +65,6 @@ def parse_mem_to_mb(mem, units):
mem *= 10 ** 3
elif units == "T":
mem *= 10 ** 6
- elif units == "P":
- mem *= 10 ** 9
else:
raise Exception('Unexpected memory unit "%s"' % units)
return int(mem)