Return-Path: X-Original-To: apmail-accumulo-commits-archive@www.apache.org Delivered-To: apmail-accumulo-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DC5DC11442 for ; Wed, 18 Jun 2014 20:00:20 +0000 (UTC) Received: (qmail 95045 invoked by uid 500); 18 Jun 2014 20:00:20 -0000 Delivered-To: apmail-accumulo-commits-archive@accumulo.apache.org Received: (qmail 95006 invoked by uid 500); 18 Jun 2014 20:00:20 -0000 Mailing-List: contact commits-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list commits@accumulo.apache.org Received: (qmail 94997 invoked by uid 99); 18 Jun 2014 20:00:20 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jun 2014 20:00:20 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 7C7B29436FD; Wed, 18 Jun 2014 20:00:20 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: elserj@apache.org To: commits@accumulo.apache.org Message-Id: <8fa93f7960514b0f827d9759d94de963@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: ACCUMULO-2923 TableIDs are hex, not numeric. Change remoteTableId from i32 to string. Date: Wed, 18 Jun 2014 20:00:20 +0000 (UTC) Repository: accumulo Updated Branches: refs/heads/master 643aaed80 -> 5f24240e4 ACCUMULO-2923 TableIDs are hex, not numeric. Change remoteTableId from i32 to string. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/5f24240e Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/5f24240e Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/5f24240e Branch: refs/heads/master Commit: 5f24240e41f72a594aa9c581f487190996531c02 Parents: 643aaed Author: Josh Elser Authored: Wed Jun 18 12:58:14 2014 -0700 Committer: Josh Elser Committed: Wed Jun 18 12:58:14 2014 -0700 ---------------------------------------------------------------------- .../thrift/ReplicationCoordinator.java | 80 +++++----- .../replication/thrift/ReplicationServicer.java | 160 ++++++++++--------- core/src/main/thrift/replication.thrift | 6 +- .../MasterReplicationCoordinator.java | 2 +- .../replication/AccumuloReplicaSystem.java | 16 +- .../replication/ReplicationServicerHandler.java | 7 +- .../replication/AccumuloReplicaSystemTest.java | 4 +- 7 files changed, 140 insertions(+), 135 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/5f24240e/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 1ee9b91..947862f 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, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws ReplicationCoordinatorException, org.apache.thrift.TException; + public String getServicerAddress(String 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.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void getServicerAddress(String remoteTableId, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; } @@ -80,13 +80,13 @@ import org.slf4j.LoggerFactory; super(iprot, oprot); } - public String getServicerAddress(int remoteTableId, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws ReplicationCoordinatorException, org.apache.thrift.TException + public String getServicerAddress(String remoteTableId, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws ReplicationCoordinatorException, org.apache.thrift.TException { send_getServicerAddress(remoteTableId, credentials); return recv_getServicerAddress(); } - public void send_getServicerAddress(int remoteTableId, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws org.apache.thrift.TException + public void send_getServicerAddress(String remoteTableId, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws org.apache.thrift.TException { getServicerAddress_args args = new getServicerAddress_args(); args.setRemoteTableId(remoteTableId); @@ -125,7 +125,7 @@ import org.slf4j.LoggerFactory; super(protocolFactory, clientManager, transport); } - public void getServicerAddress(int remoteTableId, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void getServicerAddress(String remoteTableId, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); getServicerAddress_call method_call = new getServicerAddress_call(remoteTableId, credentials, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -133,9 +133,9 @@ import org.slf4j.LoggerFactory; } public static class getServicerAddress_call extends org.apache.thrift.async.TAsyncMethodCall { - private int remoteTableId; + private String remoteTableId; 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 resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public getServicerAddress_call(String remoteTableId, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback 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; @@ -206,7 +206,7 @@ import org.slf4j.LoggerFactory; public static class getServicerAddress_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { 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 REMOTE_TABLE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("remoteTableId", org.apache.thrift.protocol.TType.STRING, (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, SchemeFactory> schemes = new HashMap, SchemeFactory>(); @@ -215,7 +215,7 @@ import org.slf4j.LoggerFactory; schemes.put(TupleScheme.class, new getServicerAddress_argsTupleSchemeFactory()); } - public int remoteTableId; // required + public String 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. */ @@ -280,13 +280,11 @@ import org.slf4j.LoggerFactory; } // isset id assignments - private static final int __REMOTETABLEID_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.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))); + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); 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); @@ -297,12 +295,11 @@ import org.slf4j.LoggerFactory; } public getServicerAddress_args( - int remoteTableId, + String remoteTableId, org.apache.accumulo.core.security.thrift.TCredentials credentials) { this(); this.remoteTableId = remoteTableId; - setRemoteTableIdIsSet(true); this.credentials = credentials; } @@ -310,8 +307,9 @@ import org.slf4j.LoggerFactory; * Performs a deep copy on other. */ public getServicerAddress_args(getServicerAddress_args other) { - __isset_bitfield = other.__isset_bitfield; - this.remoteTableId = other.remoteTableId; + if (other.isSetRemoteTableId()) { + this.remoteTableId = other.remoteTableId; + } if (other.isSetCredentials()) { this.credentials = new org.apache.accumulo.core.security.thrift.TCredentials(other.credentials); } @@ -323,32 +321,32 @@ import org.slf4j.LoggerFactory; @Override public void clear() { - setRemoteTableIdIsSet(false); - this.remoteTableId = 0; + this.remoteTableId = null; this.credentials = null; } - public int getRemoteTableId() { + public String getRemoteTableId() { return this.remoteTableId; } - public getServicerAddress_args setRemoteTableId(int remoteTableId) { + public getServicerAddress_args setRemoteTableId(String remoteTableId) { this.remoteTableId = remoteTableId; - setRemoteTableIdIsSet(true); return this; } public void unsetRemoteTableId() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REMOTETABLEID_ISSET_ID); + this.remoteTableId = null; } /** Returns true if field remoteTableId is set (has been assigned a value) and false otherwise */ public boolean isSetRemoteTableId() { - return EncodingUtils.testBit(__isset_bitfield, __REMOTETABLEID_ISSET_ID); + return this.remoteTableId != null; } public void setRemoteTableIdIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REMOTETABLEID_ISSET_ID, value); + if (!value) { + this.remoteTableId = null; + } } public org.apache.accumulo.core.security.thrift.TCredentials getCredentials() { @@ -381,7 +379,7 @@ import org.slf4j.LoggerFactory; if (value == null) { unsetRemoteTableId(); } else { - setRemoteTableId((Integer)value); + setRemoteTableId((String)value); } break; @@ -399,7 +397,7 @@ import org.slf4j.LoggerFactory; public Object getFieldValue(_Fields field) { switch (field) { case REMOTE_TABLE_ID: - return Integer.valueOf(getRemoteTableId()); + return getRemoteTableId(); case CREDENTIALS: return getCredentials(); @@ -436,12 +434,12 @@ import org.slf4j.LoggerFactory; if (that == null) return false; - boolean this_present_remoteTableId = true; - boolean that_present_remoteTableId = true; + boolean this_present_remoteTableId = true && this.isSetRemoteTableId(); + boolean that_present_remoteTableId = true && that.isSetRemoteTableId(); if (this_present_remoteTableId || that_present_remoteTableId) { if (!(this_present_remoteTableId && that_present_remoteTableId)) return false; - if (this.remoteTableId != that.remoteTableId) + if (!this.remoteTableId.equals(that.remoteTableId)) return false; } @@ -511,7 +509,11 @@ import org.slf4j.LoggerFactory; boolean first = true; sb.append("remoteTableId:"); - sb.append(this.remoteTableId); + if (this.remoteTableId == null) { + sb.append("null"); + } else { + sb.append(this.remoteTableId); + } first = false; if (!first) sb.append(", "); sb.append("credentials:"); @@ -543,8 +545,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); @@ -570,8 +570,8 @@ import org.slf4j.LoggerFactory; } switch (schemeField.id) { case 1: // REMOTE_TABLE_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.remoteTableId = iprot.readI32(); + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.remoteTableId = iprot.readString(); struct.setRemoteTableIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); @@ -601,9 +601,11 @@ import org.slf4j.LoggerFactory; struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(REMOTE_TABLE_ID_FIELD_DESC); - oprot.writeI32(struct.remoteTableId); - oprot.writeFieldEnd(); + if (struct.remoteTableId != null) { + oprot.writeFieldBegin(REMOTE_TABLE_ID_FIELD_DESC); + oprot.writeString(struct.remoteTableId); + oprot.writeFieldEnd(); + } if (struct.credentials != null) { oprot.writeFieldBegin(CREDENTIALS_FIELD_DESC); struct.credentials.write(oprot); @@ -635,7 +637,7 @@ import org.slf4j.LoggerFactory; } oprot.writeBitSet(optionals, 2); if (struct.isSetRemoteTableId()) { - oprot.writeI32(struct.remoteTableId); + oprot.writeString(struct.remoteTableId); } if (struct.isSetCredentials()) { struct.credentials.write(oprot); @@ -647,7 +649,7 @@ import org.slf4j.LoggerFactory; TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.remoteTableId = iprot.readI32(); + struct.remoteTableId = iprot.readString(); struct.setRemoteTableIdIsSet(true); } if (incoming.get(1)) { http://git-wip-us.apache.org/repos/asf/accumulo/blob/5f24240e/core/src/main/java/org/apache/accumulo/core/replication/thrift/ReplicationServicer.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/accumulo/core/replication/thrift/ReplicationServicer.java b/core/src/main/java/org/apache/accumulo/core/replication/thrift/ReplicationServicer.java index e297445..fd2cd20 100644 --- a/core/src/main/java/org/apache/accumulo/core/replication/thrift/ReplicationServicer.java +++ b/core/src/main/java/org/apache/accumulo/core/replication/thrift/ReplicationServicer.java @@ -50,17 +50,17 @@ import org.slf4j.LoggerFactory; public interface Iface { - public long replicateLog(int remoteTableId, WalEdits data, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws RemoteReplicationException, org.apache.thrift.TException; + public long replicateLog(String remoteTableId, WalEdits data, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws RemoteReplicationException, org.apache.thrift.TException; - public long replicateKeyValues(int remoteTableId, KeyValues data, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws RemoteReplicationException, org.apache.thrift.TException; + public long replicateKeyValues(String remoteTableId, KeyValues data, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws RemoteReplicationException, org.apache.thrift.TException; } public interface AsyncIface { - public void replicateLog(int remoteTableId, WalEdits data, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void replicateLog(String remoteTableId, WalEdits data, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void replicateKeyValues(int remoteTableId, KeyValues data, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void replicateKeyValues(String remoteTableId, KeyValues data, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; } @@ -84,13 +84,13 @@ import org.slf4j.LoggerFactory; super(iprot, oprot); } - public long replicateLog(int remoteTableId, WalEdits data, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws RemoteReplicationException, org.apache.thrift.TException + public long replicateLog(String remoteTableId, WalEdits data, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws RemoteReplicationException, org.apache.thrift.TException { send_replicateLog(remoteTableId, data, credentials); return recv_replicateLog(); } - public void send_replicateLog(int remoteTableId, WalEdits data, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws org.apache.thrift.TException + public void send_replicateLog(String remoteTableId, WalEdits data, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws org.apache.thrift.TException { replicateLog_args args = new replicateLog_args(); args.setRemoteTableId(remoteTableId); @@ -112,13 +112,13 @@ import org.slf4j.LoggerFactory; throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "replicateLog failed: unknown result"); } - public long replicateKeyValues(int remoteTableId, KeyValues data, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws RemoteReplicationException, org.apache.thrift.TException + public long replicateKeyValues(String remoteTableId, KeyValues data, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws RemoteReplicationException, org.apache.thrift.TException { send_replicateKeyValues(remoteTableId, data, credentials); return recv_replicateKeyValues(); } - public void send_replicateKeyValues(int remoteTableId, KeyValues data, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws org.apache.thrift.TException + public void send_replicateKeyValues(String remoteTableId, KeyValues data, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws org.apache.thrift.TException { replicateKeyValues_args args = new replicateKeyValues_args(); args.setRemoteTableId(remoteTableId); @@ -158,7 +158,7 @@ import org.slf4j.LoggerFactory; super(protocolFactory, clientManager, transport); } - public void replicateLog(int remoteTableId, WalEdits data, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void replicateLog(String remoteTableId, WalEdits data, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); replicateLog_call method_call = new replicateLog_call(remoteTableId, data, credentials, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -166,10 +166,10 @@ import org.slf4j.LoggerFactory; } public static class replicateLog_call extends org.apache.thrift.async.TAsyncMethodCall { - private int remoteTableId; + private String remoteTableId; private WalEdits data; private org.apache.accumulo.core.security.thrift.TCredentials credentials; - public replicateLog_call(int remoteTableId, WalEdits data, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public replicateLog_call(String remoteTableId, WalEdits data, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback 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.data = data; @@ -196,7 +196,7 @@ import org.slf4j.LoggerFactory; } } - public void replicateKeyValues(int remoteTableId, KeyValues data, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void replicateKeyValues(String remoteTableId, KeyValues data, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); replicateKeyValues_call method_call = new replicateKeyValues_call(remoteTableId, data, credentials, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -204,10 +204,10 @@ import org.slf4j.LoggerFactory; } public static class replicateKeyValues_call extends org.apache.thrift.async.TAsyncMethodCall { - private int remoteTableId; + private String remoteTableId; private KeyValues data; private org.apache.accumulo.core.security.thrift.TCredentials credentials; - public replicateKeyValues_call(int remoteTableId, KeyValues data, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public replicateKeyValues_call(String remoteTableId, KeyValues data, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback 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.data = data; @@ -307,7 +307,7 @@ import org.slf4j.LoggerFactory; public static class replicateLog_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("replicateLog_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 REMOTE_TABLE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("remoteTableId", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("data", org.apache.thrift.protocol.TType.STRUCT, (short)2); 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)3); @@ -317,7 +317,7 @@ import org.slf4j.LoggerFactory; schemes.put(TupleScheme.class, new replicateLog_argsTupleSchemeFactory()); } - public int remoteTableId; // required + public String remoteTableId; // required public WalEdits data; // required public org.apache.accumulo.core.security.thrift.TCredentials credentials; // required @@ -386,13 +386,11 @@ import org.slf4j.LoggerFactory; } // isset id assignments - private static final int __REMOTETABLEID_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.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))); + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.DATA, new org.apache.thrift.meta_data.FieldMetaData("data", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, WalEdits.class))); tmpMap.put(_Fields.CREDENTIALS, new org.apache.thrift.meta_data.FieldMetaData("credentials", org.apache.thrift.TFieldRequirementType.DEFAULT, @@ -405,13 +403,12 @@ import org.slf4j.LoggerFactory; } public replicateLog_args( - int remoteTableId, + String remoteTableId, WalEdits data, org.apache.accumulo.core.security.thrift.TCredentials credentials) { this(); this.remoteTableId = remoteTableId; - setRemoteTableIdIsSet(true); this.data = data; this.credentials = credentials; } @@ -420,8 +417,9 @@ import org.slf4j.LoggerFactory; * Performs a deep copy on other. */ public replicateLog_args(replicateLog_args other) { - __isset_bitfield = other.__isset_bitfield; - this.remoteTableId = other.remoteTableId; + if (other.isSetRemoteTableId()) { + this.remoteTableId = other.remoteTableId; + } if (other.isSetData()) { this.data = new WalEdits(other.data); } @@ -436,33 +434,33 @@ import org.slf4j.LoggerFactory; @Override public void clear() { - setRemoteTableIdIsSet(false); - this.remoteTableId = 0; + this.remoteTableId = null; this.data = null; this.credentials = null; } - public int getRemoteTableId() { + public String getRemoteTableId() { return this.remoteTableId; } - public replicateLog_args setRemoteTableId(int remoteTableId) { + public replicateLog_args setRemoteTableId(String remoteTableId) { this.remoteTableId = remoteTableId; - setRemoteTableIdIsSet(true); return this; } public void unsetRemoteTableId() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REMOTETABLEID_ISSET_ID); + this.remoteTableId = null; } /** Returns true if field remoteTableId is set (has been assigned a value) and false otherwise */ public boolean isSetRemoteTableId() { - return EncodingUtils.testBit(__isset_bitfield, __REMOTETABLEID_ISSET_ID); + return this.remoteTableId != null; } public void setRemoteTableIdIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REMOTETABLEID_ISSET_ID, value); + if (!value) { + this.remoteTableId = null; + } } public WalEdits getData() { @@ -519,7 +517,7 @@ import org.slf4j.LoggerFactory; if (value == null) { unsetRemoteTableId(); } else { - setRemoteTableId((Integer)value); + setRemoteTableId((String)value); } break; @@ -545,7 +543,7 @@ import org.slf4j.LoggerFactory; public Object getFieldValue(_Fields field) { switch (field) { case REMOTE_TABLE_ID: - return Integer.valueOf(getRemoteTableId()); + return getRemoteTableId(); case DATA: return getData(); @@ -587,12 +585,12 @@ import org.slf4j.LoggerFactory; if (that == null) return false; - boolean this_present_remoteTableId = true; - boolean that_present_remoteTableId = true; + boolean this_present_remoteTableId = true && this.isSetRemoteTableId(); + boolean that_present_remoteTableId = true && that.isSetRemoteTableId(); if (this_present_remoteTableId || that_present_remoteTableId) { if (!(this_present_remoteTableId && that_present_remoteTableId)) return false; - if (this.remoteTableId != that.remoteTableId) + if (!this.remoteTableId.equals(that.remoteTableId)) return false; } @@ -681,7 +679,11 @@ import org.slf4j.LoggerFactory; boolean first = true; sb.append("remoteTableId:"); - sb.append(this.remoteTableId); + if (this.remoteTableId == null) { + sb.append("null"); + } else { + sb.append(this.remoteTableId); + } first = false; if (!first) sb.append(", "); sb.append("data:"); @@ -724,8 +726,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); @@ -751,8 +751,8 @@ import org.slf4j.LoggerFactory; } switch (schemeField.id) { case 1: // REMOTE_TABLE_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.remoteTableId = iprot.readI32(); + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.remoteTableId = iprot.readString(); struct.setRemoteTableIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); @@ -791,9 +791,11 @@ import org.slf4j.LoggerFactory; struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(REMOTE_TABLE_ID_FIELD_DESC); - oprot.writeI32(struct.remoteTableId); - oprot.writeFieldEnd(); + if (struct.remoteTableId != null) { + oprot.writeFieldBegin(REMOTE_TABLE_ID_FIELD_DESC); + oprot.writeString(struct.remoteTableId); + oprot.writeFieldEnd(); + } if (struct.data != null) { oprot.writeFieldBegin(DATA_FIELD_DESC); struct.data.write(oprot); @@ -833,7 +835,7 @@ import org.slf4j.LoggerFactory; } oprot.writeBitSet(optionals, 3); if (struct.isSetRemoteTableId()) { - oprot.writeI32(struct.remoteTableId); + oprot.writeString(struct.remoteTableId); } if (struct.isSetData()) { struct.data.write(oprot); @@ -848,7 +850,7 @@ import org.slf4j.LoggerFactory; TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { - struct.remoteTableId = iprot.readI32(); + struct.remoteTableId = iprot.readString(); struct.setRemoteTableIdIsSet(true); } if (incoming.get(1)) { @@ -1325,7 +1327,7 @@ import org.slf4j.LoggerFactory; public static class replicateKeyValues_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("replicateKeyValues_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 REMOTE_TABLE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("remoteTableId", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("data", org.apache.thrift.protocol.TType.STRUCT, (short)2); 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)3); @@ -1335,7 +1337,7 @@ import org.slf4j.LoggerFactory; schemes.put(TupleScheme.class, new replicateKeyValues_argsTupleSchemeFactory()); } - public int remoteTableId; // required + public String remoteTableId; // required public KeyValues data; // required public org.apache.accumulo.core.security.thrift.TCredentials credentials; // required @@ -1404,13 +1406,11 @@ import org.slf4j.LoggerFactory; } // isset id assignments - private static final int __REMOTETABLEID_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.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))); + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.DATA, new org.apache.thrift.meta_data.FieldMetaData("data", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, KeyValues.class))); tmpMap.put(_Fields.CREDENTIALS, new org.apache.thrift.meta_data.FieldMetaData("credentials", org.apache.thrift.TFieldRequirementType.DEFAULT, @@ -1423,13 +1423,12 @@ import org.slf4j.LoggerFactory; } public replicateKeyValues_args( - int remoteTableId, + String remoteTableId, KeyValues data, org.apache.accumulo.core.security.thrift.TCredentials credentials) { this(); this.remoteTableId = remoteTableId; - setRemoteTableIdIsSet(true); this.data = data; this.credentials = credentials; } @@ -1438,8 +1437,9 @@ import org.slf4j.LoggerFactory; * Performs a deep copy on other. */ public replicateKeyValues_args(replicateKeyValues_args other) { - __isset_bitfield = other.__isset_bitfield; - this.remoteTableId = other.remoteTableId; + if (other.isSetRemoteTableId()) { + this.remoteTableId = other.remoteTableId; + } if (other.isSetData()) { this.data = new KeyValues(other.data); } @@ -1454,33 +1454,33 @@ import org.slf4j.LoggerFactory; @Override public void clear() { - setRemoteTableIdIsSet(false); - this.remoteTableId = 0; + this.remoteTableId = null; this.data = null; this.credentials = null; } - public int getRemoteTableId() { + public String getRemoteTableId() { return this.remoteTableId; } - public replicateKeyValues_args setRemoteTableId(int remoteTableId) { + public replicateKeyValues_args setRemoteTableId(String remoteTableId) { this.remoteTableId = remoteTableId; - setRemoteTableIdIsSet(true); return this; } public void unsetRemoteTableId() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REMOTETABLEID_ISSET_ID); + this.remoteTableId = null; } /** Returns true if field remoteTableId is set (has been assigned a value) and false otherwise */ public boolean isSetRemoteTableId() { - return EncodingUtils.testBit(__isset_bitfield, __REMOTETABLEID_ISSET_ID); + return this.remoteTableId != null; } public void setRemoteTableIdIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REMOTETABLEID_ISSET_ID, value); + if (!value) { + this.remoteTableId = null; + } } public KeyValues getData() { @@ -1537,7 +1537,7 @@ import org.slf4j.LoggerFactory; if (value == null) { unsetRemoteTableId(); } else { - setRemoteTableId((Integer)value); + setRemoteTableId((String)value); } break; @@ -1563,7 +1563,7 @@ import org.slf4j.LoggerFactory; public Object getFieldValue(_Fields field) { switch (field) { case REMOTE_TABLE_ID: - return Integer.valueOf(getRemoteTableId()); + return getRemoteTableId(); case DATA: return getData(); @@ -1605,12 +1605,12 @@ import org.slf4j.LoggerFactory; if (that == null) return false; - boolean this_present_remoteTableId = true; - boolean that_present_remoteTableId = true; + boolean this_present_remoteTableId = true && this.isSetRemoteTableId(); + boolean that_present_remoteTableId = true && that.isSetRemoteTableId(); if (this_present_remoteTableId || that_present_remoteTableId) { if (!(this_present_remoteTableId && that_present_remoteTableId)) return false; - if (this.remoteTableId != that.remoteTableId) + if (!this.remoteTableId.equals(that.remoteTableId)) return false; } @@ -1699,7 +1699,11 @@ import org.slf4j.LoggerFactory; boolean first = true; sb.append("remoteTableId:"); - sb.append(this.remoteTableId); + if (this.remoteTableId == null) { + sb.append("null"); + } else { + sb.append(this.remoteTableId); + } first = false; if (!first) sb.append(", "); sb.append("data:"); @@ -1742,8 +1746,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); @@ -1769,8 +1771,8 @@ import org.slf4j.LoggerFactory; } switch (schemeField.id) { case 1: // REMOTE_TABLE_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.remoteTableId = iprot.readI32(); + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.remoteTableId = iprot.readString(); struct.setRemoteTableIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); @@ -1809,9 +1811,11 @@ import org.slf4j.LoggerFactory; struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(REMOTE_TABLE_ID_FIELD_DESC); - oprot.writeI32(struct.remoteTableId); - oprot.writeFieldEnd(); + if (struct.remoteTableId != null) { + oprot.writeFieldBegin(REMOTE_TABLE_ID_FIELD_DESC); + oprot.writeString(struct.remoteTableId); + oprot.writeFieldEnd(); + } if (struct.data != null) { oprot.writeFieldBegin(DATA_FIELD_DESC); struct.data.write(oprot); @@ -1851,7 +1855,7 @@ import org.slf4j.LoggerFactory; } oprot.writeBitSet(optionals, 3); if (struct.isSetRemoteTableId()) { - oprot.writeI32(struct.remoteTableId); + oprot.writeString(struct.remoteTableId); } if (struct.isSetData()) { struct.data.write(oprot); @@ -1866,7 +1870,7 @@ import org.slf4j.LoggerFactory; TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { - struct.remoteTableId = iprot.readI32(); + struct.remoteTableId = iprot.readString(); struct.setRemoteTableIdIsSet(true); } if (incoming.get(1)) { http://git-wip-us.apache.org/repos/asf/accumulo/blob/5f24240e/core/src/main/thrift/replication.thrift ---------------------------------------------------------------------- diff --git a/core/src/main/thrift/replication.thrift b/core/src/main/thrift/replication.thrift index 392e913..27ca191 100644 --- a/core/src/main/thrift/replication.thrift +++ b/core/src/main/thrift/replication.thrift @@ -54,10 +54,10 @@ exception RemoteReplicationException { } service ReplicationCoordinator { - string getServicerAddress(1:i32 remoteTableId, 2:security.TCredentials credentials) throws (1:ReplicationCoordinatorException e), + string getServicerAddress(1:string remoteTableId, 2:security.TCredentials credentials) throws (1:ReplicationCoordinatorException e), } service ReplicationServicer { - i64 replicateLog(1:i32 remoteTableId, 2:WalEdits data, 3:security.TCredentials credentials) throws (1:RemoteReplicationException e), - i64 replicateKeyValues(1:i32 remoteTableId, 2:KeyValues data, 3:security.TCredentials credentials) throws (1:RemoteReplicationException e) + i64 replicateLog(1:string remoteTableId, 2:WalEdits data, 3:security.TCredentials credentials) throws (1:RemoteReplicationException e), + i64 replicateKeyValues(1:string remoteTableId, 2:KeyValues data, 3:security.TCredentials credentials) throws (1:RemoteReplicationException e) } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/accumulo/blob/5f24240e/server/master/src/main/java/org/apache/accumulo/master/replication/MasterReplicationCoordinator.java ---------------------------------------------------------------------- diff --git a/server/master/src/main/java/org/apache/accumulo/master/replication/MasterReplicationCoordinator.java b/server/master/src/main/java/org/apache/accumulo/master/replication/MasterReplicationCoordinator.java index 11c04be..795fabb 100644 --- a/server/master/src/main/java/org/apache/accumulo/master/replication/MasterReplicationCoordinator.java +++ b/server/master/src/main/java/org/apache/accumulo/master/replication/MasterReplicationCoordinator.java @@ -67,7 +67,7 @@ public class MasterReplicationCoordinator implements ReplicationCoordinator.Ifac @Override - public String getServicerAddress(int remoteTableId, TCredentials creds) throws ReplicationCoordinatorException, TException { + public String getServicerAddress(String remoteTableId, TCredentials creds) throws ReplicationCoordinatorException, TException { try { security.authenticateUser(SystemCredentials.get().toThrift(inst), creds); } catch (ThriftSecurityException e) { http://git-wip-us.apache.org/repos/asf/accumulo/blob/5f24240e/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystem.java ---------------------------------------------------------------------- diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystem.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystem.java index 5717185..b121641 100644 --- a/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystem.java +++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystem.java @@ -162,7 +162,7 @@ public class AccumuloReplicaSystem implements ReplicaSystem { Instance peerInstance = getPeerInstance(target); // Remote identifier is an integer (table id) in this case. - final int remoteTableId = Integer.parseInt(target.getRemoteIdentifier()); + final String remoteTableId = target.getRemoteIdentifier(); // Attempt the replication of this status a number of times before giving up and // trying to replicate it again later some other time. @@ -233,7 +233,7 @@ public class AccumuloReplicaSystem implements ReplicaSystem { } protected Status replicateRFiles(final Instance peerInstance, final String peerTserver, final ReplicationTarget target, final Path p, final Status status, - final long sizeLimit, final int remoteTableId, final TCredentials tcreds, final ReplicaSystemHelper helper) throws TTransportException, + final long sizeLimit, final String remoteTableId, final TCredentials tcreds, final ReplicaSystemHelper helper) throws TTransportException, AccumuloException, AccumuloSecurityException { DataInputStream input; try { @@ -279,7 +279,7 @@ public class AccumuloReplicaSystem implements ReplicaSystem { } protected Status replicateLogs(final Instance peerInstance, final String peerTserver, final ReplicationTarget target, final Path p, final Status status, - final long sizeLimit, final int remoteTableId, final TCredentials tcreds, final ReplicaSystemHelper helper) throws TTransportException, + final long sizeLimit, final String remoteTableId, final TCredentials tcreds, final ReplicaSystemHelper helper) throws TTransportException, AccumuloException, AccumuloSecurityException { final Set tids; @@ -317,7 +317,7 @@ public class AccumuloReplicaSystem implements ReplicaSystem { span.data("File", p.toString()); span.data("Peer instance name", peerInstance.getInstanceName()); span.data("Peer tserver", peerTserver); - span.data("Remote table ID", Integer.toString(remoteTableId)); + span.data("Remote table ID", remoteTableId); ReplicationStats replResult; try { @@ -374,11 +374,11 @@ public class AccumuloReplicaSystem implements ReplicaSystem { private Path p; private Status status; private long sizeLimit; - private int remoteTableId; + private String remoteTableId; private TCredentials tcreds; private Set tids; - public WalClientExecReturn(ReplicationTarget target, DataInputStream input, Path p, Status status, long sizeLimit, int remoteTableId, TCredentials tcreds, + public WalClientExecReturn(ReplicationTarget target, DataInputStream input, Path p, Status status, long sizeLimit, String remoteTableId, TCredentials tcreds, Set tids) { this.target = target; this.input = input; @@ -425,10 +425,10 @@ public class AccumuloReplicaSystem implements ReplicaSystem { private Path p; private Status status; private long sizeLimit; - private int remoteTableId; + private String remoteTableId; private TCredentials tcreds; - public RFileClientExecReturn(ReplicationTarget target, DataInputStream input, Path p, Status status, long sizeLimit, int remoteTableId, TCredentials tcreds) { + public RFileClientExecReturn(ReplicationTarget target, DataInputStream input, Path p, Status status, long sizeLimit, String remoteTableId, TCredentials tcreds) { this.target = target; this.input = input; this.p = p; http://git-wip-us.apache.org/repos/asf/accumulo/blob/5f24240e/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/ReplicationServicerHandler.java ---------------------------------------------------------------------- diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/ReplicationServicerHandler.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/ReplicationServicerHandler.java index 3a9bf9b..06b61c6 100644 --- a/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/ReplicationServicerHandler.java +++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/ReplicationServicerHandler.java @@ -52,10 +52,9 @@ public class ReplicationServicerHandler implements Iface { } @Override - public long replicateLog(int remoteTableId, WalEdits data, TCredentials tcreds) throws RemoteReplicationException, TException { - log.debug("Got replication request to tableID {} with {} edits", remoteTableId, data.getEditsSize()); + public long replicateLog(String tableId, WalEdits data, TCredentials tcreds) throws RemoteReplicationException, TException { + log.debug("Got replication request to tableID {} with {} edits", tableId, data.getEditsSize()); - String tableId = Integer.toString(remoteTableId); Credentials creds = Credentials.fromThrift(tcreds); Connector conn; String tableName; @@ -116,7 +115,7 @@ public class ReplicationServicerHandler implements Iface { } @Override - public long replicateKeyValues(int remoteTableId, KeyValues data, TCredentials creds) throws RemoteReplicationException, TException { + public long replicateKeyValues(String tableId, KeyValues data, TCredentials creds) throws RemoteReplicationException, TException { throw new UnsupportedOperationException(); } http://git-wip-us.apache.org/repos/asf/accumulo/blob/5f24240e/server/tserver/src/test/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystemTest.java ---------------------------------------------------------------------- diff --git a/server/tserver/src/test/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystemTest.java b/server/tserver/src/test/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystemTest.java index 4e2901d..90a2aa4 100644 --- a/server/tserver/src/test/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystemTest.java +++ b/server/tserver/src/test/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystemTest.java @@ -448,7 +448,7 @@ public class AccumuloReplicaSystemTest { Path p = new Path("/accumulo/wals/tserver+port/" + UUID.randomUUID().toString()); Status status = null; long sizeLimit = Long.MAX_VALUE; - int remoteTableId = Integer.parseInt(target.getRemoteIdentifier()); + String remoteTableId = target.getRemoteIdentifier(); TCredentials tcreds = null; Set tids = new HashSet<>(); @@ -477,7 +477,7 @@ public class AccumuloReplicaSystemTest { Path p = new Path("/accumulo/wals/tserver+port/" + UUID.randomUUID().toString()); Status status = null; long sizeLimit = Long.MAX_VALUE; - int remoteTableId = Integer.parseInt(target.getRemoteIdentifier()); + String remoteTableId = target.getRemoteIdentifier(); TCredentials tcreds = null; Set tids = new HashSet<>();