sakshamgangwar commented on a change in pull request #1079:
URL: https://github.com/apache/phoenix/pull/1079#discussion_r562080082



##########
File path: 
phoenix-core/src/it/java/org/apache/phoenix/end2end/TableSnapshotReadsMapReduceIT.java
##########
@@ -274,6 +293,9 @@ private void configureJob(Job job, String tableName, String 
inputQuery, String c
 
       assertFalse("Should only have stored" + result.size() + "rows in the 
table for the timestamp!", rs.next());
     } finally {
+      if (isSnapshotRestoreDoneExternally) {
+        assertRestoreDirCount(conf, tmpDir.toString(), 1);

Review comment:
       @shahrs87 There were two levels of subdirectories getting created for 
snapshot restore on every scan: 
   
https://github.com/apache/phoenix/blob/55f1362fc52eeabed139728dae153518883743a5/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/util/PhoenixMapReduceUtil.java#L185
   
   
https://github.com/apache/phoenix/blob/55f1362fc52eeabed139728dae153518883743a5/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableSnapshotResultIterator.java#L81
   
   I have removed those in the original flow so now the directory gets cleaned 
up every single scan and gets created again for the next scan with the same 
directory structure. 
   
   I can assert here no existence of the restore directory in the original 
flow. 




----------------------------------------------------------------
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]


Reply via email to