This is an automated email from the ASF dual-hosted git repository. kturner 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 e129b80ddf removes unused single mutation update RPC e129b80ddf is described below commit e129b80ddf621cb52485e0fa455a3de9c82d326b Author: Keith Turner <ktur...@apache.org> AuthorDate: Thu Sep 14 19:19:23 2023 -0400 removes unused single mutation update RPC --- .../thrift/TabletIngestClientService.java | 1631 -------------------- core/src/main/thrift/tabletingest.thrift | 13 - .../accumulo/tserver/TabletClientHandler.java | 92 -- .../org/apache/accumulo/test/BatchWriterIT.java | 96 -- .../accumulo/test/performance/NullTserver.java | 6 - 5 files changed, 1838 deletions(-) diff --git a/core/src/main/thrift-gen-java/org/apache/accumulo/core/tabletingest/thrift/TabletIngestClientService.java b/core/src/main/thrift-gen-java/org/apache/accumulo/core/tabletingest/thrift/TabletIngestClientService.java index 49fc226ec6..aff28c5c75 100644 --- a/core/src/main/thrift-gen-java/org/apache/accumulo/core/tabletingest/thrift/TabletIngestClientService.java +++ b/core/src/main/thrift-gen-java/org/apache/accumulo/core/tabletingest/thrift/TabletIngestClientService.java @@ -35,8 +35,6 @@ public class TabletIngestClientService { public org.apache.accumulo.core.dataImpl.thrift.UpdateErrors closeUpdate(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, long updateID) throws org.apache.accumulo.core.tabletserver.thrift.NoSuchScanIDException, org.apache.thrift.TException; - public void update(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, org.apache.accumulo.core.dataImpl.thrift.TKeyExtent keyExtent, org.apache.accumulo.core.dataImpl.thrift.TMutation mutation, TDurability durability) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.tabletserver.thrift.NotServingTabletException, ConstraintViolationException, org.apache.thrift [...] - public org.apache.accumulo.core.dataImpl.thrift.TConditionalSession startConditionalUpdate(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.util.List<java.nio.ByteBuffer> authorizations, java.lang.String tableID, TDurability durability, java.lang.String classLoaderContext) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.thrift.TException; public java.util.List<org.apache.accumulo.core.dataImpl.thrift.TCMResult> conditionalUpdate(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, long sessID, java.util.Map<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent,java.util.List<org.apache.accumulo.core.dataImpl.thrift.TConditionalMutation>> mutations, java.util.List<java.lang.String> symbols) throws org.apache.accumulo.core.tabletserver.thrift.NoSuchScanIDException, org.apache.thrift.TException; @@ -57,8 +55,6 @@ public class TabletIngestClientService { public void closeUpdate(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, long updateID, org.apache.thrift.async.AsyncMethodCallback<org.apache.accumulo.core.dataImpl.thrift.UpdateErrors> resultHandler) throws org.apache.thrift.TException; - public void update(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, org.apache.accumulo.core.dataImpl.thrift.TKeyExtent keyExtent, org.apache.accumulo.core.dataImpl.thrift.TMutation mutation, TDurability durability, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException; - public void startConditionalUpdate(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.util.List<java.nio.ByteBuffer> authorizations, java.lang.String tableID, TDurability durability, java.lang.String classLoaderContext, org.apache.thrift.async.AsyncMethodCallback<org.apache.accumulo.core.dataImpl.thrift.TConditionalSession> resultHandler) throws org.apache.thrift.TException; public void conditionalUpdate(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, long sessID, java.util.Map<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent,java.util.List<org.apache.accumulo.core.dataImpl.thrift.TConditionalMutation>> mutations, java.util.List<java.lang.String> symbols, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.accumulo.core.dataImpl.thrift.TCMResult>> resultHandler) throws org.apache.thrift.TException; @@ -166,40 +162,6 @@ public class TabletIngestClientService { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "closeUpdate failed: unknown result"); } - @Override - public void update(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, org.apache.accumulo.core.dataImpl.thrift.TKeyExtent keyExtent, org.apache.accumulo.core.dataImpl.thrift.TMutation mutation, TDurability durability) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.tabletserver.thrift.NotServingTabletException, ConstraintViolationException, org.apache.thrift [...] - { - send_update(tinfo, credentials, keyExtent, mutation, durability); - recv_update(); - } - - public void send_update(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, org.apache.accumulo.core.dataImpl.thrift.TKeyExtent keyExtent, org.apache.accumulo.core.dataImpl.thrift.TMutation mutation, TDurability durability) throws org.apache.thrift.TException - { - update_args args = new update_args(); - args.setTinfo(tinfo); - args.setCredentials(credentials); - args.setKeyExtent(keyExtent); - args.setMutation(mutation); - args.setDurability(durability); - sendBase("update", args); - } - - public void recv_update() throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.tabletserver.thrift.NotServingTabletException, ConstraintViolationException, org.apache.thrift.TException - { - update_result result = new update_result(); - receiveBase(result, "update"); - if (result.sec != null) { - throw result.sec; - } - if (result.nste != null) { - throw result.nste; - } - if (result.cve != null) { - throw result.cve; - } - return; - } - @Override public org.apache.accumulo.core.dataImpl.thrift.TConditionalSession startConditionalUpdate(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.util.List<java.nio.ByteBuffer> authorizations, java.lang.String tableID, TDurability durability, java.lang.String classLoaderContext) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.thrift.TException { @@ -458,54 +420,6 @@ public class TabletIngestClientService { } } - @Override - public void update(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, org.apache.accumulo.core.dataImpl.thrift.TKeyExtent keyExtent, org.apache.accumulo.core.dataImpl.thrift.TMutation mutation, TDurability durability, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { - checkReady(); - update_call method_call = new update_call(tinfo, credentials, keyExtent, mutation, durability, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class update_call extends org.apache.thrift.async.TAsyncMethodCall<Void> { - private org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo; - private org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials; - private org.apache.accumulo.core.dataImpl.thrift.TKeyExtent keyExtent; - private org.apache.accumulo.core.dataImpl.thrift.TMutation mutation; - private TDurability durability; - public update_call(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, org.apache.accumulo.core.dataImpl.thrift.TKeyExtent keyExtent, org.apache.accumulo.core.dataImpl.thrift.TMutation mutation, TDurability durability, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.tra [...] - super(client, protocolFactory, transport, resultHandler, false); - this.tinfo = tinfo; - this.credentials = credentials; - this.keyExtent = keyExtent; - this.mutation = mutation; - this.durability = durability; - } - - @Override - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("update", org.apache.thrift.protocol.TMessageType.CALL, 0)); - update_args args = new update_args(); - args.setTinfo(tinfo); - args.setCredentials(credentials); - args.setKeyExtent(keyExtent); - args.setMutation(mutation); - args.setDurability(durability); - args.write(prot); - prot.writeMessageEnd(); - } - - @Override - public Void getResult() throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.tabletserver.thrift.NotServingTabletException, ConstraintViolationException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_update(); - return null; - } - } - @Override public void startConditionalUpdate(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.util.List<java.nio.ByteBuffer> authorizations, java.lang.String tableID, TDurability durability, java.lang.String classLoaderContext, org.apache.thrift.async.AsyncMethodCallback<org.apache.accumulo.core.dataImpl.thrift.TConditionalSession> resultHandler) throws org.apache.thrift.TException { checkReady(); @@ -743,7 +657,6 @@ public class TabletIngestClientService { processMap.put("startUpdate", new startUpdate()); processMap.put("applyUpdates", new applyUpdates()); processMap.put("closeUpdate", new closeUpdate()); - processMap.put("update", new update()); processMap.put("startConditionalUpdate", new startConditionalUpdate()); processMap.put("conditionalUpdate", new conditionalUpdate()); processMap.put("invalidateConditionalUpdate", new invalidateConditionalUpdate()); @@ -844,42 +757,6 @@ public class TabletIngestClientService { } } - public static class update<I extends Iface> extends org.apache.thrift.ProcessFunction<I, update_args> { - public update() { - super("update"); - } - - @Override - public update_args getEmptyArgsInstance() { - return new update_args(); - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - protected boolean rethrowUnhandledExceptions() { - return false; - } - - @Override - public update_result getResult(I iface, update_args args) throws org.apache.thrift.TException { - update_result result = new update_result(); - try { - iface.update(args.tinfo, args.credentials, args.keyExtent, args.mutation, args.durability); - } catch (org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException sec) { - result.sec = sec; - } catch (org.apache.accumulo.core.tabletserver.thrift.NotServingTabletException nste) { - result.nste = nste; - } catch (ConstraintViolationException cve) { - result.cve = cve; - } - return result; - } - } - public static class startConditionalUpdate<I extends Iface> extends org.apache.thrift.ProcessFunction<I, startConditionalUpdate_args> { public startConditionalUpdate() { super("startConditionalUpdate"); @@ -1042,7 +919,6 @@ public class TabletIngestClientService { processMap.put("startUpdate", new startUpdate()); processMap.put("applyUpdates", new applyUpdates()); processMap.put("closeUpdate", new closeUpdate()); - processMap.put("update", new update()); processMap.put("startConditionalUpdate", new startConditionalUpdate()); processMap.put("conditionalUpdate", new conditionalUpdate()); processMap.put("invalidateConditionalUpdate", new invalidateConditionalUpdate()); @@ -1234,84 +1110,6 @@ public class TabletIngestClientService { } } - public static class update<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, update_args, Void> { - public update() { - super("update"); - } - - @Override - public update_args getEmptyArgsInstance() { - return new update_args(); - } - - @Override - public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new org.apache.thrift.async.AsyncMethodCallback<Void>() { - @Override - public void onComplete(Void o) { - update_result result = new update_result(); - try { - fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - @Override - public void onError(java.lang.Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TSerializable msg; - update_result result = new update_result(); - if (e instanceof org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException) { - result.sec = (org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException) e; - result.setSecIsSet(true); - msg = result; - } else if (e instanceof org.apache.accumulo.core.tabletserver.thrift.NotServingTabletException) { - result.nste = (org.apache.accumulo.core.tabletserver.thrift.NotServingTabletException) e; - result.setNsteIsSet(true); - msg = result; - } else if (e instanceof ConstraintViolationException) { - result.cve = (ConstraintViolationException) e; - result.setCveIsSet(true); - msg = result; - } else if (e instanceof org.apache.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - @Override - protected boolean isOneway() { - return false; - } - - @Override - public void start(I iface, update_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { - iface.update(args.tinfo, args.credentials, args.keyExtent, args.mutation, args.durability,resultHandler); - } - } - public static class startConditionalUpdate<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, startConditionalUpdate_args, org.apache.accumulo.core.dataImpl.thrift.TConditionalSession> { public startConditionalUpdate() { super("startConditionalUpdate"); @@ -4427,1435 +4225,6 @@ public class TabletIngestClientService { } } - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class update_args implements org.apache.thrift.TBase<update_args, update_args._Fields>, java.io.Serializable, Cloneable, Comparable<update_args> { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("update_args"); - - private static final org.apache.thrift.protocol.TField TINFO_FIELD_DESC = new org.apache.thrift.protocol.TField("tinfo", org.apache.thrift.protocol.TType.STRUCT, (short)4); - private static final org.apache.thrift.protocol.TField CREDENTIALS_FIELD_DESC = new org.apache.thrift.protocol.TField("credentials", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField KEY_EXTENT_FIELD_DESC = new org.apache.thrift.protocol.TField("keyExtent", org.apache.thrift.protocol.TType.STRUCT, (short)2); - private static final org.apache.thrift.protocol.TField MUTATION_FIELD_DESC = new org.apache.thrift.protocol.TField("mutation", org.apache.thrift.protocol.TType.STRUCT, (short)3); - private static final org.apache.thrift.protocol.TField DURABILITY_FIELD_DESC = new org.apache.thrift.protocol.TField("durability", org.apache.thrift.protocol.TType.I32, (short)5); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new update_argsStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new update_argsTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo; // required - public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials; // required - public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.dataImpl.thrift.TKeyExtent keyExtent; // required - public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.dataImpl.thrift.TMutation mutation; // required - /** - * - * @see TDurability - */ - public @org.apache.thrift.annotation.Nullable TDurability durability; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TINFO((short)4, "tinfo"), - CREDENTIALS((short)1, "credentials"), - KEY_EXTENT((short)2, "keyExtent"), - MUTATION((short)3, "mutation"), - /** - * - * @see TDurability - */ - DURABILITY((short)5, "durability"); - - private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 4: // TINFO - return TINFO; - case 1: // CREDENTIALS - return CREDENTIALS; - case 2: // KEY_EXTENT - return KEY_EXTENT; - case 3: // MUTATION - return MUTATION; - case 5: // DURABILITY - return DURABILITY; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.TINFO, new org.apache.thrift.meta_data.FieldMetaData("tinfo", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.clientImpl.thrift.TInfo.class))); - tmpMap.put(_Fields.CREDENTIALS, new org.apache.thrift.meta_data.FieldMetaData("credentials", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.securityImpl.thrift.TCredentials.class))); - tmpMap.put(_Fields.KEY_EXTENT, new org.apache.thrift.meta_data.FieldMetaData("keyExtent", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.dataImpl.thrift.TKeyExtent.class))); - tmpMap.put(_Fields.MUTATION, new org.apache.thrift.meta_data.FieldMetaData("mutation", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.dataImpl.thrift.TMutation.class))); - tmpMap.put(_Fields.DURABILITY, new org.apache.thrift.meta_data.FieldMetaData("durability", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TDurability.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(update_args.class, metaDataMap); - } - - public update_args() { - } - - public update_args( - org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, - org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, - org.apache.accumulo.core.dataImpl.thrift.TKeyExtent keyExtent, - org.apache.accumulo.core.dataImpl.thrift.TMutation mutation, - TDurability durability) - { - this(); - this.tinfo = tinfo; - this.credentials = credentials; - this.keyExtent = keyExtent; - this.mutation = mutation; - this.durability = durability; - } - - /** - * Performs a deep copy on <i>other</i>. - */ - public update_args(update_args other) { - if (other.isSetTinfo()) { - this.tinfo = new org.apache.accumulo.core.clientImpl.thrift.TInfo(other.tinfo); - } - if (other.isSetCredentials()) { - this.credentials = new org.apache.accumulo.core.securityImpl.thrift.TCredentials(other.credentials); - } - if (other.isSetKeyExtent()) { - this.keyExtent = new org.apache.accumulo.core.dataImpl.thrift.TKeyExtent(other.keyExtent); - } - if (other.isSetMutation()) { - this.mutation = new org.apache.accumulo.core.dataImpl.thrift.TMutation(other.mutation); - } - if (other.isSetDurability()) { - this.durability = other.durability; - } - } - - @Override - public update_args deepCopy() { - return new update_args(this); - } - - @Override - public void clear() { - this.tinfo = null; - this.credentials = null; - this.keyExtent = null; - this.mutation = null; - this.durability = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.accumulo.core.clientImpl.thrift.TInfo getTinfo() { - return this.tinfo; - } - - public update_args setTinfo(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo) { - this.tinfo = tinfo; - return this; - } - - public void unsetTinfo() { - this.tinfo = null; - } - - /** Returns true if field tinfo is set (has been assigned a value) and false otherwise */ - public boolean isSetTinfo() { - return this.tinfo != null; - } - - public void setTinfoIsSet(boolean value) { - if (!value) { - this.tinfo = null; - } - } - - @org.apache.thrift.annotation.Nullable - public org.apache.accumulo.core.securityImpl.thrift.TCredentials getCredentials() { - return this.credentials; - } - - public update_args setCredentials(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials) { - this.credentials = credentials; - return this; - } - - public void unsetCredentials() { - this.credentials = null; - } - - /** Returns true if field credentials is set (has been assigned a value) and false otherwise */ - public boolean isSetCredentials() { - return this.credentials != null; - } - - public void setCredentialsIsSet(boolean value) { - if (!value) { - this.credentials = null; - } - } - - @org.apache.thrift.annotation.Nullable - public org.apache.accumulo.core.dataImpl.thrift.TKeyExtent getKeyExtent() { - return this.keyExtent; - } - - public update_args setKeyExtent(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.dataImpl.thrift.TKeyExtent keyExtent) { - this.keyExtent = keyExtent; - return this; - } - - public void unsetKeyExtent() { - this.keyExtent = null; - } - - /** Returns true if field keyExtent is set (has been assigned a value) and false otherwise */ - public boolean isSetKeyExtent() { - return this.keyExtent != null; - } - - public void setKeyExtentIsSet(boolean value) { - if (!value) { - this.keyExtent = null; - } - } - - @org.apache.thrift.annotation.Nullable - public org.apache.accumulo.core.dataImpl.thrift.TMutation getMutation() { - return this.mutation; - } - - public update_args setMutation(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.dataImpl.thrift.TMutation mutation) { - this.mutation = mutation; - return this; - } - - public void unsetMutation() { - this.mutation = null; - } - - /** Returns true if field mutation is set (has been assigned a value) and false otherwise */ - public boolean isSetMutation() { - return this.mutation != null; - } - - public void setMutationIsSet(boolean value) { - if (!value) { - this.mutation = null; - } - } - - /** - * - * @see TDurability - */ - @org.apache.thrift.annotation.Nullable - public TDurability getDurability() { - return this.durability; - } - - /** - * - * @see TDurability - */ - public update_args setDurability(@org.apache.thrift.annotation.Nullable TDurability durability) { - this.durability = durability; - return this; - } - - public void unsetDurability() { - this.durability = null; - } - - /** Returns true if field durability is set (has been assigned a value) and false otherwise */ - public boolean isSetDurability() { - return this.durability != null; - } - - public void setDurabilityIsSet(boolean value) { - if (!value) { - this.durability = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case TINFO: - if (value == null) { - unsetTinfo(); - } else { - setTinfo((org.apache.accumulo.core.clientImpl.thrift.TInfo)value); - } - break; - - case CREDENTIALS: - if (value == null) { - unsetCredentials(); - } else { - setCredentials((org.apache.accumulo.core.securityImpl.thrift.TCredentials)value); - } - break; - - case KEY_EXTENT: - if (value == null) { - unsetKeyExtent(); - } else { - setKeyExtent((org.apache.accumulo.core.dataImpl.thrift.TKeyExtent)value); - } - break; - - case MUTATION: - if (value == null) { - unsetMutation(); - } else { - setMutation((org.apache.accumulo.core.dataImpl.thrift.TMutation)value); - } - break; - - case DURABILITY: - if (value == null) { - unsetDurability(); - } else { - setDurability((TDurability)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case TINFO: - return getTinfo(); - - case CREDENTIALS: - return getCredentials(); - - case KEY_EXTENT: - return getKeyExtent(); - - case MUTATION: - return getMutation(); - - case DURABILITY: - return getDurability(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case TINFO: - return isSetTinfo(); - case CREDENTIALS: - return isSetCredentials(); - case KEY_EXTENT: - return isSetKeyExtent(); - case MUTATION: - return isSetMutation(); - case DURABILITY: - return isSetDurability(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof update_args) - return this.equals((update_args)that); - return false; - } - - public boolean equals(update_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_tinfo = true && this.isSetTinfo(); - boolean that_present_tinfo = true && that.isSetTinfo(); - if (this_present_tinfo || that_present_tinfo) { - if (!(this_present_tinfo && that_present_tinfo)) - return false; - if (!this.tinfo.equals(that.tinfo)) - return false; - } - - boolean this_present_credentials = true && this.isSetCredentials(); - boolean that_present_credentials = true && that.isSetCredentials(); - if (this_present_credentials || that_present_credentials) { - if (!(this_present_credentials && that_present_credentials)) - return false; - if (!this.credentials.equals(that.credentials)) - return false; - } - - boolean this_present_keyExtent = true && this.isSetKeyExtent(); - boolean that_present_keyExtent = true && that.isSetKeyExtent(); - if (this_present_keyExtent || that_present_keyExtent) { - if (!(this_present_keyExtent && that_present_keyExtent)) - return false; - if (!this.keyExtent.equals(that.keyExtent)) - return false; - } - - boolean this_present_mutation = true && this.isSetMutation(); - boolean that_present_mutation = true && that.isSetMutation(); - if (this_present_mutation || that_present_mutation) { - if (!(this_present_mutation && that_present_mutation)) - return false; - if (!this.mutation.equals(that.mutation)) - return false; - } - - boolean this_present_durability = true && this.isSetDurability(); - boolean that_present_durability = true && that.isSetDurability(); - if (this_present_durability || that_present_durability) { - if (!(this_present_durability && that_present_durability)) - return false; - if (!this.durability.equals(that.durability)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetTinfo()) ? 131071 : 524287); - if (isSetTinfo()) - hashCode = hashCode * 8191 + tinfo.hashCode(); - - hashCode = hashCode * 8191 + ((isSetCredentials()) ? 131071 : 524287); - if (isSetCredentials()) - hashCode = hashCode * 8191 + credentials.hashCode(); - - hashCode = hashCode * 8191 + ((isSetKeyExtent()) ? 131071 : 524287); - if (isSetKeyExtent()) - hashCode = hashCode * 8191 + keyExtent.hashCode(); - - hashCode = hashCode * 8191 + ((isSetMutation()) ? 131071 : 524287); - if (isSetMutation()) - hashCode = hashCode * 8191 + mutation.hashCode(); - - hashCode = hashCode * 8191 + ((isSetDurability()) ? 131071 : 524287); - if (isSetDurability()) - hashCode = hashCode * 8191 + durability.getValue(); - - return hashCode; - } - - @Override - public int compareTo(update_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetTinfo(), other.isSetTinfo()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTinfo()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tinfo, other.tinfo); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetCredentials(), other.isSetCredentials()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCredentials()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.credentials, other.credentials); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetKeyExtent(), other.isSetKeyExtent()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetKeyExtent()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keyExtent, other.keyExtent); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetMutation(), other.isSetMutation()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMutation()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mutation, other.mutation); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetDurability(), other.isSetDurability()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDurability()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.durability, other.durability); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("update_args("); - boolean first = true; - - sb.append("tinfo:"); - if (this.tinfo == null) { - sb.append("null"); - } else { - sb.append(this.tinfo); - } - first = false; - if (!first) sb.append(", "); - sb.append("credentials:"); - if (this.credentials == null) { - sb.append("null"); - } else { - sb.append(this.credentials); - } - first = false; - if (!first) sb.append(", "); - sb.append("keyExtent:"); - if (this.keyExtent == null) { - sb.append("null"); - } else { - sb.append(this.keyExtent); - } - first = false; - if (!first) sb.append(", "); - sb.append("mutation:"); - if (this.mutation == null) { - sb.append("null"); - } else { - sb.append(this.mutation); - } - first = false; - if (!first) sb.append(", "); - sb.append("durability:"); - if (this.durability == null) { - sb.append("null"); - } else { - sb.append(this.durability); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (tinfo != null) { - tinfo.validate(); - } - if (credentials != null) { - credentials.validate(); - } - if (keyExtent != null) { - keyExtent.validate(); - } - if (mutation != null) { - mutation.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class update_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public update_argsStandardScheme getScheme() { - return new update_argsStandardScheme(); - } - } - - private static class update_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<update_args> { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, update_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 4: // TINFO - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.tinfo = new org.apache.accumulo.core.clientImpl.thrift.TInfo(); - struct.tinfo.read(iprot); - struct.setTinfoIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // CREDENTIALS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.credentials = new org.apache.accumulo.core.securityImpl.thrift.TCredentials(); - struct.credentials.read(iprot); - struct.setCredentialsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // KEY_EXTENT - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.keyExtent = new org.apache.accumulo.core.dataImpl.thrift.TKeyExtent(); - struct.keyExtent.read(iprot); - struct.setKeyExtentIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // MUTATION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.mutation = new org.apache.accumulo.core.dataImpl.thrift.TMutation(); - struct.mutation.read(iprot); - struct.setMutationIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // DURABILITY - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.durability = org.apache.accumulo.core.tabletingest.thrift.TDurability.findByValue(iprot.readI32()); - struct.setDurabilityIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, update_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.credentials != null) { - oprot.writeFieldBegin(CREDENTIALS_FIELD_DESC); - struct.credentials.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.keyExtent != null) { - oprot.writeFieldBegin(KEY_EXTENT_FIELD_DESC); - struct.keyExtent.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.mutation != null) { - oprot.writeFieldBegin(MUTATION_FIELD_DESC); - struct.mutation.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.tinfo != null) { - oprot.writeFieldBegin(TINFO_FIELD_DESC); - struct.tinfo.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.durability != null) { - oprot.writeFieldBegin(DURABILITY_FIELD_DESC); - oprot.writeI32(struct.durability.getValue()); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class update_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public update_argsTupleScheme getScheme() { - return new update_argsTupleScheme(); - } - } - - private static class update_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<update_args> { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, update_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetTinfo()) { - optionals.set(0); - } - if (struct.isSetCredentials()) { - optionals.set(1); - } - if (struct.isSetKeyExtent()) { - optionals.set(2); - } - if (struct.isSetMutation()) { - optionals.set(3); - } - if (struct.isSetDurability()) { - optionals.set(4); - } - oprot.writeBitSet(optionals, 5); - if (struct.isSetTinfo()) { - struct.tinfo.write(oprot); - } - if (struct.isSetCredentials()) { - struct.credentials.write(oprot); - } - if (struct.isSetKeyExtent()) { - struct.keyExtent.write(oprot); - } - if (struct.isSetMutation()) { - struct.mutation.write(oprot); - } - if (struct.isSetDurability()) { - oprot.writeI32(struct.durability.getValue()); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, update_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(5); - if (incoming.get(0)) { - struct.tinfo = new org.apache.accumulo.core.clientImpl.thrift.TInfo(); - struct.tinfo.read(iprot); - struct.setTinfoIsSet(true); - } - if (incoming.get(1)) { - struct.credentials = new org.apache.accumulo.core.securityImpl.thrift.TCredentials(); - struct.credentials.read(iprot); - struct.setCredentialsIsSet(true); - } - if (incoming.get(2)) { - struct.keyExtent = new org.apache.accumulo.core.dataImpl.thrift.TKeyExtent(); - struct.keyExtent.read(iprot); - struct.setKeyExtentIsSet(true); - } - if (incoming.get(3)) { - struct.mutation = new org.apache.accumulo.core.dataImpl.thrift.TMutation(); - struct.mutation.read(iprot); - struct.setMutationIsSet(true); - } - if (incoming.get(4)) { - struct.durability = org.apache.accumulo.core.tabletingest.thrift.TDurability.findByValue(iprot.readI32()); - struct.setDurabilityIsSet(true); - } - } - } - - private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) - public static class update_result implements org.apache.thrift.TBase<update_result, update_result._Fields>, java.io.Serializable, Cloneable, Comparable<update_result> { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("update_result"); - - private static final org.apache.thrift.protocol.TField SEC_FIELD_DESC = new org.apache.thrift.protocol.TField("sec", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField NSTE_FIELD_DESC = new org.apache.thrift.protocol.TField("nste", org.apache.thrift.protocol.TType.STRUCT, (short)2); - private static final org.apache.thrift.protocol.TField CVE_FIELD_DESC = new org.apache.thrift.protocol.TField("cve", org.apache.thrift.protocol.TType.STRUCT, (short)3); - - private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new update_resultStandardSchemeFactory(); - private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new update_resultTupleSchemeFactory(); - - public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException sec; // required - public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.tabletserver.thrift.NotServingTabletException nste; // required - public @org.apache.thrift.annotation.Nullable ConstraintViolationException cve; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SEC((short)1, "sec"), - NSTE((short)2, "nste"), - CVE((short)3, "cve"); - - private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); - - static { - for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SEC - return SEC; - case 2: // NSTE - return NSTE; - case 3: // CVE - return CVE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - @org.apache.thrift.annotation.Nullable - public static _Fields findByName(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - @Override - public short getThriftFieldId() { - return _thriftId; - } - - @Override - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SEC, new org.apache.thrift.meta_data.FieldMetaData("sec", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException.class))); - tmpMap.put(_Fields.NSTE, new org.apache.thrift.meta_data.FieldMetaData("nste", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.tabletserver.thrift.NotServingTabletException.class))); - tmpMap.put(_Fields.CVE, new org.apache.thrift.meta_data.FieldMetaData("cve", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ConstraintViolationException.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(update_result.class, metaDataMap); - } - - public update_result() { - } - - public update_result( - org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException sec, - org.apache.accumulo.core.tabletserver.thrift.NotServingTabletException nste, - ConstraintViolationException cve) - { - this(); - this.sec = sec; - this.nste = nste; - this.cve = cve; - } - - /** - * Performs a deep copy on <i>other</i>. - */ - public update_result(update_result other) { - if (other.isSetSec()) { - this.sec = new org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException(other.sec); - } - if (other.isSetNste()) { - this.nste = new org.apache.accumulo.core.tabletserver.thrift.NotServingTabletException(other.nste); - } - if (other.isSetCve()) { - this.cve = new ConstraintViolationException(other.cve); - } - } - - @Override - public update_result deepCopy() { - return new update_result(this); - } - - @Override - public void clear() { - this.sec = null; - this.nste = null; - this.cve = null; - } - - @org.apache.thrift.annotation.Nullable - public org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException getSec() { - return this.sec; - } - - public update_result setSec(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException sec) { - this.sec = sec; - return this; - } - - public void unsetSec() { - this.sec = null; - } - - /** Returns true if field sec is set (has been assigned a value) and false otherwise */ - public boolean isSetSec() { - return this.sec != null; - } - - public void setSecIsSet(boolean value) { - if (!value) { - this.sec = null; - } - } - - @org.apache.thrift.annotation.Nullable - public org.apache.accumulo.core.tabletserver.thrift.NotServingTabletException getNste() { - return this.nste; - } - - public update_result setNste(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.tabletserver.thrift.NotServingTabletException nste) { - this.nste = nste; - return this; - } - - public void unsetNste() { - this.nste = null; - } - - /** Returns true if field nste is set (has been assigned a value) and false otherwise */ - public boolean isSetNste() { - return this.nste != null; - } - - public void setNsteIsSet(boolean value) { - if (!value) { - this.nste = null; - } - } - - @org.apache.thrift.annotation.Nullable - public ConstraintViolationException getCve() { - return this.cve; - } - - public update_result setCve(@org.apache.thrift.annotation.Nullable ConstraintViolationException cve) { - this.cve = cve; - return this; - } - - public void unsetCve() { - this.cve = null; - } - - /** Returns true if field cve is set (has been assigned a value) and false otherwise */ - public boolean isSetCve() { - return this.cve != null; - } - - public void setCveIsSet(boolean value) { - if (!value) { - this.cve = null; - } - } - - @Override - public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { - switch (field) { - case SEC: - if (value == null) { - unsetSec(); - } else { - setSec((org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException)value); - } - break; - - case NSTE: - if (value == null) { - unsetNste(); - } else { - setNste((org.apache.accumulo.core.tabletserver.thrift.NotServingTabletException)value); - } - break; - - case CVE: - if (value == null) { - unsetCve(); - } else { - setCve((ConstraintViolationException)value); - } - break; - - } - } - - @org.apache.thrift.annotation.Nullable - @Override - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SEC: - return getSec(); - - case NSTE: - return getNste(); - - case CVE: - return getCve(); - - } - throw new java.lang.IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - @Override - public boolean isSet(_Fields field) { - if (field == null) { - throw new java.lang.IllegalArgumentException(); - } - - switch (field) { - case SEC: - return isSetSec(); - case NSTE: - return isSetNste(); - case CVE: - return isSetCve(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that instanceof update_result) - return this.equals((update_result)that); - return false; - } - - public boolean equals(update_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_sec = true && this.isSetSec(); - boolean that_present_sec = true && that.isSetSec(); - if (this_present_sec || that_present_sec) { - if (!(this_present_sec && that_present_sec)) - return false; - if (!this.sec.equals(that.sec)) - return false; - } - - boolean this_present_nste = true && this.isSetNste(); - boolean that_present_nste = true && that.isSetNste(); - if (this_present_nste || that_present_nste) { - if (!(this_present_nste && that_present_nste)) - return false; - if (!this.nste.equals(that.nste)) - return false; - } - - boolean this_present_cve = true && this.isSetCve(); - boolean that_present_cve = true && that.isSetCve(); - if (this_present_cve || that_present_cve) { - if (!(this_present_cve && that_present_cve)) - return false; - if (!this.cve.equals(that.cve)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((isSetSec()) ? 131071 : 524287); - if (isSetSec()) - hashCode = hashCode * 8191 + sec.hashCode(); - - hashCode = hashCode * 8191 + ((isSetNste()) ? 131071 : 524287); - if (isSetNste()) - hashCode = hashCode * 8191 + nste.hashCode(); - - hashCode = hashCode * 8191 + ((isSetCve()) ? 131071 : 524287); - if (isSetCve()) - hashCode = hashCode * 8191 + cve.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(update_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.compare(isSetSec(), other.isSetSec()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSec()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sec, other.sec); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetNste(), other.isSetNste()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNste()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nste, other.nste); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.compare(isSetCve(), other.isSetCve()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCve()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cve, other.cve); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - @org.apache.thrift.annotation.Nullable - @Override - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("update_result("); - boolean first = true; - - sb.append("sec:"); - if (this.sec == null) { - sb.append("null"); - } else { - sb.append(this.sec); - } - first = false; - if (!first) sb.append(", "); - sb.append("nste:"); - if (this.nste == null) { - sb.append("null"); - } else { - sb.append(this.nste); - } - first = false; - if (!first) sb.append(", "); - sb.append("cve:"); - if (this.cve == null) { - sb.append("null"); - } else { - sb.append(this.cve); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class update_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public update_resultStandardScheme getScheme() { - return new update_resultStandardScheme(); - } - } - - private static class update_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<update_result> { - - @Override - public void read(org.apache.thrift.protocol.TProtocol iprot, update_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SEC - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.sec = new org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException(); - struct.sec.read(iprot); - struct.setSecIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // NSTE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.nste = new org.apache.accumulo.core.tabletserver.thrift.NotServingTabletException(); - struct.nste.read(iprot); - struct.setNsteIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // CVE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.cve = new ConstraintViolationException(); - struct.cve.read(iprot); - struct.setCveIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - @Override - public void write(org.apache.thrift.protocol.TProtocol oprot, update_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.sec != null) { - oprot.writeFieldBegin(SEC_FIELD_DESC); - struct.sec.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.nste != null) { - oprot.writeFieldBegin(NSTE_FIELD_DESC); - struct.nste.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.cve != null) { - oprot.writeFieldBegin(CVE_FIELD_DESC); - struct.cve.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class update_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { - @Override - public update_resultTupleScheme getScheme() { - return new update_resultTupleScheme(); - } - } - - private static class update_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<update_result> { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, update_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.isSetSec()) { - optionals.set(0); - } - if (struct.isSetNste()) { - optionals.set(1); - } - if (struct.isSetCve()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetSec()) { - struct.sec.write(oprot); - } - if (struct.isSetNste()) { - struct.nste.write(oprot); - } - if (struct.isSetCve()) { - struct.cve.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, update_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.sec = new org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException(); - struct.sec.read(iprot); - struct.setSecIsSet(true); - } - if (incoming.get(1)) { - struct.nste = new org.apache.accumulo.core.tabletserver.thrift.NotServingTabletException(); - struct.nste.read(iprot); - struct.setNsteIsSet(true); - } - if (incoming.get(2)) { - struct.cve = new ConstraintViolationException(); - struct.cve.read(iprot); - struct.setCveIsSet(true); - } - } - } - - private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { - return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class startConditionalUpdate_args implements org.apache.thrift.TBase<startConditionalUpdate_args, startConditionalUpdate_args._Fields>, java.io.Serializable, Cloneable, Comparable<startConditionalUpdate_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startConditionalUpdate_args"); diff --git a/core/src/main/thrift/tabletingest.thrift b/core/src/main/thrift/tabletingest.thrift index b57d70faf9..dd8d11f979 100644 --- a/core/src/main/thrift/tabletingest.thrift +++ b/core/src/main/thrift/tabletingest.thrift @@ -66,19 +66,6 @@ service TabletIngestClientService { 1:tabletserver.NoSuchScanIDException nssi ) - //the following call supports making a single update to a tablet - void update( - 4:client.TInfo tinfo - 1:security.TCredentials credentials - 2:data.TKeyExtent keyExtent - 3:data.TMutation mutation - 5:TDurability durability - ) throws ( - 1:client.ThriftSecurityException sec - 2:tabletserver.NotServingTabletException nste - 3:ConstraintViolationException cve - ) - data.TConditionalSession startConditionalUpdate( 1:client.TInfo tinfo 2:security.TCredentials credentials diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletClientHandler.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletClientHandler.java index 5c41f08152..0273e3951e 100644 --- a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletClientHandler.java +++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletClientHandler.java @@ -18,7 +18,6 @@ */ package org.apache.accumulo.tserver; -import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.concurrent.TimeUnit.MINUTES; import static java.util.stream.Collectors.toList; @@ -88,7 +87,6 @@ import org.apache.accumulo.core.summary.Gatherer.FileSystemResolver; import org.apache.accumulo.core.summary.SummaryCollection; import org.apache.accumulo.core.tablet.thrift.TUnloadTabletGoal; import org.apache.accumulo.core.tablet.thrift.TabletManagementClientService; -import org.apache.accumulo.core.tabletingest.thrift.ConstraintViolationException; import org.apache.accumulo.core.tabletingest.thrift.DataFileInfo; import org.apache.accumulo.core.tabletingest.thrift.TDurability; import org.apache.accumulo.core.tabletingest.thrift.TabletIngestClientService; @@ -546,96 +544,6 @@ public class TabletClientHandler implements TabletServerClientService.Iface, } } - @Override - public void update(TInfo tinfo, TCredentials credentials, TKeyExtent tkeyExtent, - TMutation tmutation, TDurability tdurability) - throws NotServingTabletException, ConstraintViolationException, ThriftSecurityException { - - final TableId tableId = TableId.of(new String(tkeyExtent.getTable(), UTF_8)); - NamespaceId namespaceId = getNamespaceId(credentials, tableId); - if (!security.canWrite(credentials, tableId, namespaceId)) { - throw new ThriftSecurityException(credentials.getPrincipal(), - SecurityErrorCode.PERMISSION_DENIED); - } - final KeyExtent keyExtent = KeyExtent.fromThrift(tkeyExtent); - final Tablet tablet = server.getOnlineTablet(KeyExtent.copyOf(keyExtent)); - if (tablet == null) { - throw new NotServingTabletException(tkeyExtent); - } - Durability tabletDurability = tablet.getDurability(); - - if (!keyExtent.isMeta()) { - try { - server.resourceManager.waitUntilCommitsAreEnabled(); - } catch (HoldTimeoutException hte) { - // Major hack. Assumption is that the client has timed out and is gone. If that's not the - // case, then throwing the following will let client know there - // was a failure and it should retry. - throw new NotServingTabletException(tkeyExtent); - } - } - - final long opid = writeTracker.startWrite(TabletType.type(keyExtent)); - - try { - final Mutation mutation = new ServerMutation(tmutation); - final List<Mutation> mutations = Collections.singletonList(mutation); - - PreparedMutations prepared; - Span span = TraceUtil.startSpan(this.getClass(), "update::prep"); - try (Scope scope = span.makeCurrent()) { - prepared = tablet.prepareMutationsForCommit( - new TservConstraintEnv(server.getContext(), security, credentials), mutations); - } catch (Exception e) { - TraceUtil.setException(span, e, true); - throw e; - } finally { - span.end(); - } - - if (prepared.tabletClosed()) { - throw new NotServingTabletException(tkeyExtent); - } else if (!prepared.getViolators().isEmpty()) { - throw new ConstraintViolationException(prepared.getViolations().asList().stream() - .map(ConstraintViolationSummary::toThrift).collect(Collectors.toList())); - } else { - CommitSession session = prepared.getCommitSession(); - Durability durability = DurabilityImpl - .resolveDurabilty(DurabilityImpl.fromThrift(tdurability), tabletDurability); - - // Instead of always looping on true, skip completely when durability is NONE. - while (durability != Durability.NONE) { - try { - Span span2 = TraceUtil.startSpan(this.getClass(), "update::wal"); - try (Scope scope = span2.makeCurrent()) { - server.logger.log(session, mutation, durability); - } catch (Exception e) { - TraceUtil.setException(span2, e, true); - throw e; - } finally { - span2.end(); - } - break; - } catch (IOException ex) { - log.warn("Error writing mutations to log", ex); - } - } - - Span span3 = TraceUtil.startSpan(this.getClass(), "update::commit"); - try (Scope scope = span3.makeCurrent()) { - session.commit(mutations); - } catch (Exception e) { - TraceUtil.setException(span3, e, true); - throw e; - } finally { - span3.end(); - } - } - } finally { - writeTracker.finishWrite(opid); - } - } - private NamespaceId getNamespaceId(TCredentials credentials, TableId tableId) throws ThriftSecurityException { try { diff --git a/test/src/main/java/org/apache/accumulo/test/BatchWriterIT.java b/test/src/main/java/org/apache/accumulo/test/BatchWriterIT.java index cd3a727ded..6934277511 100644 --- a/test/src/main/java/org/apache/accumulo/test/BatchWriterIT.java +++ b/test/src/main/java/org/apache/accumulo/test/BatchWriterIT.java @@ -18,43 +18,17 @@ */ package org.apache.accumulo.test; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertThrows; - import java.time.Duration; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; import org.apache.accumulo.core.client.Accumulo; import org.apache.accumulo.core.client.AccumuloClient; -import org.apache.accumulo.core.client.AccumuloSecurityException; import org.apache.accumulo.core.client.BatchWriter; import org.apache.accumulo.core.client.BatchWriterConfig; -import org.apache.accumulo.core.client.admin.NewTableConfiguration; -import org.apache.accumulo.core.clientImpl.ClientContext; -import org.apache.accumulo.core.clientImpl.TabletLocator; -import org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException; -import org.apache.accumulo.core.conf.Property; -import org.apache.accumulo.core.data.Key; import org.apache.accumulo.core.data.Mutation; -import org.apache.accumulo.core.data.TableId; import org.apache.accumulo.core.data.Value; -import org.apache.accumulo.core.dataImpl.KeyExtent; -import org.apache.accumulo.core.rpc.ThriftUtil; -import org.apache.accumulo.core.rpc.clients.ThriftClientTypes; -import org.apache.accumulo.core.tabletingest.thrift.ConstraintViolationException; -import org.apache.accumulo.core.tabletingest.thrift.TDurability; -import org.apache.accumulo.core.tabletingest.thrift.TabletIngestClientService; -import org.apache.accumulo.core.trace.TraceUtil; import org.apache.accumulo.harness.AccumuloClusterHarness; -import org.apache.accumulo.test.constraints.NumericValueConstraint; -import org.apache.hadoop.io.Text; -import org.apache.thrift.TServiceClient; import org.junit.jupiter.api.Test; -import com.google.common.net.HostAndPort; - public class BatchWriterIT extends AccumuloClusterHarness { @Override @@ -77,74 +51,4 @@ public class BatchWriterIT extends AccumuloClusterHarness { } } } - - private static void update(ClientContext context, Mutation m, KeyExtent extent) throws Exception { - - TabletLocator.TabletLocation tabLoc = TabletLocator.getLocator(context, extent.tableId()) - .locateTablet(context, new Text(m.getRow()), false, true); - - var server = HostAndPort.fromString(tabLoc.getTserverLocation()); - - TabletIngestClientService.Iface client = null; - try { - client = ThriftUtil.getClient(ThriftClientTypes.TABLET_INGEST, server, context); - client.update(TraceUtil.traceInfo(), context.rpcCreds(), extent.toThrift(), m.toThrift(), - TDurability.DEFAULT); - } catch (ThriftSecurityException e) { - throw new AccumuloSecurityException(e.user, e.code); - } finally { - ThriftUtil.returnClient((TServiceClient) client, context); - } - } - - static String toString(Map.Entry<Key,Value> e) { - return e.getKey().getRow() + ":" + e.getKey().getColumnFamily() + ":" - + e.getKey().getColumnQualifier() + ":" + e.getKey().getColumnVisibility() + ":" - + e.getValue(); - } - - @Test - public void testSingleMutationWriteRPC() throws Exception { - // The batchwriter used to use this RPC and no longer does. This test exist to exercise the - // unused RPC until its removed in 3.x. Older client versions of Accumulo 2.1.x may call this - // RPC. - - String table = getUniqueNames(1)[0]; - try (AccumuloClient c = Accumulo.newClient().from(getClientProps()).build()) { - NewTableConfiguration ntc = new NewTableConfiguration(); - ntc.setProperties(Map.of(Property.TABLE_CONSTRAINT_PREFIX.getKey() + "1", - NumericValueConstraint.class.getName())); - c.tableOperations().create(table, ntc); - - var tableId = TableId.of(c.tableOperations().tableIdMap().get(table)); - - Mutation m = new Mutation("r1"); - m.put("f1", "q3", new Value("1")); - m.put("f1", "q4", new Value("2")); - - update((ClientContext) c, m, new KeyExtent(tableId, null, null)); - - try (var scanner = c.createScanner(table)) { - var entries = scanner.stream().map(BatchWriterIT::toString).collect(Collectors.toList()); - assertEquals(List.of("r1:f1:q3::1", "r1:f1:q4::2"), entries); - } - - m = new Mutation("r1"); - m.put("f1", "q3", new Value("5")); - m.put("f1", "q7", new Value("3")); - - update((ClientContext) c, m, new KeyExtent(tableId, null, null)); - - try (var scanner = c.createScanner(table)) { - var entries = scanner.stream().map(BatchWriterIT::toString).collect(Collectors.toList()); - assertEquals(List.of("r1:f1:q3::5", "r1:f1:q4::2", "r1:f1:q7::3"), entries); - } - - var m2 = new Mutation("r2"); - m2.put("f1", "q1", new Value("abc")); - assertThrows(ConstraintViolationException.class, - () -> update((ClientContext) c, m2, new KeyExtent(tableId, null, null))); - } - - } } diff --git a/test/src/main/java/org/apache/accumulo/test/performance/NullTserver.java b/test/src/main/java/org/apache/accumulo/test/performance/NullTserver.java index 84e9fa9111..d6bb0f81e0 100644 --- a/test/src/main/java/org/apache/accumulo/test/performance/NullTserver.java +++ b/test/src/main/java/org/apache/accumulo/test/performance/NullTserver.java @@ -160,12 +160,6 @@ public class NullTserver { return null; } - @Override - public void update(TInfo tinfo, TCredentials credentials, TKeyExtent keyExtent, - TMutation mutation, TDurability durability) { - - } - @Override public TabletServerStatus getTabletServerStatus(TInfo tinfo, TCredentials credentials) { return null;