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

refactor search index builder to store urn parts efficiently (#1937) #1972

Merged
merged 3 commits into from
Oct 29, 2020

Conversation

jywadhwani
Copy link
Contributor

@jywadhwani jywadhwani commented Oct 28, 2020

Tested the following way

  1. Run ./docker/dev.sh with this diff
  2. Ingested a new dataset using the following command
    curl 'http://localhost:8080/datasets?action=ingest' -X POST -H 'X-RestLi-Protocol-Version:2.0.0' --data '{"snapshot": {"aspects":[{"com.linkedin.common.Ownership":{"owners":[{"owner":"urn:li:corpuser:fbar","type":"DATAOWNER"}],"lastModified":{"time":0,"actor":"urn:li:corpuser:fbar"}}},{"com.linkedin.dataset.UpstreamLineage":{"upstreams":[{"auditStamp":{"time":0,"actor":"urn:li:corpuser:fbar"},"dataset":"urn:li:dataset:(urn:li:dataPlatform:foo,barUp,PROD)","type":"TRANSFORMED"}]}},{"com.linkedin.common.InstitutionalMemory":{"elements":[{"url":"https://www.linkedin.com","description":"Sample doc","createStamp":{"time":0,"actor":"urn:li:corpuser:fbar"}}]}},{"com.linkedin.schema.SchemaMetadata":{"schemaName":"FooEvent","platform":"urn:li:dataPlatform:foo","version":0,"created":{"time":0,"actor":"urn:li:corpuser:fbar"},"lastModified":{"time":0,"actor":"urn:li:corpuser:fbar"},"hash":"","platformSchema":{"com.linkedin.schema.KafkaSchema":{"documentSchema":"{\"type\":\"record\",\"name\":\"MetadataChangeEvent\",\"namespace\":\"com.linkedin.mxe\",\"doc\":\"Kafka event for proposing a metadata change for an entity.\",\"fields\":[{\"name\":\"auditHeader\",\"type\":{\"type\":\"record\",\"name\":\"KafkaAuditHeader\",\"namespace\":\"com.linkedin.avro2pegasus.events\",\"doc\":\"Header\"}}]}"}},"fields":[{"fieldPath":"foo","description":"Bar","nativeDataType":"string","type":{"type":{"com.linkedin.schema.StringType":{}}}}]}}],"urn":"urn:li:dataset:(urn:li:dataPlatform:foo,mBar,PROD)"}}'
  3. Made sure the dataset is both searchable and browsable.

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable)

@keremsahin1
Copy link
Contributor

Maybe send out two commits for easier review: one for revert of the revert and the other for the actual fix after revert?

@jplaisted
Copy link
Contributor

Please wait for #1971. You can patch and rebase on top of it if you want to do the work now.

@jywadhwani
Copy link
Contributor Author

Maybe send out two commits for easier review: one for revert of the revert and the other for the actual fix after revert?

Done. The first commit is revert of the revert (i.e. cherry-pick) and the second is the actual fix.

@jplaisted
Copy link
Contributor

Maybe send out two commits for easier review: one for revert of the revert and the other for the actual fix after revert?

Done. The first commit is revert of the revert (i.e. cherry-pick) and the second is the actual fix.

Neato. That'll make it easier to review :)

@keremsahin1
Copy link
Contributor

Neato

Neato the robot? Didn't get the reference :)

@jplaisted
Copy link
Contributor

Neato

Neato the robot? Didn't get the reference :)

(colloquial, slang) Neat (in the sense of being excellent or desirable).
Oh, neato! My car is fixed.

https://en.wiktionary.org/wiki/neato#:~:text=(file)-,Interjection,Oh%2C%20neato!

Just another way of saying "neat" lol

@keremsahin1
Copy link
Contributor

keremsahin1 commented Oct 28, 2020

Just another way of saying "neat" lol

Haha TIL

@jplaisted
Copy link
Contributor

It's easier to write, has more specific asserts, and has better error messages. We did talk about this a few weeks ago :)

Copy link
Contributor

@nagarjunakanamarlapudi nagarjunakanamarlapudi left a comment

Choose a reason for hiding this comment

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

LGTM

@jywadhwani jywadhwani merged commit 0c92a8e into datahub-project:master Oct 29, 2020
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.

4 participants