You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2020/05/29 13:22:26 UTC

[GitHub] [hive] aasha commented on a change in pull request #1040: HIVE-23514 : Add Atlas metadata replication metrics

aasha commented on a change in pull request #1040:
URL: https://github.com/apache/hive/pull/1040#discussion_r432476084



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/repl/AtlasDumpTask.java
##########
@@ -73,7 +74,12 @@ public int execute() {
       String entityGuid = checkHiveEntityGuid(atlasRequestBuilder, atlasReplInfo.getSrcCluster(),
               atlasReplInfo.getSrcDB());
       long currentModifiedTime = getCurrentTimestamp(atlasReplInfo, entityGuid);
-      dumpAtlasMetaData(atlasRequestBuilder, atlasReplInfo);
+      AtlasDumpLogger replLogger = new AtlasDumpLogger(atlasReplInfo.getSrcDB(),
+              atlasReplInfo.getStagingDir().toString());
+      replLogger.startLog();

Review comment:
       start should be called when the atlas dump task starts. This will give the complete estimate of time taken.

##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/repl/AtlasLoadTask.java
##########
@@ -66,7 +72,7 @@ public int execute() {
     }
   }
 
-  private AtlasReplInfo createAtlasReplInfo() throws SemanticException, MalformedURLException {
+  public AtlasReplInfo createAtlasReplInfo() throws SemanticException, MalformedURLException {

Review comment:
       Do you need this to be public?

##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/repl/AtlasDumpTask.java
##########
@@ -73,7 +74,12 @@ public int execute() {
       String entityGuid = checkHiveEntityGuid(atlasRequestBuilder, atlasReplInfo.getSrcCluster(),
               atlasReplInfo.getSrcDB());
       long currentModifiedTime = getCurrentTimestamp(atlasReplInfo, entityGuid);
-      dumpAtlasMetaData(atlasRequestBuilder, atlasReplInfo);
+      AtlasDumpLogger replLogger = new AtlasDumpLogger(atlasReplInfo.getSrcDB(),
+              atlasReplInfo.getStagingDir().toString());
+      replLogger.startLog();
+      long numBytesWritten = dumpAtlasMetaData(atlasRequestBuilder, atlasReplInfo);
+      LOG.debug("Finished dumping atlas metadata, total:{} bytes written", numBytesWritten);
+      replLogger.endLog(0L);

Review comment:
       Do you want to send 0 or send the bytes written? Not sure how useful that is though




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org