Skip to content

Commit

Permalink
HBASE-23653 Expose content of meta table in web ui (#1020)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
ndimiduk committed Jan 16, 2020
1 parent 04d789f commit 00fc467
Show file tree
Hide file tree
Showing 14 changed files with 1,680 additions and 27 deletions.
Expand Up @@ -18,7 +18,10 @@

package org.apache.hadoop.hbase;

import java.util.Arrays;
import java.util.Collection;
import java.util.Iterator;

import org.apache.hadoop.hbase.client.RegionInfo;
import org.apache.hadoop.hbase.client.RegionReplicaUtil;
import org.apache.hadoop.hbase.util.Bytes;
Expand All @@ -31,7 +34,7 @@
* (assuming small number of locations)
*/
@InterfaceAudience.Private
public class RegionLocations {
public class RegionLocations implements Iterable<HRegionLocation> {

private final int numNonNullElements;

Expand Down Expand Up @@ -361,6 +364,11 @@ public HRegionLocation getRegionLocation() {
return null;
}

@Override
public Iterator<HRegionLocation> iterator() {
return Arrays.asList(locations).iterator();
}

@Override
public String toString() {
StringBuilder builder = new StringBuilder("[");
Expand Down
Expand Up @@ -49,6 +49,7 @@
import org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos;

/**
* Convenience class for composing an instance of {@link TableDescriptor}.
* @since 2.0.0
*/
@InterfaceAudience.Public
Expand Down
5 changes: 5 additions & 0 deletions hbase-server/pom.xml
Expand Up @@ -442,6 +442,11 @@
<artifactId>hamcrest-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
Expand Down

0 comments on commit 00fc467

Please sign in to comment.