|
74 | 74 | import java.sql.Connection;
|
75 | 75 | import java.sql.PreparedStatement;
|
76 | 76 | import java.sql.SQLException;
|
| 77 | +import java.text.NumberFormat; |
77 | 78 | import java.time.Duration;
|
78 | 79 | import java.time.Instant;
|
79 | 80 | import java.util.ArrayList;
|
@@ -572,8 +573,8 @@ protected void estimateFullRefreshSyncSize(final JdbcDatabase database,
|
572 | 573 | // read a row and Stringify it to better understand the accurate volume of data sent over the wire.
|
573 | 574 | // However, this approach doesn't account for different row sizes.
|
574 | 575 | AirbyteTraceMessageUtility.emitEstimateTrace(PLATFORM_DATA_INCREASE_FACTOR * syncByteCount, Type.STREAM, syncRowCount, tableName, schemaName);
|
575 |
| - LOGGER.info(String.format("Estimate for table: %s : {sync_row_count: %s, sync_bytes: %s, total_table_row_count: %s, total_table_bytes: %s}", |
576 |
| - fullTableName, syncRowCount, syncByteCount, syncRowCount, syncByteCount)); |
| 576 | + LOGGER.info(String.format("Estimate for table in full refresh mode: %s : {rows_to_sync: %s, data_to_sync: %s}", |
| 577 | + fullTableName, NumberFormat.getInstance().format(syncRowCount), JdbcUtils.humanReadableByteCountSI(syncByteCount))); |
577 | 578 | }
|
578 | 579 | } catch (final SQLException e) {
|
579 | 580 | LOGGER.warn("Error occurred while attempting to estimate sync size", e);
|
@@ -614,8 +615,9 @@ protected void estimateIncrementalSyncSize(final JdbcDatabase database,
|
614 | 615 | // read a row and Stringify it to better understand the accurate volume of data sent over the wire.
|
615 | 616 | // However, this approach doesn't account for different row sizes
|
616 | 617 | AirbyteTraceMessageUtility.emitEstimateTrace(PLATFORM_DATA_INCREASE_FACTOR * syncByteCount, Type.STREAM, syncRowCount, tableName, schemaName);
|
617 |
| - LOGGER.info(String.format("Estimate for table: %s : {sync_row_count: %s, sync_bytes: %s, total_table_row_count: %s, total_table_bytes: %s}", |
618 |
| - fullTableName, syncRowCount, syncByteCount, tableRowCount, tableRowCount)); |
| 618 | + LOGGER.info(String.format("Estimate for table in incremental mode: %s : {rows_to_sync: %s, data_to_sync: %s, table_row_count: %s, table_size: %s}", |
| 619 | + fullTableName, NumberFormat.getInstance().format(syncRowCount), JdbcUtils.humanReadableByteCountSI(syncByteCount), NumberFormat.getInstance().format(tableRowCount), |
| 620 | + JdbcUtils.humanReadableByteCountSI(tableByteCount))); |
619 | 621 | } catch (final SQLException e) {
|
620 | 622 | LOGGER.warn("Error occurred while attempting to estimate sync size", e);
|
621 | 623 | }
|
|
0 commit comments