Github user animeshtrivedi commented on a diff in the pull request:
https://github.com/apache/incubator-crail/pull/8#discussion_r171180116
--- Diff:
storage-rdma/src/main/java/org/apache/crail/storage/rdma/client/RdmaStorageLocalEndpoint.java
---
@@ -61,11 +61,10 @@ public RdmaStorageLocalEndpoint(InetSocketAddress
datanodeAddr) throws Exception
this.address = datanodeAddr;
this.bufferMap = new ConcurrentHashMap<Long, CrailBuffer>();
this.unsafe = getUnsafe();
- long lba = 0;
for (File dataFile : dataDir.listFiles()) {
- MappedByteBuffer mappedBuffer = mmap(dataFile);
- bufferMap.put(lba, OffHeapBuffer.wrap(mappedBuffer));
- lba += mappedBuffer.capacity();
+ long lba = Long.parseLong(dataFile.getName());
+ OffHeapBuffer offHeapBuffer =
OffHeapBuffer.wrap(mmap(dataFile));
--- End diff --
actually, the indentation was issue with my display. Sorry.
---