当前位置: 首页>>代码示例>>Java>>正文


Java INimbus.prepare方法代码示例

本文整理汇总了Java中backtype.storm.scheduler.INimbus.prepare方法的典型用法代码示例。如果您正苦于以下问题:Java INimbus.prepare方法的具体用法?Java INimbus.prepare怎么用?Java INimbus.prepare使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在backtype.storm.scheduler.INimbus的用法示例。


在下文中一共展示了INimbus.prepare方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: launchServer

import backtype.storm.scheduler.INimbus; //导入方法依赖的package包/类
@SuppressWarnings("rawtypes")
private void launchServer(final Map conf, INimbus inimbus) {
    LOG.info("Begin to start nimbus with conf " + conf);

    try {
        // 1. check whether mode is distributed or not
        StormConfig.validate_distributed_mode(conf);

        createPid(conf);

        initShutdownHook();

        inimbus.prepare(conf, StormConfig.masterInimbus(conf));

        data = createNimbusData(conf, inimbus);

        initFollowerThread(conf);

        int port = ConfigExtension.getNimbusDeamonHttpserverPort(conf);
        hs = new Httpserver(port, conf);
        hs.start();

        initContainerHBThread(conf);

        while (!data.isLeader())
            Utils.sleep(5000);

        init(conf);
    } catch (Throwable e) {
        LOG.error("Fail to run nimbus ", e);
    } finally {
        cleanup();
    }

    LOG.info("Quit nimbus");
}
 
开发者ID:kkllwww007,项目名称:jstrom,代码行数:37,代码来源:NimbusServer.java

示例2: launchServer

import backtype.storm.scheduler.INimbus; //导入方法依赖的package包/类
@SuppressWarnings("rawtypes")
private void launchServer(final Map conf, INimbus inimbus) {
    LOG.info("Begin to start nimbus with conf " + conf);

    try {
        // 1. check whether mode is distributed or not
        StormConfig.validate_distributed_mode(conf);

        createPid(conf);

        initShutdownHook();

        inimbus.prepare(conf, StormConfig.masterInimbus(conf));

        data = createNimbusData(conf, inimbus);

        initFollowerThread(conf);

        int port = ConfigExtension.getNimbusDeamonHttpserverPort(conf);
        hs = new Httpserver(port, conf);
        hs.start();

        initContainerHBThread(conf);

        serviceHandler = new ServiceHandler(data);
        initThrift(conf);
    } catch (Throwable e) {
        if (e instanceof OutOfMemoryError) {
            LOG.error("Halting due to out of memory error...");
        }
        LOG.error("Fail to run nimbus ", e);
    } finally {
        cleanup();
    }

    LOG.info("Quit nimbus");
}
 
开发者ID:alibaba,项目名称:jstorm,代码行数:38,代码来源:NimbusServer.java

示例3: launcherLocalServer

import backtype.storm.scheduler.INimbus; //导入方法依赖的package包/类
public ServiceHandler launcherLocalServer(final Map conf, INimbus inimbus) throws Exception {
    LOG.info("Begin to start nimbus on local model");
    StormConfig.validate_local_mode(conf);
    inimbus.prepare(conf, StormConfig.masterInimbus(conf));
    data = createNimbusData(conf, inimbus);
    init(conf);
    serviceHandler = new ServiceHandler(data);
    return serviceHandler;
}
 
开发者ID:alibaba,项目名称:jstorm,代码行数:10,代码来源:NimbusServer.java

示例4: launchServer

import backtype.storm.scheduler.INimbus; //导入方法依赖的package包/类
@SuppressWarnings("rawtypes")
private void launchServer(final Map conf, INimbus inimbus) {
    LOG.info("Begin to start nimbus with conf " + conf);

    try {
        // 1. check whether mode is distributed or not
        /**
         * 判断启动模式是分布式还是本地
         * 判断依据为配置项storm.cluster.mode
         * local : 本地
         * distributed : 分布式
         */
        StormConfig.validate_distributed_mode(conf);

        createPid(conf);

        initShutdownHook();

        /**
         * 尚未开发?
         */
        inimbus.prepare(conf, StormConfig.masterInimbus(conf));

        data = createNimbusData(conf, inimbus);

        initFollowerThread(conf);

        /**
         * 在7621端口启动httpServer
         */
        int port = ConfigExtension.getNimbusDeamonHttpserverPort(conf);
        hs = new Httpserver(port, conf);
        hs.start();

        initContainerHBThread(conf);

        while (!data.isLeader())
            Utils.sleep(5000);

        initUploadMetricThread(data);

        init(conf);
    } catch (Throwable e) {
        LOG.error("Fail to run nimbus ", e);
    } finally {
        cleanup();
    }

    LOG.info("Quit nimbus");
}
 
开发者ID:songtk,项目名称:learn_jstorm,代码行数:51,代码来源:NimbusServer.java

示例5: launchServer

import backtype.storm.scheduler.INimbus; //导入方法依赖的package包/类
private void launchServer(final Map conf, INimbus inimbus) {
	LOG.info("Begin to start nimbus with conf " + conf);

	try {
		// 1. check whether mode is distributed or not
		StormConfig.validate_distributed_mode(conf);

		createPid(conf);

		initShutdownHook();

		inimbus.prepare(conf, StormConfig.masterInimbus(conf));

		data = createNimbusData(conf, inimbus);

		initFollowerThread(conf);

		int port = ConfigExtension.getNimbusDeamonHttpserverPort(conf);
		hs = new Httpserver(port, conf);
		hs.start();

		initContainerHBThread(conf);
	
		while (!data.isLeader())
			Utils.sleep(5000);
		
		
		initUploadMetricThread(data);

		init(conf);
	} catch (Throwable e) {
		LOG.error("Fail to run nimbus ", e);
	} finally {
		cleanup();
	}

	LOG.info("Quit nimbus");
}
 
开发者ID:zhangjunfang,项目名称:jstorm-0.9.6.3-,代码行数:39,代码来源:NimbusServer.java

示例6: launcherLocalServer

import backtype.storm.scheduler.INimbus; //导入方法依赖的package包/类
public ServiceHandler launcherLocalServer(final Map conf, INimbus inimbus)
		throws Exception {
	LOG.info("Begin to start nimbus on local model");

	StormConfig.validate_local_mode(conf);

	inimbus.prepare(conf, StormConfig.masterInimbus(conf));

	data = createNimbusData(conf, inimbus);

	init(conf);

	return serviceHandler;
}
 
开发者ID:zhangjunfang,项目名称:jstorm-0.9.6.3-,代码行数:15,代码来源:NimbusServer.java

示例7: launcherLocalServer

import backtype.storm.scheduler.INimbus; //导入方法依赖的package包/类
public ServiceHandler launcherLocalServer(final Map conf, INimbus inimbus) throws Exception {
    LOG.info("Begin to start nimbus on local model");

    StormConfig.validate_local_mode(conf);

    inimbus.prepare(conf, StormConfig.masterInimbus(conf));

    data = createNimbusData(conf, inimbus);

    init(conf);

    return serviceHandler;
}
 
开发者ID:songtk,项目名称:learn_jstorm,代码行数:14,代码来源:NimbusServer.java

示例8: launchServer

import backtype.storm.scheduler.INimbus; //导入方法依赖的package包/类
@SuppressWarnings("rawtypes")
private void launchServer(final Map conf, INimbus inimbus) {
	LOG.info("Begin to start nimbus with conf " + conf);

	try {
		// 1. check whether mode is distributed or not
		StormConfig.validate_distributed_mode(conf);

		createPid(conf);

		initShutdownHook();

		inimbus.prepare(conf, StormConfig.masterInimbus(conf));

		data = createNimbusData(conf, inimbus);

		initFollowerThread(conf);

		int port = ConfigExtension.getNimbusDeamonHttpserverPort(conf);
		hs = new Httpserver(port, conf);
		hs.start();

		initContainerHBThread(conf);
	
		while (!data.isLeader())
			Utils.sleep(5000);
		
		
		initUploadMetricThread(data);

		init(conf);
	} catch (Throwable e) {
		LOG.error("Fail to run nimbus ", e);
	} finally {
		cleanup();
	}

	LOG.info("Quit nimbus");
}
 
开发者ID:greeenSY,项目名称:Tstream,代码行数:40,代码来源:NimbusServer.java


注:本文中的backtype.storm.scheduler.INimbus.prepare方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。