Initialize SecondaryNameNode.
12728
private void initialize(Configuration conf) throws IOException {
    // initiate Java VM metrics
    JvmMetrics.init("SecondaryNameNode", conf.get("session.id"));
    
    // Create connection to the namenode.
    shouldRun = true;
    nameNodeAddr = NameNode.getClientProtocolAddress(conf);

    this.conf = conf;
    this.namenode =
        (NamenodeProtocol) RPC.waitForProxy(NamenodeProtocol.class,
            NamenodeProtocol.versionID, nameNodeAddr, conf);
    this.namenode.register();

    // initialize checkpoint directories
    fsName = getInfoServer();
    checkpointDirs = getFileStorageDirs(NNStorageConfiguration
        .getCheckpointDirs(conf, "/tmp/hadoop/dfs/namesecondary"));
    checkpointEditsDirs = getFileStorageDirs(NNStorageConfiguration
        .getCheckpointEditsDirs(conf, "/tmp/hadoop/dfs/namesecondary")); 
    checkpointImage = new CheckpointStorage(conf);
    checkpointImage.recoverCreate(checkpointDirs, checkpointEditsDirs);

    // Initialize other scheduling parameters from the configuration
    checkpointPeriod = conf.getLong("fs.checkpoint.period", 3600);
    checkpointTxnCount = NNStorageConfiguration.getCheckpointTxnCount(conf);

    // initialize the webserver for uploading files.
    String infoAddr = 
      NetUtils.getServerAddress(conf, 
                                "dfs.secondary.info.bindAddress",
                                "dfs.secondary.info.port",
                                "dfs.secondary.http.address");
    InetSocketAddress infoSocAddr = NetUtils.createSocketAddr(infoAddr);
    String infoBindIpAddress = infoSocAddr.getAddress().getHostAddress();
    int tmpInfoPort = infoSocAddr.getPort();
    infoServer = new HttpServer("secondary", infoBindIpAddress, tmpInfoPort,
        tmpInfoPort == 0, conf);
    infoServer.setAttribute("name.system.image", checkpointImage);
    this.infoServer.setAttribute("name.conf", conf);
    infoServer.addInternalServlet("getimage", "/getimage", GetImageServlet.class);
    infoServer.start();

    // The web-server port can be ephemeral... ensure we have the correct info
    infoPort = infoServer.getPort();
    conf.set("dfs.secondary.http.address", infoBindIpAddress + ":" +infoPort); 
    LOG.info("Secondary Web-server up at: " + infoBindIpAddress + ":" +infoPort);
    LOG.warn("Checkpoint Period   :" + checkpointPeriod + " secs " +
             "(" + checkpointPeriod/60 + " min)");
    LOG.warn("Log Size Trigger    :" + checkpointTxnCount  + " transactions ");
  }
1270741
private NodeImpl doAddNode(NodeImpl parentNode, InternalQName name, InternalQName primaryTypeName,
      NodeDefinitionData nodeDef) throws ItemExistsException, RepositoryException, ConstraintViolationException,
      VersionException, LockException
   {
      validateChildNode(parentNode, name, primaryTypeName, nodeDef);

      // Initialize data
      InternalQName[] mixinTypeNames = new InternalQName[0];
      String identifier = IdGenerator.generate();

      int orderNum = parentNode.getNextChildOrderNum();
      int index = parentNode.getNextChildIndex(name, primaryTypeName, parentNode.nodeData(), nodeDef);

      QPath path = QPath.makeChildPath(parentNode.getInternalPath(), name, index);

      AccessControlList acl = parentNode.getACL();

      // create new nodedata, [PN] fix of use index as persisted version
      NodeData nodeData =
         new TransientNodeData(path, identifier, -1, primaryTypeName, mixinTypeNames, orderNum, parentNode
            .getInternalIdentifier(), acl);

      // Create new Node
      ItemState state = ItemState.createAddedState(nodeData, false);
      NodeImpl node = (NodeImpl)dataManager.update(state, true);

      NodeTypeDataManager ntmanager = session.getWorkspace().getNodeTypesHolder();
      ItemAutocreator itemAutocreator = new ItemAutocreator(ntmanager, valueFactory, dataManager, true);

      PlainChangesLog changes =
         itemAutocreator.makeAutoCreatedItems(node.nodeData(), primaryTypeName, dataManager, session.getUserID());
      for (ItemState autoCreatedState : changes.getAllStates())
      {
         dataManager.updateItemState(autoCreatedState);
      }

      session.getActionHandler().postAddNode(node);

      return node;
   }
962445
private void init() {
        if (placeholder == null) {
            IdentificationManager.getInstance().registerIdentification(this);
            Optional<Identification> identification = IdentificationManager.getInstance().getIdentification(this);
            if (!identification.isPresent()) {
                throw new IllegalStateException("Unable to obtain Identification");
            } else {
                placeholder = identification.get();
            }
        }
    }
