Skip to content

Commit 989e3db

Browse files
committed
README: replaced 'Astra' with 'target' in output log
1 parent 650fe6d commit 989e3db

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ Note: Above command also generates a log file `logfile_name.txt` to avoid log ou
4444
- Validation job will report differences as “ERRORS” in the log file as shown below
4545

4646
```
47-
22/09/27 11:21:24 ERROR DiffJobSession: Data mismatch found - Key: ek-1 %% mn1 %% c1 %% true Data: (Index: 4 Origin: 30 Target: 20 )
48-
22/09/27 11:21:24 ERROR DiffJobSession: Corrected mismatch data in Astra: ek-1 %% mn1 %% c1 %% true
49-
22/09/27 11:21:24 ERROR DiffJobSession: Data is missing in Astra: ek-2 %% mn2 %% c2 %% true
50-
22/09/27 11:21:24 ERROR DiffJobSession: Corrected missing data in Astra: ek-2 %% mn2 %% c2 %% true
47+
22/10/27 23:25:29 ERROR DiffJobSession: Missing target row found for key: Grapes %% 1 %% 2020-05-22 %% 2020-05-23T00:05:09.353Z %% skuid %% Aliquam faucibus
48+
22/10/27 23:25:29 ERROR DiffJobSession: Inserted missing row in target: Grapes %% 1 %% 2020-05-22 %% 2020-05-23T00:05:09.353Z %% skuid %% Aliquam faucibus
49+
22/10/27 23:25:30 ERROR DiffJobSession: Mismatch row found for key: Grapes %% 1 %% 2020-05-22 %% 2020-05-23T00:05:09.353Z %% skuid %% augue odio at quam Data: (Index: 8 Origin: Hello 3 Target: Hello 2 )
50+
22/10/27 23:25:30 ERROR DiffJobSession: Updated mismatch row in target: Grapes %% 1 %% 2020-05-22 %% 2020-05-23T00:05:09.353Z %% skuid %% augue odio at quam
5151
```
5252

5353
- Please grep for all `ERROR` from the output log files to get the list of missing and mismatched records.
@@ -58,8 +58,8 @@ Note: Above command also generates a log file `logfile_name.txt` to avoid log ou
5858
- Enable/disable this feature using one or both of the below setting in the config file
5959

6060
```
61+
spark.target.autocorrect.missing true|false
6162
spark.target.autocorrect.mismatch true|false
62-
spark.target.custom.writeTime true|false
6363
```
6464

6565
# Migrating specific partition ranges

src/main/java/datastax/astra/migrate/DiffJobSession.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,13 @@ public void printCounts(String finalStr) {
130130
private void diff(Row sourceRow, Row astraRow) {
131131
if (astraRow == null) {
132132
missingCounter.incrementAndGet();
133-
logger.error("Data is missing in Target: " + getKey(sourceRow));
133+
logger.error("Missing target row found for key: " + getKey(sourceRow));
134134
//correct data
135135

136136
if (autoCorrectMissing) {
137137
astraSession.execute(bindInsert(astraInsertStatement, sourceRow, null));
138138
correctedMissingCounter.incrementAndGet();
139-
logger.error("Corrected missing data in Target: " + getKey(sourceRow));
139+
logger.error("Inserted missing row in target: " + getKey(sourceRow));
140140
}
141141

142142
return;
@@ -145,7 +145,7 @@ private void diff(Row sourceRow, Row astraRow) {
145145
String diffData = isDifferent(sourceRow, astraRow);
146146
if (!diffData.isEmpty()) {
147147
mismatchCounter.incrementAndGet();
148-
logger.error("Data mismatch found - Key: " + getKey(sourceRow) + " Data: " + diffData);
148+
logger.error("Mismatch row found for key: " + getKey(sourceRow) + " Mismatch: " + diffData);
149149

150150
if (autoCorrectMismatch) {
151151
if (isCounterTable) {
@@ -154,7 +154,7 @@ private void diff(Row sourceRow, Row astraRow) {
154154
astraSession.execute(bindInsert(astraInsertStatement, sourceRow, null));
155155
}
156156
correctedMismatchCounter.incrementAndGet();
157-
logger.error("Corrected mismatch data in Target: " + getKey(sourceRow));
157+
logger.error("Updated mismatch row in target: " + getKey(sourceRow));
158158
}
159159

160160
return;
@@ -172,7 +172,7 @@ private String isDifferent(Row sourceRow, Row astraRow) {
172172

173173
boolean isDiff = dataType.diff(source, astra);
174174
if (isDiff) {
175-
diffData.append(" (Index: " + index + " Origin: " + source + " Target: " + astra + " ) ");
175+
diffData.append("(Index: " + index + " Origin: " + source + " Target: " + astra + " ) ");
176176
}
177177
});
178178

0 commit comments

Comments
 (0)