Tabnine Logo
RollingStorage.createChunk
Code IndexAdd Tabnine to your IDE (free)

How to use
createChunk
method
in
io.pravega.segmentstore.storage.rolling.RollingStorage

Best Java code snippets using io.pravega.segmentstore.storage.rolling.RollingStorage.createChunk (Showing top 1 results out of 315)

origin: pravega/pravega

private void rollover(RollingSegmentHandle handle) throws StreamSegmentException {
  Preconditions.checkArgument(handle.getHeaderHandle() != null, "Cannot rollover a Segment with no header.");
  Preconditions.checkArgument(!handle.isReadOnly(), "Cannot rollover using a read-only handle.");
  Preconditions.checkArgument(!handle.isSealed(), "Cannot rollover a Sealed Segment.");
  log.debug("Rolling over '{}'.", handle);
  sealActiveChunk(handle);
  try {
    createChunk(handle);
  } catch (StreamSegmentExistsException ex) {
    // It may be possible that a concurrent rollover request using a different handle (either from this instance
    // or another) has already created the new chunk. Refresh the handle and try again. This is usually the case
    // with concurrent Storage instances trying to modify the same segment at the same time.
    int chunkCount = handle.chunks().size();
    handle.refresh(openHandle(handle.getSegmentName(), false));
    if (chunkCount == handle.chunks().size()) {
      // Nothing changed; re-throw the exception.
      throw ex;
    } else {
      // We've just refreshed the handle and picked up the latest chunk. Move on.
      log.warn("Aborted rollover due to concurrent rollover detected ('{}').", handle);
    }
  }
}
io.pravega.segmentstore.storage.rollingRollingStoragecreateChunk

Popular methods of RollingStorage

  • <init>
    Creates a new instance of the RollingStorage class.
  • create
  • delete
  • openRead
  • openWrite
  • seal
  • asReadableHandle
  • asWritableHandle
  • canTruncate
  • checkIfEmptyAndNotSealed
  • checkTruncatedSegment
  • concat
  • checkTruncatedSegment,
  • concat,
  • createHeader,
  • deleteChunks,
  • ensureNotDeleted,
  • ensureNotSealed,
  • ensureOffset,
  • exists,
  • getHeaderInfo

Popular in Java

  • Finding current android device location
  • getContentResolver (Context)
  • findViewById (Activity)
  • getSharedPreferences (Context)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • JButton (javax.swing)
  • JPanel (javax.swing)
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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