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


Java Constants类代码示例

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


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

示例1: initMocks

import org.apache.storm.Constants; //导入依赖的package包/类
private void initMocks(String topo_input_topic) {
    Fields switchSchema = new Fields(OFEMessageUtils.FIELD_SWITCH_ID, OFEMessageUtils.FIELD_STATE);
    when(topologyContext.getComponentId(0)).thenReturn(topo_input_topic);
    when(topologyContext.getComponentOutputFields(topo_input_topic,
            topo_input_topic)).thenReturn(switchSchema);

    Fields portSchema = new Fields(OFEMessageUtils.FIELD_SWITCH_ID,
            OFEMessageUtils.FIELD_PORT_ID, OFEMessageUtils.FIELD_STATE);
    when(topologyContext.getComponentId(1)).thenReturn(topo_input_topic);
    when(topologyContext.getComponentOutputFields(topo_input_topic,
            topo_input_topic)).thenReturn(portSchema);

    Fields tickSchema = new Fields();
    when(topologyContext.getComponentId(2)).thenReturn(Constants.SYSTEM_COMPONENT_ID);
    when(topologyContext.getComponentOutputFields(Constants.SYSTEM_COMPONENT_ID, Constants.SYSTEM_TICK_STREAM_ID))
            .thenReturn(tickSchema);

    Fields islSchema = new Fields(topo_input_topic);
    when(topologyContext.getComponentId(3)).thenReturn(topo_input_topic);
    when(topologyContext.getComponentOutputFields(topo_input_topic,
            topo_input_topic)).thenReturn(islSchema);

    when(topologyContext.getComponentId(4)).thenReturn(OFEventWFMTopology.SPOUT_ID_INPUT);
    when(topologyContext.getComponentOutputFields(
            OFEventWFMTopology.SPOUT_ID_INPUT, AbstractTopology.MESSAGE_FIELD))
            .thenReturn(AbstractTopology.fieldMessage);
}
 
开发者ID:telstra,项目名称:open-kilda,代码行数:28,代码来源:OFEventWfmTest.java

示例2: createTickTuple

import org.apache.storm.Constants; //导入依赖的package包/类
private Tuple createTickTuple() {
  final MkTupleParam tupleParam = new MkTupleParam();
  tupleParam.setComponent(Constants.SYSTEM_COMPONENT_ID);
  tupleParam.setStream(Constants.SYSTEM_TICK_STREAM_ID);
  final Tuple tickTuple = Testing.testTuple(Arrays.asList(), tupleParam);
  return tickTuple;
}
 
开发者ID:openstack,项目名称:monasca-thresh,代码行数:8,代码来源:MetricAggregationBoltTest.java

示例3: isTickTuple

import org.apache.storm.Constants; //导入依赖的package包/类
protected boolean isTickTuple(Tuple tuple) {
    return (tuple.getSourceComponent().equals(Constants.SYSTEM_COMPONENT_ID)
            && tuple.getSourceStreamId().equals(Constants.SYSTEM_TICK_STREAM_ID));
}
 
开发者ID:telstra,项目名称:open-kilda,代码行数:5,代码来源:AbstractTickRichBolt.java

示例4: isTickTuple

import org.apache.storm.Constants; //导入依赖的package包/类
protected static boolean isTickTuple(Tuple tuple) {
    return tuple.getSourceComponent().equals(Constants.SYSTEM_COMPONENT_ID)
        && tuple.getSourceStreamId().equals(Constants.SYSTEM_TICK_STREAM_ID);
}
 
开发者ID:Azure-Samples,项目名称:hdinsight-java-storm-eventhub,代码行数:5,代码来源:PowerBIBolt.java

示例5: isTickTuple

import org.apache.storm.Constants; //导入依赖的package包/类
protected static boolean isTickTuple(Tuple tuple)
{
  return tuple.getSourceComponent().equals(Constants.SYSTEM_COMPONENT_ID) && tuple.getSourceStreamId().equals(Constants.SYSTEM_TICK_STREAM_ID);
}
 
开发者ID:apache,项目名称:incubator-pirk,代码行数:5,代码来源:StormUtils.java

示例6: isTickTuple

