flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mxm <...@git.apache.org>
Subject [GitHub] flink pull request: Framesize fix
Date Tue, 28 Jul 2015 10:59:01 GMT
Github user mxm commented on a diff in the pull request:

    https://github.com/apache/flink/pull/934#discussion_r35635367
  
    --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/util/SerializedValue.java
---
    @@ -57,6 +60,25 @@ public T deserializeValue(ClassLoader loader) throws IOException, ClassNotFoundE
     		return serializedData == null ? null : (T) InstantiationUtil.deserializeObject(serializedData,
loader);
     	}
     
    +	/**
    +	 * Gets the content of the value in a byte array.
    +	 * @return the byte array backing the content of the object.
    +	 * */
    +	public byte[] getSerializedData() {
    +		return serializedData;
    +	}
    +
    +	/**
    +	 * Gets the size of the serialized content.
    +	 * @return the size in bytes of the data stored in the blob.
    +	 * */
    +	public long getSizeInBytes() {
    +		if(serializedData == null) {
    +			throw new RuntimeException("No data in this Blob.");
    --- End diff --
    
    This Exception message is not general enough for the `SerializedValue` class.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message