[ 
https://issues.apache.org/jira/browse/HIVE-21671?focusedWorklogId=238718&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-238718
 ]

ASF GitHub Bot logged work on HIVE-21671:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 07/May/19 19:00
            Start Date: 07/May/19 19:00
    Worklog Time Spent: 10m 
      Work Description: sankarh commented on pull request #615: HIVE-21671: 
Replicate Streaming ingestion with transactional batch size as 1.
URL: https://github.com/apache/hive/pull/615#discussion_r281785491
 
 

 ##########
 File path: 
streaming/src/java/org/apache/hive/streaming/AbstractRecordWriter.java
 ##########
 @@ -494,24 +494,28 @@ protected void checkAutoFlush() throws 
StreamingIOFailure {
     return addedPartitions;
   }
 
-  protected RecordUpdater createRecordUpdater(final Path partitionPath, int 
bucketId, Long minWriteId,
-    Long maxWriteID)
-    throws IOException {
+  protected RecordUpdater createRecordUpdater(List<String> partitionValues, 
final Path partitionPath,
+                                              int bucketId, Long minWriteId, 
Long maxWriteID)
+          throws IOException {
     // Initialize table properties from the table parameters. This is required 
because the table
     // may define certain table parameters that may be required while writing. 
The table parameter
     // 'transactional_properties' is one such example.
     Properties tblProperties = new Properties();
     tblProperties.putAll(table.getParameters());
-    return acidOutputFormat.getRecordUpdater(partitionPath,
-      new AcidOutputFormat.Options(conf)
-        .filesystem(fs)
-        .inspector(outputRowObjectInspector)
-        .bucket(bucketId)
-        .tableProperties(tblProperties)
-        .minimumWriteId(minWriteId)
-        .maximumWriteId(maxWriteID)
-        .statementId(statementId)
-        .finalDestination(partitionPath));
+
+    AcidOutputFormat.Options options = new AcidOutputFormat.Options(conf)
+            .filesystem(fs)
+            .inspector(outputRowObjectInspector)
+            .bucket(bucketId)
+            .tableProperties(tblProperties)
+            .minimumWriteId(minWriteId)
+            .maximumWriteId(maxWriteID)
+            .statementId(statementId)
+            .finalDestination(partitionPath);
+
+    // Add write directory information in the connection object.
+    conn.addWriteDirectoryInfo(partitionValues, 
AcidUtils.baseOrDeltaSubdirPath(partitionPath, options));
 
 Review comment:
   It is a common method used by multiple places.  Also, the input options 
decide what is the dir type.  I think, it is not confusing as reader would 
understand from the code. I will keep it as it is.
 
----------------------------------------------------------------
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


Issue Time Tracking
-------------------

    Worklog Id:     (was: 238718)
    Time Spent: 1h 50m  (was: 1h 40m)

> Replicate Streaming ingestion with transactional batch size as 1.
> -----------------------------------------------------------------
>
>                 Key: HIVE-21671
>                 URL: https://issues.apache.org/jira/browse/HIVE-21671
>             Project: Hive
>          Issue Type: Sub-task
>          Components: repl, Streaming, Transactions
>    Affects Versions: 4.0.0
>            Reporter: Sankar Hariappan
>            Assignee: Sankar Hariappan
>            Priority: Major
>              Labels: DR, pull-request-available, replication
>         Attachments: HIVE-21671.01.patch
>
>          Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> Replication streaming ingest HiveStreamingConnection on ACID tables with 
> transaction batch size as 1.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to