maheshk114 commented on a change in pull request #615: HIVE-21671: Replicate
Streaming ingestion with transactional batch size as 1.
URL: https://github.com/apache/hive/pull/615#discussion_r281501969
##########
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:
This will be always delta ..using base or delta may give wrong impression
that it can be base or delete delta in some cases
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]