-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HBASE-26192 Master UI hbck should provide a JSON formatted output opt…
…ion (#5772) Signed-off-by: Andrew Purtell <apurtell@apache.org>
- Loading branch information
Showing
16 changed files
with
1,157 additions
and
0 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
hbase-client/src/main/java/org/apache/hadoop/hbase/HbckEmptyRegionInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* 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; | ||
|
||
import org.apache.yetus.audience.InterfaceAudience; | ||
|
||
/** | ||
* POJO to present Empty Region Info from Catalog Janitor Inconsistencies Report via REST API. These | ||
* inconsistencies are shown on hbck.jsp page on Active HMaster UI as part of Catalog Janitor | ||
* inconsistencies. | ||
*/ | ||
@InterfaceAudience.Public | ||
public class HbckEmptyRegionInfo { | ||
private final String regionInfo; | ||
|
||
public HbckEmptyRegionInfo(String emptyRegionInfo) { | ||
this.regionInfo = emptyRegionInfo; | ||
} | ||
|
||
public String getRegionInfo() { | ||
return regionInfo; | ||
} | ||
} |
51 changes: 51 additions & 0 deletions
51
hbase-client/src/main/java/org/apache/hadoop/hbase/HbckInconsistentRegions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
* 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; | ||
|
||
import java.util.List; | ||
import org.apache.yetus.audience.InterfaceAudience; | ||
|
||
/** | ||
* POJO to present HBCK Inconsistent Regions from HBCK Inconsistencies Report via REST API. These | ||
* inconsistencies are shown on hbck.jsp page on Active HMaster UI as part of HBCK inconsistencies. | ||
*/ | ||
@InterfaceAudience.Public | ||
public class HbckInconsistentRegions { | ||
private final String regionId; | ||
private final HbckServerName serverNameInMeta; | ||
private final List<HbckServerName> listOfServers; | ||
|
||
public HbckInconsistentRegions(String inconsistentRegionId, HbckServerName serverNameInMeta, | ||
List<HbckServerName> listOfServerName) { | ||
this.regionId = inconsistentRegionId; | ||
this.serverNameInMeta = serverNameInMeta; | ||
this.listOfServers = listOfServerName; | ||
} | ||
|
||
public String getRegionId() { | ||
return regionId; | ||
} | ||
|
||
public HbckServerName getServerNameInMeta() { | ||
return serverNameInMeta; | ||
} | ||
|
||
public List<HbckServerName> getListOfServers() { | ||
return listOfServers; | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
hbase-client/src/main/java/org/apache/hadoop/hbase/HbckOrphanRegionsOnFS.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* 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; | ||
|
||
import org.apache.yetus.audience.InterfaceAudience; | ||
|
||
/** | ||
* POJO to present Orphan Region on FS from HBCK Inconsistencies Report via REST API. These | ||
* inconsistencies are shown on hbck.jsp page on Active HMaster UI as part of HBCK Inconsistencies. | ||
*/ | ||
@InterfaceAudience.Public | ||
public class HbckOrphanRegionsOnFS { | ||
private final String regionId; | ||
private final String regionHdfsPath; | ||
|
||
public HbckOrphanRegionsOnFS(String regionId, String orphanRegionHdfsPath) { | ||
this.regionId = regionId; | ||
this.regionHdfsPath = orphanRegionHdfsPath; | ||
} | ||
|
||
public String getRegionId() { | ||
return regionId; | ||
} | ||
|
||
public String getRegionHdfsPath() { | ||
return regionHdfsPath; | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
hbase-client/src/main/java/org/apache/hadoop/hbase/HbckOrphanRegionsOnRS.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* 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; | ||
|
||
import org.apache.yetus.audience.InterfaceAudience; | ||
|
||
/** | ||
* POJO to present Orphan Region on RS from HBCK Inconsistencies Report via REST API. These | ||
* inconsistencies are shown on hbck.jsp page on Active HMaster UI as part of HBCK Inconsistencies. | ||
*/ | ||
@InterfaceAudience.Public | ||
public class HbckOrphanRegionsOnRS { | ||
private final String regionId; | ||
private final HbckServerName rsName; | ||
|
||
public HbckOrphanRegionsOnRS(String orphanRegionId, HbckServerName orphanRegionRsName) { | ||
this.regionId = orphanRegionId; | ||
this.rsName = orphanRegionRsName; | ||
} | ||
|
||
public String getRegionId() { | ||
return regionId; | ||
} | ||
|
||
public HbckServerName getRsName() { | ||
return rsName; | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
hbase-client/src/main/java/org/apache/hadoop/hbase/HbckOverlapRegions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* 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; | ||
|
||
import org.apache.yetus.audience.InterfaceAudience; | ||
|
||
/** | ||
* POJO to present Region Overlap from Catalog Janitor Inconsistencies Report via REST API. These | ||
* inconsistencies are shown on hbck.jsp page on Active HMaster UI as part of Catalog Janitor | ||
* inconsistencies. | ||
*/ | ||
@InterfaceAudience.Public | ||
public class HbckOverlapRegions { | ||
private final HbckRegionDetails region1Info; | ||
private final HbckRegionDetails region2Info; | ||
|
||
public HbckOverlapRegions(HbckRegionDetails region1Info, HbckRegionDetails region2Info) { | ||
this.region1Info = region1Info; | ||
this.region2Info = region2Info; | ||
} | ||
|
||
public HbckRegionDetails getRegion1Info() { | ||
return region1Info; | ||
} | ||
|
||
public HbckRegionDetails getRegion2Info() { | ||
return region2Info; | ||
} | ||
} |
54 changes: 54 additions & 0 deletions
54
hbase-client/src/main/java/org/apache/hadoop/hbase/HbckRegionDetails.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* | ||
* 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; | ||
|
||
import org.apache.yetus.audience.InterfaceAudience; | ||
|
||
/** | ||
* POJO class for HBCK RegionInfo in HBCK Inconsistencies report. | ||
*/ | ||
@InterfaceAudience.Public | ||
public class HbckRegionDetails { | ||
private final String regionId; | ||
private final String tableName; | ||
private final String startKey; | ||
private final String endKey; | ||
|
||
public HbckRegionDetails(String regionId, String tableName, String startKey, String endKey) { | ||
this.regionId = regionId; | ||
this.tableName = tableName; | ||
this.startKey = startKey; | ||
this.endKey = endKey; | ||
} | ||
|
||
public String getRegionId() { | ||
return regionId; | ||
} | ||
|
||
public String getTableName() { | ||
return tableName; | ||
} | ||
|
||
public String getStartKey() { | ||
return startKey; | ||
} | ||
|
||
public String getEndKey() { | ||
return endKey; | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
hbase-client/src/main/java/org/apache/hadoop/hbase/HbckRegionHoles.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* 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; | ||
|
||
import org.apache.yetus.audience.InterfaceAudience; | ||
|
||
/** | ||
* POJO to present Region Holes from Catalog Janitor Inconsistencies Report via REST API. These | ||
* inconsistencies are shown on hbck.jsp page on Active HMaster UI as part of Catalog Janitor | ||
* inconsistencies. | ||
*/ | ||
@InterfaceAudience.Public | ||
public class HbckRegionHoles { | ||
private final HbckRegionDetails region1Info; | ||
private final HbckRegionDetails region2Info; | ||
|
||
public HbckRegionHoles(HbckRegionDetails region1Info, HbckRegionDetails region2Info) { | ||
this.region1Info = region1Info; | ||
this.region2Info = region2Info; | ||
} | ||
|
||
public HbckRegionDetails getRegion1Info() { | ||
return region1Info; | ||
} | ||
|
||
public HbckRegionDetails getRegion2Info() { | ||
return region2Info; | ||
} | ||
} |
48 changes: 48 additions & 0 deletions
48
hbase-client/src/main/java/org/apache/hadoop/hbase/HbckServerName.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* | ||
* 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; | ||
|
||
import org.apache.yetus.audience.InterfaceAudience; | ||
|
||
/** | ||
* POJO class for ServerName in HBCK Inconsistencies report. | ||
*/ | ||
@InterfaceAudience.Public | ||
public class HbckServerName { | ||
private final String hostName; | ||
private final int hostPort; | ||
private final long startCode; | ||
|
||
public HbckServerName(String hostName, int hostPort, long startCode) { | ||
this.hostName = hostName; | ||
this.hostPort = hostPort; | ||
this.startCode = startCode; | ||
} | ||
|
||
public String getHostName() { | ||
return hostName; | ||
} | ||
|
||
public int getHostPort() { | ||
return hostPort; | ||
} | ||
|
||
public long getStartCode() { | ||
return startCode; | ||
} | ||
} |
Oops, something went wrong.