This method checks whether the multiple sinks (STORE) use the same "file-based" location. If yes, throws a RuntimeException @param storeOps
(Set<LOStore> storeOps)
| 1910 | * @param storeOps |
| 1911 | */ |
| 1912 | private void checkDuplicateStoreLoc(Set<LOStore> storeOps) { |
| 1913 | Set<String> uniqueStoreLoc = new HashSet<String>(); |
| 1914 | for(LOStore store : storeOps) { |
| 1915 | String fileName = store.getFileSpec().getFileName(); |
| 1916 | if(!uniqueStoreLoc.add(fileName) && UriUtil.isHDFSFileOrLocalOrS3N(fileName, new Configuration(true))) { |
| 1917 | throw new RuntimeException("Script contains 2 or more STORE statements writing to same location : "+ fileName); |
| 1918 | } |
| 1919 | } |
| 1920 | } |
| 1921 | |
| 1922 | protected Graph duplicate() { |
| 1923 | // There are two choices on how we duplicate the logical plan |
no test coverage detected