Codota Logo
StreamApplicationDescriptor.withDefaultSystem
Code IndexAdd Codota to your IDE (free)

How to use
withDefaultSystem
method
in
org.apache.samza.application.descriptors.StreamApplicationDescriptor

Best Java code snippets using org.apache.samza.application.descriptors.StreamApplicationDescriptor.withDefaultSystem (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
origin: apache/samza

@Test(expected = IllegalStateException.class)
public void testSetDefaultSystemDescriptorAfterGettingOutputStream() {
 String streamId = "test-stream-1";
 GenericSystemDescriptor sd = new GenericSystemDescriptor("mockSystem", "mockSystemFactoryClass");
 GenericOutputDescriptor osd = sd.getOutputDescriptor(streamId, mock(Serde.class));
 new StreamApplicationDescriptorImpl(appDesc -> {
   appDesc.getOutputStream(osd);
   appDesc.withDefaultSystem(sd); // should throw exception
  }, getConfig());
}
origin: apache/samza

@Test(expected = IllegalStateException.class)
public void testSetDefaultSystemDescriptorAfterGettingInputStream() {
 String streamId = "test-stream-1";
 GenericSystemDescriptor sd = new GenericSystemDescriptor("mockSystem", "mockSystemFactoryClass");
 GenericInputDescriptor isd = sd.getInputDescriptor(streamId, mock(Serde.class));
 new StreamApplicationDescriptorImpl(appDesc -> {
   appDesc.getInputStream(isd);
   appDesc.withDefaultSystem(sd); // should throw exception
  }, getConfig());
}
origin: apache/samza

@Test
public void testMultipleSystemDescriptorForSameSystemName() {
 GenericSystemDescriptor sd1 = new GenericSystemDescriptor("mockSystem", "mockSystemFactoryClass");
 GenericSystemDescriptor sd2 = new GenericSystemDescriptor("mockSystem", "mockSystemFactoryClass");
 GenericInputDescriptor isd1 = sd1.getInputDescriptor("test-stream-1", mock(Serde.class));
 GenericInputDescriptor isd2 = sd2.getInputDescriptor("test-stream-2", mock(Serde.class));
 GenericOutputDescriptor osd1 = sd2.getOutputDescriptor("test-stream-3", mock(Serde.class));
 new StreamApplicationDescriptorImpl(appDesc -> {
   appDesc.getInputStream(isd1);
   try {
    appDesc.getInputStream(isd2);
    fail("Adding input stream with the same system name but different SystemDescriptor should have failed");
   } catch (IllegalStateException e) { }
   try {
    appDesc.getOutputStream(osd1);
    fail("adding output stream with the same system name but different SystemDescriptor should have failed");
   } catch (IllegalStateException e) { }
  }, getConfig());
 new StreamApplicationDescriptorImpl(appDesc -> {
   appDesc.withDefaultSystem(sd2);
   try {
    appDesc.getInputStream(isd1);
    fail("Adding input stream with the same system name as the default system but different SystemDescriptor should have failed");
   } catch (IllegalStateException e) { }
  }, getConfig());
}
org.apache.samza.application.descriptorsStreamApplicationDescriptorwithDefaultSystem

Popular methods of StreamApplicationDescriptor

  • getInputStream
    Gets the input MessageStream corresponding to the inputDescriptor. A MessageStream, obtained by call
  • getOutputStream
    Gets the OutputStream corresponding to the outputDescriptor. An OutputStream>, obtained by calling t
  • getTable
    Gets the Table corresponding to the TableDescriptor. Multiple invocations of this method with the sa
  • withApplicationTaskContextFactory
  • getConfig
  • withApplicationContainerContextFactory
  • withProcessorLifecycleListenerFactory

Popular in Java

  • Making http requests using okhttp
  • addToBackStack (FragmentTransaction)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • getApplicationContext (Context)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • FileInputStream (java.io)
    A FileInputStream obtains input bytes from a file in a file system. What files are available depends
  • ConcurrentHashMap (java.util.concurrent)
    A hash table supporting full concurrency of retrievals and adjustable expected concurrency for updat
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now