Tabnine Logo
BlobKey.toString
Code IndexAdd Tabnine to your IDE (free)

How to use
toString
method
in
org.apache.flink.runtime.blob.BlobKey

Best Java code snippets using org.apache.flink.runtime.blob.BlobKey.toString (Showing top 5 results out of 315)

origin: org.apache.flink/flink-runtime_2.10

/**
 * Returns the path for the given blob key.
 *
 * <p>The returned path can be used with the state backend for recovery purposes.
 *
 * <p>This follows the same scheme as {@link #getStorageLocation(File, BlobKey)}
 * and is used for HA.
 */
static String getRecoveryPath(String basePath, BlobKey blobKey) {
  // format: $base/cache/blob_$key
  return String.format("%s/cache/%s%s", basePath, BLOB_FILE_PREFIX, blobKey.toString());
}
origin: org.apache.flink/flink-runtime_2.10

/**
 * Returns the (designated) physical storage location of the BLOB with the given key.
 *
 * @param key
 *        the key identifying the BLOB
 * @return the (designated) physical storage location of the BLOB
 */
static File getStorageLocation(File storageDir, BlobKey key) {
  return new File(getCacheDirectory(storageDir), BLOB_FILE_PREFIX + key.toString());
}
origin: org.apache.flink/flink-runtime

/**
 * Returns the path for the given blob key.
 *
 * <p>The returned path can be used with the (local or HA) BLOB store file system back-end for
 * recovery purposes and follows the same scheme as {@link #getStorageLocation(File, JobID,
 * BlobKey)}.
 *
 * @param storageDir
 *         storage directory used be the BLOB service
 * @param key
 *         the key identifying the BLOB
 * @param jobId
 *         ID of the job for the incoming files
 *
 * @return the path to the given BLOB
 */
static String getStorageLocationPath(
    String storageDir, @Nullable JobID jobId, BlobKey key) {
  if (jobId == null) {
    // format: $base/no_job/blob_$key
    return String.format("%s/%s/%s%s",
      storageDir, NO_JOB_DIR_PREFIX, BLOB_FILE_PREFIX, key.toString());
  } else {
    // format: $base/job_$jobId/blob_$key
    return String.format("%s/%s%s/%s%s",
      storageDir, JOB_DIR_PREFIX, jobId.toString(), BLOB_FILE_PREFIX, key.toString());
  }
}
origin: org.apache.flink/flink-runtime_2.11

/**
 * Returns the path for the given blob key.
 *
 * <p>The returned path can be used with the (local or HA) BLOB store file system back-end for
 * recovery purposes and follows the same scheme as {@link #getStorageLocation(File, JobID,
 * BlobKey)}.
 *
 * @param storageDir
 *         storage directory used be the BLOB service
 * @param key
 *         the key identifying the BLOB
 * @param jobId
 *         ID of the job for the incoming files
 *
 * @return the path to the given BLOB
 */
static String getStorageLocationPath(
    String storageDir, @Nullable JobID jobId, BlobKey key) {
  if (jobId == null) {
    // format: $base/no_job/blob_$key
    return String.format("%s/%s/%s%s",
      storageDir, NO_JOB_DIR_PREFIX, BLOB_FILE_PREFIX, key.toString());
  } else {
    // format: $base/job_$jobId/blob_$key
    return String.format("%s/%s%s/%s%s",
      storageDir, JOB_DIR_PREFIX, jobId.toString(), BLOB_FILE_PREFIX, key.toString());
  }
}
origin: com.alibaba.blink/flink-runtime

/**
 * Returns the path for the given blob key.
 *
 * <p>The returned path can be used with the (local or HA) BLOB store file system back-end for
 * recovery purposes and follows the same scheme as {@link #getStorageLocation(File, JobID,
 * BlobKey)}.
 *
 * @param storageDir
 *         storage directory used be the BLOB service
 * @param key
 *         the key identifying the BLOB
 * @param jobId
 *         ID of the job for the incoming files
 *
 * @return the path to the given BLOB
 */
static String getStorageLocationPath(
    String storageDir, @Nullable JobID jobId, BlobKey key) {
  if (jobId == null) {
    // format: $base/no_job/blob_$key
    return String.format("%s/%s/%s%s",
      storageDir, NO_JOB_DIR_PREFIX, BLOB_FILE_PREFIX, key.toString());
  } else {
    // format: $base/job_$jobId/blob_$key
    return String.format("%s/%s%s/%s%s",
      storageDir, JOB_DIR_PREFIX, jobId.toString(), BLOB_FILE_PREFIX, key.toString());
  }
}
org.apache.flink.runtime.blobBlobKeytoString

Popular methods of BlobKey

  • readFromInputStream
    Auxiliary method to read a BLOB key from an input stream.
  • writeToOutputStream
    Auxiliary method to write this BLOB key to an output stream.
  • createKey
    Returns the right BlobKey subclass for the given parameters.
  • getHash
    Returns the hash component of this key.
  • getType
    Returns the (internal) BLOB type which is reflected by the inheriting sub-class.
  • <init>
    Constructs a new BLOB key from the given byte array.
  • equals

Popular in Java

  • Creating JSON documents from java classes using gson
  • startActivity (Activity)
  • getSharedPreferences (Context)
  • getResourceAsStream (ClassLoader)
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • JButton (javax.swing)
  • CodeWhisperer alternatives
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