pkumarsinha commented on a change in pull request #1225:
URL: https://github.com/apache/hive/pull/1225#discussion_r454923611
##########
File path:
ql/src/java/org/apache/hadoop/hive/ql/parse/repl/dump/io/FileOperations.java
##########
@@ -165,4 +178,83 @@ private void validateSrcPathListExists() throws
IOException, LoginException {
throw new FileNotFoundException(FILE_NOT_FOUND.format(e.getMessage()));
}
}
+
+ /**
+ * This needs the root data directory to which the data needs to be exported
to.
+ * The data export here is a list of files either in table/partition that
are written to the _files
+ * in the exportRootDataDir provided.
+ */
+ void exportFilesAsList() throws SemanticException, IOException,
LoginException {
+ if (dataPathList.isEmpty()) {
+ return;
+ }
+ Retry<Void> retryable = new Retry<Void>(IOException.class) {
+ @Override
+ public Void execute() throws Exception {
+ try (BufferedWriter writer = writer()) {
+ for (Path dataPath : dataPathList) {
+ writeFilesList(listFilesInDir(dataPath), writer,
AcidUtils.getAcidSubDir(dataPath));
+ }
+ } catch (IOException e) {
+ if (e instanceof FileNotFoundException) {
Review comment:
Shouldn't this suffice?
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]