DRILL-1117: Fix stats in partition sender
Project: http://git-wip-us.apache.org/repos/asf/incubator-drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-drill/commit/e29d2fc2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-drill/tree/e29d2fc2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-drill/diff/e29d2fc2
Branch: refs/heads/master
Commit: e29d2fc2477a7b91d92b197991328d091640e2ff
Parents: de00d6f
Author: Steven Phillips <sphillips@maprtech.com>
Authored: Mon Jul 7 23:39:49 2014 -0700
Committer: Steven Phillips <sphillips@maprtech.com>
Committed: Tue Jul 8 03:20:45 2014 -0700
----------------------------------------------------------------------
.../physical/impl/partitionsender/PartitionSenderRootExec.java | 3 ---
.../exec/physical/impl/partitionsender/PartitionerTemplate.java | 2 ++
2 files changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/e29d2fc2/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/partitionsender/PartitionSenderRootExec.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/partitionsender/PartitionSenderRootExec.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/partitionsender/PartitionSenderRootExec.java
index 1820cd5..659863f 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/partitionsender/PartitionSenderRootExec.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/partitionsender/PartitionSenderRootExec.java
@@ -132,7 +132,6 @@ public class PartitionSenderRootExec extends BaseRootExec {
return false;
case OK_NEW_SCHEMA:
- newSchema = true;
try {
// send all existing batches
if (partitioner != null) {
@@ -152,7 +151,6 @@ public class PartitionSenderRootExec extends BaseRootExec {
return false;
}
case OK:
- stats.batchReceived(0, incoming.getRecordCount(), newSchema);
try {
partitioner.partitionBatch(incoming);
} catch (IOException e) {
@@ -160,7 +158,6 @@ public class PartitionSenderRootExec extends BaseRootExec {
context.fail(e);
return false;
}
- updateStats(partitioner.getOutgoingBatches());
for (VectorWrapper<?> v : incoming) {
v.clear();
}
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/e29d2fc2/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/partitionsender/PartitionerTemplate.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/partitionsender/PartitionerTemplate.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/partitionsender/PartitionerTemplate.java
index 0fe3f15..fcbd954 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/partitionsender/PartitionerTemplate.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/partitionsender/PartitionerTemplate.java
@@ -316,6 +316,8 @@ public abstract class PartitionerTemplate implements Partitioner {
public void updateStats(FragmentWritableBatch writableBatch) {
stats.addLongStat(Metric.BYTES_SENT, writableBatch.getByteCount());
+ stats.addLongStat(Metric.BATCHES_SENT, 1);
+ stats.addLongStat(Metric.RECORDS_SENT, writableBatch.getHeader().getDef().getRecordCount());
}
public void initializeBatch() {
|