nemo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jeongy...@apache.org
Subject [incubator-nemo] 37/40: fix checkstyle
Date Fri, 06 Apr 2018 02:36:17 GMT
This is an automated email from the ASF dual-hosted git repository.

jeongyoon pushed a commit to branch skew_exp
in repository https://gitbox.apache.org/repos/asf/incubator-nemo.git

commit 348c2178ac429e4965a14cb1b04d9e8b74564334
Author: sanha <sanhaleehana@naver.com>
AuthorDate: Fri Mar 23 15:57:09 2018 +0900

    fix checkstyle
---
 .../runtime/executor/data/BlockManagerWorker.java    |  2 +-
 .../nemo/runtime/executor/data/block/FileBlock.java  | 20 +++++++++++---------
 2 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/runtime/executor/src/main/java/edu/snu/nemo/runtime/executor/data/BlockManagerWorker.java
b/runtime/executor/src/main/java/edu/snu/nemo/runtime/executor/data/BlockManagerWorker.java
index 66628db..ac2d209 100644
--- a/runtime/executor/src/main/java/edu/snu/nemo/runtime/executor/data/BlockManagerWorker.java
+++ b/runtime/executor/src/main/java/edu/snu/nemo/runtime/executor/data/BlockManagerWorker.java
@@ -164,7 +164,7 @@ public final class BlockManagerWorker {
     if (optionalBlock.isPresent()) {
       if (blockStore.equals(DataStoreProperty.Value.LocalFileStore)) {
         final DataUtil.IteratorWithNumBytes itr = ((FileBlock) optionalBlock.get()).readLazily(keyRange);
-        handleUsedData(blockStore, blockId);
+        handleUsedData(blockStore, blockId); // TODO #?: okay? condition?
         return CompletableFuture.completedFuture(itr);
       } else {
         final Iterable<NonSerializedPartition> partitions = optionalBlock.get().readPartitions(keyRange);
diff --git a/runtime/executor/src/main/java/edu/snu/nemo/runtime/executor/data/block/FileBlock.java
b/runtime/executor/src/main/java/edu/snu/nemo/runtime/executor/data/block/FileBlock.java
index 02046d7..a901ed3 100644
--- a/runtime/executor/src/main/java/edu/snu/nemo/runtime/executor/data/block/FileBlock.java
+++ b/runtime/executor/src/main/java/edu/snu/nemo/runtime/executor/data/block/FileBlock.java
@@ -158,15 +158,18 @@ public final class FileBlock<K extends Serializable> extends AbstractBlock<K>
{
     }
   }
 
-  private class LazyIterator implements Iterator, AutoCloseable, DataUtil.IteratorWithNumBytes
{
+  /**
+   * WOW.
+   */
+  private final class LazyIterator implements Iterator, AutoCloseable, DataUtil.IteratorWithNumBytes
{
 
-    final KeyRange keyRange;
-    final FileInputStream fileInputStream;
-    final Iterator<PartitionMetadata<K>> partitionMetadataItr;
-    final Serializer serializerToUse;
-    int readablePartitions;
-    Iterator currentIterator;
-    long numSerializedBytes;
+    private final KeyRange keyRange;
+    private final FileInputStream fileInputStream;
+    private final Iterator<PartitionMetadata<K>> partitionMetadataItr;
+    private final Serializer serializerToUse;
+    private int readablePartitions;
+    private Iterator currentIterator;
+    private long numSerializedBytes;
 
     private LazyIterator(final KeyRange keyRange) throws BlockFetchException {
       try {
@@ -261,7 +264,6 @@ public final class FileBlock<K extends Serializable> extends AbstractBlock<K>
{
   }
 
   public DataUtil.IteratorWithNumBytes readLazily(final KeyRange keyRange) throws BlockFetchException
{
-    // TODO: handle used data?
     if (!metadata.isCommitted()) {
       throw new BlockFetchException(new Throwable("Cannot retrieve elements before a block
is committed"));
     } else {

-- 
To stop receiving notification emails like this one, please contact
jeongyoon@apache.org.

Mime
View raw message