-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Schema registry #1137
Schema registry #1137
Conversation
# Conflicts: # pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java
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.
overall looks good to me.
); | ||
return future; | ||
} | ||
|
||
@NotNull | ||
private CompletableFuture<LedgerHandle> openLedger(Long ledgerId) { | ||
final CompletableFuture<LedgerHandle> future = new CompletableFuture<>(); | ||
bookKeeper.asyncOpenLedger(ledgerId, DigestType.MAC, new byte[]{}, | ||
bookKeeper.asyncOpenLedger(ledgerId, DigestType.MAC, "".getBytes(Charsets.UTF_8), |
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.
- make
"".getBytes(Charsets.UTF_8)
a constant - use DigestType.CRC32C which is fastest than any other digest types.
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.
Both of these can be taken from the service configuration.
@@ -27,6 +27,7 @@ | |||
import com.google.common.hash.Hashing; | |||
import com.google.protobuf.ByteString; | |||
import com.google.protobuf.InvalidProtocolBufferException; | |||
import java.nio.ByteBuffer; |
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.
nit: the import seems not needed at all?
); | ||
|
||
try { | ||
// validateDestinationExists(destinationName); |
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.
remove this line?
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.
yes
bin/pulsar
Outdated
@@ -214,6 +214,8 @@ if [ -z "$PULSAR_LOG_CONF" ]; then | |||
PULSAR_LOG_CONF=$DEFAULT_LOG_CONF | |||
fi | |||
|
|||
OPTS="-agentlib:jdwp=transport=dt_socket,server=y,address=8000,suspend=n" |
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.
any idea why do we need this?
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.
oops, I was debugging something and left this in.
); | ||
return future; | ||
} | ||
|
||
@NotNull | ||
private CompletableFuture<LedgerHandle> openLedger(Long ledgerId) { | ||
final CompletableFuture<LedgerHandle> future = new CompletableFuture<>(); | ||
bookKeeper.asyncOpenLedger(ledgerId, DigestType.MAC, new byte[]{}, | ||
bookKeeper.asyncOpenLedger(ledgerId, DigestType.MAC, "".getBytes(Charsets.UTF_8), |
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.
Both of these can be taken from the service configuration.
private SchemaType type; | ||
private long timestamp; | ||
private String data; | ||
private Map<String, String> props; |
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.
any reason for not using full word?
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.
just (personal) convention. I'm not even consistent... Happy to change.
- rename props to properties in GetSchemaResponse - Use config for ledger parameters
# Conflicts: # pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/SchemasResource.java # pulsar-client/src/main/java/org/apache/pulsar/client/impl/ClientCnx.java # pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java
All changes are merged, this tracking ticket can be closed or merged. |
awesome work! @mgodave |
Motivation
Allow users of the system to store the structure and format of the data in a topic
PIP: https://lists.apache.org/thread.html/6f5498bc90526efc44b0725eea0310b9332b4f71b04631233bd4daa1@%3Cdev.pulsar.apache.org%3E