Hello Andrew Wang
Thanks for your comments. I just uploaded v8 patch with following changes
unit test for the fallback behavior
Added an unit test for the fallback code. Mocked an old version of server, tested 3 scenarios, 1) Server doesn't recognize GETFILEBLOCKLOCATIONS and send back an error. 2) Server handles GET_BLOCK_LOCATIONS and returns a sample of data. 3) Server sends out a random exception.
I am still using single function to handle that, but I added more java doc ahead. The reason is 1) Separate them would have majority of code similar 2) I checked the times of this function gets called while doing the fallback UT, this is easier with single method.
The example curl and response are indented by 9 instead of 8
I am following the indents format with rest of the document. They are also 9. Anyhow I checked the indents again in the doc I added, it should be OK now.
provide an example response for a file with more than one block
I don't think this schema works
I verified the schema again with this online tool, and compared with FileStatuses/FileStatus schemas (they are similar). See Sample response, BlockLocations JSON schema which looks just like FileStatuses JSON schema, and BlockLocation Properties Schema . Let me if it looks good now.
Thank you and let me know if you have any further comments.