aasha commented on a change in pull request #977:
URL: https://github.com/apache/hive/pull/977#discussion_r413005203
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ReplDumpTask.java
##########
@@ -511,6 +539,71 @@ private Long incrementalDump(Path dumpRoot, DumpMetaData
dmd, Path cmRoot, Hive
return lastReplId;
}
+ private int getMaxEventAllowed(int currentEventMaxLimit) {
+ int maxDirItems =
Integer.parseInt(conf.get(ReplUtils.DFS_MAX_DIR_ITEMS_CONFIG, "0"));
+ if (maxDirItems > 0) {
+ maxDirItems = maxDirItems - ReplUtils.RESERVED_DIR_ITEMS_COUNT;
+ if (maxDirItems < currentEventMaxLimit) {
+ LOG.warn("Changing the maxEventLimit from {} to {} as the '" +
ReplUtils.DFS_MAX_DIR_ITEMS_CONFIG
+ + "' limit encountered. Set this config appropriately
to increase the maxEventLimit",
+ currentEventMaxLimit, maxDirItems);
+ currentEventMaxLimit = maxDirItems;
+ }
+ }
+ return currentEventMaxLimit;
+ }
+
+ private void cleanFailedEventDirIfExists(Path dumpDir, long resumeFrom)
throws IOException {
+ Path nextEventRoot = new Path(dumpDir, String.valueOf(resumeFrom + 1));
+ Retry<Void> retriable = new Retry<Void>(IOException.class) {
+ @Override
+ public Void execute() throws IOException {
+ FileSystem fs = FileSystem.get(nextEventRoot.toUri(), conf);
+ if (fs.exists(nextEventRoot)) {
+ fs.delete(nextEventRoot, true);
+ }
+ return null;
+ }
+ };
+ try {
+ retriable.run();
+ } catch (Exception e) {
+ throw new IOException(e);
+ }
+ }
+
+ public void updateLastEventDumped(Path ackFile, long lastReplId) throws
SemanticException {
+ List<List<String>> listValues = new ArrayList<>();
Review comment:
why is this a list?
----------------------------------------------------------------
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]