Clone Tools
  • last updated 18 mins ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
DRILL-7351: Added tokens to Web forms to prevent CSRF attacks

  1. … 25 more files in changeset.
DRILL-7222: Visualize estimated and actual row counts for a query

With statistics in place, it is useful to have the estimated rowcount along side the actual rowcount query profile's operator overview. A toggle button allows this with the estimated rows hidden by default

We can extract this from the Physical Plan section of the profile.

Added a toggle-ready table-column header

closes #1779

  1. … 5 more files in changeset.
DRILL-7202: Failed query shows warning that fragments made no progress

This bug arises because of the `toggleWarning()` javascript function that shows the warning if the number of slow major fragments matches the number of major fragments.

For failed queries, the number of major fragments = 0; and that matches the number of tags (which is also zero for a non-running query). Hence the warning shows.

DRILL-7048: Implement JDBC Statement.setMaxRows() with System Option

This introduces support for JDBC's Statement.setMaxRows(int) API, which can help Drill execute a query much faster if it knows that not ALL the records in the resultset will be consumed upfront.

This Commit introduces the core changes to support the feature within Drill's execution engine

Protobuf Changes

1. RunQuery: Added "autolimit_rowcount"

2. QueryProfile: Added "autoLimit"

3. Regenerated Java and C++ client files

REST API support

1. Support for REST server to interpret a submitted query and also for rendering this information for an executed query

2. Updates to the Freemarker templates (for WebUI)

3. Safety check within Javascript (for WebUI)

JDBC API support

1. Introduces backend execution of 'ALTER SESSION' to apply the auto-limiting of resultset size

2. Added Unit Tests for PreparedStatement and Statement objects

3. Added getter setter methods to be skipped in testing for org.apache.drill.jdbc.test.Drill2489CallsAfterCloseThrowExceptionsTest.testclosedPreparedStmtOfOpenConnMethodsThrowRight()

Updates based on review comments

Additional Updates

Test Cleanup

1. Revert Drill2489 hack

2. Formatting in *StatementTest

3. Removal f redundant `statement.close()`

4. Manage new Exception thrown when setting invalid maxRow values

Final updates

1. Test changes

2. Trim trailing spaces in auto-limit value (Javascript)

3. Before & After annotations to synchronize changes to system values for MaxRows(auto-limit)

Reorganized tests due to synchronized locking

Removed conflicting JsonCreator in QueryWrapper

Additional test cleanup

closes #1714

  1. … 34 more files in changeset.
DRILL-7036: Improve UI for alert and error messages closes #1644 This PR standardizes error and alert messages to a cleaner interface by leveraging Bootstraps UX elements for publishing the messages in a presentable format. Exceptions reported back to the browser and rendered in a neat tabular format (using Panels) All errors can be redirected to errorMessage.ftl which will render it in a neat format. Alerts are replaced with modals. Interactions (pages) affected by Alert modals 1. Missing Query submission 2. profile Query Rerun 3. invalid Profile Listing Fetch 4. invalid Option Value for update 5. Missing username/password submission

The errorMessage.ftl has been moved to root dir, and unused `error.ftl` was removed

  1. … 10 more files in changeset.
DRILL-6942: Provide ability to sort list of profiles on Drill Web UI

This provides an option to order the list of query profiles based on any of the displayed fields, including total duration. This way, a user can easily identify long running queries.

In addition, the number of profiles listed per page for both, completed and running list of queries, has been made configurable with the parameter: `drill.exec.http.profiles_per_page` (default is 10,25,50,100)

closes #1594

  1. … 5 more files in changeset.
DRILL-6939: Indicate when a query is submitted and is in progress

On query submission, a modal popup blocks further interaction until the result of the query are available.

Since the Query ID is not available at this point, the only way to cancel a running query is to navigate to it via the `/profiles` tab. For this, the modal allows a button to pop out to this tab without closing the current window which is waiting for the result-set.

[Update] Shared running query modal introduced

closes #1592

  1. … 4 more files in changeset.
DRILL-6933: Fix ctrl+enter when Impersonation is disabled

Without impersonation, the key combination did not work because a conditional block of the FTLs skipped the Javascript functions required for submitting with the key combination.

This commit fixes that by unifying the functions that are common to both approaches of submitting a query (with and without impersoination)

[Update] Changes made to isOnlyImpersonationEnabled method and onlyImpersonationEnabled variable

[Update] userName is a global var in the script

closes #1591

  1. … 6 more files in changeset.
DRILL-6922: Do not set return result set option on query level if it is the same as current value

1. Rename return result option name to `exec.query.return_result_set_for_ddl`.

2. Add check if option value is the same as current value in DrillSqlWorker before setting result set option on query level.

3. Separate Session and Query options on Web UI.

closes #1584

  1. … 5 more files in changeset.
DRILL-6879: Show warnings for potential performance issues

1. Introduced warning for non-progressive fragments. Based on a threshold (`drill.exec.http.profile.warning.progress.threshold`), if all fragments have not made progress within that time, a warning is issued. The default is 5 minutes (300 sec)

2. Introduced a warning if any of the buffered operators spill to disk.

3. Introduced a warning for operators where the longest running fragment runs beyond a minimum threshold (drill.exec.http.profile.warning.time.skew.min), and runs atleast 2 times longer than the average (drill.exec.http.profile.warning.time.skew.ratio.process). The clock symbol with a tooltip indicates the extent of the skew. For wait times, the ratio is defined by `drill.exec.http.profile.warning.time.skew.ratio.wait`

3. Introduced a warning for operators where the average wait time of a scan operator exceeds its processing time, for a minimum threshold (drill.exec.http.profile.warning.scan.wait.min). The turtle symbol with a tooltip indicates which scan operator spent more time waiting than processing.

