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


Java SubmitOptions类代码示例

本文整理汇总了Java中backtype.storm.generated.SubmitOptions的典型用法代码示例。如果您正苦于以下问题:Java SubmitOptions类的具体用法?Java SubmitOptions怎么用?Java SubmitOptions使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: submitTopologyWithOpts

import backtype.storm.generated.SubmitOptions; //导入依赖的package包/类
@Override
public void submitTopologyWithOpts(String topologyName, Map conf,
		StormTopology topology, SubmitOptions submitOpts){
	
	if (!Utils.isValidConf(conf))
		throw new RuntimeException("Topology conf is not json-serializable");
	JStormUtils.setLocalMode(true);
	
	try {
		if (submitOpts == null) {
			state.getNimbus().submitTopology(topologyName, null,
					Utils.to_json(conf), topology);
		}else {
			state.getNimbus().submitTopologyWithOpts(topologyName, null,
					Utils.to_json(conf), topology, submitOpts);
		}
		
	} catch (Exception e) {
		
		LOG.error("Failed to submit topology " + topologyName, e);
		throw new RuntimeException(e);
	} 
}
 
开发者ID:zhangjunfang,项目名称:jstorm-0.9.6.3-,代码行数:24,代码来源:LocalCluster.java

示例2: submitTopology

import backtype.storm.generated.SubmitOptions; //导入依赖的package包/类
public static void submitTopology(String name, Map stormConf,
		StormTopology topology, SubmitOptions opts, List<File> jarFiles)
		throws AlreadyAliveException, InvalidTopologyException {
	if (jarFiles == null) {
		jarFiles = new ArrayList<File>();
	}
	Map<String, String> jars = new HashMap<String, String>(jarFiles.size());
	List<String> names = new ArrayList<String>(jarFiles.size());
	
	for (File f : jarFiles) {
		if (!f.exists()) {
			LOG.info(f.getName() + " is not existed: "
					+ f.getAbsolutePath());
			continue;
		}
		jars.put(f.getName(), f.getAbsolutePath());
		names.add(f.getName());
	}
	LOG.info("Files: " + names + " will be loaded");
	stormConf.put(GenericOptionsParser.TOPOLOGY_LIB_PATH, jars);
	stormConf.put(GenericOptionsParser.TOPOLOGY_LIB_NAME, names);
	submitTopology(name, stormConf, topology, opts);
}
 
开发者ID:zhangjunfang,项目名称:jstorm-0.9.6.3-,代码行数:24,代码来源:StormSubmitter.java

示例3: submitTopologyWithOpts

import backtype.storm.generated.SubmitOptions; //导入依赖的package包/类
@Override
public void submitTopologyWithOpts(String topologyName, Map conf,
		StormTopology topology, SubmitOptions submitOpts){
	// TODO Auto-generated method stub
	if (!Utils.isValidConf(conf))
		throw new RuntimeException("Topology conf is not json-serializable");
	JStormUtils.setLocalMode(true);
	
	try {
		if (submitOpts == null) {
			state.getNimbus().submitTopology(topologyName, null,
					Utils.to_json(conf), topology);
		}else {
			state.getNimbus().submitTopologyWithOpts(topologyName, null,
					Utils.to_json(conf), topology, submitOpts);
		}
		
	} catch (Exception e) {
		// TODO Auto-generated catch block
		LOG.error("Failed to submit topology " + topologyName, e);
		throw new RuntimeException(e);
	} 
}
 
开发者ID:songtk,项目名称:learn_jstorm,代码行数:24,代码来源:LocalCluster.java

示例4: submitTopology

import backtype.storm.generated.SubmitOptions; //导入依赖的package包/类
public static void submitTopology(String name, Map stormConf,
		StormTopology topology, SubmitOptions opts, List<File> jarFiles)
		throws AlreadyAliveException, InvalidTopologyException {
	Map<String, String> jars = new HashMap<String, String>(jarFiles.size());
	List<String> names = new ArrayList<String>(jarFiles.size());
	if (jarFiles == null)
		jarFiles = new ArrayList<File>();
	for (File f : jarFiles) {
		if (!f.exists()) {
			LOG.info(f.getName() + " is not existed: "
					+ f.getAbsolutePath());
			continue;
		}
		jars.put(f.getName(), f.getAbsolutePath());
		names.add(f.getName());
	}
	LOG.info("Files: " + names + " will be loaded");
	stormConf.put(GenericOptionsParser.TOPOLOGY_LIB_PATH, jars);
	stormConf.put(GenericOptionsParser.TOPOLOGY_LIB_NAME, names);
	submitTopology(name, stormConf, topology, opts);
}
 
开发者ID:greeenSY,项目名称:Tstream,代码行数:22,代码来源:StormSubmitter.java

示例5: submitTopologyWithOpts

