@Override protected void chore() { if (!isConnected()) { return; } List<ServerName> sns = generateDeadServersListToSend(); if (sns.isEmpty()) { // Nothing to send. Done. return; } final long curTime = EnvironmentEdgeManager.currentTime(); if (lastMessageTime > curTime - messagePeriod) { // We already sent something less than 10 second ago. Done. return; } // Ok, we're going to send something then. lastMessageTime = curTime; // We're reusing an existing protobuf message, but we don't send everything. // This could be extended in the future, for example if we want to send stuff like the // hbase:meta server name. publisher.publish(ClusterMetricsBuilder.newBuilder() .setHBaseVersion(VersionInfo.getVersion()) .setClusterId(master.getMasterFileSystem().getClusterId().toString()) .setMasterName(master.getServerName()) .setDeadServerNames(sns) .build()); }
ClusterId clusterId = fileSystemManager.getClusterId(); status.setStatus("Publishing Cluster ID " + clusterId + " in ZooKeeper"); ZKClusterId.setClusterId(this.zooKeeper, fileSystemManager.getClusterId()); this.clusterId = clusterId.toString();
this.masterAddressSyncer.start(); ZKClusterId.setClusterId(clientZkWatcher, fileSystemManager.getClusterId());
public String getClusterId() { return fileSystemManager.getClusterId(); }
this.fileSystemManager.getClusterId(), this.serverManager.getOnlineServers(), this.serverManager.getDeadServers(),
master.getMasterFileSystem().getClusterId().toString(), null, sns,
fileSystemManager.getClusterId().toString() : null; Map<String, RegionState> regionsInTransition = assignmentManager != null ? assignmentManager.getRegionStates().getRegionsInTransition() : null;
ClusterId.setClusterId(this.zooKeeper, fileSystemManager.getClusterId()); if (!masterRecovery) { this.executorService = new ExecutorService(getServerName().toString());
ZKClusterId.setClusterId(this.zooKeeper, fileSystemManager.getClusterId()); this.serverManager = createServerManager(this, this);