Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
scan-node.cc
Go to the documentation of this file.
1 // Copyright 2012 Cloudera Inc.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #include "exec/scan-node.h"
16 
17 #include <boost/bind.hpp>
18 
19 #include "common/names.h"
20 
21 namespace impala {
22 
23 // Changing these names have compatibility concerns.
24 const string ScanNode::BYTES_READ_COUNTER = "BytesRead";
25 const string ScanNode::ROWS_READ_COUNTER = "RowsRead";
26 const string ScanNode::TOTAL_HDFS_READ_TIMER = "TotalRawHdfsReadTime(*)";
27 const string ScanNode::TOTAL_HBASE_READ_TIMER = "TotalRawHBaseReadTime(*)";
28 const string ScanNode::TOTAL_THROUGHPUT_COUNTER = "TotalReadThroughput";
29 const string ScanNode::MATERIALIZE_TUPLE_TIMER = "MaterializeTupleTime(*)";
31  "PerReadThreadRawHdfsThroughput";
32 const string ScanNode::NUM_DISKS_ACCESSED_COUNTER = "NumDisksAccessed";
33 const string ScanNode::SCAN_RANGES_COMPLETE_COUNTER = "ScanRangesComplete";
34 const string ScanNode::SCANNER_THREAD_COUNTERS_PREFIX = "ScannerThreads";
36  "ScannerThreadsTotalWallClockTime";
38  "AverageScannerThreadConcurrency";
40  "AverageHdfsReadThreadConcurrency";
42  "NumScannerThreadsStarted";
43 
45  SCOPED_TIMER(runtime_profile_->total_time_counter());
47 
60  return Status::OK;
61 }
62 
63 }
static const std::string NUM_SCANNER_THREADS_STARTED
Definition: scan-node.h:134
virtual Status Prepare(RuntimeState *state)
Definition: scan-node.cc:44
static const std::string TOTAL_THROUGHPUT_COUNTER
Definition: scan-node.h:125
static const std::string AVERAGE_SCANNER_THREAD_CONCURRENCY
Definition: scan-node.h:132
boost::scoped_ptr< RuntimeProfile > runtime_profile_
Definition: exec-node.h:225
#define RETURN_IF_ERROR(stmt)
some generally useful macros
Definition: status.h:242
static const std::string NUM_DISKS_ACCESSED_COUNTER
Definition: scan-node.h:127
static const std::string MATERIALIZE_TUPLE_TIMER
Definition: scan-node.h:128
Counter * AddRateCounter(const std::string &name, Counter *src_counter)
static const std::string TOTAL_HBASE_READ_TIMER
Definition: scan-node.h:124
RuntimeProfile::Counter * bytes_read_counter_
Definition: scan-node.h:140
#define ADD_CHILD_TIMER(profile, name, parent)
#define SCOPED_TIMER(c)
static const std::string PER_READ_THREAD_THROUGHPUT_COUNTER
Definition: scan-node.h:126
RuntimeProfile::Counter * materialize_tuple_timer_
Definition: scan-node.h:151
static const std::string SCAN_RANGES_COMPLETE_COUNTER
Definition: scan-node.h:129
static const std::string SCANNER_THREAD_COUNTERS_PREFIX
Definition: scan-node.h:130
static const std::string AVERAGE_HDFS_READ_THREAD_CONCURRENCY
Definition: scan-node.h:133
RuntimeProfile::Counter * rows_read_counter_
rows/tuples read from the scanner (including those discarded by EvalConjucts())
Definition: scan-node.h:144
static const std::string ROWS_READ_COUNTER
Definition: scan-node.h:122
virtual Status Prepare(RuntimeState *state)
Definition: exec-node.cc:130
#define ADD_COUNTER(profile, name, unit)
RuntimeProfile::Counter * total_throughput_counter_
Wall based aggregate read throughput [bytes/sec].
Definition: scan-node.h:147
RuntimeProfile::ThreadCounters * scanner_thread_counters_
Aggregated scanner thread counters.
Definition: scan-node.h:154
static const Status OK
Definition: status.h:87
static const std::string TOTAL_HDFS_READ_TIMER
Definition: scan-node.h:123
#define ADD_TIME_SERIES_COUNTER(profile, name, src_counter)
RuntimeProfile::TimeSeriesCounter * bytes_read_timeseries_counter_
Time series of the bytes_read_counter_.
Definition: scan-node.h:142
static const std::string SCANNER_THREAD_TOTAL_WALLCLOCK_TIME
Definition: scan-node.h:131
#define ADD_THREAD_COUNTERS(profile, prefix)
static const std::string BYTES_READ_COUNTER
names of ScanNode common counters
Definition: scan-node.h:121
RuntimeProfile * runtime_profile()
Definition: exec-node.h:161