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
ae107bdb96
commit
00581ac911
|
@ -2227,10 +2227,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) {
|
||||||
|
@ -2265,6 +2270,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