jackylk commented on a change in pull request #3532: [CARBONDATA-3557] Write flink streaming data to partition table URL: https://github.com/apache/carbondata/pull/3532#discussion_r361796705
########## File path: integration/flink/src/main/java/org/apache/carbon/flink/CarbonS3Writer.java ########## @@ -184,29 +204,15 @@ public void close() { } } - private Map<String, Long> uploadSegmentDataFiles( - final String localPath, final String remotePath) { - final File[] files = new File(localPath).listFiles(); - if (files == null) { - return new HashMap<>(0); + private void closeWriters() throws IOException { + if (this.writerFactory == null) { + return; } - Map<String, Long> fileNameMapLength = new HashMap<>(files.length); - for (File file : files) { - fileNameMapLength.put(file.getName(), file.length()); - if (LOGGER.isDebugEnabled()) { - LOGGER.debug("Upload file[" + file.getAbsolutePath() + "] to [" + remotePath + "] start."); - } - try { - CarbonUtil.copyCarbonDataFileToCarbonStorePath(file.getAbsolutePath(), remotePath, 1024); - } catch (CarbonDataWriterException exception) { - LOGGER.error(exception.getMessage(), exception); - throw exception; - } - if (LOGGER.isDebugEnabled()) { - LOGGER.debug("Upload file[" + file.getAbsolutePath() + "] to [" + remotePath + "] end."); - } + final List<org.apache.carbondata.sdk.file.CarbonWriter> writers = Review comment: ```suggestion final List<CarbonWriter> writers = ``` ---------------------------------------------------------------- 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 With regards, Apache Git Services