asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "abdullah alamoudi (Code Review)" <do-not-re...@asterixdb.incubator.apache.org>
Subject Change in asterixdb[master]: [NO ISSUE][OTH] Add component size to traces of IO operations
Date Sun, 22 Oct 2017 19:00:54 GMT
abdullah alamoudi has submitted this change and it was merged.

Change subject: [NO ISSUE][OTH] Add component size to traces of IO operations
......................................................................


[NO ISSUE][OTH] Add component size to traces of IO operations

- user model changes: no
- storage format changes: no
- interface changes: yes
  The ITracer interface now support adding name and cat to
  Duration end events.
  ITracer.durationE(String name, String cat, long tid, String args)

Details:
- The duration end trace now adds size information of the resulted
  component.

Change-Id: Icd8ba8194a00019179c3547fac060fc68edb97f0
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2088
Reviewed-by: Till Westmann <tillw@apache.org>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Contrib: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
---
M hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/TracedIOOperation.java
M hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/trace/ITracer.java
M hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/trace/Tracer.java
3 files changed, 15 insertions(+), 1 deletion(-)

Approvals:
  Till Westmann: Looks good to me, approved
  Jenkins: Verified; ; Verified

Objections:
  Anon. E. Moose #1000171: 
  Jenkins: Violations found



diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/TracedIOOperation.java
b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/TracedIOOperation.java
index 9cc8022..a7ec8c3 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/TracedIOOperation.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/TracedIOOperation.java
@@ -87,7 +87,8 @@
         try {
             return ioOp.call();
         } finally {
-            tracer.durationE(tid, "{\"optional\":\"value\"}");
+            tracer.durationE(getTarget().getRelativePath(), cat, tid,
+                    "{\"size\":" + getTarget().getFile().length() + "}");
         }
     }
 
diff --git a/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/trace/ITracer.java
b/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/trace/ITracer.java
index 01b78da..8342c5b 100644
--- a/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/trace/ITracer.java
+++ b/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/trace/ITracer.java
@@ -76,6 +76,11 @@
         public void instant(String name, String cat, Scope scope, String args) {
             // nothing to do here
         }
+
+        @Override
+        public void durationE(String name, String cat, long tid, String args) {
+            // nothing to do here
+        }
     };
 
     static ITracer check(ITracer tracer) {
@@ -93,6 +98,8 @@
 
     void durationE(long tid, String args);
 
+    void durationE(String name, String cat, long tid, String args);
+
     void instant(String name, String cat, Scope scope, String args);
 
     @Override
diff --git a/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/trace/Tracer.java
b/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/trace/Tracer.java
index 00991e4..d540dda 100644
--- a/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/trace/Tracer.java
+++ b/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/trace/Tracer.java
@@ -89,6 +89,12 @@
     }
 
     @Override
+    public void durationE(String name, String cat, long tid, String args) {
+        Event e = Event.create(name, cat, Phase.E, pid, tid, null, args);
+        traceLog.log(TRACE_LOG_LEVEL, e.toJson());
+    }
+
+    @Override
     public void instant(String name, String cat, Scope scope, String args) {
         Event e = Event.create(name, cat, Phase.i, pid, Thread.currentThread().getId(), scope,
args);
         traceLog.log(TRACE_LOG_LEVEL, e.toJson());

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2088
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Icd8ba8194a00019179c3547fac060fc68edb97f0
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi <bamousaa@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <tillw@apache.org>
Gerrit-Reviewer: abdullah alamoudi <bamousaa@gmail.com>

Mime
View raw message