1353467
private void initializeDependentKeys() {
        visit(new Visitor<NodeT>() {
            @Override
            public void visitNode(NodeT node) {
                if (node.dependencyKeys().isEmpty()) {
                    return;
                }

                String dependentKey = node.key();
                for (String dependencyKey : node.dependencyKeys()) {
                    nodeTable.get(dependencyKey)
                            .addDependent(dependentKey);
                }
            }

            @Override
            public  void visitEdge(String fromKey, String toKey, EdgeType edgeType) {
                if (edgeType == EdgeType.BACK) {
                    throw new IllegalStateException("Detected circular dependency: " + findPath(fromKey, toKey));
                }
            }
        });
    }
155993
protected void initJspConfig(XmlParser.Node node)
    {
        for (int i=0;i<node.size();i++)
        {
            Object o=node.get(i);
            if (o instanceof XmlParser.Node && "taglib".equals(((XmlParser.Node)o).getTag()))
                initTagLib((XmlParser.Node)o);
        }
    }
212314
function nodeDomainInitialized(reset) {
        initState()
            .done(function () {
                var inProgress = updateJsonHandler.get(updateProgressKey);
                if (inProgress && reset) {
                    setUpdateStateInJSON(updateProgressKey, !reset)
                        .always(checkUpdateStatus);
                 } else if (!inProgress) {
                    checkUpdateStatus();
                }
            });
    }
591223
def __initialize_node(self, attributes_flags=int(Qt.ItemIsSelectable | Qt.ItemIsEnabled)):
        

        self["traced"] = umbra.ui.nodes.GraphModelAttribute(name="traced",
                                                            value=foundations.trace.is_traced(self.__module),
                                                            flags=attributes_flags)
        self.update_node_attributes()
1273679
public void init(Node segref, String path, char predelim0, char predelim1, StringBuffer res, Document document,
                     HashMap<String, String> predefs, HashMap<String, String> valids) {
        super.init(segref, path, predelim0, predelim1, res, document, predefs, valids);
    }
270539
protected void initializeInitParams(Node initParamNode,
			Map<String, Object> initParameters) {

		String paramName = null;
		String paramValue = null;

		NodeList childNodes = initParamNode.getChildNodes();
		for (int j = 0; j < childNodes.getLength(); j++) {
			Node childNode = childNodes.item(j);
			String nodeName = childNode.getNodeName();
			if (nodeName.equals(PARAM_NAME_TAG_NAME)) {
				paramName = getTextValue(childNode);
			} else if (nodeName.equals(PARAM_VALUE_TAG_NAME)) {
				paramValue = getTextValue(childNode);
			}
		}

		initParameters.put(paramName, paramValue);
	}
1013872
def _init_name_core(self, name: str):
        """"""
        self.__regex = re.compile(rf'^{self._pattern}$')
        self.name = name
1309241
def visit_assignname(self, node, parent, node_name=None):
        """"""
        newnode = nodes.AssignName(
            node_name,
            getattr(node, "lineno", None),
            getattr(node, "col_offset", None),
            parent,
        )
        self._save_assignment(newnode)
        return newnode
832259
protected function initializeNodeTemplates()
    {
        $this->nodeType = $this->nodeTypeManager->getNodeType($this->nodeTypeName);
        $this->nodeTemplate = new NodeTemplate();
        $this->nodeTemplate->setNodeType($this->nodeType);
    }
1272049
private void initializePossibleAttributeNames() {
        final Set<String> possibleAttribNames = new LinkedHashSet<>();

        for (final Map<String, List<Object>> attributeMapForSomeUser : this.backingMap.values()) {
            final Set<String> keySet = attributeMapForSomeUser.keySet();
            possibleAttribNames.addAll(keySet);
        }

        this.possibleUserAttributeNames = Collections.unmodifiableSet(possibleAttribNames);
    }
1347669
protected void initZnode() {
    try {
      ZooKeeperUtil.createAndFailSilent(this, baseZnode);
      ZooKeeperUtil.createAndFailSilent(this, backupServersZnode);
    } catch (Exception e) {
      LOG.fatal("Error to create znode " + baseZnode + " and " + backupServersZnode
          + ", exit immediately", e);
      System.exit(0);
    }
  }
138894
protected function initializeCurrentUsername()
    {
        if (isset($this->currentUsername)) {
            return;
        }

        $currentUser = $this->userDomainService->getCurrentUser();
        if (!$currentUser instanceof User) {
            return;
        }

        $this->currentUsername = $this->userDomainService->getUsername($currentUser);
    }
1219991
def GLOBAL(self, node):
        """"""
        if isinstance(self.scope, FunctionScope):
            self.scope.globals.update(node.names)
5166
@Override
    public void init(Configuration conf) {
        String rootName = conf.get(ConfigConstants.CONF_DELIMITED_ROOT_NAME, 
                DEFAULT_ROOT_NAME);
        rootStart = '<' + rootName + '>';
        rootEnd = "</" + rootName + '>';
        
    }