Package backtype.storm.grouping

Examples of backtype.storm.grouping.CustomStreamGrouping


    // secondRelationSize, parallelism,-1);

    final String firstEmitterIndex = String.valueOf(allCompNames.indexOf(emitter1.getName()));
    final String secondEmitterIndex = String.valueOf(allCompNames.indexOf(emitter2.getName()));

    CustomStreamGrouping mapping=null;
   
    mapping = new ThetaJoinStaticMapping(firstEmitterIndex,
        secondEmitterIndex, assignment, map);

    final ArrayList<StormEmitter> emittersList = new ArrayList<StormEmitter>();
View Full Code Here


      this.random = new Random();
      grouperType = GrouperType.none;
    } else if (GroupingConstants.custom_object.equals(fields)) {
      // �û��Զ������
      JavaObject jobj = thrift_grouping.get_custom_object();
      CustomStreamGrouping g = Thrift.instantiateJavaObject(jobj);
      custom_grouper = new MkCustomGrouper(g, out_fields, num_tasks);
      grouperType = GrouperType.custom_obj;
    } else if (GroupingConstants.custom_serialized.equals(fields)) {
      // �û��Զ�������л�����ķ���
      byte[] obj = thrift_grouping.get_custom_serialized();
      CustomStreamGrouping g = (CustomStreamGrouping) Utils
          .deserialize(obj);
      custom_grouper = new MkCustomGrouper(g, out_fields, num_tasks);
      grouperType = GrouperType.custom_serialized;
    } else if (GroupingConstants.direct.equals(fields)) {
      // ֱ�ӷ���-spout��bolt��ֱ��ָ����Ŀ��
View Full Code Here

    }
   
    private static boolean isIdentityPartition(PartitionNode n) {
        Grouping g = n.thriftGrouping;
        if(g.is_set_custom_serialized()) {
            CustomStreamGrouping csg = (CustomStreamGrouping) Utils.deserialize(g.get_custom_serialized());
            return csg instanceof IdentityGrouping;
        }
        return false;
    }
View Full Code Here

      this.random = new Random();
      grouperType = GrouperType.none;
    } else if (Grouping._Fields.CUSTOM_OBJECT.equals(fields)) {
      // user custom grouping by JavaObject
      JavaObject jobj = thrift_grouping.get_custom_object();
      CustomStreamGrouping g = Thrift.instantiateJavaObject(jobj);
      int myTaskId = topology_context.getThisTaskId();
      String componentId = topology_context.getComponentId(myTaskId);
      GlobalStreamId stream = new GlobalStreamId(componentId, streamId);
      custom_grouper = new MkCustomGrouper(topology_context, g, stream,
          out_tasks, myTaskId);
      grouperType = GrouperType.custom_obj;
    } else if (Grouping._Fields.CUSTOM_SERIALIZED.equals(fields)) {
      // user custom group by serialized Object
      byte[] obj = thrift_grouping.get_custom_serialized();
      CustomStreamGrouping g = (CustomStreamGrouping) Utils
          .deserialize(obj);
      int myTaskId = topology_context.getThisTaskId();
      String componentId = topology_context.getComponentId(myTaskId);
      GlobalStreamId stream = new GlobalStreamId(componentId, streamId);
      custom_grouper = new MkCustomGrouper(topology_context, g, stream,
View Full Code Here

    }
   
    private static boolean isIdentityPartition(PartitionNode n) {
        Grouping g = n.thriftGrouping;
        if(g.is_set_custom_serialized()) {
            CustomStreamGrouping csg = (CustomStreamGrouping) Utils.deserialize(g.get_custom_serialized());
            return csg instanceof IdentityGrouping;
        }
        return false;
    }
View Full Code Here

TOP

Related Classes of backtype.storm.grouping.CustomStreamGrouping

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.