import org.apache.storm.Constants; //导入依赖的package包/类
public static boolean isTickTuple(Tuple tuple) {
  return tuple.getSourceComponent().equals(Constants.SYSTEM_COMPONENT_ID) && tuple.getSourceStreamId().equals(
      Constants.SYSTEM_TICK_STREAM_ID);
}
 
开发者ID:MBtech,项目名称:stormbenchmark,代码行数:5,代码来源:TupleHelpers.java

示例7: isTickTuple

import org.apache.storm.Constants; //导入依赖的package包/类
public static boolean isTickTuple(Tuple tuple) {
   return tuple != null && tuple.getSourceComponent().equals(Constants.SYSTEM_COMPONENT_ID)
         && tuple.getSourceStreamId().equals(Constants.SYSTEM_TICK_STREAM_ID);
}
 
开发者ID:MBtech,项目名称:stormbenchmark,代码行数:5,代码来源:Utils.java

示例8: makeTickTuple

import org.apache.storm.Constants; //导入依赖的package包/类
public Tuple makeTickTuple() {
    MockTopologyContext context = new MockTopologyContext(new String[]{StreamlineEvent.STREAMLINE_EVENT}, Constants.SYSTEM_COMPONENT_ID );

    return new TupleImpl(context, new Values(1000), (int) Constants.SYSTEM_TASK_ID, Constants.SYSTEM_TICK_STREAM_ID);
}
 
开发者ID:hortonworks,项目名称:streamline,代码行数:6,代码来源:TestRealtimeJoinBolt.java

示例9: isTick

import org.apache.storm.Constants; //导入依赖的package包/类
public boolean isTick(Tuple tuple) {
  return tuple != null &&
          Constants.SYSTEM_COMPONENT_ID.equals(tuple.getSourceComponent()) &&
          Constants.SYSTEM_TICK_STREAM_ID.equals(tuple.getSourceStreamId());
}
 
开发者ID:apache,项目名称:metron,代码行数:6,代码来源:BatchHelper.java

示例10: mockTickTuple

import org.apache.storm.Constants; //导入依赖的package包/类
private static Tuple mockTickTuple() {
  return mockTuple(Constants.SYSTEM_COMPONENT_ID, Constants.SYSTEM_TICK_STREAM_ID);
}
 
开发者ID:apache,项目名称:metron,代码行数:4,代码来源:HBaseBoltTest.java

示例11: mockTickTuple

import org.apache.storm.Constants; //导入依赖的package包/类
public static Tuple mockTickTuple() {
  Tuple tuple = mock(Tuple.class);
  when(tuple.getSourceComponent()).thenReturn(Constants.SYSTEM_COMPONENT_ID);
  when(tuple.getSourceStreamId()).thenReturn(Constants.SYSTEM_TICK_STREAM_ID);
  return tuple;
}
 
开发者ID:apache,项目名称:metron,代码行数:7,代码来源:ProfileBuilderBoltTest.java

示例12: isTick

import org.apache.storm.Constants; //导入依赖的package包/类
public static boolean isTick(Tuple tuple) {
  return tuple != null
      && Constants.SYSTEM_COMPONENT_ID.equals(tuple.getSourceComponent())
      && Constants.SYSTEM_TICK_STREAM_ID.equals(tuple.getSourceStreamId());
}
 
开发者ID:twitter,项目名称:heron,代码行数:6,代码来源:TupleUtils.java

示例13: isTickTuple

import org.apache.storm.Constants; //导入依赖的package包/类
public static boolean isTickTuple(Tuple tuple) {
  return tuple.getSourceComponent().equals(Constants.SYSTEM_COMPONENT_ID)
      && tuple.getSourceStreamId().equals(Constants.SYSTEM_TICK_STREAM_ID);
}
 
开发者ID:openstack,项目名称:monasca-thresh,代码行数:5,代码来源:Tuples.java

示例14: isTickTuple

import org.apache.storm.Constants; //导入依赖的package包/类
public static boolean isTickTuple(Tuple tuple) {
    return tuple.getSourceComponent().equals(Constants.SYSTEM_COMPONENT_ID)
            && tuple.getSourceStreamId().equals(Constants.SYSTEM_TICK_STREAM_ID);
}
 
开发者ID:elastic,项目名称:elasticsearch-hadoop,代码行数:5,代码来源:TupleUtils.java


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