/[Apache-SVN]
ViewVC logotype

Revision 1299019


Jump to revision: Previous Next
Author: mbautin
Date: Fri Mar 9 20:14:26 2012 UTC (12 years, 8 months ago)
Changed paths: 19
Log Message:
[jira] [HBASE-4542] Add filter info to slow query logging

Author: Zhiqiu Kong

Summary:
The original 89-fb diff is: https://reviews.facebook.net/D1263

Slow opertaion log does not provide enough information when a filter is
present. The followings are done to add the filter info:

1) Added toString() method for filters inheriting FilterBase, this
affect 22 filters and their subclasses. The info added includes the
filter's name and its members. For example, for TimestampsFilter, we'll
output its class name as well as the defined timestamps.

2) Added a field 'filter' in Get::toMap() and Scan::toMap() to enable
the logging of filter info.

Task ID: #750975

Blame Rev:

Test Plan:
1. Run and passed unit-tests to make sure it does not break things

2. Run kannan's script to trigger the slow operation logging, checked
for each filter to make sure the filter info was logged. To be more
detailed, the output log are as following (only 'filter' filed is put
here for ease of reading):

"filter":"TimestampsFilter (3/3): [2, 3, 5]"
"filter":"TimestampsFilter (5/6): [2, 3, 5, 7, 11]"
"filter":"ColumnPrefixFilter col2"
"filter":"ColumnRangeFilter [col2a, col2b]"
"filter":"ColumnCountGetFilter 8"
"filter":"ColumnPaginationFilter (4, 4)"
"filter":"InclusiveStopFilter row"
"filter":"PrefixFilter row"
"filter":"PageFilter 1"
"filter":"SkipFilter TimestampsFilter (1/1): [1000]"
"filter":"WhileMatchFilter TimestampsFilter (3/3): [2, 3, 5]"
"filter":"KeyOnlyFilter"
"filter":"FirstKeyOnlyFilter"
"filter":"MultipleColumnPrefixFilter (3/3): [a, b, c]"
"filter":"DependentColumnFilter (family, qualifier, true, LESS, value)"
"filter":"FamilyFilter (LESS, value)"
"filter":"QualifierFilter (LESS, value)"
"filter":"RowFilter (LESS, value)"
"filter":"ValueFilter (LESS, value)"
"filter":"KeyOnlyFilter"
"filter":"FirstKeyOnlyFilter"
"filter":"SingleColumnValueFilter (family, qualifier, EQUAL, value)"
"filter":"SingleColumnValueExcludeFilter (family, qualifier, EQUAL,
value)"
"filter":"FilterList AND (2/2): [KeyOnlyFilter, FirstKeyOnlyFilter]"
Please check ~zhiqiu/Codes/scripts/testFilter.rb for the testing script.

3. Added unit test cases to TestOperation to verify the filters'
toString() method works well.

Reviewed By: mbautin

Reviewers: Kannan, madhuvaidya, mbautin, JIRA

CC: Kannan, madhuvaidya, mbautin, zhiqiu, stack

Differential Revision: https://reviews.facebook.net/D1539

Changed paths

Path Details
Directoryhbase/trunk/src/main/java/org/apache/hadoop/hbase/client/Get.java modified , text changed
Directoryhbase/trunk/src/main/java/org/apache/hadoop/hbase/client/Scan.java modified , text changed
Directoryhbase/trunk/src/main/java/org/apache/hadoop/hbase/filter/ColumnCountGetFilter.java modified , text changed
Directoryhbase/trunk/src/main/java/org/apache/hadoop/hbase/filter/ColumnPaginationFilter.java modified , text changed
Directoryhbase/trunk/src/main/java/org/apache/hadoop/hbase/filter/ColumnPrefixFilter.java modified , text changed
Directoryhbase/trunk/src/main/java/org/apache/hadoop/hbase/filter/ColumnRangeFilter.java modified , text changed
Directoryhbase/trunk/src/main/java/org/apache/hadoop/hbase/filter/CompareFilter.java modified , text changed
Directoryhbase/trunk/src/main/java/org/apache/hadoop/hbase/filter/DependentColumnFilter.java modified , text changed
Directoryhbase/trunk/src/main/java/org/apache/hadoop/hbase/filter/FilterBase.java modified , text changed
Directoryhbase/trunk/src/main/java/org/apache/hadoop/hbase/filter/FilterList.java modified , text changed
Directoryhbase/trunk/src/main/java/org/apache/hadoop/hbase/filter/InclusiveStopFilter.java modified , text changed
Directoryhbase/trunk/src/main/java/org/apache/hadoop/hbase/filter/MultipleColumnPrefixFilter.java modified , text changed
Directoryhbase/trunk/src/main/java/org/apache/hadoop/hbase/filter/PageFilter.java modified , text changed
Directoryhbase/trunk/src/main/java/org/apache/hadoop/hbase/filter/PrefixFilter.java modified , text changed
Directoryhbase/trunk/src/main/java/org/apache/hadoop/hbase/filter/SingleColumnValueFilter.java modified , text changed
Directoryhbase/trunk/src/main/java/org/apache/hadoop/hbase/filter/SkipFilter.java modified , text changed
Directoryhbase/trunk/src/main/java/org/apache/hadoop/hbase/filter/TimestampsFilter.java modified , text changed
Directoryhbase/trunk/src/main/java/org/apache/hadoop/hbase/filter/WhileMatchFilter.java modified , text changed
Directoryhbase/trunk/src/test/java/org/apache/hadoop/hbase/client/TestOperation.java modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26