johnyangk commented on a change in pull request #223: [NEMO-388] Off-heap 
memory management (reuse ByteBuffer)
URL: https://github.com/apache/incubator-nemo/pull/223#discussion_r306149997
 
 

 ##########
 File path: 
runtime/executor/src/main/java/org/apache/nemo/runtime/executor/data/stores/BlockStore.java
 ##########
 @@ -33,13 +34,14 @@
    * A stale data created by previous failed task should be handled during the 
creation of new block.
    *
    * @param blockId the ID of the block to create.
+   * @param memoryPoolAssigner  the MemoryPoolAssigner for memory allocation.
    * @return the created block.
    * @throws BlockWriteException for any error occurred while trying to create 
a block.
    *                             (This exception will be thrown to the 
scheduler
    *                             through {@link 
org.apache.nemo.runtime.executor.Executor} and
    *                             have to be handled by the scheduler with 
fault tolerance mechanism.)
    */
-  Block createBlock(String blockId) throws BlockWriteException;
+  Block createBlock(String blockId, MemoryPoolAssigner memoryPoolAssigner) 
throws BlockWriteException;
 
 Review comment:
   Among the different BlockStore implementations, only MemoryStore and 
SerializedMemoryStore seem to use the MemoryPoolAssigner. Do you plan to have 
other BlockStores use it as well in the future? If not, it'd be better to keep 
this API, and instead inject MemoryPoolAssigner directly into MemoryStore and 
SerializedMemoryStore.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to