[ https://issues.apache.org/jira/browse/HDDS-1496?focusedWorklogId=247646&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-247646 ]
ASF GitHub Bot logged work on HDDS-1496: ---------------------------------------- Author: ASF GitHub Bot Created on: 23/May/19 19:40 Start Date: 23/May/19 19:40 Worklog Time Spent: 10m Work Description: bharatviswa504 commented on pull request #804: HDDS-1496. Support partial chunk reads and checksum verification URL: https://github.com/apache/hadoop/pull/804#discussion_r287051851 ########## File path: hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/io/KeyInputStream.java ########## @@ -53,58 +46,77 @@ private static final int EOF = -1; - private final ArrayList<ChunkInputStreamEntry> streamEntries; - // streamOffset[i] stores the offset at which blockInputStream i stores - // data in the key - private long[] streamOffset = null; - private int currentStreamIndex; + private String key; private long length = 0; private boolean closed = false; - private String key; - public KeyInputStream() { - streamEntries = new ArrayList<>(); - currentStreamIndex = 0; - } + // List of BlockInputStreams, one for each block in the key + private final List<BlockInputStream> blockStreams; - @VisibleForTesting - public synchronized int getCurrentStreamIndex() { - return currentStreamIndex; - } + // blockOffsets[i] stores the index of the first data byte in + // blockStream i w.r.t the key data. Review comment: NIT: i.e or unwated i? ---------------------------------------------------------------- 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: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 247646) Time Spent: 3h 50m (was: 3h 40m) > Support partial chunk reads and checksum verification > ----------------------------------------------------- > > Key: HDDS-1496 > URL: https://issues.apache.org/jira/browse/HDDS-1496 > Project: Hadoop Distributed Data Store > Issue Type: Improvement > Reporter: Hanisha Koneru > Assignee: Hanisha Koneru > Priority: Major > Labels: pull-request-available > Time Spent: 3h 50m > Remaining Estimate: 0h > > BlockInputStream#readChunkFromContainer() reads the whole chunk from disk > even if we need to read only a part of the chunk. > This Jira aims to improve readChunkFromContainer so that only that part of > the chunk file is read which is needed by client plus the part of chunk file > which is required to verify the checksum. > For example, lets say the client is reading from index 120 to 450 in the > chunk. And let's say checksum is stored for every 100 bytes in the chunk i.e. > the first checksum is for bytes from index 0 to 99, the next for bytes from > index 100 to 199 and so on. To verify bytes from 120 to 450, we would need to > read from bytes 100 to 499 so that checksum verification can be done. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org