Skip to content

Commit

Permalink
HBASE-28837 Introduce row statistics coprocessor example (#6327)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
3 people authored Dec 20, 2024
1 parent 9932b00 commit d0444c9
Show file tree
Hide file tree
Showing 21 changed files with 1,903 additions and 10 deletions.
29 changes: 21 additions & 8 deletions hbase-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@
<name>Apache HBase - Examples</name>
<description>Examples of HBase usage</description>
<dependencies>
<dependency>
<groupId>org.apache.hbase.thirdparty</groupId>
<artifactId>hbase-shaded-miscellaneous</artifactId>
</dependency>
<dependency>
<groupId>org.apache.hbase.thirdparty</groupId>
<artifactId>hbase-shaded-netty</artifactId>
Expand All @@ -46,6 +42,27 @@
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-protocol</artifactId>
</dependency>
<dependency>
<groupId>org.apache.hbase.thirdparty</groupId>
<artifactId>hbase-shaded-miscellaneous</artifactId>
</dependency>
<dependency>
<groupId>com.lmax</groupId>
<artifactId>disruptor</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-logging</artifactId>
Expand Down Expand Up @@ -99,10 +116,6 @@
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.hbase.coprocessor.example.row.stats;

import java.util.Map;
import org.apache.yetus.audience.InterfaceAudience;

@InterfaceAudience.Private
public interface RowStatistics {
String getTable();

String getRegion();

String getColumnFamily();

boolean isMajor();

long getLargestRowNumBytes();

int getLargestRowCellsCount();

long getLargestCellNumBytes();

int getCellsLargerThanOneBlockCount();

int getRowsLargerThanOneBlockCount();

int getCellsLargerThanMaxCacheSizeCount();

int getTotalDeletesCount();

int getTotalCellsCount();

int getTotalRowsCount();

long getTotalBytes();

String getLargestRowAsString();

String getLargestCellAsString();

Map<String, Long> getRowSizeBuckets();

Map<String, Long> getValueSizeBuckets();

String getJsonString();
}
Loading

0 comments on commit d0444c9

Please sign in to comment.