-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Make pageSize configurable #1797
Conversation
This will address the issue #1796. A new property called azkaban.display.numOfExecutions will be added in the azkaban.properties and be used to determine the number of rows to be displayed.
Thanks. Please see the config key naming conventions at |
Names have been changed to follow the naming convention! |
Thanks for the feedback. I'll check out the SaveAction plugin, I thought it only supported intellij and I'm using eclipse but I guess I was wrong! |
Also added a new line at the end in the properties file
Installed intellij and applied the style sheet, though it didn't add a new line at the end so I manually added one. Also refactor - rename variable doesn't work properly so I had to rename them one by one as well! |
@@ -106,6 +108,7 @@ public void init(final ServletConfig config) throws ServletException { | |||
this.label = props.getString("azkaban.label", ""); | |||
this.color = props.getString("azkaban.color", "#FF0000"); | |||
this.passwordPlaceholder = props.getString("azkaban.password.placeholder", "Password"); | |||
this.displayExecutionPageSize = props.getInt("azkaban.display.execution_page_size", 16); |
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 define new config keys in the Constants class.
@@ -320,6 +323,8 @@ protected Page newPage(final HttpServletRequest req, final HttpServletResponse r | |||
page.add("triggerPlugins", this.triggerPlugins); | |||
} | |||
|
|||
page.add("displayExecutionPageSize", displayExecutionPageSize); |
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.
Make the key "displayExecutionPageSize" a constant?
public int getDisplayExecutionPageSize() { | ||
return displayExecutionPageSize; | ||
} | ||
} |
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.
Add new line.
keys were extracted to a constant. |
hm not sure why the build is failing. any ideas? |
I would download the raw travis log and look for test failures. How to find test failure from the ci log Download the raw log |
I added the tip to https://github.com/azkaban/azkaban/wiki/Developer-Tools-and-Tips |
Codecov Report
@@ Coverage Diff @@
## master #1797 +/- ##
============================================
+ Coverage 32.88% 32.94% +0.05%
+ Complexity 2633 2632 -1
============================================
Files 404 404
Lines 29066 29068 +2
Branches 3699 3699
============================================
+ Hits 9557 9575 +18
+ Misses 18634 18614 -20
- Partials 875 879 +4
Continue to review full report at Codecov.
|
Pull Request Test Coverage Report for Build 3990
💛 - Coveralls |
@HappyRay the build seems to be fine, what do you think about those code coverages? |
@@ -226,6 +226,20 @@ | |||
public static final String QUEUEPROCESSING_ENABLED = "azkaban.queueprocessing.enabled"; | |||
|
|||
public static final String SESSION_TIME_TO_LIVE = "session.time.to.live"; | |||
|
|||
// allowed max size of project dir in mb | |||
public static final String PROJECT_DIR_MAX_SIZE = "azkaban.project_cache_max_size_in_mb"; |
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.
Why does this change show up here? This seems to belong to another change.
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.
@HappyRay there was a merge conflict while I was updating my branch to master's head. Would it be better to close this PR and open a new one?
|
||
public static class PageProperties { | ||
// number of rows to be displayed on the executions page. | ||
public static final String DISPLAY_EXECUTION_PAGE_SIZE = "displayExecutionPageSize"; |
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.
What's this for?
@kunkun-tang has added additional support for our new documentation system. Going forward, we would expect changes to include documentation changes as needed in the same PR whenever possible. That work is still in progress. Could you work with him to see if it is doable now? @kunkun-tang |
@HappyRay I'm happy to provide documentations for the changes. The last commit I made was for the merge conflicts that CI was flagging about. This PR's changes are pretty simple and straightforward. |
to avoid any confusions, I've reverted the merge. |
@HappyRay bump! |
Please work with @kunkun-tang |
@kunkun-tang could you review the changes please?! |
@fwantastic Please rebase from the latest upstream master. Will start reviewing it from there. Thanks! |
This will address the issue #1796. A new property called azkaban.display.numOfExecutions will be added in the azkaban.properties and be used to determine the number of rows to be displayed.
Also added a new line at the end in the properties file
@kunkun-tang I've rebased the branch and should be ready for review. I accidently committed a blank file so I removed it in the last commit |
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.
Generally LGTM. Only some trivials
@@ -41,3 +41,5 @@ jetty.connector.stats=true | |||
executor.connector.stats=true | |||
# Azkaban plugin settings | |||
azkaban.jobtype.plugin.dir=plugins/jobtypes | |||
#number of executions to be displayed | |||
azkaban.display.execution_page_size=100 |
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.
Isn't it too large for default solo server?
@@ -229,6 +229,9 @@ | |||
|
|||
// allowed max size of shared project dir in MB | |||
public static final String PROJECT_DIR_MAX_SIZE_IN_MB = "azkaban.project_cache_max_size_in_mb"; | |||
|
|||
// number of rows to be displayed on the executions page. | |||
public static final String DISPLAY_EXECUTION_PAGE_SIZE = "azkaban.display.execution_page_size"; |
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 removed, right?
@@ -369,4 +379,8 @@ protected void writeJSON(final HttpServletResponse resp, final Object obj, final | |||
resp.setContentType(JSON_MIME_TYPE); | |||
JSONUtils.toJSON(obj, resp.getOutputStream(), true); | |||
} | |||
|
|||
public int getDisplayExecutionPageSize() { |
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.
We may don't need to introduce public
here? package-access is good enough?
@@ -48,6 +48,8 @@ | |||
var projectName = "${project.name}"; | |||
var flowId = "${flowid}"; | |||
var execId = null; | |||
|
|||
var displayExecutionPageSize = "${displayExecutionPageSize}"; |
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.
Why it introduces an extra blank line?
- removing unused constants - making the default value 16 for the page size property - updating getDisplayExecutionPageSize method to package private - improving variable names
Thanks for the contribution! |
Hey @fwantastic , have you tested this feature before? |
hey @kunkun-tang, I've tested this manually on my machine but there's no test for it. was there any issues with this? |
Found a UI bug in #1797 , when we deploy latest master to our staging cluster. The observation of this bug is all execution history table is missing.  The cause looks like a javascript or backbone grammar issue. The fix is quite simple.
Yes. It turned out the page still missed execution entires when it is being initialized. I'm able to reproduce the issue in my local solo server. Per my understandg , Before {size} is fully loaded, the javascript started to call it. @fwantastic . And Javascript cannot find the value. Looks like my fix #1797 doesn't work during the initialization phase as well. |
@kunkun-tang I cloned master but I'm unable to replicate the issue on my end. I'm running the solo server locally on win 10 + cygwin + h2. However, I think I found the issue.
In historypage.vm, this should be included in 'head' section, just like line 51 in flowpage.vm
I've made these changes super long time ago on my old project, I think I tried to make the page size configurable on executions page as well and probably I missed to include it on historypage.vm on this pull request. But I really do not understand how it's working on mine. |
Looks like flowpage.vm already exists the change you mentioned. I think I found the issue. We need to add "page" parameter in
in AbstractAzkabanServlet class. @fwantastic |
@kunkun-tang but that is already added in HistoryServlet's handleHistoryPage method
and pageSize is declared as
|
That is for History Page. Looks like flow page also needs. @fwantastic |
#1797 introduced a bug that executions history cannot be displayed in executions tab give every project The issue is that javascript cannot find ${size}. The resolution is simple that we should add "size" to the context so that javascript is able to locate it.
@kunkun-tang Oh I was dumb.. I thought you were talking about the history page this whole time. Yes I totally forgot that this PR covers the flow page as well and I shouldn't have removed the size property in abstract servlet class. You are correct. |
This will address the issue #1796. A new property called azkaban.display.numOfExecutions will be added in the azkaban.properties and be used to determine the number of rows to be displayed.
As it will default to 16 when the property does not exist, it will not have any impact on the existing page size.