Skip to content

Commit

Permalink
resolved the issue for bad records not written in csv file when bad_r…
Browse files Browse the repository at this point in the history
…ecords_action=redirect

refactor the code for closing the streams
  • Loading branch information
anubhav100 authored and ravipesala committed Feb 24, 2017
1 parent bb0bc2e commit d8bbc3c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ protected Iterator<CarbonRowBatch> getIterator(final Iterator<CarbonRowBatch> ch
}
return childIter.hasNext();
}

@Override public CarbonRowBatch next() {
return processRowBatch(childIter.next(), localConverter);
}
Expand Down Expand Up @@ -163,6 +162,7 @@ private String getBadLogStoreLocation(String storeLocation) {
@Override
public void close() {
if (!closed) {
createBadRecordLogger().closeStreams();
super.close();
if (converters != null) {
for (RowConverter converter : converters) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ private String getBadLogStoreLocation(String storeLocation) {
public void close() {
if (!closed) {
super.close();
createBadRecordLogger().closeStreams();
if (converters != null) {
for (RowConverter converter : converters) {
converter.finish();
Expand Down

0 comments on commit d8bbc3c

Please sign in to comment.