@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.apache.hadoop.hbase.protobuf.generated.AdminProtos.WALEntry)) { return super.equals(obj); } org.apache.hadoop.hbase.protobuf.generated.AdminProtos.WALEntry other = (org.apache.hadoop.hbase.protobuf.generated.AdminProtos.WALEntry) obj; boolean result = true; result = result && (hasKey() == other.hasKey()); if (hasKey()) { result = result && getKey() .equals(other.getKey()); } result = result && getKeyValueBytesList() .equals(other.getKeyValueBytesList()); result = result && (hasAssociatedCellCount() == other.hasAssociatedCellCount()); if (hasAssociatedCellCount()) { result = result && (getAssociatedCellCount() == other.getAssociatedCellCount()); } result = result && getUnknownFields().equals(other.getUnknownFields()); return result; }
public org.apache.hadoop.hbase.protobuf.generated.AdminProtos.WALEntry buildPartial() { org.apache.hadoop.hbase.protobuf.generated.AdminProtos.WALEntry result = new org.apache.hadoop.hbase.protobuf.generated.AdminProtos.WALEntry(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } if (keyBuilder_ == null) { result.key_ = key_; } else { result.key_ = keyBuilder_.build(); } if (((bitField0_ & 0x00000002) == 0x00000002)) { keyValueBytes_ = java.util.Collections.unmodifiableList(keyValueBytes_); bitField0_ = (bitField0_ & ~0x00000002); } result.keyValueBytes_ = keyValueBytes_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000002; } result.associatedCellCount_ = associatedCellCount_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
public Builder mergeFrom(org.apache.hadoop.hbase.protobuf.generated.AdminProtos.WALEntry other) { if (other == org.apache.hadoop.hbase.protobuf.generated.AdminProtos.WALEntry.getDefaultInstance()) return this; if (other.hasKey()) { mergeKey(other.getKey()); } if (!other.keyValueBytes_.isEmpty()) { if (keyValueBytes_.isEmpty()) { keyValueBytes_ = other.keyValueBytes_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureKeyValueBytesIsMutable(); keyValueBytes_.addAll(other.keyValueBytes_); } onChanged(); } if (other.hasAssociatedCellCount()) { setAssociatedCellCount(other.getAssociatedCellCount()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
ByteString regionName = entries.get(0).getKey().getEncodedRegionName(); Region region = regionServer.getRegionByEncodedName(regionName.toStringUtf8()); RegionCoprocessorHost coprocessorHost = if (!regionName.equals(entry.getKey().getEncodedRegionName())) { throw new NotServingRegionException("Replay request contains entries from multiple " + "regions. First region:" + regionName.toStringUtf8() + " , other region:" + entry.getKey().getEncodedRegionName()); long nonceGroup = entry.getKey().hasNonceGroup() ? entry.getKey().getNonceGroup() : HConstants.NO_NONCE; long nonce = entry.getKey().hasNonce() ? entry.getKey().getNonce() : HConstants.NO_NONCE; regionServer.nonceManager.reportOperationFromWal( nonceGroup, nonce, entry.getKey().getWriteTime()); long replaySeqId = (entry.getKey().hasOrigSequenceNumber()) ? entry.getKey().getOrigSequenceNumber() : entry.getKey().getLogSequenceNumber(); OperationStatus[] result = doReplayBatchOp(region, edits, replaySeqId);
long replaySeqId = (entry.getKey().hasOrigSequenceNumber()) ? entry.getKey().getOrigSequenceNumber() : entry.getKey().getLogSequenceNumber(); int count = entry.getAssociatedCellCount(); List<MutationReplay> mutations = new ArrayList<MutationReplay>(); Cell previousCell = null; m = new Put(cell.getRowArray(), cell.getRowOffset(), cell.getRowLength()); long nonceGroup = entry.getKey().hasNonceGroup() ? entry.getKey().getNonceGroup() : HConstants.NO_NONCE; long nonce = entry.getKey().hasNonce() ? entry.getKey().getNonce() : HConstants.NO_NONCE; mutations.add(new MutationReplay(MutationType.PUT, m, nonceGroup, nonce)); org.apache.hadoop.hbase.protobuf.generated.WALProtos.WALKey walKeyProto = entry.getKey(); List<UUID> clusterIds = new ArrayList<UUID>(walKeyProto.getClusterIdsCount()); for (HBaseProtos.UUID uuid : entry.getKey().getClusterIdsList()) { clusterIds.add(new UUID(uuid.getMostSigBits(), uuid.getLeastSigBits()));
for (WALEntry entry : entries) { TableName table = TableName.valueOf(entry.getKey().getTableName().toByteArray()); Cell previousCell = null; Mutation m = null; int count = entry.getAssociatedCellCount(); for (int i = 0; i < count; i++) { new Put(cell.getRowArray(), cell.getRowOffset(), cell.getRowLength()); List<UUID> clusterIds = new ArrayList<UUID>(); for(HBaseProtos.UUID clusterId : entry.getKey().getClusterIdsList()){ clusterIds.add(toUUID(clusterId)); this.metrics.setAgeOfLastAppliedOp(entries.get(size - 1).getKey().getWriteTime()); this.metrics.applyBatch(size); this.totalReplicatedEdits.addAndGet(totalReplicated);
TableName tableName = (entry.getKey().getWriteTime() < subscriptionTimestamp) ? null : TableName.valueOf(entry.getKey().getTableName().toByteArray()); Multimap<ByteBuffer, Cell> keyValuesPerRowKey = ArrayListMultimap.create(); final Map<ByteBuffer, byte[]> payloadPerRowKey = Maps.newHashMap(); int count = entry.getAssociatedCellCount(); for (int i = 0; i < count; i++) { if (!cells.advance()) { payloadPerRowKey.get(rowKeyBuffer)); eventExecutor.scheduleSepEvent(sepEvent); lastProcessedTimestamp = Math.max(lastProcessedTimestamp, entry.getKey().getWriteTime());
TableName tableName = (entry.getKey().getWriteTime() < subscriptionTimestamp) ? null : TableName.valueOf(entry.getKey().getTableName().toByteArray()); Multimap<ByteBuffer, KeyValue> keyValuesPerRowKey = ArrayListMultimap.create(); final Map<ByteBuffer, byte[]> payloadPerRowKey = Maps.newHashMap(); int count = entry.getAssociatedCellCount(); for (int i = 0; i < count; i++) { if (!cells.advance()) { payloadPerRowKey.get(rowKeyBuffer)); eventExecutor.scheduleSepEvent(sepEvent); lastProcessedTimestamp = Math.max(lastProcessedTimestamp, entry.getKey().getWriteTime());
TableName tableName = TableName.valueOf(walEntry.getKey().getTableName().toByteArray()); if (tableName == null) { continue; int count = walEntry.getAssociatedCellCount();
public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.facebook.presto.hbase.$internal.com.google.protobuf.CodedOutputStream .computeMessageSize(1, key_); } { int dataSize = 0; for (int i = 0; i < keyValueBytes_.size(); i++) { dataSize += com.facebook.presto.hbase.$internal.com.google.protobuf.CodedOutputStream .computeBytesSizeNoTag(keyValueBytes_.get(i)); } size += dataSize; size += 1 * getKeyValueBytesList().size(); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.facebook.presto.hbase.$internal.com.google.protobuf.CodedOutputStream .computeInt32Size(3, associatedCellCount_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.apache.hadoop.hbase.protobuf.generated.AdminProtos.WALEntry)) { return super.equals(obj); } org.apache.hadoop.hbase.protobuf.generated.AdminProtos.WALEntry other = (org.apache.hadoop.hbase.protobuf.generated.AdminProtos.WALEntry) obj; boolean result = true; result = result && (hasKey() == other.hasKey()); if (hasKey()) { result = result && getKey() .equals(other.getKey()); } result = result && getKeyValueBytesList() .equals(other.getKeyValueBytesList()); result = result && (hasAssociatedCellCount() == other.hasAssociatedCellCount()); if (hasAssociatedCellCount()) { result = result && (getAssociatedCellCount() == other.getAssociatedCellCount()); } result = result && getUnknownFields().equals(other.getUnknownFields()); return result; }
public org.apache.hadoop.hbase.protobuf.generated.AdminProtos.WALEntry buildPartial() { org.apache.hadoop.hbase.protobuf.generated.AdminProtos.WALEntry result = new org.apache.hadoop.hbase.protobuf.generated.AdminProtos.WALEntry(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } if (keyBuilder_ == null) { result.key_ = key_; } else { result.key_ = keyBuilder_.build(); } if (((bitField0_ & 0x00000002) == 0x00000002)) { keyValueBytes_ = java.util.Collections.unmodifiableList(keyValueBytes_); bitField0_ = (bitField0_ & ~0x00000002); } result.keyValueBytes_ = keyValueBytes_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000002; } result.associatedCellCount_ = associatedCellCount_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
public org.apache.hadoop.hbase.protobuf.generated.AdminProtos.WALEntry buildPartial() { org.apache.hadoop.hbase.protobuf.generated.AdminProtos.WALEntry result = new org.apache.hadoop.hbase.protobuf.generated.AdminProtos.WALEntry(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } if (keyBuilder_ == null) { result.key_ = key_; } else { result.key_ = keyBuilder_.build(); } if (((bitField0_ & 0x00000002) == 0x00000002)) { keyValueBytes_ = java.util.Collections.unmodifiableList(keyValueBytes_); bitField0_ = (bitField0_ & ~0x00000002); } result.keyValueBytes_ = keyValueBytes_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000002; } result.associatedCellCount_ = associatedCellCount_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, key_); } { int dataSize = 0; for (int i = 0; i < keyValueBytes_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeBytesSizeNoTag(keyValueBytes_.get(i)); } size += dataSize; size += 1 * getKeyValueBytesList().size(); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(3, associatedCellCount_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.apache.hadoop.hbase.protobuf.generated.AdminProtos.WALEntry)) { return super.equals(obj); } org.apache.hadoop.hbase.protobuf.generated.AdminProtos.WALEntry other = (org.apache.hadoop.hbase.protobuf.generated.AdminProtos.WALEntry) obj; boolean result = true; result = result && (hasKey() == other.hasKey()); if (hasKey()) { result = result && getKey() .equals(other.getKey()); } result = result && getKeyValueBytesList() .equals(other.getKeyValueBytesList()); result = result && (hasAssociatedCellCount() == other.hasAssociatedCellCount()); if (hasAssociatedCellCount()) { result = result && (getAssociatedCellCount() == other.getAssociatedCellCount()); } result = result && getUnknownFields().equals(other.getUnknownFields()); return result; }
public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, key_); } { int dataSize = 0; for (int i = 0; i < keyValueBytes_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeBytesSizeNoTag(keyValueBytes_.get(i)); } size += dataSize; size += 1 * getKeyValueBytesList().size(); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(3, associatedCellCount_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }
public org.apache.hadoop.hbase.protobuf.generated.AdminProtos.WALEntry buildPartial() { org.apache.hadoop.hbase.protobuf.generated.AdminProtos.WALEntry result = new org.apache.hadoop.hbase.protobuf.generated.AdminProtos.WALEntry(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } if (keyBuilder_ == null) { result.key_ = key_; } else { result.key_ = keyBuilder_.build(); } if (((bitField0_ & 0x00000002) == 0x00000002)) { keyValueBytes_ = java.util.Collections.unmodifiableList(keyValueBytes_); bitField0_ = (bitField0_ & ~0x00000002); } result.keyValueBytes_ = keyValueBytes_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000002; } result.associatedCellCount_ = associatedCellCount_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.apache.hadoop.hbase.protobuf.generated.AdminProtos.WALEntry)) { return super.equals(obj); } org.apache.hadoop.hbase.protobuf.generated.AdminProtos.WALEntry other = (org.apache.hadoop.hbase.protobuf.generated.AdminProtos.WALEntry) obj; boolean result = true; result = result && (hasKey() == other.hasKey()); if (hasKey()) { result = result && getKey() .equals(other.getKey()); } result = result && getKeyValueBytesList() .equals(other.getKeyValueBytesList()); result = result && (hasAssociatedCellCount() == other.hasAssociatedCellCount()); if (hasAssociatedCellCount()) { result = result && (getAssociatedCellCount() == other.getAssociatedCellCount()); } result = result && getUnknownFields().equals(other.getUnknownFields()); return result; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (hasKey()) { hash = (37 * hash) + KEY_FIELD_NUMBER; hash = (53 * hash) + getKey().hashCode(); } if (getKeyValueBytesCount() > 0) { hash = (37 * hash) + KEY_VALUE_BYTES_FIELD_NUMBER; hash = (53 * hash) + getKeyValueBytesList().hashCode(); } if (hasAssociatedCellCount()) { hash = (37 * hash) + ASSOCIATED_CELL_COUNT_FIELD_NUMBER; hash = (53 * hash) + getAssociatedCellCount(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; }
public Builder mergeFrom(org.apache.hadoop.hbase.protobuf.generated.AdminProtos.WALEntry other) { if (other == org.apache.hadoop.hbase.protobuf.generated.AdminProtos.WALEntry.getDefaultInstance()) return this; if (other.hasKey()) { mergeKey(other.getKey()); } if (!other.keyValueBytes_.isEmpty()) { if (keyValueBytes_.isEmpty()) { keyValueBytes_ = other.keyValueBytes_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureKeyValueBytesIsMutable(); keyValueBytes_.addAll(other.keyValueBytes_); } onChanged(); } if (other.hasAssociatedCellCount()) { setAssociatedCellCount(other.getAssociatedCellCount()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }