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

[FEATURE] Add index refresh job management commands #57

Closed
Tracked by #3
dai-chen opened this issue Oct 3, 2023 · 1 comment
Closed
Tracked by #3

[FEATURE] Add index refresh job management commands #57

dai-chen opened this issue Oct 3, 2023 · 1 comment
Assignees
Labels
0.1.1 enhancement New feature or request

Comments

@dai-chen
Copy link
Collaborator

dai-chen commented Oct 3, 2023

Is your feature request related to a problem?

Currently, there is no dedicated commands for index refresh management. For restart, we overload CREATE IF NOT EXISTS to serve this purpose. However, this caused problem like there is no way to differentiate create or restart.

What solution would you like?

Proposed solution is to provide dedicated commands as below (spec will be finalized later):

SHOW INDEX JOBS [ON tableName]

Description: Show Flint index info including properties. This is like an enhanced SHOW command with some DESC info for caller convenience.

# Example: Show all jobs
SHOW INDEX JOBS
Flint job name | kind | auto_refresh | properties
-----------------------------------------------------------
flint_http_logs_skipping_index | skipping | false | {}
flint_alb_logs_elb_and_requestUri_index | covering | true | { ... }
flint_alb_logs_elb_and_clientIp_index | covering | true | { ... }

# Example: Show specific job
SHOW INDEX JOBS ON alb_logs
Flint job name | kind | auto_refresh | properties
-----------------------------------------------------------
flint_alb_logs_elb_and_requestUri_index | true | { ... }
flint_alb_logs_elb_and_clientIp_index | true | { ... }

# Example: Show MV job
SHOW INDEX JOBS ON alb_logs_metrics
Flint job name | kind | auto_refresh | properties
-----------------------------------------------------------
flint_alb_logs_metrics | mv | true | { ... }

RECOVER INDEX JOB flintJobName

Description: Restart index streaming job. It's caller responsibility to make sure previous streaming job already stopped (because it maybe in other SparkContext).

# Examples: Recover skipping index job
RECOVER INDEX JOB flint_http_logs_skipping_index
success

# Examples: Recover covering index job
RECOVER INDEX JOB flint_alb_logs_elb_and_requestUri_index
success

# Examples: Recover MV job
RECOVER INDEX JOB flint_alb_logs_metrics
success
@dai-chen
Copy link
Collaborator Author

dai-chen commented Nov 3, 2023

SHOW command is deprioritized due to index state and runtime info moved to Flint metadata log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.1.1 enhancement New feature or request
Development

No branches or pull requests

1 participant