Skip to content

Commit d0444c9

Browse files
ndimidukeab148Evie Boland
authored
HBASE-28837 Introduce row statistics coprocessor example (#6327)
Signed-off-by: Nick Dimiduk <ndimiduk@apache.org> Co-authored-by: eab148 <54775485+eab148@users.noreply.github.com> Co-authored-by: Evie Boland <eboland@hubspot.com>
1 parent 9932b00 commit d0444c9

21 files changed

Lines changed: 1903 additions & 10 deletions

hbase-examples/pom.xml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@
3030
<name>Apache HBase - Examples</name>
3131
<description>Examples of HBase usage</description>
3232
<dependencies>
33-
<dependency>
34-
<groupId>org.apache.hbase.thirdparty</groupId>
35-
<artifactId>hbase-shaded-miscellaneous</artifactId>
36-
</dependency>
3733
<dependency>
3834
<groupId>org.apache.hbase.thirdparty</groupId>
3935
<artifactId>hbase-shaded-netty</artifactId>
@@ -46,6 +42,27 @@
4642
<groupId>org.apache.hbase</groupId>
4743
<artifactId>hbase-protocol</artifactId>
4844
</dependency>
45+
<dependency>
46+
<groupId>org.apache.hbase.thirdparty</groupId>
47+
<artifactId>hbase-shaded-miscellaneous</artifactId>
48+
</dependency>
49+
<dependency>
50+
<groupId>com.lmax</groupId>
51+
<artifactId>disruptor</artifactId>
52+
</dependency>
53+
<dependency>
54+
<groupId>org.apache.logging.log4j</groupId>
55+
<artifactId>log4j-1.2-api</artifactId>
56+
<scope>test</scope>
57+
</dependency>
58+
<dependency>
59+
<groupId>org.slf4j</groupId>
60+
<artifactId>slf4j-api</artifactId>
61+
</dependency>
62+
<dependency>
63+
<groupId>org.apache.commons</groupId>
64+
<artifactId>commons-lang3</artifactId>
65+
</dependency>
4966
<dependency>
5067
<groupId>org.apache.hbase</groupId>
5168
<artifactId>hbase-logging</artifactId>
@@ -99,10 +116,6 @@
99116
<groupId>commons-io</groupId>
100117
<artifactId>commons-io</artifactId>
101118
</dependency>
102-
<dependency>
103-
<groupId>org.slf4j</groupId>
104-
<artifactId>slf4j-api</artifactId>
105-
</dependency>
106119
<dependency>
107120
<groupId>org.apache.zookeeper</groupId>
108121
<artifactId>zookeeper</artifactId>
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
package org.apache.hadoop.hbase.coprocessor.example.row.stats;
19+
20+
import java.util.Map;
21+
import org.apache.yetus.audience.InterfaceAudience;
22+
23+
@InterfaceAudience.Private
24+
public interface RowStatistics {
25+
String getTable();
26+
27+
String getRegion();
28+
29+
String getColumnFamily();
30+
31+
boolean isMajor();
32+
33+
long getLargestRowNumBytes();
34+
35+
int getLargestRowCellsCount();
36+
37+
long getLargestCellNumBytes();
38+
39+
int getCellsLargerThanOneBlockCount();
40+
41+
int getRowsLargerThanOneBlockCount();
42+
43+
int getCellsLargerThanMaxCacheSizeCount();
44+
45+
int getTotalDeletesCount();
46+
47+
int getTotalCellsCount();
48+
49+
int getTotalRowsCount();
50+
51+
long getTotalBytes();
52+
53+
String getLargestRowAsString();
54+
55+
String getLargestCellAsString();
56+
57+
Map<String, Long> getRowSizeBuckets();
58+
59+
Map<String, Long> getValueSizeBuckets();
60+
61+
String getJsonString();
62+
}

0 commit comments

Comments
 (0)