[
https://issues.apache.org/jira/browse/FLINK-7068?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16155558#comment-16155558
]
ASF GitHub Bot commented on FLINK-7068:
---------------------------------------
Github user tillrohrmann commented on a diff in the pull request:
https://github.com/apache/flink/pull/4358#discussion_r137268133
--- Diff:
flink-runtime/src/main/java/org/apache/flink/runtime/blob/BlobClient.java ---
@@ -601,7 +564,39 @@ public void deleteInternal(@Nullable JobID jobId,
BlobKey key) throws IOExceptio
}
/**
- * Uploads the JAR files to a {@link BlobServer} at the given address.
+ * Reads the response from the input stream and throws in case of errors
+ *
+ * @param is
+ * stream to read from
+ *
+ * @return <tt>true</tt> if the delete operation was successful at the
{@link BlobServer};
+ * <tt>false</tt> otherwise
+ *
+ * @throws IOException
+ * if the server code throws an exception or if reading
the response failed
+ */
+ private static boolean receiveAndCheckDeleteResponse(InputStream is)
throws IOException {
+ int response = is.read();
+ if (response < 0) {
+ throw new EOFException("Premature end of response");
+ }
+ if (response == RETURN_ERROR) {
+ Throwable cause = readExceptionFromStream(is);
+ if (cause == null) {
+ return false;
+ } else {
+ throw new IOException("Server side error: " +
cause.getMessage(), cause);
--- End diff --
I think we don't have to append the cause message to `IOException's`
message, because it is included in the `cause`.
> change BlobService sub-classes for permanent and transient BLOBs
> ----------------------------------------------------------------
>
> Key: FLINK-7068
> URL: https://issues.apache.org/jira/browse/FLINK-7068
> Project: Flink
> Issue Type: Sub-task
> Components: Distributed Coordination, Network
> Affects Versions: 1.4.0
> Reporter: Nico Kruber
> Assignee: Nico Kruber
>
> A {{PermanentBlobStore}} should resemble use cases for BLOBs that are
> permanently stored for a job's life time (HA and non-HA).
> A {{TransientBlobStore}} should reflect BLOB offloading for logs, RPC, etc.
> which even does not have to be reflected by files.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)