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

7_THS_displayEvents #117

Merged
merged 11 commits into from
Dec 12, 2018
Merged

Conversation

pdtran3k6
Copy link
Contributor

No description provided.

@pdtran3k6 pdtran3k6 self-assigned this Dec 3, 2018
@pdtran3k6 pdtran3k6 changed the title 7_WIP_displayEvents 7_WIP_THS_displayEvents Dec 3, 2018
@pdtran3k6 pdtran3k6 mentioned this pull request Dec 3, 2018
@pdtran3k6 pdtran3k6 changed the title 7_WIP_THS_displayEvents 7_THS_displayEvents Dec 3, 2018
@pdtran3k6 pdtran3k6 force-pushed the 7_phattran_eventReader branch 3 times, most recently from 9609772 to 53bd24e Compare December 3, 2018 20:14
@erwa
Copy link
Contributor

erwa commented Dec 4, 2018

Hey, it's difficult to see what the incremental changes in your PR are, since they include all the changes from previous (including unmerged) PRs.

Can you push all your branches to linkedin/TonY and update the base branch of each PR so that each PR only shows the incremental change?

Ref: https://blog.github.com/2016-08-15-change-the-base-branch-of-a-pull-request/

Copy link
Contributor

@erwa erwa left a comment

Choose a reason for hiding this comment

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

Looks good overall. I actually realized I reviewed the dispatching code rather than the displaying code. (Another reason to push your branches to linkedin/TonY and select the base branch for your pull requests so that only incremental changes are shown.)

@pdtran3k6
Copy link
Contributor Author

pdtran3k6 commented Dec 4, 2018

Ok, I confirmed that I have permission to push branches to linkedin/tony. I will clone and work on the linkedin/tony repo for the next PR. For now, I think you can check the changes of any of my PR by picking the last commit. @erwa

Copy link
Contributor

@erwa erwa left a comment

Choose a reason for hiding this comment

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

Looks good. A few minor comments.

@pdtran3k6 pdtran3k6 force-pushed the 7_phattran_eventReader branch 5 times, most recently from 2c93bb9 to 8b2636a Compare December 10, 2018 03:07
@erwa
Copy link
Contributor

erwa commented Dec 12, 2018

This branch also has conflicts that need manual resolution.

Used fs.rename instead of FileUtil.copy for performance reason
Added tony-site.xml configs into tonyConf
Moved tony.history.location out of tony-default.xml
Fixed util function + skips config check in test
Modified reader/writer and event wrapper from MapReduce
Added licenses + generating Avro java files from schema
Write events (init + finished) to jhist file
Reverted back to 30s timeout
Removed unused import
Removed unused code
Added new key + comment in tony-default.xml
Added max attempts for event writer
Reordered init event
Refactored code
Added event handler thread
5_ParserUtils tests (tony-framework#106)

* Refactored code
Added tony-site.xml configs into tonyConf
Moved tony.history.location out of tony-default.xml
Fixed util function + skips config check in test
Removed redundate else statement in startTHS.sh
Replaced history file path in application.example.conf
Used TonyConfigurationKeys instead of hardcoded string
Added all config for history server in tony-default.xml + TonyConfigurationKeys
Refactored Tony config intialization method
Removed TonyClient unused Strings

* Generate intermediate date folders if necessary for each job
Added nested folder support for reading config file.
Hardcoded file path + return Collections.emptyList()
Set proper permission to nested folders.

* Reverted back to JUnit for testing since TestNG doesn't work properly with Play
Added ParserUtils tests
Updated config for BrowserTest + JobsMetadataPageControllerTest
Added config.xml for testing
Added fail reasons for tests
Added extra slash for HDFS file path (safeguard)
Removed extra slash (BUG)
Modified reader/writer and event wrapper from MapReduce
Added licenses + generating Avro java files from schema
Write events (init + finished) to jhist file
Reverted back to 30s timeout
Removed unused import
Removed unused code
Added new key + comment in tony-default.xml
Added max attempts for event writer
Reordered init event
Refactored code
Added event handler thread
Modified reader/writer and event wrapper from MapReduce
Added licenses + generating Avro java files from schema
Write events (init + finished) to jhist file
Reverted back to 30s timeout
Removed unused import
Removed unused code
Added new key + comment in tony-default.xml
Added max attempts for event writer
Reordered init event
Refactored code
Added nested folder support for reading config file.
Hardcoded file path + return Collections.emptyList()
Set proper permission to nested folders.
Added tony-site.xml configs into tonyConf
Moved tony.history.location out of tony-default.xml
Fixed util function + skips config check in test
Updated error msg
Changed data next API
Atmpt to fix Travis build
@pdtran3k6 pdtran3k6 merged commit c738a62 into tony-framework:master Dec 12, 2018
@pdtran3k6 pdtran3k6 deleted the 7_phattran_eventReader branch December 12, 2018 20:02
public void writeEvent(BlockingQueue<Event> queue, DataFileWriter<Event> writer) {
Event event = null;
try {
event = queue.poll();
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be switched to .take() and we should use interrupt to stop the event handler.

Currently, we are doing a lot of spinning:

while (!isStopped) {
  writeEvent(...);
}

is going to use a lot of CPU looping over and over again.

Copy link
Contributor

Choose a reason for hiding this comment

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

Filed #128 for this.

private Path jobDir = new Path("./src/test/resources/jobDir");
private TonyJobMetadata metadata = new TonyJobMetadata();

private List<Event> parseEvents(FileSystem fs, Path jobDir, TonyJobMetadata metadata) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please don't duplicate the code in ParserUtils.parseEvents() here. You can move ParserUtils from the tony-history-server module to the tony-core module to avoid the cyclic dependency.

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.

None yet

3 participants