Skip to content

Commit 42481e7

Browse files
author
Nikolai Kolesnikov
committed
1/ Re-ordered to improve access to the processedPage variable
1 parent b137a15 commit 42481e7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main/java/com/amazon/aws/keyspaces/PersistCassandraRowToParquet.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ void processRowsAsync(AsyncResultSet rs, Throwable error) {
176176
//rs.fetchNextPage().whenComplete(this::processRowsAsync);
177177
//processedPage++;
178178
rs.fetchNextPage().whenComplete((thisRs, thisError) ->{
179-
processRowsAsync(thisRs, thisError);
180179
processedPage++;
180+
processRowsAsync(thisRs, thisError);
181181
});
182182
} else {
183183
LOG.info("Completed to read pages");

src/main/java/com/amazon/aws/keyspaces/Utils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public static void writeState(State state) {
1818
FileOutputStream myFileOutputStream = new FileOutputStream(System.getProperty("user.dir") + "/state.ser");
1919
mapper.writeValue(myFileOutputStream, state);
2020
} catch (Exception e) {
21-
LOG.severe("Error when saving to file." + e.getMessage());
21+
LOG.severe("Error when saving to the state file." + e.getMessage());
2222
}
2323
}
2424

@@ -29,7 +29,7 @@ public static State readState() {
2929
FileInputStream myFileInputStream = new FileInputStream(System.getProperty("user.dir") + "/state.ser");
3030
state = mapper.readValue(myFileInputStream, State.class);
3131
} catch (Exception e) {
32-
LOG.severe("Error when loading from file." + e.getMessage());
32+
LOG.severe("Error when loading from the state file." + e.getMessage());
3333
}
3434
return state;
3535
}

0 commit comments

Comments
 (0)