本文整理汇总了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);
}
}
示例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);
}
示例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);
}
}
示例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);
}
示例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);
}
}
示例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);
}
示例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
}
示例8: submitTopologyWithOpts
import backtype.storm.generated.SubmitOptions; //导入依赖的package包/类
void submitTopologyWithOpts(String topologyName, Map conf,
StormTopology topology, SubmitOptions submitOpts)
throws AlreadyAliveException, InvalidTopologyException;
示例9: submitTopologyWithOpts
import backtype.storm.generated.SubmitOptions; //导入依赖的package包/类
void submitTopologyWithOpts(String topologyName, Map conf, StormTopology topology, SubmitOptions submitOpts) throws AlreadyAliveException,
InvalidTopologyException;
示例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);
}
示例11: submitTopologyWithOpts
import backtype.storm.generated.SubmitOptions; //导入依赖的package包/类
void submitTopologyWithOpts(String topologyName, Map conf, StormTopology topology, SubmitOptions submitOpts)
throws AlreadyAliveException, InvalidTopologyException;
示例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);
}
示例13: submitTopologyWithOpts
import backtype.storm.generated.SubmitOptions; //导入依赖的package包/类
void submitTopologyWithOpts(String topologyName, Map conf, StormTopology topology, SubmitOptions submitOpts) throws AlreadyAliveException, InvalidTopologyException;