Github user zentol commented on a diff in the pull request:
https://github.com/apache/flink/pull/4158#discussion_r126382129
--- Diff:
flink-runtime/src/main/java/org/apache/flink/runtime/blob/BlobClient.java ---
@@ -587,67 +445,14 @@ private void sendPutHeader(OutputStream outputStream,
JobID jobID, String key) t
/**
* Deletes the BLOB identified by the given BLOB key from the BLOB
server.
*
- * @param key
+ * @param bKey
* the key to identify the BLOB
* @throws IOException
* thrown if an I/O error occurs while transferring the request
to
* the BLOB server or if the BLOB server cannot delete the file
*/
- public void delete(BlobKey key) throws IOException {
- checkArgument(key != null, "BLOB key must not be null.");
-
- deleteInternal(null, null, key);
- }
-
- /**
- * Deletes the BLOB identified by the given job ID and key from the
BLOB server.
- *
- * @param jobId
- * the job ID to identify the BLOB
- * @param key
- * the key to identify the BLOB
- * @throws IOException
- * thrown if an I/O error occurs while transferring the request
to the BLOB server
- */
- public void delete(JobID jobId, String key) throws IOException {
- checkArgument(jobId != null, "Job id must not be null.");
- checkArgument(key != null, "BLOB name must not be null.");
-
- if (key.length() > MAX_KEY_LENGTH) {
- throw new IllegalArgumentException("Keys must not be
longer than " + MAX_KEY_LENGTH);
- }
-
- deleteInternal(jobId, key, null);
- }
-
- /**
- * Deletes all BLOBs belonging to the job with the given ID from the
BLOB server
- *
- * @param jobId
- * the job ID to identify the BLOBs to be deleted
- * @throws IOException
- * thrown if an I/O error occurs while transferring the request
to the BLOB server
- */
- public void deleteAll(JobID jobId) throws IOException {
- checkArgument(jobId != null, "Job id must not be null.");
-
- deleteInternal(jobId, null, null);
- }
-
- /**
- * Delete one or multiple BLOBs from the BLOB server.
- *
- * @param jobId The job ID to identify the BLOB(s) to be deleted.
- * @param key The key to identify the specific BLOB to delete or
<code>null</code> to delete
- * all BLOBs associated with the job id.
- * @param bKey The blob key to identify a specific content addressable
BLOB. This parameter
- * is exclusive with jobId and key.
- * @throws IOException Thrown if an I/O error occurs while transferring
the request to the BLOB server.
- */
- private void deleteInternal(JobID jobId, String key, BlobKey bKey)
throws IOException {
- if ((jobId != null && bKey != null) || (jobId == null && bKey
== null)) {
- throw new IllegalArgumentException();
- }
+ public void delete(BlobKey bKey) throws IOException {
--- End diff --
Let's call this `blobKey`. for consistency (since we're changing the name
anyway)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---