Tabnine Logo
PartitionChangeException
Code IndexAdd Tabnine 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)

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

  • Finding current android device location
  • getApplicationContext (Context)
  • getSupportFragmentManager (FragmentActivity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • JFileChooser (javax.swing)
  • Top 17 Plugins for Android Studio
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