Tabnine Logo
GlobalStreamId
Code IndexAdd Tabnine to your IDE (free)

How to use
GlobalStreamId
in
org.apache.storm.generated

Best Java code snippets using org.apache.storm.generated.GlobalStreamId (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew ArrayList()
  • Codota Iconnew LinkedList()
  • Smart code suggestions by Tabnine
}
origin: apache/storm

public static GlobalStreamId getGlobalStreamId(String streamId, String componentId) {
  if (componentId == null) {
    return new GlobalStreamId(streamId, DEFAULT_STREAM_ID);
  }
  return new GlobalStreamId(streamId, componentId);
}
origin: apache/storm

private String getStreamId(GlobalStreamId globalStreamId) {
  if (globalStreamId.get_componentId().startsWith("spout")) {
    return globalStreamId.get_componentId() + globalStreamId.get_streamId();
  }
  return globalStreamId.get_streamId();
}
origin: apache/storm

@Override
public boolean equals(java.lang.Object that) {
 if (that == null)
  return false;
 if (that instanceof GlobalStreamId)
  return this.equals((GlobalStreamId)that);
 return false;
}
origin: apache/storm

/**
 * Performs a deep copy on <i>other</i>.
 */
public GlobalStreamId(GlobalStreamId other) {
 if (other.is_set_componentId()) {
  this.componentId = other.componentId;
 }
 if (other.is_set_streamId()) {
  this.streamId = other.streamId;
 }
}
origin: apache/storm

public void validate() throws org.apache.storm.thrift.TException {
 // check for required fields
 if (!is_set_componentId()) {
  throw new org.apache.storm.thrift.protocol.TProtocolException("Required field 'componentId' is unset! Struct:" + toString());
 }
 if (!is_set_streamId()) {
  throw new org.apache.storm.thrift.protocol.TProtocolException("Required field 'streamId' is unset! Struct:" + toString());
 }
 // check for sub-struct validity
}
origin: apache/storm

@Test
public void testDeserialize_readingFromGzip() throws Exception {
  GlobalStreamId id = new GlobalStreamId("first", "second");
  byte[] serialized = new GzipThriftSerializationDelegate().serialize(id);
  GlobalStreamId id2 = testDelegate.deserialize(serialized, GlobalStreamId.class);
  assertEquals(id2.get_componentId(), id.get_componentId());
  assertEquals(id2.get_streamId(), id.get_streamId());
}
origin: apache/storm

Map<GlobalStreamId, String> fleshOutStreamBatchIds(boolean includeCommitStream) {
  Map<GlobalStreamId, String> ret = new HashMap<>(batchIds);
  Set<String> allBatches = new HashSet<>(batchIds.values());
  for (String b : allBatches) {
    ret.put(new GlobalStreamId(masterCoordinator(b), MasterBatchCoordinator.BATCH_STREAM_ID), b);
    if (includeCommitStream) {
      ret.put(new GlobalStreamId(masterCoordinator(b), MasterBatchCoordinator.COMMIT_STREAM_ID), b);
    }
    // DO NOT include the success stream as part of the batch. it should not trigger coordination tuples,
    // and is just a metadata tuple to assist in cleanup, should not trigger batch tracking
  }
  for (String id : spouts.keySet()) {
    TransactionalSpoutComponent c = spouts.get(id);
    if (c.batchGroupId != null) {
      ret.put(new GlobalStreamId(spoutCoordinator(id), MasterBatchCoordinator.BATCH_STREAM_ID), c.batchGroupId);
    }
  }
  //this takes care of setting up coord streams for spouts and bolts
  for (GlobalStreamId s : batchIds.keySet()) {
    String b = batchIds.get(s);
    ret.put(new GlobalStreamId(s.get_componentId(), TridentBoltExecutor.COORD_STREAM(b)), b);
  }
  return ret;
}
origin: apache/storm

  @Override
  public String getComponent() {
    return stream.get_componentId();
  }
});
origin: apache/storm

public OutputStream remap(String origId, Map<GlobalStreamId, GlobalStreamId> remappedStreams) {
  GlobalStreamId remapped = remappedStreams.get(new GlobalStreamId(origId, id));
  return new OutputStream(remapped.get_streamId(), rate, areKeysSkewed);
}
origin: apache/storm

  @Override
  public String getStream() {
    return stream.get_streamId();
  }
});
origin: apache/storm

for (int _i39 = 0; _i39 < _map36.size; ++_i39)
 _key37 = new GlobalStreamId();
 _key37.read(iprot);
 _val38 = new Grouping();
 _val38.read(iprot);
