nemo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-nemo] johnyangk commented on a change in pull request #222: [NEMO-350] Implement Off-heap SerializedMemoryStore & [NEMO-384] Implement DirectByteBufferInputStream for Off-heap SerializedMemoryStore
Date Wed, 19 Jun 2019 07:22:56 GMT
johnyangk commented on a change in pull request #222: [NEMO-350] Implement Off-heap SerializedMemoryStore
& [NEMO-384] Implement DirectByteBufferInputStream for Off-heap SerializedMemoryStore
URL: https://github.com/apache/incubator-nemo/pull/222#discussion_r295148555
 
 

 ##########
 File path: runtime/executor/src/main/java/org/apache/nemo/runtime/executor/data/partition/SerializedPartition.java
 ##########
 @@ -144,18 +171,41 @@ public boolean isSerialized() {
   }
 
   /**
+   * This method should only be used when this partition is constructed with a data from
existing file.
+   *
    * @return the serialized data.
    * @throws IOException if the partition is not committed yet.
    */
   @Override
   public byte[] getData() throws IOException {
     if (!committed) {
       throw new IOException("The partition is not committed yet!");
+    } else if (offheap) {
+      throw new RuntimeException("This partition does not have on-heap data");
     } else {
       return serializedData;
     }
   }
 
+  /**
+   * This method is used to emit the output as {@link SerializedPartition}.
+   *
+   * @return the serialized data in list of {@link ByteBuffer}s
+   * @throws IOException if the partition is not committed yet.
+   */
+  public List<ByteBuffer> getBuffer() throws IOException {
 
 Review comment:
   getDirectByteBufferList()?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message