Aruha 1173 #838
Merged
Aruha 1173 #838
Conversation
Codecov Report
@@ Coverage Diff @@
## master #838 +/- ##
============================================
+ Coverage 53.18% 53.64% +0.46%
- Complexity 1639 1682 +43
============================================
Files 310 310
Lines 9206 9326 +120
Branches 806 837 +31
============================================
+ Hits 4896 5003 +107
- Misses 4021 4025 +4
- Partials 289 298 +9
Continue to review full report at Codecov.
|
|
batch.add(new BatchItem(sb.toString())); | ||
public static List<BatchItem> from(final String events) { | ||
final List<BatchItem> batch = new ArrayList<>(); | ||
int objectStart = locateOpenSquareBracket(events) + 1; |
adyach
Feb 16, 2018
Member
Maybe arrayStart to be compliant with arrayEnd?
Also why +1 here?
Maybe arrayStart to be compliant with arrayEnd?
Also why +1 here?
antban
Feb 16, 2018
Author
Member
@adyach not to parse too much, also, the name is perfectly correct. object start may be only openSquareBracket + 1 and further.
@adyach not to parse too much, also, the name is perfectly correct. object start may be only openSquareBracket + 1 and further.
import java.util.Optional; | ||
|
||
public class BatchItem { | ||
|
||
public enum Injection { | ||
METADATA("metadata"),; |
adyach
Feb 16, 2018
Member
,
,
} | ||
return idx; | ||
} | ||
|
||
} |
adyach
Feb 16, 2018
Member
\n
\n
|
||
event.put("metadata", sourceMetadata); | ||
event.put("foo", "Test data data data"); | ||
final BatchItem bi = BatchFactory.from("[" + event.toString(2) + "]").get(0); |
adyach
Feb 16, 2018
Member
new JSONArray().put(event).toString(2)
new JSONArray().put(event).toString(2)
|
deploy validation please |
|
deploy validation please |
deploy validation please |
2 similar comments
deploy validation please |
deploy validation please |
|
|
deploy validation please |
|
934ac9f
into
master
7 of 8 checks passed
7 of 8 checks passed
zappr
Approvals: @antban, @lmontrieux.
zappr/pr/specification
PR has passed specification checks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Do not reformat incoming messages while publishing
Description
Right now nakadi is parsing json while validating events and than stores events from parsed format to a kafka format. This may lead to problems user behavior (for example 0.0 and 0 should be treated in the same manner, but it is actually not)
This ticket prevents nakadi from this kind of modifications, removing only meaningless values from the events.