Codota Logo
PartitionChangeException
Code IndexAdd Codota to your IDE (free)

How to use
PartitionChangeException
in
org.apache.samza

Best Java code snippets using org.apache.samza.PartitionChangeException (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: org.apache.samza/samza-core

private StreamPartitionCountMonitor getPartitionCountMonitor(Config config, SystemAdmins systemAdmins) {
 StreamMetadataCache streamMetadata = new StreamMetadataCache(systemAdmins, 0, SystemClock.instance());
 Set<SystemStream> inputStreamsToMonitor = new TaskConfigJava(config).getAllInputStreams();
 if (inputStreamsToMonitor.isEmpty()) {
  throw new SamzaException("Input streams to a job can not be empty.");
 }
 return new StreamPartitionCountMonitor(
   inputStreamsToMonitor,
   streamMetadata,
   metrics,
   new JobConfig(config).getMonitorPartitionChangeFrequency(),
   streamsChanged -> {
   // Fail the jobs with durable state store. Otherwise, application state.status remains UNDEFINED s.t. YARN job will be restarted
   if (hasDurableStores) {
    log.error("Input topic partition count changed in a job with durable state. Failing the job.");
    state.status = SamzaApplicationState.SamzaAppStatus.FAILED;
   }
   coordinatorException = new PartitionChangeException("Input topic partition count changes detected.");
  });
}
origin: org.apache.samza/samza-core_2.11

private StreamPartitionCountMonitor getPartitionCountMonitor(Config config, SystemAdmins systemAdmins) {
 StreamMetadataCache streamMetadata = new StreamMetadataCache(systemAdmins, 0, SystemClock.instance());
 Set<SystemStream> inputStreamsToMonitor = new TaskConfigJava(config).getAllInputStreams();
 if (inputStreamsToMonitor.isEmpty()) {
  throw new SamzaException("Input streams to a job can not be empty.");
 }
 return new StreamPartitionCountMonitor(
   inputStreamsToMonitor,
   streamMetadata,
   metrics,
   new JobConfig(config).getMonitorPartitionChangeFrequency(),
   streamsChanged -> {
   // Fail the jobs with durable state store. Otherwise, application state.status remains UNDEFINED s.t. YARN job will be restarted
   if (hasDurableStores) {
    log.error("Input topic partition count changed in a job with durable state. Failing the job.");
    state.status = SamzaApplicationState.SamzaAppStatus.FAILED;
   }
   coordinatorException = new PartitionChangeException("Input topic partition count changes detected.");
  });
}
origin: org.apache.samza/samza-core_2.12

private StreamPartitionCountMonitor getPartitionCountMonitor(Config config, SystemAdmins systemAdmins) {
 StreamMetadataCache streamMetadata = new StreamMetadataCache(systemAdmins, 0, SystemClock.instance());
 Set<SystemStream> inputStreamsToMonitor = new TaskConfigJava(config).getAllInputStreams();
 if (inputStreamsToMonitor.isEmpty()) {
  throw new SamzaException("Input streams to a job can not be empty.");
 }
 return new StreamPartitionCountMonitor(
   inputStreamsToMonitor,
   streamMetadata,
   metrics,
   new JobConfig(config).getMonitorPartitionChangeFrequency(),
   streamsChanged -> {
   // Fail the jobs with durable state store. Otherwise, application state.status remains UNDEFINED s.t. YARN job will be restarted
   if (hasDurableStores) {
    log.error("Input topic partition count changed in a job with durable state. Failing the job.");
    state.status = SamzaApplicationState.SamzaAppStatus.FAILED;
   }
   coordinatorException = new PartitionChangeException("Input topic partition count changes detected.");
  });
}
origin: org.apache.samza/samza-core_2.10

private StreamPartitionCountMonitor getPartitionCountMonitor(Config config, SystemAdmins systemAdmins) {
 StreamMetadataCache streamMetadata = new StreamMetadataCache(systemAdmins, 0, SystemClock.instance());
 Set<SystemStream> inputStreamsToMonitor = new TaskConfigJava(config).getAllInputStreams();
 if (inputStreamsToMonitor.isEmpty()) {
  throw new SamzaException("Input streams to a job can not be empty.");
 }
 return new StreamPartitionCountMonitor(
   inputStreamsToMonitor,
   streamMetadata,
   metrics,
   new JobConfig(config).getMonitorPartitionChangeFrequency(),
   streamsChanged -> {
   // Fail the jobs with durable state store. Otherwise, application state.status remains UNDEFINED s.t. YARN job will be restarted
   if (hasDurableStores) {
    log.error("Input topic partition count changed in a job with durable state. Failing the job.");
    state.status = SamzaApplicationState.SamzaAppStatus.FAILED;
   }
   coordinatorException = new PartitionChangeException("Input topic partition count changes detected.");
  });
}
org.apache.samzaPartitionChangeException

Javadoc

Exception to indicate that the input org.apache.samza.system.SystemStreamPartition changed

Most used methods

  • <init>

Popular in Java

  • Start an intent from android
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • getExternalFilesDir (Context)
  • Kernel (java.awt.image)
  • BigInteger (java.math)
    Immutable arbitrary-precision integers. All operations behave as if BigIntegers were represented in
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Vector (java.util)
    The Vector class implements a growable array of objects. Like an array, it contains components that
  • BoxLayout (javax.swing)
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
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