You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by sa...@apache.org on 2021/05/11 01:11:56 UTC
[atlas] branch master updated: ATLAS-4153: [Atlas: Spooling] The
order of the entities created in atlas is not same as the order created in
hive
This is an automated email from the ASF dual-hosted git repository.
sarath pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/atlas.git
The following commit(s) were added to refs/heads/master by this push:
new e6f78f2 ATLAS-4153: [Atlas: Spooling] The order of the entities created in atlas is not same as the order created in hive
e6f78f2 is described below
commit e6f78f28c8167c0099c1493fee51aac39abeebea
Author: Radhika Kundam <rk...@cloudera.com>
AuthorDate: Mon May 10 18:11:43 2021 -0700
ATLAS-4153: [Atlas: Spooling] The order of the entities created in atlas is not same as the order created in hive
Signed-off-by: Sarath Subramanian <sa...@apache.org>
---
.../main/java/org/apache/atlas/notification/spool/Publisher.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/notification/src/main/java/org/apache/atlas/notification/spool/Publisher.java b/notification/src/main/java/org/apache/atlas/notification/spool/Publisher.java
index 2947a21..22242c9 100644
--- a/notification/src/main/java/org/apache/atlas/notification/spool/Publisher.java
+++ b/notification/src/main/java/org/apache/atlas/notification/spool/Publisher.java
@@ -134,9 +134,9 @@ public class Publisher implements Runnable {
FileLockedReadWrite fileLockedRead = new FileLockedReadWrite(source);
try {
- DataInput dataInput = fileLockedRead.getInput(new File(record.getPath()));
- int lineInSpoolFile = 0;
- List<String> messages = new ArrayList<>();
+ DataInput dataInput = fileLockedRead.getInput(new File(record.getPath()));
+ int lineInSpoolFile = 0;
+ List<String> messages = new ArrayList<>();
for (String message = dataInput.readLine(); message != null; message = dataInput.readLine()) {
lineInSpoolFile++;
@@ -147,7 +147,7 @@ public class Publisher implements Runnable {
messages.add(message);
- if (messages.size() == messageBatchSize) {
+ if ((isDestDown && messages.size() == 1) || messages.size() == messageBatchSize) {
dispatch(record, lineInSpoolFile, messages);
}
}