You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tajo.apache.org by ji...@apache.org on 2015/01/13 06:03:44 UTC

tajo git commit: TAJO-1299: TB and PB representations in StorageUnit are overflow

Repository: tajo
Updated Branches:
  refs/heads/master d1a46c6b6 -> 9553edc9b


TAJO-1299: TB and PB representations in StorageUnit are overflow

Closes #348


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

Branch: refs/heads/master
Commit: 9553edc9ba0d6a0d4ff6e75b6be5d06aef91eddb
Parents: d1a46c6
Author: Jihun Kang <ji...@apache.org>
Authored: Tue Jan 13 14:02:14 2015 +0900
Committer: Jihun Kang <ji...@apache.org>
Committed: Tue Jan 13 14:02:14 2015 +0900

----------------------------------------------------------------------
 CHANGES                                                     | 3 +++
 .../src/main/java/org/apache/tajo/unit/StorageUnit.java     | 9 +++++----
 2 files changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tajo/blob/9553edc9/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 54d72e1..52ae50c 100644
--- a/CHANGES
+++ b/CHANGES
@@ -164,6 +164,9 @@ Release 0.9.1 - unreleased
 
   BUG FIXES
 
+    TAJO-1299: TB and PB representations in StorageUnit are overflow.
+    (jihun)
+
     TAJO-1297: Tajo Web UI does not work after TAJO-1291. (jihoon)
 
     TAJO-1251: Query is hanging occasionally by shuffle report. (jinho)

http://git-wip-us.apache.org/repos/asf/tajo/blob/9553edc9/tajo-common/src/main/java/org/apache/tajo/unit/StorageUnit.java
----------------------------------------------------------------------
diff --git a/tajo-common/src/main/java/org/apache/tajo/unit/StorageUnit.java b/tajo-common/src/main/java/org/apache/tajo/unit/StorageUnit.java
index dd345c1..6af84e9 100644
--- a/tajo-common/src/main/java/org/apache/tajo/unit/StorageUnit.java
+++ b/tajo-common/src/main/java/org/apache/tajo/unit/StorageUnit.java
@@ -22,8 +22,9 @@ public class StorageUnit {
 
 	public static final int B = 8;
 	public static final int KB = 1024;
-	public static final int MB = KB * 1024;
-	public static final int GB = MB * 1024;
-	public static final int TB = GB * 1024;
-	public static final int PB = TB * 1024;
+	public static final int MB = KB * KB;
+	public static final int GB = MB * KB;
+	// To prevent a overflow in a integer variable, this variable size increased to 64bit size.
+	public static final long TB = (long)GB * KB;
+	public static final long PB = TB * KB;
 }