You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ozone.apache.org by xy...@apache.org on 2020/07/30 23:40:14 UTC
[hadoop-ozone] branch ozone-0.6.0 updated: HDDS-4047. OzoneManager
met NPE exception while getServiceList (#1277)
This is an automated email from the ASF dual-hosted git repository.
xyao pushed a commit to branch ozone-0.6.0
in repository https://gitbox.apache.org/repos/asf/hadoop-ozone.git
The following commit(s) were added to refs/heads/ozone-0.6.0 by this push:
new 7744948 HDDS-4047. OzoneManager met NPE exception while getServiceList (#1277)
7744948 is described below
commit 7744948ce432775ea3d9b170b4bea1acbceec85e
Author: maobaolong <30...@qq.com>
AuthorDate: Fri Jul 31 07:37:31 2020 +0800
HDDS-4047. OzoneManager met NPE exception while getServiceList (#1277)
(cherry picked from commit a95b0b8580ae2b3d093505efd85eeb31117467e2)
---
.../java/org/apache/hadoop/ozone/om/OzoneManager.java | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
index 102d447..5ddd7f7 100644
--- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
+++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
@@ -1132,8 +1132,7 @@ public final class OzoneManager extends ServiceRuntimeInfoImpl
metricsTimer.schedule(scheduleOMMetricsWriteTask, 0, period);
keyManager.start(configuration);
- omRpcServer.start();
- isOmRpcServerRunning = true;
+
try {
httpServer = new OzoneManagerHttpServer(configuration, this);
httpServer.start();
@@ -1141,6 +1140,9 @@ public final class OzoneManager extends ServiceRuntimeInfoImpl
// Allow OM to start as Http Server failure is not fatal.
LOG.error("OM HttpServer failed to start.", ex);
}
+ omRpcServer.start();
+ isOmRpcServerRunning = true;
+
registerMXBean();
startJVMPauseMonitor();
@@ -1185,8 +1187,6 @@ public final class OzoneManager extends ServiceRuntimeInfoImpl
}
omRpcServer = getRpcServer(configuration);
- omRpcServer.start();
- isOmRpcServerRunning = true;
try {
httpServer = new OzoneManagerHttpServer(configuration, this);
@@ -1195,6 +1195,10 @@ public final class OzoneManager extends ServiceRuntimeInfoImpl
// Allow OM to start as Http Server failure is not fatal.
LOG.error("OM HttpServer failed to start.", ex);
}
+
+ omRpcServer.start();
+ isOmRpcServerRunning = true;
+
registerMXBean();
startJVMPauseMonitor();
@@ -2487,13 +2491,15 @@ public final class OzoneManager extends ServiceRuntimeInfoImpl
.setType(ServicePort.Type.RPC)
.setValue(omRpcAddress.getPort())
.build());
- if (httpServer.getHttpAddress() != null) {
+ if (httpServer != null
+ && httpServer.getHttpAddress() != null) {
omServiceInfoBuilder.addServicePort(ServicePort.newBuilder()
.setType(ServicePort.Type.HTTP)
.setValue(httpServer.getHttpAddress().getPort())
.build());
}
- if (httpServer.getHttpsAddress() != null) {
+ if (httpServer != null
+ && httpServer.getHttpsAddress() != null) {
omServiceInfoBuilder.addServicePort(ServicePort.newBuilder()
.setType(ServicePort.Type.HTTPS)
.setValue(httpServer.getHttpsAddress().getPort())
---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-commits-help@hadoop.apache.org