Skip to content

NIFI-3466 - Addresses ParseCEF Locale related failures and introduce ability to define Locale of logs#1614

Closed
trixpan wants to merge 1 commit intoapache:masterfrom
trixpan:NIFI-3466
Closed

NIFI-3466 - Addresses ParseCEF Locale related failures and introduce ability to define Locale of logs#1614
trixpan wants to merge 1 commit intoapache:masterfrom
trixpan:NIFI-3466

Conversation

@trixpan
Copy link
Copy Markdown
Contributor

@trixpan trixpan commented Mar 23, 2017

Thank you for submitting a contribution to Apache NiFi.

In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:

For all changes:

  • Is there a JIRA ticket associated with this PR? Is it referenced
    in the commit message?

  • Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.

  • Has your PR been rebased against the latest commit within the target branch (typically master)?

  • Is your initial contribution a single, squashed commit?

For code changes:

  • Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder?
  • Have you written or updated unit tests to verify your changes?
  • ~~~If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?~~~
  • ~~~If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly?~~~
  • ~~~If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly?~~~
  • If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties?

For documentation related changes:

  • Have you ensured that format looks appropriate for the output in which it is rendered?

Note:

Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.

@trixpan
Copy link
Copy Markdown
Contributor Author

trixpan commented Mar 23, 2017

@pvillard31 @apiri this should hopefully address the Locale related errors affecting ParseCEF.

@trixpan
Copy link
Copy Markdown
Contributor Author

trixpan commented Mar 23, 2017

also please note there seem to be an unrelated issue affecting another test unit that fails unter pt_BR and fr_FR but passes ja_JP. I suspect it is a comma vs dot number notation issue.

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.apache.nifi.schemaregistry.processors.TransformersTest
Tests run: 14, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 0.518 sec <<< FAILURE! - in org.apache.nifi.schemaregistry.processors.TransformersTest
[5] input_csv/decimal_logicalType.txt,input_avro/decimal_logicalType_valid_scale_with_no_default.txt,expected_ouput_csv/decimal_logicalType.txt (testCSVRoundtrip)(org.apache.nifi.schemaregistry.processors.TransformersTest)  Time elapsed: 0.013 sec  <<< ERROR!
java.lang.NumberFormatException: null
	at java.math.BigDecimal.<init>(BigDecimal.java:494)
	at java.math.BigDecimal.<init>(BigDecimal.java:383)
	at java.math.BigDecimal.<init>(BigDecimal.java:806)
	at org.apache.nifi.schemaregistry.processors.CSVUtils.write(CSVUtils.java:161)
	at org.apache.nifi.schemaregistry.processors.TransformersTest.testCSVRoundtrip(TransformersTest.java:149)

[6] input_csv/decimal_logicalType.txt,input_avro/decimal_logicalType_invalid_scale_with_default.txt,expected_ouput_csv/decimal_logicalType_invalid_scale.txt (testCSVRoundtrip)(org.apache.nifi.schemaregistry.processors.TransformersTest)  Time elapsed: 0.004 sec  <<< ERROR!
java.lang.NumberFormatException: null
	at java.math.BigDecimal.<init>(BigDecimal.java:494)
	at java.math.BigDecimal.<init>(BigDecimal.java:383)
	at java.math.BigDecimal.<init>(BigDecimal.java:806)
	at org.apache.nifi.schemaregistry.processors.CSVUtils.write(CSVUtils.java:161)
	at org.apache.nifi.schemaregistry.processors.TransformersTest.testCSVRoundtrip(TransformersTest.java:149)

[7] input_csv/decimal_logicalType_missing_value.txt,input_avro/decimal_logicalType_valid_scale_with_default.txt,expected_ouput_csv/decimal_logicalType_valid_scale_with_default.txt (testCSVRoundtrip)(org.apache.nifi.schemaregistry.processors.TransformersTest)  Time elapsed: 0.005 sec  <<< ERROR!
java.lang.NumberFormatException: null
	at java.math.BigDecimal.<init>(BigDecimal.java:494)
	at java.math.BigDecimal.<init>(BigDecimal.java:383)
	at java.math.BigDecimal.<init>(BigDecimal.java:806)
	at org.apache.nifi.schemaregistry.processors.CSVUtils.write(CSVUtils.java:161)
	at org.apache.nifi.schemaregistry.processors.TransformersTest.testCSVRoundtrip(TransformersTest.java:149)


Results :


Tests in error: 
  TransformersTest.testCSVRoundtrip:149 » NumberFormat
  TransformersTest.testCSVRoundtrip:149 » NumberFormat
  TransformersTest.testCSVRoundtrip:149 » NumberFormat

@trixpan
Copy link
Copy Markdown
Contributor Author

trixpan commented Mar 23, 2017

please ignore the last comment regarding the error above, seems to be a rebasing issue.

Copy link
Copy Markdown
Contributor

@pvillard31 pvillard31 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a minor comment otherwise LGTM. We have a green Travis build again! :)

"value is generally safe. Only change if having issues parsing CEF messages")
.required(true)
.addValidator(new ValidateLocale())
// .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to remove?

@pvillard31
Copy link
Copy Markdown
Contributor

Thanks @trixpan, LGTM, merging to master, thanks for all the efforts you put into locale related build stuff!

@asfgit asfgit closed this in a298f1a Mar 23, 2017
josephxsxn pushed a commit to josephxsxn/nifi that referenced this pull request Mar 23, 2017
Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com>

This closes apache#1614.
@trixpan trixpan deleted the NIFI-3466 branch May 15, 2017 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants