Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Apekshit Sharma <[email protected]>
  • Loading branch information
apeksharma committed Jun 12, 2020
1 parent be218a0 commit bd997f6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* ‍
*/

public class InvalidEntityException extends RuntimeException {
public class InvalidEntityException extends ImporterException {

private static final long serialVersionUID = 1988238764876411857L;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public void onItem(RecordItem recordItem) throws ImporterException {
try {
entityId = transactionHandler.getEntity(recordItem);
} catch (InvalidEntityException e) { // transaction can have invalid topic/contract/file id
log.error(e);
log.warn("Invalid entity encountered for consensusTimestamp {} : {}", consensusNs, e.getMessage());
entityId = null;
}
TransactionTypeEnum transactionTypeEnum = TransactionTypeEnum.of(recordItem.getTransactionType());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.HashSet;
import java.util.Set;
import javax.inject.Named;
import javax.sql.DataSource;
import lombok.RequiredArgsConstructor;
Expand Down Expand Up @@ -59,7 +60,7 @@ public class SqlEntityListener implements EntityListener, RecordStreamFileListen
private long batch_count = 0;
// Keeps track of entityIds seen in the current file being processed. This is for optimizing inserts into
// t_entities table so that insertion of node and treasury ids are not tried for every transaction.
private HashSet<EntityId> entityIds;
private Set<EntityId> entityIds;
private PreparedStatement sqlInsertTransaction;
private PreparedStatement sqlInsertEntityId;
private PreparedStatement sqlInsertTransferList;
Expand Down

0 comments on commit bd997f6

Please sign in to comment.