accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [2/6] git commit: ACCUMULO-2587 First addition of authentication between replication service and client
Date Tue, 27 May 2014 04:04:18 GMT
ACCUMULO-2587 First addition of authentication between replication service and client


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/b3ef383d
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/b3ef383d
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/b3ef383d

Branch: refs/heads/ACCUMULO-378
Commit: b3ef383d12741229ef7dc11014821225f7fcfcf5
Parents: 2425fd2
Author: Josh Elser <elserj@apache.org>
Authored: Fri May 23 14:31:03 2014 -0400
Committer: Josh Elser <elserj@apache.org>
Committed: Fri May 23 14:31:03 2014 -0400

----------------------------------------------------------------------
 .../org/apache/accumulo/core/conf/Property.java |   5 +
 .../replication/RemoteReplicationErrorCode.java |  28 -
 .../ReplicationCoordinatorErrorCode.java        |  26 -
 .../thrift/RemoteCoordinationException.java     | 500 ------------------
 .../thrift/RemoteReplicationErrorCode.java      |  70 +++
 .../thrift/RemoteReplicationException.java      |  78 +--
 .../thrift/ReplicationCoordinator.java          | 157 +++++-
 .../thrift/ReplicationCoordinatorErrorCode.java |  64 +++
 .../thrift/ReplicationCoordinatorException.java | 518 +++++++++++++++++++
 .../replication/thrift/ReplicationServicer.java | 270 +++++++++-
 core/src/main/thrift/replication.thrift         |  27 +-
 .../MasterReplicationCoordinator.java           |  24 +-
 .../replication/AccumuloReplicaSystem.java      |  34 +-
 .../BatchWriterReplicationReplayer.java         |  10 +-
 .../replication/ReplicationServicerHandler.java |  18 +-
 15 files changed, 1164 insertions(+), 665 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/b3ef383d/core/src/main/java/org/apache/accumulo/core/conf/Property.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/conf/Property.java b/core/src/main/java/org/apache/accumulo/core/conf/Property.java
index 08665df..fe0ea25 100644
--- a/core/src/main/java/org/apache/accumulo/core/conf/Property.java
+++ b/core/src/main/java/org/apache/accumulo/core/conf/Property.java
@@ -464,6 +464,11 @@ public enum Property {
   @Experimental
   REPLICATION_PEERS("replication.peer.", null, PropertyType.PREFIX, "Properties in this category control what systems data can be replicated to"),
   @Experimental
+  REPLICATION_PEER_USER("replication.peer.user.", null, PropertyType.PREFIX, "The username to provide when authenticating with the given peer"),
+  @Experimental
+  @Sensitive
+  REPLICATION_PEER_PASSWORD("replication.peer.password", null, PropertyType.PREFIX, "The password to provide when authenticating with the given peer"),
+  @Experimental
   REPLICATION_NAME("replication.name", "", PropertyType.STRING, "Name of this cluster with respect to replication. Used to identify this instance from other peers"),
   @Experimental
   REPLICATION_MAX_WORK_QUEUE("replication.max.work.queue", "20000000", PropertyType.COUNT, "Upper bound of the number of files queued for replication"),

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b3ef383d/core/src/main/java/org/apache/accumulo/core/replication/RemoteReplicationErrorCode.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/replication/RemoteReplicationErrorCode.java b/core/src/main/java/org/apache/accumulo/core/replication/RemoteReplicationErrorCode.java
deleted file mode 100644
index 9f9eef7..0000000
--- a/core/src/main/java/org/apache/accumulo/core/replication/RemoteReplicationErrorCode.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.accumulo.core.replication;
-
-/**
- * 
- */
-public enum RemoteReplicationErrorCode {
-  COULD_NOT_DESERIALIZE,
-  COULD_NOT_APPLY,
-  TABLE_DOES_NOT_EXIST,
-  CANNOT_AUTHENTICATE,
-  CANNOT_INSTANTIATE_REPLAYER,
-}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b3ef383d/core/src/main/java/org/apache/accumulo/core/replication/ReplicationCoordinatorErrorCode.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/replication/ReplicationCoordinatorErrorCode.java b/core/src/main/java/org/apache/accumulo/core/replication/ReplicationCoordinatorErrorCode.java
deleted file mode 100644
index d571fe0..0000000
--- a/core/src/main/java/org/apache/accumulo/core/replication/ReplicationCoordinatorErrorCode.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.accumulo.core.replication;
-
-/**
- * 
- */
-public enum ReplicationCoordinatorErrorCode {
-
-  NO_AVAILABLE_SERVERS,
-  SERVICE_CONFIGURATION_UNAVAILABLE,
-}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b3ef383d/core/src/main/java/org/apache/accumulo/core/replication/thrift/RemoteCoordinationException.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/replication/thrift/RemoteCoordinationException.java b/core/src/main/java/org/apache/accumulo/core/replication/thrift/RemoteCoordinationException.java
deleted file mode 100644
index a63cd3d..0000000
--- a/core/src/main/java/org/apache/accumulo/core/replication/thrift/RemoteCoordinationException.java
+++ /dev/null
@@ -1,500 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
- * Autogenerated by Thrift Compiler (0.9.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *  @generated
- */
-package org.apache.accumulo.core.replication.thrift;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings("all") public class RemoteCoordinationException extends TException implements org.apache.thrift.TBase<RemoteCoordinationException, RemoteCoordinationException._Fields>, java.io.Serializable, Cloneable {
-  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RemoteCoordinationException");
-
-  private static final org.apache.thrift.protocol.TField CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("code", org.apache.thrift.protocol.TType.I32, (short)1);
-  private static final org.apache.thrift.protocol.TField REASON_FIELD_DESC = new org.apache.thrift.protocol.TField("reason", org.apache.thrift.protocol.TType.STRING, (short)2);
-
-  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
-  static {
-    schemes.put(StandardScheme.class, new RemoteCoordinationExceptionStandardSchemeFactory());
-    schemes.put(TupleScheme.class, new RemoteCoordinationExceptionTupleSchemeFactory());
-  }
-
-  public int code; // required
-  public String reason; // required
-
-  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-  @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-    CODE((short)1, "code"),
-    REASON((short)2, "reason");
-
-    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
-    static {
-      for (_Fields field : EnumSet.allOf(_Fields.class)) {
-        byName.put(field.getFieldName(), field);
-      }
-    }
-
-    /**
-     * Find the _Fields constant that matches fieldId, or null if its not found.
-     */
-    public static _Fields findByThriftId(int fieldId) {
-      switch(fieldId) {
-        case 1: // CODE
-          return CODE;
-        case 2: // REASON
-          return REASON;
-        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 IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-      return fields;
-    }
-
-    /**
-     * Find the _Fields constant that matches name, or null if its not found.
-     */
-    public static _Fields findByName(String name) {
-      return byName.get(name);
-    }
-
-    private final short _thriftId;
-    private final String _fieldName;
-
-    _Fields(short thriftId, String fieldName) {
-      _thriftId = thriftId;
-      _fieldName = fieldName;
-    }
-
-    public short getThriftFieldId() {
-      return _thriftId;
-    }
-
-    public String getFieldName() {
-      return _fieldName;
-    }
-  }
-
-  // isset id assignments
-  private static final int __CODE_ISSET_ID = 0;
-  private byte __isset_bitfield = 0;
-  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-  static {
-    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-    tmpMap.put(_Fields.CODE, new org.apache.thrift.meta_data.FieldMetaData("code", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
-    tmpMap.put(_Fields.REASON, new org.apache.thrift.meta_data.FieldMetaData("reason", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-    metaDataMap = Collections.unmodifiableMap(tmpMap);
-    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RemoteCoordinationException.class, metaDataMap);
-  }
-
-  public RemoteCoordinationException() {
-  }
-
-  public RemoteCoordinationException(
-    int code,
-    String reason)
-  {
-    this();
-    this.code = code;
-    setCodeIsSet(true);
-    this.reason = reason;
-  }
-
-  /**
-   * Performs a deep copy on <i>other</i>.
-   */
-  public RemoteCoordinationException(RemoteCoordinationException other) {
-    __isset_bitfield = other.__isset_bitfield;
-    this.code = other.code;
-    if (other.isSetReason()) {
-      this.reason = other.reason;
-    }
-  }
-
-  public RemoteCoordinationException deepCopy() {
-    return new RemoteCoordinationException(this);
-  }
-
-  @Override
-  public void clear() {
-    setCodeIsSet(false);
-    this.code = 0;
-    this.reason = null;
-  }
-
-  public int getCode() {
-    return this.code;
-  }
-
-  public RemoteCoordinationException setCode(int code) {
-    this.code = code;
-    setCodeIsSet(true);
-    return this;
-  }
-
-  public void unsetCode() {
-    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CODE_ISSET_ID);
-  }
-
-  /** Returns true if field code is set (has been assigned a value) and false otherwise */
-  public boolean isSetCode() {
-    return EncodingUtils.testBit(__isset_bitfield, __CODE_ISSET_ID);
-  }
-
-  public void setCodeIsSet(boolean value) {
-    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CODE_ISSET_ID, value);
-  }
-
-  public String getReason() {
-    return this.reason;
-  }
-
-  public RemoteCoordinationException setReason(String reason) {
-    this.reason = reason;
-    return this;
-  }
-
-  public void unsetReason() {
-    this.reason = null;
-  }
-
-  /** Returns true if field reason is set (has been assigned a value) and false otherwise */
-  public boolean isSetReason() {
-    return this.reason != null;
-  }
-
-  public void setReasonIsSet(boolean value) {
-    if (!value) {
-      this.reason = null;
-    }
-  }
-
-  public void setFieldValue(_Fields field, Object value) {
-    switch (field) {
-    case CODE:
-      if (value == null) {
-        unsetCode();
-      } else {
-        setCode((Integer)value);
-      }
-      break;
-
-    case REASON:
-      if (value == null) {
-        unsetReason();
-      } else {
-        setReason((String)value);
-      }
-      break;
-
-    }
-  }
-
-  public Object getFieldValue(_Fields field) {
-    switch (field) {
-    case CODE:
-      return Integer.valueOf(getCode());
-
-    case REASON:
-      return getReason();
-
-    }
-    throw new IllegalStateException();
-  }
-
-  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-  public boolean isSet(_Fields field) {
-    if (field == null) {
-      throw new IllegalArgumentException();
-    }
-
-    switch (field) {
-    case CODE:
-      return isSetCode();
-    case REASON:
-      return isSetReason();
-    }
-    throw new IllegalStateException();
-  }
-
-  @Override
-  public boolean equals(Object that) {
-    if (that == null)
-      return false;
-    if (that instanceof RemoteCoordinationException)
-      return this.equals((RemoteCoordinationException)that);
-    return false;
-  }
-
-  public boolean equals(RemoteCoordinationException that) {
-    if (that == null)
-      return false;
-
-    boolean this_present_code = true;
-    boolean that_present_code = true;
-    if (this_present_code || that_present_code) {
-      if (!(this_present_code && that_present_code))
-        return false;
-      if (this.code != that.code)
-        return false;
-    }
-
-    boolean this_present_reason = true && this.isSetReason();
-    boolean that_present_reason = true && that.isSetReason();
-    if (this_present_reason || that_present_reason) {
-      if (!(this_present_reason && that_present_reason))
-        return false;
-      if (!this.reason.equals(that.reason))
-        return false;
-    }
-
-    return true;
-  }
-
-  @Override
-  public int hashCode() {
-    return 0;
-  }
-
-  public int compareTo(RemoteCoordinationException other) {
-    if (!getClass().equals(other.getClass())) {
-      return getClass().getName().compareTo(other.getClass().getName());
-    }
-
-    int lastComparison = 0;
-    RemoteCoordinationException typedOther = (RemoteCoordinationException)other;
-
-    lastComparison = Boolean.valueOf(isSetCode()).compareTo(typedOther.isSetCode());
-    if (lastComparison != 0) {
-      return lastComparison;
-    }
-    if (isSetCode()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.code, typedOther.code);
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-    }
-    lastComparison = Boolean.valueOf(isSetReason()).compareTo(typedOther.isSetReason());
-    if (lastComparison != 0) {
-      return lastComparison;
-    }
-    if (isSetReason()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.reason, typedOther.reason);
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-    }
-    return 0;
-  }
-
-  public _Fields fieldForId(int fieldId) {
-    return _Fields.findByThriftId(fieldId);
-  }
-
-  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
-  }
-
-  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
-  }
-
-  @Override
-  public String toString() {
-    StringBuilder sb = new StringBuilder("RemoteCoordinationException(");
-    boolean first = true;
-
-    sb.append("code:");
-    sb.append(this.code);
-    first = false;
-    if (!first) sb.append(", ");
-    sb.append("reason:");
-    if (this.reason == null) {
-      sb.append("null");
-    } else {
-      sb.append(this.reason);
-    }
-    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, ClassNotFoundException {
-    try {
-      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-      __isset_bitfield = 0;
-      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 RemoteCoordinationExceptionStandardSchemeFactory implements SchemeFactory {
-    public RemoteCoordinationExceptionStandardScheme getScheme() {
-      return new RemoteCoordinationExceptionStandardScheme();
-    }
-  }
-
-  private static class RemoteCoordinationExceptionStandardScheme extends StandardScheme<RemoteCoordinationException> {
-
-    public void read(org.apache.thrift.protocol.TProtocol iprot, RemoteCoordinationException 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: // CODE
-            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
-              struct.code = iprot.readI32();
-              struct.setCodeIsSet(true);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-            }
-            break;
-          case 2: // REASON
-            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.reason = iprot.readString();
-              struct.setReasonIsSet(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();
-    }
-
-    public void write(org.apache.thrift.protocol.TProtocol oprot, RemoteCoordinationException struct) throws org.apache.thrift.TException {
-      struct.validate();
-
-      oprot.writeStructBegin(STRUCT_DESC);
-      oprot.writeFieldBegin(CODE_FIELD_DESC);
-      oprot.writeI32(struct.code);
-      oprot.writeFieldEnd();
-      if (struct.reason != null) {
-        oprot.writeFieldBegin(REASON_FIELD_DESC);
-        oprot.writeString(struct.reason);
-        oprot.writeFieldEnd();
-      }
-      oprot.writeFieldStop();
-      oprot.writeStructEnd();
-    }
-
-  }
-
-  private static class RemoteCoordinationExceptionTupleSchemeFactory implements SchemeFactory {
-    public RemoteCoordinationExceptionTupleScheme getScheme() {
-      return new RemoteCoordinationExceptionTupleScheme();
-    }
-  }
-
-  private static class RemoteCoordinationExceptionTupleScheme extends TupleScheme<RemoteCoordinationException> {
-
-    @Override
-    public void write(org.apache.thrift.protocol.TProtocol prot, RemoteCoordinationException struct) throws org.apache.thrift.TException {
-      TTupleProtocol oprot = (TTupleProtocol) prot;
-      BitSet optionals = new BitSet();
-      if (struct.isSetCode()) {
-        optionals.set(0);
-      }
-      if (struct.isSetReason()) {
-        optionals.set(1);
-      }
-      oprot.writeBitSet(optionals, 2);
-      if (struct.isSetCode()) {
-        oprot.writeI32(struct.code);
-      }
-      if (struct.isSetReason()) {
-        oprot.writeString(struct.reason);
-      }
-    }
-
-    @Override
-    public void read(org.apache.thrift.protocol.TProtocol prot, RemoteCoordinationException struct) throws org.apache.thrift.TException {
-      TTupleProtocol iprot = (TTupleProtocol) prot;
-      BitSet incoming = iprot.readBitSet(2);
-      if (incoming.get(0)) {
-        struct.code = iprot.readI32();
-        struct.setCodeIsSet(true);
-      }
-      if (incoming.get(1)) {
-        struct.reason = iprot.readString();
-        struct.setReasonIsSet(true);
-      }
-    }
-  }
-
-}
-

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b3ef383d/core/src/main/java/org/apache/accumulo/core/replication/thrift/RemoteReplicationErrorCode.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/replication/thrift/RemoteReplicationErrorCode.java b/core/src/main/java/org/apache/accumulo/core/replication/thrift/RemoteReplicationErrorCode.java
new file mode 100644
index 0000000..5da3327
--- /dev/null
+++ b/core/src/main/java/org/apache/accumulo/core/replication/thrift/RemoteReplicationErrorCode.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.accumulo.core.replication.thrift;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+@SuppressWarnings("all") public enum RemoteReplicationErrorCode implements org.apache.thrift.TEnum {
+  COULD_NOT_DESERIALIZE(0),
+  COULD_NOT_APPLY(1),
+  TABLE_DOES_NOT_EXIST(2),
+  CANNOT_AUTHENTICATE(3),
+  CANNOT_INSTANTIATE_REPLAYER(4);
+
+  private final int value;
+
+  private RemoteReplicationErrorCode(int value) {
+    this.value = value;
+  }
+
+  /**
+   * Get the integer value of this enum value, as defined in the Thrift IDL.
+   */
+  public int getValue() {
+    return value;
+  }
+
+  /**
+   * Find a the enum type by its integer value, as defined in the Thrift IDL.
+   * @return null if the value is not found.
+   */
+  public static RemoteReplicationErrorCode findByValue(int value) { 
+    switch (value) {
+      case 0:
+        return COULD_NOT_DESERIALIZE;
+      case 1:
+        return COULD_NOT_APPLY;
+      case 2:
+        return TABLE_DOES_NOT_EXIST;
+      case 3:
+        return CANNOT_AUTHENTICATE;
+      case 4:
+        return CANNOT_INSTANTIATE_REPLAYER;
+      default:
+        return null;
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b3ef383d/core/src/main/java/org/apache/accumulo/core/replication/thrift/RemoteReplicationException.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/replication/thrift/RemoteReplicationException.java b/core/src/main/java/org/apache/accumulo/core/replication/thrift/RemoteReplicationException.java
index f93bbba..e825d2c 100644
--- a/core/src/main/java/org/apache/accumulo/core/replication/thrift/RemoteReplicationException.java
+++ b/core/src/main/java/org/apache/accumulo/core/replication/thrift/RemoteReplicationException.java
@@ -58,11 +58,19 @@ import org.slf4j.LoggerFactory;
     schemes.put(TupleScheme.class, new RemoteReplicationExceptionTupleSchemeFactory());
   }
 
-  public int code; // required
+  /**
+   * 
+   * @see RemoteReplicationErrorCode
+   */
+  public RemoteReplicationErrorCode code; // required
   public String reason; // required
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+    /**
+     * 
+     * @see RemoteReplicationErrorCode
+     */
     CODE((short)1, "code"),
     REASON((short)2, "reason");
 
@@ -123,13 +131,11 @@ import org.slf4j.LoggerFactory;
   }
 
   // isset id assignments
-  private static final int __CODE_ISSET_ID = 0;
-  private byte __isset_bitfield = 0;
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
     tmpMap.put(_Fields.CODE, new org.apache.thrift.meta_data.FieldMetaData("code", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, RemoteReplicationErrorCode.class)));
     tmpMap.put(_Fields.REASON, new org.apache.thrift.meta_data.FieldMetaData("reason", org.apache.thrift.TFieldRequirementType.DEFAULT, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
@@ -140,12 +146,11 @@ import org.slf4j.LoggerFactory;
   }
 
   public RemoteReplicationException(
-    int code,
+    RemoteReplicationErrorCode code,
     String reason)
   {
     this();
     this.code = code;
-    setCodeIsSet(true);
     this.reason = reason;
   }
 
@@ -153,8 +158,9 @@ import org.slf4j.LoggerFactory;
    * Performs a deep copy on <i>other</i>.
    */
   public RemoteReplicationException(RemoteReplicationException other) {
-    __isset_bitfield = other.__isset_bitfield;
-    this.code = other.code;
+    if (other.isSetCode()) {
+      this.code = other.code;
+    }
     if (other.isSetReason()) {
       this.reason = other.reason;
     }
@@ -166,32 +172,40 @@ import org.slf4j.LoggerFactory;
 
   @Override
   public void clear() {
-    setCodeIsSet(false);
-    this.code = 0;
+    this.code = null;
     this.reason = null;
   }
 
-  public int getCode() {
+  /**
+   * 
+   * @see RemoteReplicationErrorCode
+   */
+  public RemoteReplicationErrorCode getCode() {
     return this.code;
   }
 
-  public RemoteReplicationException setCode(int code) {
+  /**
+   * 
+   * @see RemoteReplicationErrorCode
+   */
+  public RemoteReplicationException setCode(RemoteReplicationErrorCode code) {
     this.code = code;
-    setCodeIsSet(true);
     return this;
   }
 
   public void unsetCode() {
-    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CODE_ISSET_ID);
+    this.code = null;
   }
 
   /** Returns true if field code is set (has been assigned a value) and false otherwise */
   public boolean isSetCode() {
-    return EncodingUtils.testBit(__isset_bitfield, __CODE_ISSET_ID);
+    return this.code != null;
   }
 
   public void setCodeIsSet(boolean value) {
-    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CODE_ISSET_ID, value);
+    if (!value) {
+      this.code = null;
+    }
   }
 
   public String getReason() {
@@ -224,7 +238,7 @@ import org.slf4j.LoggerFactory;
       if (value == null) {
         unsetCode();
       } else {
-        setCode((Integer)value);
+        setCode((RemoteReplicationErrorCode)value);
       }
       break;
 
@@ -242,7 +256,7 @@ import org.slf4j.LoggerFactory;
   public Object getFieldValue(_Fields field) {
     switch (field) {
     case CODE:
-      return Integer.valueOf(getCode());
+      return getCode();
 
     case REASON:
       return getReason();
@@ -279,12 +293,12 @@ import org.slf4j.LoggerFactory;
     if (that == null)
       return false;
 
-    boolean this_present_code = true;
-    boolean that_present_code = true;
+    boolean this_present_code = true && this.isSetCode();
+    boolean that_present_code = true && that.isSetCode();
     if (this_present_code || that_present_code) {
       if (!(this_present_code && that_present_code))
         return false;
-      if (this.code != that.code)
+      if (!this.code.equals(that.code))
         return false;
     }
 
@@ -354,7 +368,11 @@ import org.slf4j.LoggerFactory;
     boolean first = true;
 
     sb.append("code:");
-    sb.append(this.code);
+    if (this.code == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.code);
+    }
     first = false;
     if (!first) sb.append(", ");
     sb.append("reason:");
@@ -383,8 +401,6 @@ import org.slf4j.LoggerFactory;
 
   private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
     try {
-      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-      __isset_bitfield = 0;
       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);
@@ -411,7 +427,7 @@ import org.slf4j.LoggerFactory;
         switch (schemeField.id) {
           case 1: // CODE
             if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
-              struct.code = iprot.readI32();
+              struct.code = RemoteReplicationErrorCode.findByValue(iprot.readI32());
               struct.setCodeIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
@@ -440,9 +456,11 @@ import org.slf4j.LoggerFactory;
       struct.validate();
 
       oprot.writeStructBegin(STRUCT_DESC);
-      oprot.writeFieldBegin(CODE_FIELD_DESC);
-      oprot.writeI32(struct.code);
-      oprot.writeFieldEnd();
+      if (struct.code != null) {
+        oprot.writeFieldBegin(CODE_FIELD_DESC);
+        oprot.writeI32(struct.code.getValue());
+        oprot.writeFieldEnd();
+      }
       if (struct.reason != null) {
         oprot.writeFieldBegin(REASON_FIELD_DESC);
         oprot.writeString(struct.reason);
@@ -474,7 +492,7 @@ import org.slf4j.LoggerFactory;
       }
       oprot.writeBitSet(optionals, 2);
       if (struct.isSetCode()) {
-        oprot.writeI32(struct.code);
+        oprot.writeI32(struct.code.getValue());
       }
       if (struct.isSetReason()) {
         oprot.writeString(struct.reason);
@@ -486,7 +504,7 @@ import org.slf4j.LoggerFactory;
       TTupleProtocol iprot = (TTupleProtocol) prot;
       BitSet incoming = iprot.readBitSet(2);
       if (incoming.get(0)) {
-        struct.code = iprot.readI32();
+        struct.code = RemoteReplicationErrorCode.findByValue(iprot.readI32());
         struct.setCodeIsSet(true);
       }
       if (incoming.get(1)) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b3ef383d/core/src/main/java/org/apache/accumulo/core/replication/thrift/ReplicationCoordinator.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/replication/thrift/ReplicationCoordinator.java b/core/src/main/java/org/apache/accumulo/core/replication/thrift/ReplicationCoordinator.java
index ebc7c61..1ee9b91 100644
--- a/core/src/main/java/org/apache/accumulo/core/replication/thrift/ReplicationCoordinator.java
+++ b/core/src/main/java/org/apache/accumulo/core/replication/thrift/ReplicationCoordinator.java
@@ -50,13 +50,13 @@ import org.slf4j.LoggerFactory;
 
   public interface Iface {
 
-    public String getServicerAddress(int remoteTableId) throws RemoteCoordinationException, org.apache.thrift.TException;
+    public String getServicerAddress(int remoteTableId, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws ReplicationCoordinatorException, org.apache.thrift.TException;
 
   }
 
   public interface AsyncIface {
 
-    public void getServicerAddress(int remoteTableId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getServicerAddress_call> resultHandler) throws org.apache.thrift.TException;
+    public void getServicerAddress(int remoteTableId, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getServicerAddress_call> resultHandler) throws org.apache.thrift.TException;
 
   }
 
@@ -80,20 +80,21 @@ import org.slf4j.LoggerFactory;
       super(iprot, oprot);
     }
 
-    public String getServicerAddress(int remoteTableId) throws RemoteCoordinationException, org.apache.thrift.TException
+    public String getServicerAddress(int remoteTableId, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws ReplicationCoordinatorException, org.apache.thrift.TException
     {
-      send_getServicerAddress(remoteTableId);
+      send_getServicerAddress(remoteTableId, credentials);
       return recv_getServicerAddress();
     }
 
-    public void send_getServicerAddress(int remoteTableId) throws org.apache.thrift.TException
+    public void send_getServicerAddress(int remoteTableId, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws org.apache.thrift.TException
     {
       getServicerAddress_args args = new getServicerAddress_args();
       args.setRemoteTableId(remoteTableId);
+      args.setCredentials(credentials);
       sendBase("getServicerAddress", args);
     }
 
-    public String recv_getServicerAddress() throws RemoteCoordinationException, org.apache.thrift.TException
+    public String recv_getServicerAddress() throws ReplicationCoordinatorException, org.apache.thrift.TException
     {
       getServicerAddress_result result = new getServicerAddress_result();
       receiveBase(result, "getServicerAddress");
@@ -124,29 +125,32 @@ import org.slf4j.LoggerFactory;
       super(protocolFactory, clientManager, transport);
     }
 
-    public void getServicerAddress(int remoteTableId, org.apache.thrift.async.AsyncMethodCallback<getServicerAddress_call> resultHandler) throws org.apache.thrift.TException {
+    public void getServicerAddress(int remoteTableId, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<getServicerAddress_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      getServicerAddress_call method_call = new getServicerAddress_call(remoteTableId, resultHandler, this, ___protocolFactory, ___transport);
+      getServicerAddress_call method_call = new getServicerAddress_call(remoteTableId, credentials, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
     public static class getServicerAddress_call extends org.apache.thrift.async.TAsyncMethodCall {
       private int remoteTableId;
-      public getServicerAddress_call(int remoteTableId, org.apache.thrift.async.AsyncMethodCallback<getServicerAddress_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+      private org.apache.accumulo.core.security.thrift.TCredentials credentials;
+      public getServicerAddress_call(int remoteTableId, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<getServicerAddress_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.remoteTableId = remoteTableId;
+        this.credentials = credentials;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
         prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getServicerAddress", org.apache.thrift.protocol.TMessageType.CALL, 0));
         getServicerAddress_args args = new getServicerAddress_args();
         args.setRemoteTableId(remoteTableId);
+        args.setCredentials(credentials);
         args.write(prot);
         prot.writeMessageEnd();
       }
 
-      public String getResult() throws RemoteCoordinationException, org.apache.thrift.TException {
+      public String getResult() throws ReplicationCoordinatorException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
@@ -189,8 +193,8 @@ import org.slf4j.LoggerFactory;
       public getServicerAddress_result getResult(I iface, getServicerAddress_args args) throws org.apache.thrift.TException {
         getServicerAddress_result result = new getServicerAddress_result();
         try {
-          result.success = iface.getServicerAddress(args.remoteTableId);
-        } catch (RemoteCoordinationException e) {
+          result.success = iface.getServicerAddress(args.remoteTableId, args.credentials);
+        } catch (ReplicationCoordinatorException e) {
           result.e = e;
         }
         return result;
@@ -203,6 +207,7 @@ import org.slf4j.LoggerFactory;
     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getServicerAddress_args");
 
     private static final org.apache.thrift.protocol.TField REMOTE_TABLE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("remoteTableId", org.apache.thrift.protocol.TType.I32, (short)1);
+    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)2);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
@@ -211,10 +216,12 @@ import org.slf4j.LoggerFactory;
     }
 
     public int remoteTableId; // required
+    public org.apache.accumulo.core.security.thrift.TCredentials credentials; // required
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-      REMOTE_TABLE_ID((short)1, "remoteTableId");
+      REMOTE_TABLE_ID((short)1, "remoteTableId"),
+      CREDENTIALS((short)2, "credentials");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -231,6 +238,8 @@ import org.slf4j.LoggerFactory;
         switch(fieldId) {
           case 1: // REMOTE_TABLE_ID
             return REMOTE_TABLE_ID;
+          case 2: // CREDENTIALS
+            return CREDENTIALS;
           default:
             return null;
         }
@@ -278,6 +287,8 @@ import org.slf4j.LoggerFactory;
       Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
       tmpMap.put(_Fields.REMOTE_TABLE_ID, new org.apache.thrift.meta_data.FieldMetaData("remoteTableId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+      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.security.thrift.TCredentials.class)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getServicerAddress_args.class, metaDataMap);
     }
@@ -286,11 +297,13 @@ import org.slf4j.LoggerFactory;
     }
 
     public getServicerAddress_args(
-      int remoteTableId)
+      int remoteTableId,
+      org.apache.accumulo.core.security.thrift.TCredentials credentials)
     {
       this();
       this.remoteTableId = remoteTableId;
       setRemoteTableIdIsSet(true);
+      this.credentials = credentials;
     }
 
     /**
@@ -299,6 +312,9 @@ import org.slf4j.LoggerFactory;
     public getServicerAddress_args(getServicerAddress_args other) {
       __isset_bitfield = other.__isset_bitfield;
       this.remoteTableId = other.remoteTableId;
+      if (other.isSetCredentials()) {
+        this.credentials = new org.apache.accumulo.core.security.thrift.TCredentials(other.credentials);
+      }
     }
 
     public getServicerAddress_args deepCopy() {
@@ -309,6 +325,7 @@ import org.slf4j.LoggerFactory;
     public void clear() {
       setRemoteTableIdIsSet(false);
       this.remoteTableId = 0;
+      this.credentials = null;
     }
 
     public int getRemoteTableId() {
@@ -334,6 +351,30 @@ import org.slf4j.LoggerFactory;
       __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REMOTETABLEID_ISSET_ID, value);
     }
 
+    public org.apache.accumulo.core.security.thrift.TCredentials getCredentials() {
+      return this.credentials;
+    }
+
+    public getServicerAddress_args setCredentials(org.apache.accumulo.core.security.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;
+      }
+    }
+
     public void setFieldValue(_Fields field, Object value) {
       switch (field) {
       case REMOTE_TABLE_ID:
@@ -344,6 +385,14 @@ import org.slf4j.LoggerFactory;
         }
         break;
 
+      case CREDENTIALS:
+        if (value == null) {
+          unsetCredentials();
+        } else {
+          setCredentials((org.apache.accumulo.core.security.thrift.TCredentials)value);
+        }
+        break;
+
       }
     }
 
@@ -352,6 +401,9 @@ import org.slf4j.LoggerFactory;
       case REMOTE_TABLE_ID:
         return Integer.valueOf(getRemoteTableId());
 
+      case CREDENTIALS:
+        return getCredentials();
+
       }
       throw new IllegalStateException();
     }
@@ -365,6 +417,8 @@ import org.slf4j.LoggerFactory;
       switch (field) {
       case REMOTE_TABLE_ID:
         return isSetRemoteTableId();
+      case CREDENTIALS:
+        return isSetCredentials();
       }
       throw new IllegalStateException();
     }
@@ -391,6 +445,15 @@ import org.slf4j.LoggerFactory;
           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;
+      }
+
       return true;
     }
 
@@ -417,6 +480,16 @@ import org.slf4j.LoggerFactory;
           return lastComparison;
         }
       }
+      lastComparison = Boolean.valueOf(isSetCredentials()).compareTo(typedOther.isSetCredentials());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetCredentials()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.credentials, typedOther.credentials);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
       return 0;
     }
 
@@ -440,6 +513,14 @@ import org.slf4j.LoggerFactory;
       sb.append("remoteTableId:");
       sb.append(this.remoteTableId);
       first = false;
+      if (!first) sb.append(", ");
+      sb.append("credentials:");
+      if (this.credentials == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.credentials);
+      }
+      first = false;
       sb.append(")");
       return sb.toString();
     }
@@ -447,6 +528,9 @@ import org.slf4j.LoggerFactory;
     public void validate() throws org.apache.thrift.TException {
       // check for required fields
       // check for sub-struct validity
+      if (credentials != null) {
+        credentials.validate();
+      }
     }
 
     private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -493,6 +577,15 @@ import org.slf4j.LoggerFactory;
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
               break;
+            case 2: // CREDENTIALS
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+                struct.credentials = new org.apache.accumulo.core.security.thrift.TCredentials();
+                struct.credentials.read(iprot);
+                struct.setCredentialsIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
             default:
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
           }
@@ -511,6 +604,11 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(REMOTE_TABLE_ID_FIELD_DESC);
         oprot.writeI32(struct.remoteTableId);
         oprot.writeFieldEnd();
+        if (struct.credentials != null) {
+          oprot.writeFieldBegin(CREDENTIALS_FIELD_DESC);
+          struct.credentials.write(oprot);
+          oprot.writeFieldEnd();
+        }
         oprot.writeFieldStop();
         oprot.writeStructEnd();
       }
@@ -532,20 +630,31 @@ import org.slf4j.LoggerFactory;
         if (struct.isSetRemoteTableId()) {
           optionals.set(0);
         }
-        oprot.writeBitSet(optionals, 1);
+        if (struct.isSetCredentials()) {
+          optionals.set(1);
+        }
+        oprot.writeBitSet(optionals, 2);
         if (struct.isSetRemoteTableId()) {
           oprot.writeI32(struct.remoteTableId);
         }
+        if (struct.isSetCredentials()) {
+          struct.credentials.write(oprot);
+        }
       }
 
       @Override
       public void read(org.apache.thrift.protocol.TProtocol prot, getServicerAddress_args struct) throws org.apache.thrift.TException {
         TTupleProtocol iprot = (TTupleProtocol) prot;
-        BitSet incoming = iprot.readBitSet(1);
+        BitSet incoming = iprot.readBitSet(2);
         if (incoming.get(0)) {
           struct.remoteTableId = iprot.readI32();
           struct.setRemoteTableIdIsSet(true);
         }
+        if (incoming.get(1)) {
+          struct.credentials = new org.apache.accumulo.core.security.thrift.TCredentials();
+          struct.credentials.read(iprot);
+          struct.setCredentialsIsSet(true);
+        }
       }
     }
 
@@ -564,7 +673,7 @@ import org.slf4j.LoggerFactory;
     }
 
     public String success; // required
-    public RemoteCoordinationException e; // required
+    public ReplicationCoordinatorException e; // required
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -644,7 +753,7 @@ import org.slf4j.LoggerFactory;
 
     public getServicerAddress_result(
       String success,
-      RemoteCoordinationException e)
+      ReplicationCoordinatorException e)
     {
       this();
       this.success = success;
@@ -659,7 +768,7 @@ import org.slf4j.LoggerFactory;
         this.success = other.success;
       }
       if (other.isSetE()) {
-        this.e = new RemoteCoordinationException(other.e);
+        this.e = new ReplicationCoordinatorException(other.e);
       }
     }
 
@@ -697,11 +806,11 @@ import org.slf4j.LoggerFactory;
       }
     }
 
-    public RemoteCoordinationException getE() {
+    public ReplicationCoordinatorException getE() {
       return this.e;
     }
 
-    public getServicerAddress_result setE(RemoteCoordinationException e) {
+    public getServicerAddress_result setE(ReplicationCoordinatorException e) {
       this.e = e;
       return this;
     }
@@ -735,7 +844,7 @@ import org.slf4j.LoggerFactory;
         if (value == null) {
           unsetE();
         } else {
-          setE((RemoteCoordinationException)value);
+          setE((ReplicationCoordinatorException)value);
         }
         break;
 
@@ -924,7 +1033,7 @@ import org.slf4j.LoggerFactory;
               break;
             case 1: // E
               if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
-                struct.e = new RemoteCoordinationException();
+                struct.e = new ReplicationCoordinatorException();
                 struct.e.read(iprot);
                 struct.setEIsSet(true);
               } else { 
@@ -998,7 +1107,7 @@ import org.slf4j.LoggerFactory;
           struct.setSuccessIsSet(true);
         }
         if (incoming.get(1)) {
-          struct.e = new RemoteCoordinationException();
+          struct.e = new ReplicationCoordinatorException();
           struct.e.read(iprot);
           struct.setEIsSet(true);
         }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b3ef383d/core/src/main/java/org/apache/accumulo/core/replication/thrift/ReplicationCoordinatorErrorCode.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/replication/thrift/ReplicationCoordinatorErrorCode.java b/core/src/main/java/org/apache/accumulo/core/replication/thrift/ReplicationCoordinatorErrorCode.java
new file mode 100644
index 0000000..fb71ce5
--- /dev/null
+++ b/core/src/main/java/org/apache/accumulo/core/replication/thrift/ReplicationCoordinatorErrorCode.java
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.accumulo.core.replication.thrift;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+@SuppressWarnings("all") public enum ReplicationCoordinatorErrorCode implements org.apache.thrift.TEnum {
+  NO_AVAILABLE_SERVERS(0),
+  SERVICE_CONFIGURATION_UNAVAILABLE(1),
+  CANNOT_AUTHENTICATE(2);
+
+  private final int value;
+
+  private ReplicationCoordinatorErrorCode(int value) {
+    this.value = value;
+  }
+
+  /**
+   * Get the integer value of this enum value, as defined in the Thrift IDL.
+   */
+  public int getValue() {
+    return value;
+  }
+
+  /**
+   * Find a the enum type by its integer value, as defined in the Thrift IDL.
+   * @return null if the value is not found.
+   */
+  public static ReplicationCoordinatorErrorCode findByValue(int value) { 
+    switch (value) {
+      case 0:
+        return NO_AVAILABLE_SERVERS;
+      case 1:
+        return SERVICE_CONFIGURATION_UNAVAILABLE;
+      case 2:
+        return CANNOT_AUTHENTICATE;
+      default:
+        return null;
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b3ef383d/core/src/main/java/org/apache/accumulo/core/replication/thrift/ReplicationCoordinatorException.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/replication/thrift/ReplicationCoordinatorException.java b/core/src/main/java/org/apache/accumulo/core/replication/thrift/ReplicationCoordinatorException.java
new file mode 100644
index 0000000..d7a74e8
--- /dev/null
+++ b/core/src/main/java/org/apache/accumulo/core/replication/thrift/ReplicationCoordinatorException.java
@@ -0,0 +1,518 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.accumulo.core.replication.thrift;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings("all") public class ReplicationCoordinatorException extends TException implements org.apache.thrift.TBase<ReplicationCoordinatorException, ReplicationCoordinatorException._Fields>, java.io.Serializable, Cloneable {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ReplicationCoordinatorException");
+
+  private static final org.apache.thrift.protocol.TField CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("code", org.apache.thrift.protocol.TType.I32, (short)1);
+  private static final org.apache.thrift.protocol.TField REASON_FIELD_DESC = new org.apache.thrift.protocol.TField("reason", org.apache.thrift.protocol.TType.STRING, (short)2);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new ReplicationCoordinatorExceptionStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new ReplicationCoordinatorExceptionTupleSchemeFactory());
+  }
+
+  /**
+   * 
+   * @see ReplicationCoordinatorErrorCode
+   */
+  public ReplicationCoordinatorErrorCode code; // required
+  public String reason; // required
+
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+  @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+    /**
+     * 
+     * @see ReplicationCoordinatorErrorCode
+     */
+    CODE((short)1, "code"),
+    REASON((short)2, "reason");
+
+    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+    static {
+      for (_Fields field : EnumSet.allOf(_Fields.class)) {
+        byName.put(field.getFieldName(), field);
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
+    public static _Fields findByThriftId(int fieldId) {
+      switch(fieldId) {
+        case 1: // CODE
+          return CODE;
+        case 2: // REASON
+          return REASON;
+        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 IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      return fields;
+    }
+
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
+    public static _Fields findByName(String name) {
+      return byName.get(name);
+    }
+
+    private final short _thriftId;
+    private final String _fieldName;
+
+    _Fields(short thriftId, String fieldName) {
+      _thriftId = thriftId;
+      _fieldName = fieldName;
+    }
+
+    public short getThriftFieldId() {
+      return _thriftId;
+    }
+
+    public String getFieldName() {
+      return _fieldName;
+    }
+  }
+
+  // isset id assignments
+  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+  static {
+    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.CODE, new org.apache.thrift.meta_data.FieldMetaData("code", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ReplicationCoordinatorErrorCode.class)));
+    tmpMap.put(_Fields.REASON, new org.apache.thrift.meta_data.FieldMetaData("reason", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ReplicationCoordinatorException.class, metaDataMap);
+  }
+
+  public ReplicationCoordinatorException() {
+  }
+
+  public ReplicationCoordinatorException(
+    ReplicationCoordinatorErrorCode code,
+    String reason)
+  {
+    this();
+    this.code = code;
+    this.reason = reason;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public ReplicationCoordinatorException(ReplicationCoordinatorException other) {
+    if (other.isSetCode()) {
+      this.code = other.code;
+    }
+    if (other.isSetReason()) {
+      this.reason = other.reason;
+    }
+  }
+
+  public ReplicationCoordinatorException deepCopy() {
+    return new ReplicationCoordinatorException(this);
+  }
+
+  @Override
+  public void clear() {
+    this.code = null;
+    this.reason = null;
+  }
+
+  /**
+   * 
+   * @see ReplicationCoordinatorErrorCode
+   */
+  public ReplicationCoordinatorErrorCode getCode() {
+    return this.code;
+  }
+
+  /**
+   * 
+   * @see ReplicationCoordinatorErrorCode
+   */
+  public ReplicationCoordinatorException setCode(ReplicationCoordinatorErrorCode code) {
+    this.code = code;
+    return this;
+  }
+
+  public void unsetCode() {
+    this.code = null;
+  }
+
+  /** Returns true if field code is set (has been assigned a value) and false otherwise */
+  public boolean isSetCode() {
+    return this.code != null;
+  }
+
+  public void setCodeIsSet(boolean value) {
+    if (!value) {
+      this.code = null;
+    }
+  }
+
+  public String getReason() {
+    return this.reason;
+  }
+
+  public ReplicationCoordinatorException setReason(String reason) {
+    this.reason = reason;
+    return this;
+  }
+
+  public void unsetReason() {
+    this.reason = null;
+  }
+
+  /** Returns true if field reason is set (has been assigned a value) and false otherwise */
+  public boolean isSetReason() {
+    return this.reason != null;
+  }
+
+  public void setReasonIsSet(boolean value) {
+    if (!value) {
+      this.reason = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case CODE:
+      if (value == null) {
+        unsetCode();
+      } else {
+        setCode((ReplicationCoordinatorErrorCode)value);
+      }
+      break;
+
+    case REASON:
+      if (value == null) {
+        unsetReason();
+      } else {
+        setReason((String)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case CODE:
+      return getCode();
+
+    case REASON:
+      return getReason();
+
+    }
+    throw new IllegalStateException();
+  }
+
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+  public boolean isSet(_Fields field) {
+    if (field == null) {
+      throw new IllegalArgumentException();
+    }
+
+    switch (field) {
+    case CODE:
+      return isSetCode();
+    case REASON:
+      return isSetReason();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof ReplicationCoordinatorException)
+      return this.equals((ReplicationCoordinatorException)that);
+    return false;
+  }
+
+  public boolean equals(ReplicationCoordinatorException that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_code = true && this.isSetCode();
+    boolean that_present_code = true && that.isSetCode();
+    if (this_present_code || that_present_code) {
+      if (!(this_present_code && that_present_code))
+        return false;
+      if (!this.code.equals(that.code))
+        return false;
+    }
+
+    boolean this_present_reason = true && this.isSetReason();
+    boolean that_present_reason = true && that.isSetReason();
+    if (this_present_reason || that_present_reason) {
+      if (!(this_present_reason && that_present_reason))
+        return false;
+      if (!this.reason.equals(that.reason))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    return 0;
+  }
+
+  public int compareTo(ReplicationCoordinatorException other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+    ReplicationCoordinatorException typedOther = (ReplicationCoordinatorException)other;
+
+    lastComparison = Boolean.valueOf(isSetCode()).compareTo(typedOther.isSetCode());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetCode()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.code, typedOther.code);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetReason()).compareTo(typedOther.isSetReason());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetReason()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.reason, typedOther.reason);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    return 0;
+  }
+
+  public _Fields fieldForId(int fieldId) {
+    return _Fields.findByThriftId(fieldId);
+  }
+
+  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+  }
+
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("ReplicationCoordinatorException(");
+    boolean first = true;
+
+    sb.append("code:");
+    if (this.code == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.code);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("reason:");
+    if (this.reason == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.reason);
+    }
+    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, 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 ReplicationCoordinatorExceptionStandardSchemeFactory implements SchemeFactory {
+    public ReplicationCoordinatorExceptionStandardScheme getScheme() {
+      return new ReplicationCoordinatorExceptionStandardScheme();
+    }
+  }
+
+  private static class ReplicationCoordinatorExceptionStandardScheme extends StandardScheme<ReplicationCoordinatorException> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, ReplicationCoordinatorException 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: // CODE
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.code = ReplicationCoordinatorErrorCode.findByValue(iprot.readI32());
+              struct.setCodeIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // REASON
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.reason = iprot.readString();
+              struct.setReasonIsSet(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();
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot, ReplicationCoordinatorException struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.code != null) {
+        oprot.writeFieldBegin(CODE_FIELD_DESC);
+        oprot.writeI32(struct.code.getValue());
+        oprot.writeFieldEnd();
+      }
+      if (struct.reason != null) {
+        oprot.writeFieldBegin(REASON_FIELD_DESC);
+        oprot.writeString(struct.reason);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class ReplicationCoordinatorExceptionTupleSchemeFactory implements SchemeFactory {
+    public ReplicationCoordinatorExceptionTupleScheme getScheme() {
+      return new ReplicationCoordinatorExceptionTupleScheme();
+    }
+  }
+
+  private static class ReplicationCoordinatorExceptionTupleScheme extends TupleScheme<ReplicationCoordinatorException> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, ReplicationCoordinatorException struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetCode()) {
+        optionals.set(0);
+      }
+      if (struct.isSetReason()) {
+        optionals.set(1);
+      }
+      oprot.writeBitSet(optionals, 2);
+      if (struct.isSetCode()) {
+        oprot.writeI32(struct.code.getValue());
+      }
+      if (struct.isSetReason()) {
+        oprot.writeString(struct.reason);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, ReplicationCoordinatorException struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(2);
+      if (incoming.get(0)) {
+        struct.code = ReplicationCoordinatorErrorCode.findByValue(iprot.readI32());
+        struct.setCodeIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.reason = iprot.readString();
+        struct.setReasonIsSet(true);
+      }
+    }
+  }
+
+}
+


Mime
View raw message