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


Java Scheme类代码示例

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


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

示例1: FileSpout

import backtype.storm.spout.Scheme; //导入依赖的package包/类
public FileSpout(String dir, String filter, Scheme scheme) {
    Path pdir = Paths.get(dir);
    List<String> f = new LinkedList<String>();
    try (DirectoryStream<Path> stream = Files.newDirectoryStream(pdir,
            filter)) {
        for (Path entry : stream) {
            String inputFile = entry.toAbsolutePath().toString();
            f.add(inputFile);
            LOG.info("Input : {}", inputFile);
        }
    } catch (IOException ioe) {
        LOG.error("IOException: %s%n", ioe);
    }
    _inputFiles = f.toArray(new String[f.size()]);
    _scheme = scheme;
}
 
开发者ID:zaizi,项目名称:alfresco-apache-storm-demo,代码行数:17,代码来源:FileSpout.java

示例2: getSchemeFromClassName

import backtype.storm.spout.Scheme; //导入依赖的package包/类
private static Scheme getSchemeFromClassName(String spoutSchemeCls) throws Exception {
    return (Scheme)Class.forName(spoutSchemeCls).getConstructor().newInstance();
}
 
开发者ID:sakserv,项目名称:storm-kafka-hdfs-example,代码行数:4,代码来源:KafkaSpoutConfigBuilder.java

示例3: BasicSchemeSpout

import backtype.storm.spout.Scheme; //导入依赖的package包/类
public BasicSchemeSpout(final Scheme scheme) {

        Validate.notNull(scheme, "Scheme is required");
        this.scheme = scheme;
    }
 
开发者ID:YinYanfei,项目名称:CadalWorkspace,代码行数:6,代码来源:BasicSchemeSpout.java

示例4: KafkaSpout

import backtype.storm.spout.Scheme; //导入依赖的package包/类
/**
 * Default constructor. Actual Kafka consumers are be created and started on {@link #open()}.
 * 
 * @param kafkaProperties
 *        Properties to be used when constructing the Kafka {@link ConsumerConnector}.
 * @param topic
 *        The Kafka topic to consumer from.
 * @param scheme
 *        A {@link Scheme} that will be responsible for deserializing messages coming from Kafka. Whatever objects
 *        this produces needs to be natively understood by Storm or needs to be <a
 *        href="https://github.com/nathanmarz/storm/wiki/Serialization">registered with Storm</a> as a serializable
 *        type. Your best bet however is to stick to "native" types and use the internal tuple structure.
 */
public KafkaSpout(final Properties kafkaProperties, final String topic, final Scheme scheme) {
    super(scheme);

    this.kafkaProperties = kafkaProperties;
    this.topic = topic;
}
 
开发者ID:YinYanfei,项目名称:CadalWorkspace,代码行数:20,代码来源:KafkaSpout.java

示例5: getScheme

import backtype.storm.spout.Scheme; //导入依赖的package包/类
Scheme getScheme(); 
开发者ID:twitter,项目名称:heron,代码行数:2,代码来源:ISchemableSpout.java

示例6: setScheme

import backtype.storm.spout.Scheme; //导入依赖的package包/类
void setScheme(Scheme scheme); 
开发者ID:twitter,项目名称:heron,代码行数:2,代码来源:ISchemableSpout.java


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