-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Add repository-url module and move URLRepository #22752
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
Merged
Merged
Changes from 30 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
ad4f704
Add basic url repository module
Tim-Brooks b32361f
Merge remote-tracking branch 'upstream/master' into url_repository_mo…
Tim-Brooks 563b616
Fix compile issues
Tim-Brooks 54f6e6b
Merge remote-tracking branch 'upstream/master' into url_repository_mo…
Tim-Brooks 311d890
Work on restructuring module
Tim-Brooks 669c4ef
Work on restructuring module
Tim-Brooks 00b20f9
Merge remote-tracking branch 'upstream/master' into url_repository_mo…
Tim-Brooks 18fefbd
WIP: work on implementing test for urlblobstore
Tim-Brooks 8f92848
Merge remote-tracking branch 'upstream/master' into url_repository_mo…
Tim-Brooks abd7750
Merge branch 'master' into url_repository_module
Tim-Brooks 4e05efc
Implement basic blogstore tests
Tim-Brooks 7bf6f4f
Add URLRepository tests
Tim-Brooks b263edc
Fix restore bw compat test
Tim-Brooks 983dc67
Merge remote-tracking branch 'upstream/master' into url_repository_mo…
Tim-Brooks 6c574e2
Reorganize packages
Tim-Brooks 6ecf433
Fix checkstyles and modify for review feedback
Tim-Brooks ee80d3b
Fix line length
Tim-Brooks ec750a9
Remove system.out call
Tim-Brooks 6f661c8
Fix forbidden issues
Tim-Brooks fa40f2c
Rename url module repository
Tim-Brooks b8b6132
Remove dupliated tests
Tim-Brooks 344eeb2
Move integration test
Tim-Brooks 937ce94
Fix checkstyle errors
Tim-Brooks 63da34d
Fix integration test name
Tim-Brooks b49a346
replace rest test using url repo with fs
Tim-Brooks 1555ca0
Implement basic yaml integration test
Tim-Brooks e488f29
Merge remote-tracking branch 'upstream/master' into url_repository_mo…
Tim-Brooks 9ac5852
Fix integration test by setting config
Tim-Brooks dd03e3a
Use constants
Tim-Brooks 12775b4
Fix module description
Tim-Brooks 0880f6c
Remove compiler lint args
Tim-Brooks File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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,32 @@ | ||
| /* | ||
| * Licensed to Elasticsearch under one or more contributor | ||
| * license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright | ||
| * ownership. Elasticsearch licenses this file to you under | ||
| * the Apache License, Version 2.0 (the "License"); you may | ||
| * not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, | ||
| * software distributed under the License is distributed on an | ||
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| * KIND, either express or implied. See the License for the | ||
| * specific language governing permissions and limitations | ||
| * under the License. | ||
| */ | ||
|
|
||
| esplugin { | ||
| description 'Module for URL repository' | ||
| classname 'org.elasticsearch.plugin.repository.url.URLRepositoryPlugin' | ||
| } | ||
|
|
||
| compileJava.options.compilerArgs << "-Xlint:-unchecked,-rawtypes" | ||
| compileTestJava.options.compilerArgs << "-Xlint:-unchecked,-rawtypes" | ||
|
|
||
| integTest { | ||
| cluster { | ||
| setting 'repositories.url.allowed_urls', 'http://snapshot.test*' | ||
| } | ||
| } | ||
File renamed without changes.
This file contains hidden or 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
50 changes: 50 additions & 0 deletions
50
...sitory-url/src/main/java/org/elasticsearch/plugin/repository/url/URLRepositoryPlugin.java
This file contains hidden or 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,50 @@ | ||
| /* | ||
| * Licensed to Elasticsearch under one or more contributor | ||
| * license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright | ||
| * ownership. Elasticsearch licenses this file to you under | ||
| * the Apache License, Version 2.0 (the "License"); you may | ||
| * not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, | ||
| * software distributed under the License is distributed on an | ||
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| * KIND, either express or implied. See the License for the | ||
| * specific language governing permissions and limitations | ||
| * under the License. | ||
| */ | ||
|
|
||
| package org.elasticsearch.plugin.repository.url; | ||
|
|
||
| import org.elasticsearch.common.settings.Setting; | ||
| import org.elasticsearch.common.xcontent.NamedXContentRegistry; | ||
| import org.elasticsearch.env.Environment; | ||
| import org.elasticsearch.plugins.Plugin; | ||
| import org.elasticsearch.plugins.RepositoryPlugin; | ||
| import org.elasticsearch.repositories.Repository; | ||
| import org.elasticsearch.repositories.url.URLRepository; | ||
|
|
||
| import java.util.Arrays; | ||
| import java.util.Collections; | ||
| import java.util.List; | ||
| import java.util.Map; | ||
|
|
||
| public class URLRepositoryPlugin extends Plugin implements RepositoryPlugin { | ||
|
|
||
| @Override | ||
| public List<Setting<?>> getSettings() { | ||
| return Arrays.asList( | ||
| URLRepository.ALLOWED_URLS_SETTING, | ||
| URLRepository.REPOSITORIES_URL_SETTING, | ||
| URLRepository.SUPPORTED_PROTOCOLS_SETTING | ||
| ); | ||
| } | ||
|
|
||
| @Override | ||
| public Map<String, Repository.Factory> getRepositories(Environment env, NamedXContentRegistry namedXContentRegistry) { | ||
| return Collections.singletonMap(URLRepository.TYPE, metadata -> new URLRepository(metadata, env, namedXContentRegistry)); | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain why these are needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just copied an existing module and made appropriate modifications when I created this. I assume those are artifacts from that and I do not know any reason those are need. I'll remove them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, let's indeed see if we can drop them.