-
Notifications
You must be signed in to change notification settings - Fork 161
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
7_THS_displayEvents #117
Conversation
9609772
to
53bd24e
Compare
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/ |
There was a problem hiding this 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.)
tony-core/src/main/java/com/linkedin/tony/util/HistoryFileUtils.java
Outdated
Show resolved
Hide resolved
tony-core/src/main/java/com/linkedin/tony/util/HistoryFileUtils.java
Outdated
Show resolved
Hide resolved
tony-core/src/main/java/com/linkedin/tony/util/HistoryFileUtils.java
Outdated
Show resolved
Hide resolved
tony-core/src/main/java/com/linkedin/tony/util/HistoryFileUtils.java
Outdated
Show resolved
Hide resolved
tony-core/src/main/java/com/linkedin/tony/util/HistoryFileUtils.java
Outdated
Show resolved
Hide resolved
tony-core/src/main/java/com/linkedin/tony/util/HistoryFileUtils.java
Outdated
Show resolved
Hide resolved
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 |
tony-core/src/main/java/com/linkedin/tony/TonyApplicationMaster.java
Outdated
Show resolved
Hide resolved
tony-core/src/main/java/com/linkedin/tony/util/HistoryFileUtils.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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.
2c93bb9
to
8b2636a
Compare
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
5262efb
to
9dc17ec
Compare
public void writeEvent(BlockingQueue<Event> queue, DataFileWriter<Event> writer) { | ||
Event event = null; | ||
try { | ||
event = queue.poll(); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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.
No description provided.