Skip to content

Commit 2990a0f

Browse files
eab148Evie Boland
andauthored
HBASE-28837 Introduce row statistics coprocessor example (apache#6327)
Co-authored-by: Evie Boland <eboland@hubspot.com> Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
1 parent ac22a22 commit 2990a0f

21 files changed

+1905
-10
lines changed

hbase-examples/pom.xml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@
3737
<internal.protobuf.version>4.28.2</internal.protobuf.version>
3838
</properties>
3939
<dependencies>
40-
<dependency>
41-
<groupId>org.apache.hbase.thirdparty</groupId>
42-
<artifactId>hbase-shaded-miscellaneous</artifactId>
43-
</dependency>
4440
<dependency>
4541
<groupId>org.apache.hbase.thirdparty</groupId>
4642
<artifactId>hbase-shaded-netty</artifactId>
@@ -49,6 +45,27 @@
4945
<groupId>org.apache.hbase</groupId>
5046
<artifactId>hbase-protocol-shaded</artifactId>
5147
</dependency>
48+
<dependency>
49+
<groupId>org.apache.hbase.thirdparty</groupId>
50+
<artifactId>hbase-shaded-miscellaneous</artifactId>
51+
</dependency>
52+
<dependency>
53+
<groupId>com.lmax</groupId>
54+
<artifactId>disruptor</artifactId>
55+
</dependency>
56+
<dependency>
57+
<groupId>org.apache.logging.log4j</groupId>
58+
<artifactId>log4j-1.2-api</artifactId>
59+
<scope>test</scope>
60+
</dependency>
61+
<dependency>
62+
<groupId>org.slf4j</groupId>
63+
<artifactId>slf4j-api</artifactId>
64+
</dependency>
65+
<dependency>
66+
<groupId>org.apache.commons</groupId>
67+
<artifactId>commons-lang3</artifactId>
68+
</dependency>
5269
<dependency>
5370
<groupId>org.apache.hbase</groupId>
5471
<artifactId>hbase-logging</artifactId>
@@ -106,10 +123,6 @@
106123
<groupId>commons-io</groupId>
107124
<artifactId>commons-io</artifactId>
108125
</dependency>
109-
<dependency>
110-
<groupId>org.slf4j</groupId>
111-
<artifactId>slf4j-api</artifactId>
112-
</dependency>
113126
<dependency>
114127
<groupId>org.apache.zookeeper</groupId>
115128
<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)