drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [4/8] drill git commit: DRILL-2569: Fixed operator path truncation in profile page
Date Thu, 07 May 2015 18:02:36 GMT
DRILL-2569: Fixed operator path truncation in profile page


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

Branch: refs/heads/master
Commit: aaba1cdf9520678a80c31898eb8bfe8a0190b865
Parents: f71bf6b
Author: Sudheesh Katkam <skatkam@maprtech.com>
Authored: Tue May 5 09:46:44 2015 -0700
Committer: Jason Altekruse <altekrusejason@gmail.com>
Committed: Thu May 7 10:06:23 2015 -0700

----------------------------------------------------------------------
 .../drill/exec/server/rest/profile/OperatorPathBuilder.java | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/aaba1cdf/exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/profile/OperatorPathBuilder.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/profile/OperatorPathBuilder.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/profile/OperatorPathBuilder.java
index 4cf378f..354cf46 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/profile/OperatorPathBuilder.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/profile/OperatorPathBuilder.java
@@ -39,8 +39,13 @@ public class OperatorPathBuilder {
   }
 
   // Utility to left pad strings
-  protected String leftPad(String text) {
-    return String.format("00%s", text).substring(text.length());
+  private String leftPad(final String text) {
+    final int length = text.length();
+    if (length > 2) {
+      return text;
+    } else {
+      return String.format("00%s", text).substring(length);
+    }
   }
 
   public OperatorPathBuilder setMajor(MajorFragmentProfile major) {


Mime
View raw message