4. TableBuilder Refactored

a. Using attribute map instead of String arguments, eg. for 'title'

b. Removed APIs that pass a hyperlink since that is never used.

closes #1572

  1. … 9 more files in changeset.
DRILL-6886: Cancel Query Button for running queries

The Freemarker template missed a check for a query's Running state to display the [Cancel] button.

The fix is trivial and only needs the check.

DRILL-6848: Duration panel in a query profile's WebUI does not open

DRILL-5571 ( PR #1531 ) accidentally introduced a bug that permanently keeps the "Duration" panel closed instead of opening it. This trivial patch fixes that.

DRILL-2035: Add ability to cancel multiple queries

Currently Drill UI allows canceling one query at a time.

This commit (on lines of DRILL-5571 / PR #1531) allows for cancelling multiple `running` queries.

DRILL-5571: Cancel running query from its Web UI

Currently, a running query can be cancelled by navigating to the Edit Query Tab of the profile page, making it difficult to access. This commit allows the user to cancel.

In addition, the Duration segment is also made visible by default rather than collapsed.

DRILL-6837: Missing reference for dynamically created Javascript library

A PR for DRILL-6084 broke the auto-complete library required for Edit Query page, with the removal of the static javascript library.

https://github.com/apache/drill/pull/1491/files#diff-2bb3c04f1a9eead1faf57212cce5d2a9

The dynamically loaded script is not defined in the Freemarker template page.

The fix is trivial.

DRILL-6611: Add Ctrl+Enter support for query submission

1. BugFix on parent commit: Ensure query submission is done with user name when impersonation is enabled.

2. Support non-Mac browsers

3. Support keyboard submission for profile pages with Edit Query tab.

  1. … 1 more file in changeset.
DRILL-6819: Remove invisible back link in Drill WebUI

  1. … 15 more files in changeset.
DRILL-6583: Add space between pagination links in Profiles (WebUI) list

Inject a small space to improve readability of the pagination links (CSS)

closes #1369

DRILL-6432: Show Button to print visualized query plan (#1278)

* DRILL-6432: Show Button to print visualized query plan

Having the capability to only print the visualized query plan means the user can specifyi the zoom level (in the printer settings) when printing large complex plans that might span multiple pages.

* Update based on review comment

Padded button by 15px to avoid sticking to pane

closes #1278

DRILL-6443: Enable Search for both running AND completed queries

When running a query in Drill, the `/profiles` page will show the search (and pagination) capabilities only for the top most visible table (i.e. Running Queries ).

The Completed Queries table will show the search feature only when there are no running queries. This is because the backend uses a generalized freemarker macro to define the seach capabilities for the tables being rendered. With running queries, both, running and completed queries tables have the same element ID, resulting in the search capability only being applied to the first table.

This modifies the Freemarker macro to take an additional argument for distinguishing between Running and Completed Queries table.

DRILL-5305: Query Profile must display Query ID

Introduced change to the Protobuf to inject the text-equivalent of the QueryID into the profile. This way, the profile's file name can be changed, but restored back based on this new field.

The Profile UI also shows the Query ID, though this is not inferred from this new field, for sake of backward compatibility with older profiles.

closes #1265

  1. … 6 more files in changeset.
DRILL-6320: Fixed license headers.

closes #1207

  1. … 2065 more files in changeset.
DRILL-6279: Indicate operators that spilled in-memory data to disk on Web UI

As part of this coomit added Bootstrap's Glyphicons.

closes #1197

  1. … 6 more files in changeset.
DRILL-5868: Support SQL syntax highlighting of queries

Based on the commit for DRILL-5981 (PR #1043), this commit further leverages the Ace JavaScript library with customizations specific to Drill.

This commit introduces the following to the Query Editor (including the Edit Query tab within an existing profile to rerunning the query).

1. Syntax highlighting (This is supported for submitted query profiles

2. Autocomplete supported in editors

3. Specifying Drill specific keywords and functions in visible autocomplete

4. Key snippets (template SQLs) allowing for rapid writing of syntax:

i. Query System Tables

ii. CView, CTAS and CTempTAS

iii. Alter Session

iv. Explain and Select * queries

NOTE: The lists for #3 and #4 are not exhaustive. As more features are added to Drill, these lists can be expanded.

Updates based on review comments

1. Disabled warning message

2. Extended reserved keyword list

3. Fixed bugs

List:

Update 1: Bug fix for when Impersonation is enabled

Update 2: Remove the duplicate editor that might get injected

Update 3: Removed trailing whitespaces in Javascripts

close apache/drill#1084

  1. … 8 more files in changeset.
DRILL-5996: Add ability to re-run queries from Profiles tab with impersonation and without authentication

closes #1061

  1. … 4 more files in changeset.
DRILL-5867: List profiles in pages rather than a long verbose listing

Leverage existing DataTables libraries to paginate a long pre-fetched list of profiles for listing.

Added benefit of querying through that list (search field) is also available for a user

Minor change made to the display text for prefetching of profiles (DRILL-5259) so that it is not confused with what this commit adds to the UI.

This closes #1029

  1. … 1 more file in changeset.
DRILL-5923: Display name for query state

closes #1021

  1. … 3 more files in changeset.
DRILL-5802: Provide a sortable table for tables within a query profile

Using the DataTables jQuery library, we can now sort tables (fragments and operators) to group like values or sort on a column.

In addition, additional tooltips have been provided for these columns

closes #969

  1. … 7 more files in changeset.
DRILL-5259: Allow listing a user-defined number of profiles

Added an additional field in the UI allowing a user to specify the max number of profiles to load via Refresh

closes #963

  1. … 1 more file in changeset.