mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-23 13:26:02 +00:00
This commit cleans up replication response and request so that the base class does not allow subclasses to implement Streamable. relates #34389
This commit is contained in:
parent
901310a826
commit
c26edb4c43
@ -171,11 +171,6 @@ public class TransportVerifyShardBeforeCloseAction extends TransportReplicationA
|
||||
return "verify shard " + shardId + " before close with block " + clusterBlock;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFrom(final StreamInput in) {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeTo(final StreamOutput out) throws IOException {
|
||||
super.writeTo(out);
|
||||
|
@ -46,11 +46,6 @@ public class ShardFlushRequest extends ReplicationRequest<ShardFlushRequest> {
|
||||
return request;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFrom(StreamInput in) throws IOException {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeTo(StreamOutput out) throws IOException {
|
||||
super.writeTo(out);
|
||||
|
@ -84,11 +84,6 @@ public class BulkShardRequest extends ReplicatedWriteRequest<BulkShardRequest> {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFrom(StreamInput in) {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
// This is included in error messages so we'll try to make it somewhat user friendly.
|
||||
|
@ -298,11 +298,6 @@ public class DeleteRequest extends ReplicatedWriteRequest<DeleteRequest>
|
||||
return OpType.DELETE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFrom(StreamInput in) {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeTo(StreamOutput out) throws IOException {
|
||||
super.writeTo(out);
|
||||
|
@ -630,11 +630,6 @@ public class IndexRequest extends ReplicatedWriteRequest<IndexRequest> implement
|
||||
routing(metaData.resolveWriteIndexRouting(routing, index));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFrom(StreamInput in) {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeTo(StreamOutput out) throws IOException {
|
||||
super.writeTo(out);
|
||||
|
@ -84,11 +84,6 @@ public final class ResyncReplicationRequest extends ReplicatedWriteRequest<Resyn
|
||||
return operations;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFrom(final StreamInput in) {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeTo(final StreamOutput out) throws IOException {
|
||||
super.writeTo(out);
|
||||
|
@ -61,11 +61,6 @@ public abstract class ReplicatedWriteRequest<R extends ReplicatedWriteRequest<R>
|
||||
return refreshPolicy;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFrom(StreamInput in) {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeTo(StreamOutput out) throws IOException {
|
||||
super.writeTo(out);
|
||||
|
@ -188,7 +188,7 @@ public abstract class ReplicationRequest<Request extends ReplicationRequest<Requ
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFrom(StreamInput in) throws IOException {
|
||||
public final void readFrom(StreamInput in) throws IOException {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@ public class ReplicationResponse extends ActionResponse {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFrom(StreamInput in) throws IOException {
|
||||
public final void readFrom(StreamInput in) throws IOException {
|
||||
throw new UnsupportedOperationException("Streamable no longer used");
|
||||
}
|
||||
|
||||
|
@ -167,11 +167,6 @@ public class RetentionLeaseBackgroundSyncAction extends TransportReplicationActi
|
||||
waitForActiveShards(ActiveShardCount.NONE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFrom(final StreamInput in) {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeTo(final StreamOutput out) throws IOException {
|
||||
super.writeTo(Objects.requireNonNull(out));
|
||||
|
@ -169,11 +169,6 @@ public class RetentionLeaseSyncAction extends
|
||||
waitForActiveShards(ActiveShardCount.NONE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFrom(final StreamInput in) {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeTo(final StreamOutput out) throws IOException {
|
||||
super.writeTo(Objects.requireNonNull(out));
|
||||
|
@ -1210,11 +1210,6 @@ public class TransportReplicationActionTests extends ESTestCase {
|
||||
super.writeTo(out);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFrom(StreamInput in) throws IOException {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRetry() {
|
||||
super.onRetry();
|
||||
|
@ -50,11 +50,6 @@ public final class BulkShardOperationsRequest extends ReplicatedWriteRequest<Bul
|
||||
return maxSeqNoOfUpdatesOrDeletes;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFrom(final StreamInput in) {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeTo(final StreamOutput out) throws IOException {
|
||||
super.writeTo(out);
|
||||
|
Loading…
x
Reference in New Issue
Block a user