private void preRegistrationInitialization() {
    final Span span = TraceUtil.createSpan("HRegionServer.preRegistrationInitialization");
    try (Scope ignored = span.makeCurrent()) {
      initializeZooKeeper();
      setupClusterConnection();
      bootstrapNodeManager = new BootstrapNodeManager(asyncClusterConnection, masterAddressTracker);
      regionReplicationBufferManager = new RegionReplicationBufferManager(this);
      // Setup RPC client for master communication
      this.rpcClient = asyncClusterConnection.getRpcClient();
      span.setStatus(StatusCode.OK);
    } catch (Throwable t) {
      // Call stop if error or process will stick around for ever since server
      // puts up non-daemon threads.
      TraceUtil.setError(span, t);
      this.rpcServices.stop();
      abort("Initialization of RS failed.  Hence aborting RS.", t);
    } finally {
      span.end();
    }
  }
All initialization needed before we go register with Master.<br>
Do bare minimum. Do bulk of initializations AFTER we've connected to the Master.<br>
In here we just put up the RpcServer, setup Connection, and ZooKeeper.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java