HBASE-22904 NPE occurs when RS send space quota usage report during HMaster init (#529)
* NPE occurs when RS send space quota usage report during HMaster init * Added the debug log Signed-off-by: Sakthi <sakthi@apache.org> Signed-off-by: stack <stack@apache.org>
This commit is contained in:
parent
7300108dfb
commit
5a1603f2ba
|
@ -2209,10 +2209,15 @@ public class MasterRpcServices extends RSRpcServices
|
||||||
return RegionSpaceUseReportResponse.newBuilder().build();
|
return RegionSpaceUseReportResponse.newBuilder().build();
|
||||||
}
|
}
|
||||||
MasterQuotaManager quotaManager = this.master.getMasterQuotaManager();
|
MasterQuotaManager quotaManager = this.master.getMasterQuotaManager();
|
||||||
final long now = EnvironmentEdgeManager.currentTime();
|
if (quotaManager != null) {
|
||||||
for (RegionSpaceUse report : request.getSpaceUseList()) {
|
final long now = EnvironmentEdgeManager.currentTime();
|
||||||
quotaManager.addRegionSize(ProtobufUtil.toRegionInfo(
|
for (RegionSpaceUse report : request.getSpaceUseList()) {
|
||||||
report.getRegionInfo()), report.getRegionSize(), now);
|
quotaManager.addRegionSize(ProtobufUtil.toRegionInfo(report.getRegionInfo()),
|
||||||
|
report.getRegionSize(), now);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
LOG.debug(
|
||||||
|
"Received region space usage report but HMaster is not ready to process it, skipping");
|
||||||
}
|
}
|
||||||
return RegionSpaceUseReportResponse.newBuilder().build();
|
return RegionSpaceUseReportResponse.newBuilder().build();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -2247,6 +2252,9 @@ public class MasterRpcServices extends RSRpcServices
|
||||||
.setSize(tableSize.getValue()).build());
|
.setSize(tableSize.getValue()).build());
|
||||||
}
|
}
|
||||||
return builder.build();
|
return builder.build();
|
||||||
|
} else {
|
||||||
|
LOG.debug(
|
||||||
|
"Received space quota region size report but HMaster is not ready to process it, skipping");
|
||||||
}
|
}
|
||||||
return builder.build();
|
return builder.build();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
Loading…
Reference in New Issue