-
Notifications
You must be signed in to change notification settings - Fork 23
Issue 227 add type in case it's not provided #228
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
base: master
Are you sure you want to change the base?
Changes from all commits
1605441
3a9bf3d
6d16ad9
66f4aa9
8a229c5
39cfdb9
ddb8939
1c8021f
6a9b3d4
f57ad7b
a1ba834
1938f7f
9efd2c3
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 |
|---|---|---|
|
|
@@ -27,12 +27,14 @@ | |
| import io.pravega.schemaregistry.storage.impl.group.Group; | ||
| import io.pravega.schemaregistry.storage.impl.groups.Groups; | ||
| import io.pravega.schemaregistry.storage.impl.schemas.Schemas; | ||
| import lombok.extern.slf4j.Slf4j; | ||
|
|
||
| import javax.annotation.Nullable; | ||
| import java.math.BigInteger; | ||
| import java.util.List; | ||
| import java.util.concurrent.CompletableFuture; | ||
|
|
||
| @Slf4j | ||
| public class SchemaStoreImpl<T> implements SchemaStore { | ||
| private final Groups<T> groups; | ||
| private final Schemas<T> schemas; | ||
|
|
@@ -133,7 +135,8 @@ public CompletableFuture<SchemaWithVersion> getLatestSchemaVersion(String namesp | |
| @Override | ||
| public CompletableFuture<VersionInfo> addSchema(String namespace, String groupId, SchemaInfo schemaInfo, SchemaInfo normalized, | ||
| BigInteger fingerprint, GroupProperties prop, Etag etag) { | ||
| // Store normalized form of schema with the global schemas while the original form is stored within the group. | ||
| // Store normalized form of schema with the global schemas while the original form is stored within the group. | ||
| log.info("Add schema called to add a new schema in namespace {} and groupId {}", namespace, groupId); | ||
|
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. Here namespace passed by user may be an empty string, but we're adding the schema to default namespace in this case. So the log message should indicate that. Infact this is the best place to set the namespace string to its default value if the user has provided an empty String. 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. Not allowing empty String as value for any parameter can be enforced by specifying the |
||
| return schemas.addSchema(normalized, namespace, groupId) | ||
| .thenCompose(v -> getGroup(namespace, groupId).thenCompose(grp -> grp.addSchema(schemaInfo, fingerprint, prop, etag))); | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.