Skip to content

Commit 00fc467

Browse files
authored
HBASE-23653 Expose content of meta table in web ui (#1020)
Adds a display of the content of 'hbase:meta' to the Master's table.jsp, when that table is selected. Supports basic pagination, filtering, &c. Signed-off-by: stack <stack@apache.org> Signed-off-by: Bharath Vissapragada <bharathv@apache.org>
1 parent 04d789f commit 00fc467

14 files changed

Lines changed: 1680 additions & 27 deletions

File tree

hbase-client/src/main/java/org/apache/hadoop/hbase/RegionLocations.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@
1818

1919
package org.apache.hadoop.hbase;
2020

21+
import java.util.Arrays;
2122
import java.util.Collection;
23+
import java.util.Iterator;
24+
2225
import org.apache.hadoop.hbase.client.RegionInfo;
2326
import org.apache.hadoop.hbase.client.RegionReplicaUtil;
2427
import org.apache.hadoop.hbase.util.Bytes;
@@ -31,7 +34,7 @@
3134
* (assuming small number of locations)
3235
*/
3336
@InterfaceAudience.Private
34-
public class RegionLocations {
37+
public class RegionLocations implements Iterable<HRegionLocation> {
3538

3639
private final int numNonNullElements;
3740

@@ -361,6 +364,11 @@ public HRegionLocation getRegionLocation() {
361364
return null;
362365
}
363366

367+
@Override
368+
public Iterator<HRegionLocation> iterator() {
369+
return Arrays.asList(locations).iterator();
370+
}
371+
364372
@Override
365373
public String toString() {
366374
StringBuilder builder = new StringBuilder("[");

hbase-client/src/main/java/org/apache/hadoop/hbase/client/TableDescriptorBuilder.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
import org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos;
5050

5151
/**
52+
* Convenience class for composing an instance of {@link TableDescriptor}.
5253
* @since 2.0.0
5354
*/
5455
@InterfaceAudience.Public

hbase-server/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,11 @@
442442
<artifactId>hamcrest-core</artifactId>
443443
<scope>test</scope>
444444
</dependency>
445+
<dependency>
446+
<groupId>org.hamcrest</groupId>
447+
<artifactId>hamcrest-library</artifactId>
448+
<scope>test</scope>
449+
</dependency>
445450
<dependency>
446451
<groupId>org.bouncycastle</groupId>
447452
<artifactId>bcprov-jdk15on</artifactId>

0 commit comments

Comments
 (0)