origin: apache/storm

@Override
public int hashCode() {
  int result = streamId != null ? streamId.hashCode() : 0;
  result = 31 * result + sourceTask;
  return result;
}
origin: apache/storm

@Test
public void testDeserialize_readingFromGzipBridge() throws Exception {
  GlobalStreamId id = new GlobalStreamId("first", "second");
  byte[] serialized = new GzipBridgeThriftSerializationDelegate().serialize(id);
  GlobalStreamId id2 = testDelegate.deserialize(serialized, GlobalStreamId.class);
  assertEquals(id2.get_componentId(), id.get_componentId());
  assertEquals(id2.get_streamId(), id.get_streamId());
}
origin: apache/storm

/**
 * For bolts that has incoming streams from spouts (the root bolts), add checkpoint stream from checkpoint spout to its input. For other
 * bolts, add checkpoint stream from the previous bolt to its input.
 */
private void addCheckPointInputs(ComponentCommon component) {
  Set<GlobalStreamId> checkPointInputs = new HashSet<>();
  for (GlobalStreamId inputStream : component.get_inputs().keySet()) {
    String sourceId = inputStream.get_componentId();
    if (_spouts.containsKey(sourceId)) {
      checkPointInputs.add(new GlobalStreamId(CHECKPOINT_COMPONENT_ID, CHECKPOINT_STREAM_ID));
    } else {
      checkPointInputs.add(new GlobalStreamId(sourceId, CHECKPOINT_STREAM_ID));
    }
  }
  for (GlobalStreamId streamId : checkPointInputs) {
    component.put_to_inputs(streamId, Grouping.all(new NullStruct()));
  }
}
origin: apache/storm

@Override
public String getComponent() {
  return stream.get_componentId();
}
origin: apache/storm

private Set<GlobalStreamId> getComponentStreams(TopologyContext context) {
  Set<GlobalStreamId> streams = new HashSet<>();
  for (GlobalStreamId streamId : context.getThisSources().keySet()) {
    if (!streamId.get_streamId().equals(CheckpointSpout.CHECKPOINT_STREAM_ID)) {
      streams.add(streamId);
    }
  }
  return streams;
}
origin: apache/storm

@Override
public int hashCode() {
 int hashCode = 1;
 hashCode = hashCode * 8191 + ((is_set_componentId()) ? 131071 : 524287);
 if (is_set_componentId())
  hashCode = hashCode * 8191 + componentId.hashCode();
 hashCode = hashCode * 8191 + ((is_set_streamId()) ? 131071 : 524287);
 if (is_set_streamId())
  hashCode = hashCode * 8191 + streamId.hashCode();
 return hashCode;
}
origin: org.apache.storm/storm-core

public void validate() throws org.apache.thrift.TException {
 // check for required fields
 if (!is_set_componentId()) {
  throw new org.apache.thrift.protocol.TProtocolException("Required field 'componentId' is unset! Struct:" + toString());
 }
 if (!is_set_streamId()) {
  throw new org.apache.thrift.protocol.TProtocolException("Required field 'streamId' is unset! Struct:" + toString());
 }
 // check for sub-struct validity
}
origin: org.apache.storm/storm-core

@Override
public int hashCode() {
  int result = streamId != null ? streamId.hashCode() : 0;
  result = 31 * result + sourceTask;
  return result;
}
origin: apache/storm

public java.lang.Object getFieldValue(_Fields field) {
 switch (field) {
 case COMPONENT_ID:
  return get_componentId();
 case STREAM_ID:
  return get_streamId();
 }
 throw new java.lang.IllegalStateException();
}
org.apache.storm.generatedGlobalStreamId

Most used methods

  • <init>
    Performs a deep copy on other.
  • get_componentId
  • get_streamId
  • equals
  • hashCode
  • is_set_componentId
    Returns true if field componentId is set (has been assigned a value) and false otherwise
  • is_set_streamId
    Returns true if field streamId is set (has been assigned a value) and false otherwise
  • read
  • set_componentId
  • set_componentId_isSet
  • set_streamId
  • set_streamId_isSet
  • set_streamId,
  • set_streamId_isSet,
  • toString,
  • unset_componentId,
  • unset_streamId,
  • validate,
  • write,
  • scheme

Popular in Java

  • Start an intent from android
  • addToBackStack (FragmentTransaction)
  • requestLocationUpdates (LocationManager)
  • scheduleAtFixedRate (Timer)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Top 25 Plugins for Webstorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now