forked from hopshadoop/hops-metadata-dal-impl-ndb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HOPSFS-162: Fixed Retry Cache Cleaner (hopshadoop#64)
* HOPSFS-162: Fixed Retry Cache Cleaner * HOPSFS-162: create an index on hdfs_retry_cache_entry.epoch
- Loading branch information
Showing
2 changed files
with
11 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
-- create an index on hdfs_retry_cache_entry.epoch | ||
-- check if the create index fix is not already applied | ||
|
||
SELECT COUNT(*) INTO @index_exists FROM information_schema.statistics WHERE table_schema = 'hops' AND table_name = 'hdfs_retry_cache_entry' AND index_name = 'epoch_idx'; | ||
|
||
SET @create_index_stmt = IF(@index_exists = 0, 'ALTER TABLE hdfs_retry_cache_entry ADD INDEX epoch_idx (epoch);', 'SELECT "Index already exists";'); | ||
PREPARE stmt FROM @create_index_stmt; | ||
EXECUTE stmt; | ||
DEALLOCATE PREPARE stmt; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters