Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointerException in ParserUtils.parseConfig if config is missing <final> element #318

Closed
erwa opened this issue Jun 6, 2019 · 0 comments
Assignees

Comments

@erwa
Copy link
Contributor

erwa commented Jun 6, 2019

Currently, ParserUtils assumes that each <property> in the job config has the following 4 subelements:

  • <name>
  • <value>
  • <final>
  • <source>

<final> may not always be present, causing a NPE:

2019-06-06 00:13:10,516 [ERROR] from history.HistoryFileMover in pool-4-thread-1 - Encountered exception while moving history directories
java.lang.NullPointerException: null
        at com.linkedin.tony.util.ParserUtils.parseConfig(ParserUtils.java:214)
        at cache.CacheWrapper.updateCaches(CacheWrapper.java:90)
        at history.HistoryFileMover.moveIntermediateToFinished(HistoryFileMover.java:72)
        at history.HistoryFileMover.lambda$new$0(HistoryFileMover.java:62)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

To be more robust, we should add null checks.

@erwa erwa self-assigned this Jun 6, 2019
erwa pushed a commit that referenced this issue Jun 6, 2019
erwa added a commit that referenced this issue Jun 6, 2019
…<final> element #318 (#319)

* NullPointerException in ParserUtils.parseConfig if config is missing <final> element #318

* Use -> Using

* Added test resource folder
@erwa erwa closed this as completed Jun 6, 2019
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

No branches or pull requests

1 participant