Skip to content

Commit a62c8f5

Browse files
committed
HBASE-23653 Expose content of meta table in web ui
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.
1 parent fd05aab commit a62c8f5

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
@@ -436,6 +436,11 @@
436436
<artifactId>hamcrest-core</artifactId>
437437
<scope>test</scope>
438438
</dependency>
439+
<dependency>
440+
<groupId>org.hamcrest</groupId>
441+
<artifactId>hamcrest-library</artifactId>
442+
<scope>test</scope>
443+
</dependency>
439444
<dependency>
440445
<groupId>org.bouncycastle</groupId>
441446
<artifactId>bcprov-jdk15on</artifactId>

0 commit comments

Comments
 (0)