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

Data loader (GUI component) #7572

Merged
merged 12 commits into from
May 4, 2019
Merged

Conversation

vogievetsky
Copy link
Contributor

This PR implements the GUI part of #7502 and depends on #7531 being merged.
The data loader / spec editor is fully functional for index and index_parallel tasks and with a few more changes and also #7566 being merged it will be able to handle streaming data also (but there is no need to wait for #7566).

Since this PR required so much UI work a lot of other goodies in the console were updated to accommodate it:

  • Remove mocha and use jest exclusively
  • Add helper scripts to generate components
  • Massively improve the AutoForm to be flexible enough for all the new use-cases in the code
  • Rearrange the header to accommodate the new view (in particular rename SQL to Query so it is a verb)
  • Added some nice object modification utils
  • Encapsulated QueryState into a class
  • Improved the webpack dev server npm start script API

Here is a screenshot of the Schema design page:

image

@fjy fjy added this to the 0.15.0 milestone Apr 29, 2019
@vogievetsky
Copy link
Contributor Author

Might change some copy soon but felt cute in this gif: https://imgur.com/a/nvzCs4V (too big for GH embed)

Copy link
Member

@clintropolis clintropolis left a comment

Choose a reason for hiding this comment

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

lgtm 👍

type: 'index',
spec: {
ioConfig: deepSet(ioConfig, 'type', 'index')
// dataSchema: {
Copy link
Member

Choose a reason for hiding this comment

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

why is this block commented?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That will be commented in to support #7566

tuningConfig?: TuningConfig;
}

export type IngestionType = 'kafka' | 'kinesis' | 'index_hadoop' | 'index' | 'index_parallel';
Copy link
Member

Choose a reason for hiding this comment

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

It seems like it would be really useful in the future to figure out a way to populate this stuff based on the set of loaded extensions, but I'm not sure the best mechanism to do that at this point.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well that is just a type, so in the future it would probably become string. I was planning of proposing a system for extending the data loader to arbitrary extensions. So that every extension could declare a json blob (that I will propose) and then be able to 'register' itself with the data loader

}
];

it('works for path, ignore-arrays', () => {
Copy link
Member

Choose a reason for hiding this comment

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

heh, nice 👍

{!selectedMetricSpec && this.renderDimensionSpecControls()}
{!selectedDimensionSpec && this.renderMetricSpecControls()}
{this.renderChangeRollupAction()}
{this.renderChangeDime
Copy link
Member

Choose a reason for hiding this comment

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

nit: this reads strangely, but it's just taken from the docs...

{!selectedMetricSpec && this.renderDimensionSpecControls()}
{!selectedDimensionSpec && this.renderMetricSpecControls()}
{this.renderChangeRollupAction()}
{this.renderChangeDime
Copy link
Member

Choose a reason for hiding this comment

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

nit: same about reading a bit strange, but also copied from the docs...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I was going to submit an issue about that part being a bit unclean in the druid ingestion spec.


// copied from http://goo.gl/0ejHHW with small tweak to make dddd not pass on its own
// tslint:disable-next-line:max-line-length
export const ISO_MATCHER = new RegExp(/^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))(T((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)$/);
Copy link
Member

Choose a reason for hiding this comment

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

oh man, dates and times are just the worst 🙃

"version": "7.3.4",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.3.4.tgz",
"integrity": "sha512-jRsuseXBo9pN197KnDwhhaaBzyZr2oIcLHHTt2oDdQrej5Qp57dCCJafWx5ivU8/alEYDpssYqv1MUqcxwQlrA==",
"version": "7.4.3",
Copy link
Member

Choose a reason for hiding this comment

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

just leaving a comment to call out that we'll need to update versions in the license stuff for next release

@clintropolis clintropolis merged commit baf54f3 into apache:master May 4, 2019
@vogievetsky vogievetsky deleted the data-loader-gui branch May 4, 2019 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants