private boolean isReplicationRequest(Action action) { // replication request can only be put or delete. if (!action.hasMutation()) { return false; } MutationProto mutation = action.getMutation(); MutationType type = mutation.getMutateType(); if (type != MutationType.PUT && type != MutationType.DELETE) { return false; } // replication will set a special attribute so we can make use of it to decide whether a request // is for replication. return mutation.getAttributeList().stream().map(p -> p.getName()) .filter(n -> n.equals(ReplicationUtils.REPLICATION_ATTR_NAME)).findAny().isPresent(); }
for (NameBytesPair attribute: proto.getAttributeList()) { put.setAttribute(attribute.getName(), attribute.getValue().toByteArray());
for (NameBytesPair attribute: proto.getAttributeList()) { delete.setAttribute(attribute.getName(), attribute.getValue().toByteArray());
for (NameBytesPair attribute: proto.getAttributeList()) { put.setAttribute(attribute.getName(), attribute.getValue().toByteArray());
for (NameBytesPair attribute: proto.getAttributeList()) { delete.setAttribute(attribute.getName(), attribute.getValue().toByteArray());
for (NameBytesPair attribute : proto.getAttributeList()) { mutation.setAttribute(attribute.getName(), attribute.getValue().toByteArray());
get.setTimeRange(timeRange.getMin(), timeRange.getMax()); for (NameBytesPair attribute : proto.getAttributeList()) { get.setAttribute(attribute.getName(), attribute.getValue().toByteArray());
for (NameBytesPair attribute: proto.getAttributeList()) { put.setAttribute(attribute.getName(), attribute.getValue().toByteArray());
for (NameBytesPair attribute : proto.getAttributeList()) { mutation.setAttribute(attribute.getName(), attribute.getValue().toByteArray());
for (NameBytesPair attribute: proto.getAttributeList()) { delete.setAttribute(attribute.getName(), attribute.getValue().toByteArray());
get.setTimeRange(timeRange.getMin(), timeRange.getMax()); for (NameBytesPair attribute : proto.getAttributeList()) { get.setAttribute(attribute.getName(), attribute.getValue().toByteArray());
get.setTimeRange(timeRange.getMin(), timeRange.getMax()); for (NameBytesPair attribute : proto.getAttributeList()) { get.setAttribute(attribute.getName(), attribute.getValue().toByteArray());
for (NameBytesPair attribute : proto.getAttributeList()) { mutation.setAttribute(attribute.getName(), attribute.getValue().toByteArray());