import backtype.storm.generated.SubmitOptions; //导入依赖的package包/类
@Override
public void submitTopologyWithOpts(String topologyName, Map conf,
		StormTopology topology, SubmitOptions submitOpts){
	// TODO Auto-generated method stub
	if (!Utils.isValidConf(conf))
		throw new RuntimeException("Topology conf is not json-serializable");
	try {
		if (submitOpts == null) {
			state.getNimbus().submitTopology(topologyName, null,
					Utils.to_json(conf), topology);
		}else {
			state.getNimbus().submitTopologyWithOpts(topologyName, null,
					Utils.to_json(conf), topology, submitOpts);
		}
		
	} catch (Exception e) {
		// TODO Auto-generated catch block
		LOG.error("Failed to submit topology " + topologyName, e);
		throw new RuntimeException(e);
	} 
}
 
开发者ID:greeenSY,项目名称:Tstream,代码行数:22,代码来源:LocalCluster.java

示例6: submitTopology

import backtype.storm.generated.SubmitOptions; //导入依赖的package包/类
@Override
public void submitTopology(String name, String uploadedJarLocation,
		String jsonConf, StormTopology topology)
		throws AlreadyAliveException, InvalidTopologyException,
		TopologyAssignException, TException {
	SubmitOptions options = new SubmitOptions(TopologyInitialStatus.ACTIVE);

	submitTopologyWithOpts(name, uploadedJarLocation, jsonConf, topology,
			options);
}
 
开发者ID:zhangjunfang,项目名称:jstorm-0.9.6.3-,代码行数:11,代码来源:ServiceHandler.java

示例7: submitTopologyWithOpts

import backtype.storm.generated.SubmitOptions; //导入依赖的package包/类
@Override
public void submitTopologyWithOpts(String topologyName, Map conf,
		StormTopology topology, SubmitOptions submitOpts)
		throws AlreadyAliveException, InvalidTopologyException {
	// TODO Auto-generated method stub

}
 
开发者ID:IntersysConsulting,项目名称:ingestive,代码行数:8,代码来源:MockedLocalCluster.java

示例8: submitTopologyWithOpts

import backtype.storm.generated.SubmitOptions; //导入依赖的package包/类
void submitTopologyWithOpts(String topologyName, Map conf,
StormTopology topology, SubmitOptions submitOpts)
throws AlreadyAliveException, InvalidTopologyException;
 
开发者ID:zhangjunfang,项目名称:jstorm-0.9.6.3-,代码行数:4,代码来源:ILocalCluster.java

示例9: submitTopologyWithOpts

import backtype.storm.generated.SubmitOptions; //导入依赖的package包/类
void submitTopologyWithOpts(String topologyName, Map conf, StormTopology topology, SubmitOptions submitOpts) throws AlreadyAliveException,
InvalidTopologyException;
 
开发者ID:kkllwww007,项目名称:jstrom,代码行数:3,代码来源:ILocalCluster.java

示例10: submitTopology

import backtype.storm.generated.SubmitOptions; //导入依赖的package包/类
@Override
public String submitTopology(String name, String uploadedJarLocation, String jsonConf, StormTopology topology)
        throws TException, TopologyAssignException {
    SubmitOptions options = new SubmitOptions(TopologyInitialStatus.ACTIVE);
    return submitTopologyWithOpts(name, uploadedJarLocation, jsonConf, topology, options);
}
 
开发者ID:alibaba,项目名称:jstorm,代码行数:7,代码来源:ServiceHandler.java

示例11: submitTopologyWithOpts

import backtype.storm.generated.SubmitOptions; //导入依赖的package包/类
void submitTopologyWithOpts(String topologyName, Map conf, StormTopology topology, SubmitOptions submitOpts)
throws AlreadyAliveException, InvalidTopologyException;
 
开发者ID:alibaba,项目名称:jstorm,代码行数:3,代码来源:ILocalCluster.java

示例12: submitTopologyWithProgressBar

import backtype.storm.generated.SubmitOptions; //导入依赖的package包/类
/**
 * Submits a topology to run on the cluster with a progress bar. A topology
 * runs forever or until explicitly killed.
 * 
 * 
 * @param name
 *            the name of the storm.
 * @param stormConf
 *            the topology-specific configuration. See {@link Config}.
 * @param topology
 *            the processing to execute.
 * @param opts
 *            to manipulate the starting of the topology
 * @throws AlreadyAliveException
 *             if a topology with this name is already running
 * @throws InvalidTopologyException
 *             if an invalid topology was submitted
 * @throws TopologyAssignException
 */

public static void submitTopologyWithProgressBar(String name,
		Map stormConf, StormTopology topology, SubmitOptions opts)
		throws AlreadyAliveException, InvalidTopologyException {

	/**
	 * remove progress bar in jstorm
	 */
	submitTopology(name, stormConf, topology, opts);
}
 
开发者ID:zhangjunfang,项目名称:jstorm-0.9.6.3-,代码行数:30,代码来源:StormSubmitter.java

示例13: submitTopologyWithOpts

import backtype.storm.generated.SubmitOptions; //导入依赖的package包/类
void submitTopologyWithOpts(String topologyName, Map conf, StormTopology topology, SubmitOptions submitOpts) throws AlreadyAliveException, InvalidTopologyException; 
开发者ID:metamx,项目名称:incubator-storm,代码行数:2,代码来源:ILocalCluster.java


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