public static void main(String[] args) { System.out.println("Storm " + getVersion()); System.out.println("URL " + getUrl() + " -r " + getRevision()); System.out.println("Branch " + getBranch()); System.out.println("Compiled by " + getUser() + " on " + getDate()); System.out.println("From source with checksum " + getSrcChecksum()); } }
private PacemakerServer launchServer() { LOG.info("Starting pacemaker server for storm version '{}", VersionInfo.getVersion()); return new PacemakerServer(this, conf); }
protected String _getBuildVersion(){ return getVersion() + " from " + _getRevision() + " by " + _getUser() + " source checksum " + _getSrcChecksum(); }
/** * Add version information to the given topology. * * @param topology the topology being submitted (MIGHT BE MODIFIED) * @return topology */ public static StormTopology addVersions(StormTopology topology) { String stormVersion = VersionInfo.getVersion(); if (stormVersion != null && !"Unknown".equalsIgnoreCase(stormVersion) && !topology.is_set_storm_version()) { topology.set_storm_version(stormVersion); } String jdkVersion = System.getProperty("java.version"); if (jdkVersion != null && !topology.is_set_jdk_version()) { topology.set_jdk_version(jdkVersion); } return topology; }
public static void main(String[] args) { System.out.println("Storm " + getVersion()); System.out.println("URL " + getUrl() + " -r " + getRevision()); System.out.println("Branch " + getBranch()); System.out.println("Compiled by " + getUser() + " on " + getDate()); System.out.println("From source with checksum " + getSrcChecksum()); } }
result.put("stormVersion", VersionInfo.getVersion()); result.put("stormVersionInfo", MEMORIZED_FULL_VERSION.get()); result.put("supervisors", supervisorSummaries.size());
String topoVersionString = getStormVersionFor(_conf, _topologyId, _ops, stormRoot); if (topoVersionString == null) { topoVersionString = (String) _conf.getOrDefault(Config.SUPERVISOR_WORKER_DEFAULT_VERSION, VersionInfo.getVersion());
/** * start distribute supervisor. */ public void launchDaemon() { LOG.info("Starting supervisor for storm version '{}'.", VersionInfo.getVersion()); try { Map<String, Object> conf = getConf(); if (ConfigUtils.isLocalMode(conf)) { throw new IllegalArgumentException("Cannot start server in local mode!"); } launch(); metricsRegistry.registerGauge("supervisor:num-slots-used-gauge", () -> SupervisorUtils.supervisorWorkerIds(conf).size()); //This will only get updated once metricsRegistry.registerMeter("supervisor:num-launched").mark(); metricsRegistry.registerMeter("supervisor:num-shell-exceptions", ShellUtils.numShellExceptions); metricsRegistry.startMetricsReporters(conf); Utils.addShutdownHookWithForceKillIn1Sec(() -> { metricsRegistry.stopMetricsReporters(); this.close(); }); // blocking call under the hood, must invoke after launch cause some services must be initialized launchSupervisorThriftServer(conf); } catch (Exception e) { LOG.error("Failed to start supervisor\n", e); System.exit(1); } }
@Test public void checkVersionInfo() { Map<String, String> versions = new HashMap<>(); String key = VersionInfo.getVersion(); assertNotEquals("Unknown", key, "Looks like we don't know what version of storm we are"); versions.put(key, System.getProperty("java.class.path")); Map<String, Object> conf = new HashMap<>(); conf.put(Config.SUPERVISOR_WORKER_VERSION_CLASSPATH_MAP, versions); NavigableMap<String, IVersionInfo> alternativeVersions = Utils.getAlternativeVersionsMap(conf); assertEquals(1, alternativeVersions.size()); IVersionInfo found = alternativeVersions.get(key); assertNotNull(found); assertEquals(key, found.getVersion()); } }
topoVersionString = (String) conf.getOrDefault(Config.SUPERVISOR_WORKER_DEFAULT_VERSION, VersionInfo.getVersion());
this.active = true; this.upTime = Utils.makeUptimeComputer(); this.stormVersion = VersionInfo.getVersion(); this.sharedContext = sharedContext; this.heartbeatExecutor = Executors.newFixedThreadPool(1);
/** * Add version information to the given topology * @param topology the topology being submitted (MIGHT BE MODIFIED) * @return topology */ public static StormTopology addVersions(StormTopology topology) { String stormVersion = VersionInfo.getVersion(); LOG.warn("STORM-VERSION new {} old {}", stormVersion, topology.get_storm_version()); if (stormVersion != null && !"Unknown".equalsIgnoreCase(stormVersion) && !topology.is_set_storm_version()) { topology.set_storm_version(stormVersion); } String jdkVersion = System.getProperty("java.version"); if (jdkVersion != null && !topology.is_set_jdk_version()) { topology.set_jdk_version(jdkVersion); } return topology; } }
/** * start distribute supervisor */ public void launchDaemon() { LOG.info("Starting supervisor for storm version '{}'.", VersionInfo.getVersion()); try { Map<String, Object> conf = getConf(); if (ConfigUtils.isLocalMode(conf)) { throw new IllegalArgumentException("Cannot start server in local mode!"); } launch(); Utils.addShutdownHookWithForceKillIn1Sec(new Runnable(){ @Override public void run() { close(); } }); registerWorkerNumGauge("supervisor:num-slots-used-gauge", conf); StormMetricsRegistry.startMetricsReporters(conf); } catch (Exception e) { LOG.error("Failed to start supervisor\n", e); System.exit(1); } }
this.active = true; this.upTime = Utils.makeUptimeComputer(); this.stormVersion = VersionInfo.getVersion(); this.sharedContext = sharedContext;