-
Notifications
You must be signed in to change notification settings - Fork 76
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
Allow primary metastore to have prefix #161
Changes from all commits
a21b901
71b7b7a
862393e
a88db3e
9c57d4e
c6584f5
6b10d08
ed3ea22
eba268e
15fb87a
2df1664
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -141,7 +141,7 @@ The table below describes all the available configuration values for Waggle Danc | |
| `primary-meta-store` | No | Primary MetaStore config. Can be empty but it is advised to configure it. | | ||
| `primary-meta-store.remote-meta-store-uris` | Yes | Thrift URIs of the federated read-only metastore. | | ||
| `primary-meta-store.name` | Yes | Database name that uniquely identifies this metastore. Used internally. Cannot be empty. | | ||
| `primary-meta-store.database-prefix` | No | This will be ignored for the primary metastore and an empty string will always be used instead. | | ||
| `primary-meta-store.database-prefix` | No | Prefix used to access the primary metastore and differentiate databases in it from databases in another metastore. The default prefix (i.e. if this value isn't explicitly set) is empty string.| | ||
| `primary-meta-store.access-control-type` | No | Sets how the client access controls should be handled. Default is `READ_ONLY` Other options `READ_AND_WRITE_AND_CREATE`, `READ_AND_WRITE_ON_DATABASE_WHITELIST` and `READ_AND_WRITE_AND_CREATE_ON_DATABASE_WHITELIST` see Access Control section below. | | ||
| `primary-meta-store.writable-database-white-list` | No | White-list of databases used to verify write access used in conjunction with `primary-meta-store.access-control-type`. The list of databases should be listed without any `primary-meta-store.database-prefix`. This property supports both full database names and (case-insensitive) [Java RegEx patterns](https://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html).| | ||
| `primary-meta-store.metastore-tunnel` | No | See metastore tunnel configuration values below. | | ||
|
@@ -356,7 +356,7 @@ database is encountered that is not prefixed then the primary metastore is used | |
remote-meta-store-uris: thrift://primaryLocalMetastore:9083 | ||
federated-meta-stores: | ||
- name: federated | ||
prefix: waggle_prod_ | ||
database-prefix: waggle_prod_ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh dear, was this wrong in our documentation all along? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oops There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 😅 |
||
remote-meta-store-uris: thrift://federatedProdMetastore:9083 | ||
|
||
Note: When choosing a prefix ensure that it does not match the start of _any_ existing database names in any of the configured metastores. To illustrate the problem this would cause, | ||
|
@@ -378,7 +378,7 @@ In `PREFIXED` mode any databases that are created while Waggle Dance is running | |
remote-meta-store-uris: thrift://primaryLocalMetastore:9083 | ||
federated-meta-stores: | ||
- name: federated | ||
prefix: waggle_prod_ | ||
database-prefix: waggle_prod_ | ||
remote-meta-store-uris: thrift://federatedProdMetastore:9083 | ||
mapped-databases: | ||
- etldata | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,10 +18,9 @@ | |
import java.util.Collections; | ||
import java.util.List; | ||
|
||
import javax.validation.constraints.NotBlank; | ||
import javax.validation.constraints.NotNull; | ||
|
||
import org.hibernate.validator.constraints.NotBlank; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hibernate's
|
||
|
||
public class FederatedMetaStore extends AbstractMetaStore { | ||
|
||
private @NotNull List<String> mappedDatabases = Collections.emptyList(); | ||
|
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.
README also needs an update probably.
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.
Done :)