You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by mm...@apache.org on 2022/01/12 12:48:45 UTC
[accumulo] branch main updated: Update protobuf to 3.19.2 (#2412)
This is an automated email from the ASF dual-hosted git repository.
mmiller pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/main by this push:
new 30c49ef Update protobuf to 3.19.2 (#2412)
30c49ef is described below
commit 30c49ef1a193bd6712efe4c28e304e107b47a1c3
Author: Mike Miller <mm...@apache.org>
AuthorDate: Wed Jan 12 07:48:34 2022 -0500
Update protobuf to 3.19.2 (#2412)
---
.../accumulo/core/protobuf/ProtobufUtil.java | 6 +-
pom.xml | 2 +-
.../server/replication/proto/Replication.java | 682 ++++++++++++++-------
server/base/src/main/protobuf/replication.proto | 1 +
server/base/src/main/scripts/generate-protobuf.sh | 2 +-
5 files changed, 452 insertions(+), 241 deletions(-)
diff --git a/core/src/main/java/org/apache/accumulo/core/protobuf/ProtobufUtil.java b/core/src/main/java/org/apache/accumulo/core/protobuf/ProtobufUtil.java
index 000916b..57baf5a 100644
--- a/core/src/main/java/org/apache/accumulo/core/protobuf/ProtobufUtil.java
+++ b/core/src/main/java/org/apache/accumulo/core/protobuf/ProtobufUtil.java
@@ -20,7 +20,7 @@ package org.apache.accumulo.core.protobuf;
import org.apache.accumulo.core.data.Value;
-import com.google.protobuf.GeneratedMessage;
+import com.google.protobuf.GeneratedMessageV3;
import com.google.protobuf.TextFormat;
/**
@@ -29,11 +29,11 @@ import com.google.protobuf.TextFormat;
public class ProtobufUtil {
private static final char LEFT_BRACKET = '[', RIGHT_BRACKET = ']';
- public static Value toValue(GeneratedMessage msg) {
+ public static Value toValue(GeneratedMessageV3 msg) {
return new Value(msg.toByteArray());
}
- public static String toString(GeneratedMessage msg) {
+ public static String toString(GeneratedMessageV3 msg) {
// Too much typing
return LEFT_BRACKET + TextFormat.shortDebugString(msg) + RIGHT_BRACKET;
}
diff --git a/pom.xml b/pom.xml
index 2aaa691..12112c1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -286,7 +286,7 @@
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
- <version>3.7.1</version>
+ <version>3.19.2</version>
</dependency>
<dependency>
<groupId>com.lmax</groupId>
diff --git a/server/base/src/main/java/org/apache/accumulo/server/replication/proto/Replication.java b/server/base/src/main/java/org/apache/accumulo/server/replication/proto/Replication.java
index 4a20d87..043ff72 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/replication/proto/Replication.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/replication/proto/Replication.java
@@ -21,102 +21,113 @@
package org.apache.accumulo.server.replication.proto;
-@SuppressWarnings({"unused"})
-public final class Replication {
+@SuppressWarnings({"unused"}) public final class Replication {
private Replication() {}
public static void registerAllExtensions(
+ com.google.protobuf.ExtensionRegistryLite registry) {
+ }
+
+ public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
+ registerAllExtensions(
+ (com.google.protobuf.ExtensionRegistryLite) registry);
}
- public interface StatusOrBuilder
- extends com.google.protobuf.MessageOrBuilder {
+ public interface StatusOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:Status)
+ com.google.protobuf.MessageOrBuilder {
- // optional int64 begin = 1 [default = 0];
/**
- * <code>optional int64 begin = 1 [default = 0];</code>
- *
* <pre>
* offset where replication should start
* </pre>
+ *
+ * <code>optional int64 begin = 1 [default = 0];</code>
+ * @return Whether the begin field is set.
*/
boolean hasBegin();
/**
- * <code>optional int64 begin = 1 [default = 0];</code>
- *
* <pre>
* offset where replication should start
* </pre>
+ *
+ * <code>optional int64 begin = 1 [default = 0];</code>
+ * @return The begin.
*/
long getBegin();
- // optional int64 end = 2 [default = 0];
/**
- * <code>optional int64 end = 2 [default = 0];</code>
- *
* <pre>
* offset where data is ready for replication
* </pre>
+ *
+ * <code>optional int64 end = 2 [default = 0];</code>
+ * @return Whether the end field is set.
*/
boolean hasEnd();
/**
- * <code>optional int64 end = 2 [default = 0];</code>
- *
* <pre>
* offset where data is ready for replication
* </pre>
+ *
+ * <code>optional int64 end = 2 [default = 0];</code>
+ * @return The end.
*/
long getEnd();
- // optional bool infiniteEnd = 3 [default = false];
/**
- * <code>optional bool infiniteEnd = 3 [default = false];</code>
- *
* <pre>
* do we have a discrete 'end'
* </pre>
+ *
+ * <code>optional bool infiniteEnd = 3 [default = false];</code>
+ * @return Whether the infiniteEnd field is set.
*/
boolean hasInfiniteEnd();
/**
- * <code>optional bool infiniteEnd = 3 [default = false];</code>
- *
* <pre>
* do we have a discrete 'end'
* </pre>
+ *
+ * <code>optional bool infiniteEnd = 3 [default = false];</code>
+ * @return The infiniteEnd.
*/
boolean getInfiniteEnd();
- // optional bool closed = 4 [default = false];
/**
- * <code>optional bool closed = 4 [default = false];</code>
- *
* <pre>
* will more data be appended to the file
* </pre>
+ *
+ * <code>optional bool closed = 4 [default = false];</code>
+ * @return Whether the closed field is set.
*/
boolean hasClosed();
/**
- * <code>optional bool closed = 4 [default = false];</code>
- *
* <pre>
* will more data be appended to the file
* </pre>
+ *
+ * <code>optional bool closed = 4 [default = false];</code>
+ * @return The closed.
*/
boolean getClosed();
- // optional int64 createdTime = 5 [default = 0];
/**
- * <code>optional int64 createdTime = 5 [default = 0];</code>
- *
* <pre>
* when, in ms, was the file created?
* </pre>
+ *
+ * <code>optional int64 createdTime = 5 [default = 0];</code>
+ * @return Whether the createdTime field is set.
*/
boolean hasCreatedTime();
/**
- * <code>optional int64 createdTime = 5 [default = 0];</code>
- *
* <pre>
* when, in ms, was the file created?
* </pre>
+ *
+ * <code>optional int64 createdTime = 5 [default = 0];</code>
+ * @return The createdTime.
*/
long getCreatedTime();
}
@@ -124,35 +135,37 @@ public final class Replication {
* Protobuf type {@code Status}
*/
public static final class Status extends
- com.google.protobuf.GeneratedMessage
- implements StatusOrBuilder {
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:Status)
+ StatusOrBuilder {
+ private static final long serialVersionUID = 0L;
// Use Status.newBuilder() to construct.
- private Status(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
+ private Status(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
- this.unknownFields = builder.getUnknownFields();
}
- private Status(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
-
- private static final Status defaultInstance;
- public static Status getDefaultInstance() {
- return defaultInstance;
+ private Status() {
}
- public Status getDefaultInstanceForType() {
- return defaultInstance;
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new Status();
}
- private final transient com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
+ getUnknownFields() {
return this.unknownFields;
}
private Status(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- initFields();
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
@@ -164,39 +177,45 @@ public final class Replication {
case 0:
done = true;
break;
- default:
- if (!parseUnknownField(input, unknownFields,
- extensionRegistry, tag)) {
- done = true;
- }
- break;
- case 8:
+ case 8: {
bitField0_ |= 0x00000001;
begin_ = input.readInt64();
break;
- case 16:
+ }
+ case 16: {
bitField0_ |= 0x00000002;
end_ = input.readInt64();
break;
- case 24:
+ }
+ case 24: {
bitField0_ |= 0x00000004;
infiniteEnd_ = input.readBool();
break;
- case 32:
+ }
+ case 32: {
bitField0_ |= 0x00000008;
closed_ = input.readBool();
break;
- case 40:
+ }
+ case 40: {
bitField0_ |= 0x00000010;
createdTime_ = input.readInt64();
break;
+ }
+ default: {
+ if (!parseUnknownField(
+ input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
+ e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
@@ -207,222 +226,300 @@ public final class Replication {
return org.apache.accumulo.server.replication.proto.Replication.internal_static_Status_descriptor;
}
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.apache.accumulo.server.replication.proto.Replication.internal_static_Status_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.apache.accumulo.server.replication.proto.Replication.Status.class, org.apache.accumulo.server.replication.proto.Replication.Status.Builder.class);
}
- public static final com.google.protobuf.Parser<Status> PARSER = new com.google.protobuf.AbstractParser<>() {
- public Status parsePartialFrom(com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new Status(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser<Status> getParserForType() {
- return PARSER;
- }
-
private int bitField0_;
- // optional int64 begin = 1 [default = 0];
public static final int BEGIN_FIELD_NUMBER = 1;
private long begin_;
/**
- * <code>optional int64 begin = 1 [default = 0];</code>
- *
* <pre>
* offset where replication should start
* </pre>
+ *
+ * <code>optional int64 begin = 1 [default = 0];</code>
+ * @return Whether the begin field is set.
*/
+ @java.lang.Override
public boolean hasBegin() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
+ return ((bitField0_ & 0x00000001) != 0);
}
/**
- * <code>optional int64 begin = 1 [default = 0];</code>
- *
* <pre>
* offset where replication should start
* </pre>
+ *
+ * <code>optional int64 begin = 1 [default = 0];</code>
+ * @return The begin.
*/
+ @java.lang.Override
public long getBegin() {
return begin_;
}
- // optional int64 end = 2 [default = 0];
public static final int END_FIELD_NUMBER = 2;
private long end_;
/**
- * <code>optional int64 end = 2 [default = 0];</code>
- *
* <pre>
* offset where data is ready for replication
* </pre>
+ *
+ * <code>optional int64 end = 2 [default = 0];</code>
+ * @return Whether the end field is set.
*/
+ @java.lang.Override
public boolean hasEnd() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
+ return ((bitField0_ & 0x00000002) != 0);
}
/**
- * <code>optional int64 end = 2 [default = 0];</code>
- *
* <pre>
* offset where data is ready for replication
* </pre>
+ *
+ * <code>optional int64 end = 2 [default = 0];</code>
+ * @return The end.
*/
+ @java.lang.Override
public long getEnd() {
return end_;
}
- // optional bool infiniteEnd = 3 [default = false];
public static final int INFINITEEND_FIELD_NUMBER = 3;
private boolean infiniteEnd_;
/**
- * <code>optional bool infiniteEnd = 3 [default = false];</code>
- *
* <pre>
* do we have a discrete 'end'
* </pre>
+ *
+ * <code>optional bool infiniteEnd = 3 [default = false];</code>
+ * @return Whether the infiniteEnd field is set.
*/
+ @java.lang.Override
public boolean hasInfiniteEnd() {
- return ((bitField0_ & 0x00000004) == 0x00000004);
+ return ((bitField0_ & 0x00000004) != 0);
}
/**
- * <code>optional bool infiniteEnd = 3 [default = false];</code>
- *
* <pre>
* do we have a discrete 'end'
* </pre>
+ *
+ * <code>optional bool infiniteEnd = 3 [default = false];</code>
+ * @return The infiniteEnd.
*/
+ @java.lang.Override
public boolean getInfiniteEnd() {
return infiniteEnd_;
}
- // optional bool closed = 4 [default = false];
public static final int CLOSED_FIELD_NUMBER = 4;
private boolean closed_;
/**
- * <code>optional bool closed = 4 [default = false];</code>
- *
* <pre>
* will more data be appended to the file
* </pre>
+ *
+ * <code>optional bool closed = 4 [default = false];</code>
+ * @return Whether the closed field is set.
*/
+ @java.lang.Override
public boolean hasClosed() {
- return ((bitField0_ & 0x00000008) == 0x00000008);
+ return ((bitField0_ & 0x00000008) != 0);
}
/**
- * <code>optional bool closed = 4 [default = false];</code>
- *
* <pre>
* will more data be appended to the file
* </pre>
+ *
+ * <code>optional bool closed = 4 [default = false];</code>
+ * @return The closed.
*/
+ @java.lang.Override
public boolean getClosed() {
return closed_;
}
- // optional int64 createdTime = 5 [default = 0];
public static final int CREATEDTIME_FIELD_NUMBER = 5;
private long createdTime_;
/**
- * <code>optional int64 createdTime = 5 [default = 0];</code>
- *
* <pre>
* when, in ms, was the file created?
* </pre>
+ *
+ * <code>optional int64 createdTime = 5 [default = 0];</code>
+ * @return Whether the createdTime field is set.
*/
+ @java.lang.Override
public boolean hasCreatedTime() {
- return ((bitField0_ & 0x00000010) == 0x00000010);
+ return ((bitField0_ & 0x00000010) != 0);
}
/**
- * <code>optional int64 createdTime = 5 [default = 0];</code>
- *
* <pre>
* when, in ms, was the file created?
* </pre>
+ *
+ * <code>optional int64 createdTime = 5 [default = 0];</code>
+ * @return The createdTime.
*/
+ @java.lang.Override
public long getCreatedTime() {
return createdTime_;
}
- private void initFields() {
- begin_ = 0L;
- end_ = 0L;
- infiniteEnd_ = false;
- closed_ = false;
- createdTime_ = 0L;
- }
private byte memoizedIsInitialized = -1;
+ @java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
- if (isInitialized != -1) return isInitialized == 1;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
+ @java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- getSerializedSize();
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ if (((bitField0_ & 0x00000001) != 0)) {
output.writeInt64(1, begin_);
}
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ if (((bitField0_ & 0x00000002) != 0)) {
output.writeInt64(2, end_);
}
- if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ if (((bitField0_ & 0x00000004) != 0)) {
output.writeBool(3, infiniteEnd_);
}
- if (((bitField0_ & 0x00000008) == 0x00000008)) {
+ if (((bitField0_ & 0x00000008) != 0)) {
output.writeBool(4, closed_);
}
- if (((bitField0_ & 0x00000010) == 0x00000010)) {
+ if (((bitField0_ & 0x00000010) != 0)) {
output.writeInt64(5, createdTime_);
}
- getUnknownFields().writeTo(output);
+ unknownFields.writeTo(output);
}
- private int memoizedSerializedSize = -1;
+ @java.lang.Override
public int getSerializedSize() {
- int size = memoizedSerializedSize;
+ int size = memoizedSize;
if (size != -1) return size;
size = 0;
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(1, begin_);
}
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(2, end_);
}
- if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(3, infiniteEnd_);
}
- if (((bitField0_ & 0x00000008) == 0x00000008)) {
+ if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(4, closed_);
}
- if (((bitField0_ & 0x00000010) == 0x00000010)) {
+ if (((bitField0_ & 0x00000010) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(5, createdTime_);
}
- size += getUnknownFields().getSerializedSize();
- memoizedSerializedSize = size;
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
return size;
}
- private static final long serialVersionUID = 0L;
@java.lang.Override
- protected java.lang.Object writeReplace()
- throws java.io.ObjectStreamException {
- return super.writeReplace();
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof org.apache.accumulo.server.replication.proto.Replication.Status)) {
+ return super.equals(obj);
+ }
+ org.apache.accumulo.server.replication.proto.Replication.Status other = (org.apache.accumulo.server.replication.proto.Replication.Status) obj;
+
+ if (hasBegin() != other.hasBegin()) return false;
+ if (hasBegin()) {
+ if (getBegin()
+ != other.getBegin()) return false;
+ }
+ if (hasEnd() != other.hasEnd()) return false;
+ if (hasEnd()) {
+ if (getEnd()
+ != other.getEnd()) return false;
+ }
+ if (hasInfiniteEnd() != other.hasInfiniteEnd()) return false;
+ if (hasInfiniteEnd()) {
+ if (getInfiniteEnd()
+ != other.getInfiniteEnd()) return false;
+ }
+ if (hasClosed() != other.hasClosed()) return false;
+ if (hasClosed()) {
+ if (getClosed()
+ != other.getClosed()) return false;
+ }
+ if (hasCreatedTime() != other.hasCreatedTime()) return false;
+ if (hasCreatedTime()) {
+ if (getCreatedTime()
+ != other.getCreatedTime()) return false;
+ }
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
}
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasBegin()) {
+ hash = (37 * hash) + BEGIN_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ getBegin());
+ }
+ if (hasEnd()) {
+ hash = (37 * hash) + END_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ getEnd());
+ }
+ if (hasInfiniteEnd()) {
+ hash = (37 * hash) + INFINITEEND_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
+ getInfiniteEnd());
+ }
+ if (hasClosed()) {
+ hash = (37 * hash) + CLOSED_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
+ getClosed());
+ }
+ if (hasCreatedTime()) {
+ hash = (37 * hash) + CREATEDTIME_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ getCreatedTime());
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static org.apache.accumulo.server.replication.proto.Replication.Status parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.apache.accumulo.server.replication.proto.Replication.Status parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
public static org.apache.accumulo.server.replication.proto.Replication.Status parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
@@ -446,60 +543,76 @@ public final class Replication {
}
public static org.apache.accumulo.server.replication.proto.Replication.Status parseFrom(java.io.InputStream input)
throws java.io.IOException {
- return PARSER.parseFrom(input);
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
}
public static org.apache.accumulo.server.replication.proto.Replication.Status parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- return PARSER.parseFrom(input, extensionRegistry);
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.apache.accumulo.server.replication.proto.Replication.Status parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
- return PARSER.parseDelimitedFrom(input);
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
}
public static org.apache.accumulo.server.replication.proto.Replication.Status parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.apache.accumulo.server.replication.proto.Replication.Status parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
- return PARSER.parseFrom(input);
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
}
public static org.apache.accumulo.server.replication.proto.Replication.Status parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- return PARSER.parseFrom(input, extensionRegistry);
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
}
- public static Builder newBuilder() { return Builder.create(); }
+ @java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
public static Builder newBuilder(org.apache.accumulo.server.replication.proto.Replication.Status prototype) {
- return newBuilder().mergeFrom(prototype);
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
}
- public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessage.BuilderParent parent) {
- return new Builder(parent);
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
}
/**
* Protobuf type {@code Status}
*/
public static final class Builder extends
- com.google.protobuf.GeneratedMessage.Builder<Builder>
- implements org.apache.accumulo.server.replication.proto.Replication.StatusOrBuilder {
+ com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
+ // @@protoc_insertion_point(builder_implements:Status)
+ org.apache.accumulo.server.replication.proto.Replication.StatusOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.apache.accumulo.server.replication.proto.Replication.internal_static_Status_descriptor;
}
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.apache.accumulo.server.replication.proto.Replication.internal_static_Status_fieldAccessorTable
.ensureFieldAccessorsInitialized(
@@ -512,18 +625,16 @@ public final class Replication {
}
private Builder(
- com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
+ if (com.google.protobuf.GeneratedMessageV3
+ .alwaysUseFieldBuilders) {
}
}
- private static Builder create() {
- return new Builder();
- }
-
+ @java.lang.Override
public Builder clear() {
super.clear();
begin_ = 0L;
@@ -539,19 +650,18 @@ public final class Replication {
return this;
}
- public Builder clone() {
- return create().mergeFrom(buildPartial());
- }
-
+ @java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.apache.accumulo.server.replication.proto.Replication.internal_static_Status_descriptor;
}
+ @java.lang.Override
public org.apache.accumulo.server.replication.proto.Replication.Status getDefaultInstanceForType() {
return org.apache.accumulo.server.replication.proto.Replication.Status.getDefaultInstance();
}
+ @java.lang.Override
public org.apache.accumulo.server.replication.proto.Replication.Status build() {
org.apache.accumulo.server.replication.proto.Replication.Status result = buildPartial();
if (!result.isInitialized()) {
@@ -560,35 +670,69 @@ public final class Replication {
return result;
}
+ @java.lang.Override
public org.apache.accumulo.server.replication.proto.Replication.Status buildPartial() {
org.apache.accumulo.server.replication.proto.Replication.Status result = new org.apache.accumulo.server.replication.proto.Replication.Status(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.begin_ = begin_;
to_bitField0_ |= 0x00000001;
}
- result.begin_ = begin_;
- if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.end_ = end_;
to_bitField0_ |= 0x00000002;
}
- result.end_ = end_;
- if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
+ if (((from_bitField0_ & 0x00000004) != 0)) {
+ result.infiniteEnd_ = infiniteEnd_;
to_bitField0_ |= 0x00000004;
}
- result.infiniteEnd_ = infiniteEnd_;
- if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
+ if (((from_bitField0_ & 0x00000008) != 0)) {
+ result.closed_ = closed_;
to_bitField0_ |= 0x00000008;
}
- result.closed_ = closed_;
- if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
+ if (((from_bitField0_ & 0x00000010) != 0)) {
+ result.createdTime_ = createdTime_;
to_bitField0_ |= 0x00000010;
}
- result.createdTime_ = createdTime_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
+ @java.lang.Override
+ public Builder clone() {
+ return super.clone();
+ }
+ @java.lang.Override
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return super.setField(field, value);
+ }
+ @java.lang.Override
+ public Builder clearField(
+ com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return super.clearField(field);
+ }
+ @java.lang.Override
+ public Builder clearOneof(
+ com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return super.clearOneof(oneof);
+ }
+ @java.lang.Override
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ int index, java.lang.Object value) {
+ return super.setRepeatedField(field, index, value);
+ }
+ @java.lang.Override
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return super.addRepeatedField(field, value);
+ }
+ @java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.apache.accumulo.server.replication.proto.Replication.Status) {
return mergeFrom((org.apache.accumulo.server.replication.proto.Replication.Status)other);
@@ -615,14 +759,17 @@ public final class Replication {
if (other.hasCreatedTime()) {
setCreatedTime(other.getCreatedTime());
}
- this.mergeUnknownFields(other.getUnknownFields());
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
return this;
}
+ @java.lang.Override
public final boolean isInitialized() {
return true;
}
+ @java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -632,7 +779,7 @@ public final class Replication {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.apache.accumulo.server.replication.proto.Replication.Status) e.getUnfinishedMessage();
- throw e;
+ throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
@@ -642,34 +789,39 @@ public final class Replication {
}
private int bitField0_;
- // optional int64 begin = 1 [default = 0];
private long begin_ ;
/**
- * <code>optional int64 begin = 1 [default = 0];</code>
- *
* <pre>
* offset where replication should start
* </pre>
+ *
+ * <code>optional int64 begin = 1 [default = 0];</code>
+ * @return Whether the begin field is set.
*/
+ @java.lang.Override
public boolean hasBegin() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
+ return ((bitField0_ & 0x00000001) != 0);
}
/**
- * <code>optional int64 begin = 1 [default = 0];</code>
- *
* <pre>
* offset where replication should start
* </pre>
+ *
+ * <code>optional int64 begin = 1 [default = 0];</code>
+ * @return The begin.
*/
+ @java.lang.Override
public long getBegin() {
return begin_;
}
/**
- * <code>optional int64 begin = 1 [default = 0];</code>
- *
* <pre>
* offset where replication should start
* </pre>
+ *
+ * <code>optional int64 begin = 1 [default = 0];</code>
+ * @param value The begin to set.
+ * @return This builder for chaining.
*/
public Builder setBegin(long value) {
bitField0_ |= 0x00000001;
@@ -678,11 +830,12 @@ public final class Replication {
return this;
}
/**
- * <code>optional int64 begin = 1 [default = 0];</code>
- *
* <pre>
* offset where replication should start
* </pre>
+ *
+ * <code>optional int64 begin = 1 [default = 0];</code>
+ * @return This builder for chaining.
*/
public Builder clearBegin() {
bitField0_ = (bitField0_ & ~0x00000001);
@@ -691,34 +844,39 @@ public final class Replication {
return this;
}
- // optional int64 end = 2 [default = 0];
private long end_ ;
/**
- * <code>optional int64 end = 2 [default = 0];</code>
- *
* <pre>
* offset where data is ready for replication
* </pre>
+ *
+ * <code>optional int64 end = 2 [default = 0];</code>
+ * @return Whether the end field is set.
*/
+ @java.lang.Override
public boolean hasEnd() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
+ return ((bitField0_ & 0x00000002) != 0);
}
/**
- * <code>optional int64 end = 2 [default = 0];</code>
- *
* <pre>
* offset where data is ready for replication
* </pre>
+ *
+ * <code>optional int64 end = 2 [default = 0];</code>
+ * @return The end.
*/
+ @java.lang.Override
public long getEnd() {
return end_;
}
/**
- * <code>optional int64 end = 2 [default = 0];</code>
- *
* <pre>
* offset where data is ready for replication
* </pre>
+ *
+ * <code>optional int64 end = 2 [default = 0];</code>
+ * @param value The end to set.
+ * @return This builder for chaining.
*/
public Builder setEnd(long value) {
bitField0_ |= 0x00000002;
@@ -727,11 +885,12 @@ public final class Replication {
return this;
}
/**
- * <code>optional int64 end = 2 [default = 0];</code>
- *
* <pre>
* offset where data is ready for replication
* </pre>
+ *
+ * <code>optional int64 end = 2 [default = 0];</code>
+ * @return This builder for chaining.
*/
public Builder clearEnd() {
bitField0_ = (bitField0_ & ~0x00000002);
@@ -740,34 +899,39 @@ public final class Replication {
return this;
}
- // optional bool infiniteEnd = 3 [default = false];
private boolean infiniteEnd_ ;
/**
- * <code>optional bool infiniteEnd = 3 [default = false];</code>
- *
* <pre>
* do we have a discrete 'end'
* </pre>
+ *
+ * <code>optional bool infiniteEnd = 3 [default = false];</code>
+ * @return Whether the infiniteEnd field is set.
*/
+ @java.lang.Override
public boolean hasInfiniteEnd() {
- return ((bitField0_ & 0x00000004) == 0x00000004);
+ return ((bitField0_ & 0x00000004) != 0);
}
/**
- * <code>optional bool infiniteEnd = 3 [default = false];</code>
- *
* <pre>
* do we have a discrete 'end'
* </pre>
+ *
+ * <code>optional bool infiniteEnd = 3 [default = false];</code>
+ * @return The infiniteEnd.
*/
+ @java.lang.Override
public boolean getInfiniteEnd() {
return infiniteEnd_;
}
/**
- * <code>optional bool infiniteEnd = 3 [default = false];</code>
- *
* <pre>
* do we have a discrete 'end'
* </pre>
+ *
+ * <code>optional bool infiniteEnd = 3 [default = false];</code>
+ * @param value The infiniteEnd to set.
+ * @return This builder for chaining.
*/
public Builder setInfiniteEnd(boolean value) {
bitField0_ |= 0x00000004;
@@ -776,11 +940,12 @@ public final class Replication {
return this;
}
/**
- * <code>optional bool infiniteEnd = 3 [default = false];</code>
- *
* <pre>
* do we have a discrete 'end'
* </pre>
+ *
+ * <code>optional bool infiniteEnd = 3 [default = false];</code>
+ * @return This builder for chaining.
*/
public Builder clearInfiniteEnd() {
bitField0_ = (bitField0_ & ~0x00000004);
@@ -789,34 +954,39 @@ public final class Replication {
return this;
}
- // optional bool closed = 4 [default = false];
private boolean closed_ ;
/**
- * <code>optional bool closed = 4 [default = false];</code>
- *
* <pre>
* will more data be appended to the file
* </pre>
+ *
+ * <code>optional bool closed = 4 [default = false];</code>
+ * @return Whether the closed field is set.
*/
+ @java.lang.Override
public boolean hasClosed() {
- return ((bitField0_ & 0x00000008) == 0x00000008);
+ return ((bitField0_ & 0x00000008) != 0);
}
/**
- * <code>optional bool closed = 4 [default = false];</code>
- *
* <pre>
* will more data be appended to the file
* </pre>
+ *
+ * <code>optional bool closed = 4 [default = false];</code>
+ * @return The closed.
*/
+ @java.lang.Override
public boolean getClosed() {
return closed_;
}
/**
- * <code>optional bool closed = 4 [default = false];</code>
- *
* <pre>
* will more data be appended to the file
* </pre>
+ *
+ * <code>optional bool closed = 4 [default = false];</code>
+ * @param value The closed to set.
+ * @return This builder for chaining.
*/
public Builder setClosed(boolean value) {
bitField0_ |= 0x00000008;
@@ -825,11 +995,12 @@ public final class Replication {
return this;
}
/**
- * <code>optional bool closed = 4 [default = false];</code>
- *
* <pre>
* will more data be appended to the file
* </pre>
+ *
+ * <code>optional bool closed = 4 [default = false];</code>
+ * @return This builder for chaining.
*/
public Builder clearClosed() {
bitField0_ = (bitField0_ & ~0x00000008);
@@ -838,34 +1009,39 @@ public final class Replication {
return this;
}
- // optional int64 createdTime = 5 [default = 0];
private long createdTime_ ;
/**
- * <code>optional int64 createdTime = 5 [default = 0];</code>
- *
* <pre>
* when, in ms, was the file created?
* </pre>
+ *
+ * <code>optional int64 createdTime = 5 [default = 0];</code>
+ * @return Whether the createdTime field is set.
*/
+ @java.lang.Override
public boolean hasCreatedTime() {
- return ((bitField0_ & 0x00000010) == 0x00000010);
+ return ((bitField0_ & 0x00000010) != 0);
}
/**
- * <code>optional int64 createdTime = 5 [default = 0];</code>
- *
* <pre>
* when, in ms, was the file created?
* </pre>
+ *
+ * <code>optional int64 createdTime = 5 [default = 0];</code>
+ * @return The createdTime.
*/
+ @java.lang.Override
public long getCreatedTime() {
return createdTime_;
}
/**
- * <code>optional int64 createdTime = 5 [default = 0];</code>
- *
* <pre>
* when, in ms, was the file created?
* </pre>
+ *
+ * <code>optional int64 createdTime = 5 [default = 0];</code>
+ * @param value The createdTime to set.
+ * @return This builder for chaining.
*/
public Builder setCreatedTime(long value) {
bitField0_ |= 0x00000010;
@@ -874,11 +1050,12 @@ public final class Replication {
return this;
}
/**
- * <code>optional int64 createdTime = 5 [default = 0];</code>
- *
* <pre>
* when, in ms, was the file created?
* </pre>
+ *
+ * <code>optional int64 createdTime = 5 [default = 0];</code>
+ * @return This builder for chaining.
*/
public Builder clearCreatedTime() {
bitField0_ = (bitField0_ & ~0x00000010);
@@ -886,29 +1063,70 @@ public final class Replication {
onChanged();
return this;
}
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
// @@protoc_insertion_point(builder_scope:Status)
}
+ // @@protoc_insertion_point(class_scope:Status)
+ private static final org.apache.accumulo.server.replication.proto.Replication.Status DEFAULT_INSTANCE;
static {
- defaultInstance = new Status(true);
- defaultInstance.initFields();
+ DEFAULT_INSTANCE = new org.apache.accumulo.server.replication.proto.Replication.Status();
+ }
+
+ public static org.apache.accumulo.server.replication.proto.Replication.Status getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ @java.lang.Deprecated public static final com.google.protobuf.Parser<Status>
+ PARSER = new com.google.protobuf.AbstractParser<Status>() {
+ @java.lang.Override
+ public Status parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new Status(input, extensionRegistry);
+ }
+ };
+
+ public static com.google.protobuf.Parser<Status> parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<Status> getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public org.apache.accumulo.server.replication.proto.Replication.Status getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
}
- // @@protoc_insertion_point(class_scope:Status)
}
- private static com.google.protobuf.Descriptors.Descriptor
+ private static final com.google.protobuf.Descriptors.Descriptor
internal_static_Status_descriptor;
- private static
- com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ private static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_Status_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
- private static com.google.protobuf.Descriptors.FileDescriptor
+ private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
@@ -919,24 +1137,16 @@ public final class Replication {
"org.apache.accumulo.server.replication.p" +
"rotoH\001"
};
- com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
- new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
- public com.google.protobuf.ExtensionRegistry assignDescriptors(
- com.google.protobuf.Descriptors.FileDescriptor root) {
- descriptor = root;
- internal_static_Status_descriptor =
- getDescriptor().getMessageTypes().get(0);
- internal_static_Status_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessage.FieldAccessorTable(
- internal_static_Status_descriptor,
- new java.lang.String[] { "Begin", "End", "InfiniteEnd", "Closed", "CreatedTime", });
- return null;
- }
- };
- com.google.protobuf.Descriptors.FileDescriptor
+ descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
- }, assigner);
+ });
+ internal_static_Status_descriptor =
+ getDescriptor().getMessageTypes().get(0);
+ internal_static_Status_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_Status_descriptor,
+ new java.lang.String[] { "Begin", "End", "InfiniteEnd", "Closed", "CreatedTime", });
}
// @@protoc_insertion_point(outer_class_scope)
diff --git a/server/base/src/main/protobuf/replication.proto b/server/base/src/main/protobuf/replication.proto
index 9410785..441d124 100644
--- a/server/base/src/main/protobuf/replication.proto
+++ b/server/base/src/main/protobuf/replication.proto
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+syntax = "proto2";
option java_package = "org.apache.accumulo.server.replication.proto";
option optimize_for = SPEED;
diff --git a/server/base/src/main/scripts/generate-protobuf.sh b/server/base/src/main/scripts/generate-protobuf.sh
index 8800a90..e182a83 100755
--- a/server/base/src/main/scripts/generate-protobuf.sh
+++ b/server/base/src/main/scripts/generate-protobuf.sh
@@ -25,7 +25,7 @@
# In other scripts, set the variables that diverge from the defaults below, then call this script.
# Leave the BUILD_DIR and FINAL_DIR alone for Maven builds.
# ========================================================================================================================
-[[ -z $REQUIRED_PROTOC_VERSION ]] && REQUIRED_PROTOC_VERSION='libprotoc 2.5.0'
+[[ -z $REQUIRED_PROTOC_VERSION ]] && REQUIRED_PROTOC_VERSION='libprotoc 3.19.2'
[[ -z $BUILD_DIR ]] && BUILD_DIR='target/proto'
[[ -z $FINAL_DIR ]] && FINAL_DIR='src/main'
# ========================================================================================================================