flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-7068) change BlobService sub-classes for permanent and transient BLOBs
Date Wed, 20 Sep 2017 12:39:02 GMT

    [ https://issues.apache.org/jira/browse/FLINK-7068?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16173104#comment-16173104
] 

ASF GitHub Bot commented on FLINK-7068:
---------------------------------------

Github user NicoK commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4358#discussion_r139956243
  
    --- 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'm tempted to leave it that way not only because previous code followed that pattern
(as in `BlobClient#receiveAndCheckGetResponse()`) but also because it is nice to have a brief
failure message with some details without having to dig through the stack trace.


> 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)

Mime
View raw message