Hello Kudu Jenkins, Andrew Wong,

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/17598

to look at the new patch set (#2).

Change subject: [tools] add --row_count_only and --report_scanner_stats flags
......................................................................

[tools] add --row_count_only and --report_scanner_stats flags

This patch updates `kudu table scan` and `kudu perf table_scan` CLI
tools to introduce two new flags:
  * --row_count_only
  * --report_scanner_stats

The motivation for this patch the necessity to:
  * have an explicit option to run something similar to
    SELECT COUNT(1) FROM <table_name> when using `kudu perf scan_table`
    and `kudu table scan` CLI tools
  * report on the scanner metrics while running a query like
    SELECT COUNT(1) FROM <table_name>

I also added a few generic test scenarios to cover the newly introduced
new functionality.

Another notable change in behavior is not polluting the output of the
table rows with scanner stats by default: only the summary is printed
in the very end unless --report_scanner_stats is specified (of course,
scanner stats have been enriched with this patch as well).

A few examples of the output from the updated CLI tools:

  kudu table scan 10.17.240.17:9876 \
      default.loadgen_auto_d61d513aeec4478d9c4638e434565dee \
      --row_count_only
  Total count 3000000 cost 0.16833 seconds

  kudu perf table_scan 10.17.240.17:9876 \
      default.loadgen_auto_d61d513aeec4478d9c4638e434565dee \
      --tablets=e1195e0e0e6842b3a9c19ef6de696440 \
      --row_count_only \
      --report_scanner_stats
  T e1195e0e0e6842b3a9c19ef6de696440 scanned 93753 rows in 0.050205518 seconds
                 NextBatch() calls               1
                        bytes_read               0
             cfile_cache_hit_bytes               0
            cfile_cache_miss_bytes               0
                  cpu_system_nanos         1000000
                    cpu_user_nanos        38994000
              queue_duration_nanos          131807
              total_duration_nanos        41545038
  Total count 93753 cost 0.051109 second

  kudu perf table_scan 10.17.240.17:9876 \
      default.loadgen_auto_d61d513aeec4478d9c4638e434565dee \
      --tablets=e1195e0e0e6842b3a9c19ef6de696440 \
      --columns=* \
      --report_scanner_stats
  T e1195e0e0e6842b3a9c19ef6de696440 scanned 93753 rows in 0.084285734 seconds
                 NextBatch() calls               6
                        bytes_read         3262005
             cfile_cache_hit_bytes               0
            cfile_cache_miss_bytes         3524539
                  cpu_system_nanos        21998000
                    cpu_user_nanos       164975000
              queue_duration_nanos          339230
              total_duration_nanos        51007394
  Total count 93753 cost 0.0854584 seconds

Change-Id: Ia64e1a0b26996f0087d2473d15350d590581a69c
---
M src/kudu/tools/kudu-tool-test.cc
M src/kudu/tools/table_scanner.cc
M src/kudu/tools/tool_action_common.cc
M src/kudu/tools/tool_action_perf.cc
M src/kudu/tools/tool_action_table.cc
5 files changed, 137 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/98/17598/2
--
To view, visit http://gerrit.cloudera.org:8080/17598
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ia64e1a0b26996f0087d2473d15350d590581a69c
Gerrit-Change-Number: 17598
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Serbin <aser...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)

Reply via email to