/** * @param msg * @return A String version of the passed in <code>msg</code> */ public static String toText(Message msg) { return TextFormat.shortDebugString(msg); }
/** * Write a flush marker indicating a start / abort or a complete of a region flush * * <p>This write is for internal use only. Not for external client consumption. */ public static WALKeyImpl writeFlushMarker(WAL wal, NavigableMap<byte[], Integer> replicationScope, RegionInfo hri, final FlushDescriptor f, boolean sync, MultiVersionConcurrencyControl mvcc) throws IOException { WALKeyImpl walKey = doFullAppendTransaction(wal, replicationScope, hri, WALEdit.createFlushWALEdit(hri, f), mvcc, sync); if (LOG.isTraceEnabled()) { LOG.trace("Appended flush marker " + TextFormat.shortDebugString(f)); } return walKey; }
/** * Write a region open marker indicating that the region is opened. * This write is for internal use only. Not for external client consumption. */ public static WALKeyImpl writeRegionEventMarker(WAL wal, NavigableMap<byte[], Integer> replicationScope, RegionInfo hri, final RegionEventDescriptor r, final MultiVersionConcurrencyControl mvcc) throws IOException { WALKeyImpl walKey = writeMarker(wal, replicationScope, hri, WALEdit.createRegionEventWALEdit(hri, r), mvcc); if (LOG.isTraceEnabled()) { LOG.trace("Appended region event marker " + TextFormat.shortDebugString(r)); } return walKey; }
/** * Write a log marker that a bulk load has succeeded and is about to be committed. * This write is for internal use only. Not for external client consumption. * @param wal The log to write into. * @param replicationScope The replication scope of the families in the HRegion * @param hri A description of the region in the table that we are bulk loading into. * @param desc A protocol buffers based description of the client's bulk loading request * @return walKey with sequenceid filled out for this bulk load marker * @throws IOException We will throw an IOException if we can not append to the HLog. */ public static WALKeyImpl writeBulkLoadMarkerAndSync(final WAL wal, final NavigableMap<byte[], Integer> replicationScope, final RegionInfo hri, final WALProtos.BulkLoadDescriptor desc, final MultiVersionConcurrencyControl mvcc) throws IOException { WALKeyImpl walKey = writeMarker(wal, replicationScope, hri, WALEdit.createBulkLoadEvent(hri, desc), mvcc); if (LOG.isTraceEnabled()) { LOG.trace("Appended Bulk Load marker " + TextFormat.shortDebugString(desc)); } return walKey; }
/** * Write the marker that a compaction has succeeded and is about to be committed. * This provides info to the HMaster to allow it to recover the compaction if this regionserver * dies in the middle. It also prevents the compaction from finishing if this regionserver has * already lost its lease on the log. * * <p>This write is for internal use only. Not for external client consumption. * @param mvcc Used by WAL to get sequence Id for the waledit. */ public static WALKeyImpl writeCompactionMarker(WAL wal, NavigableMap<byte[], Integer> replicationScope, RegionInfo hri, final CompactionDescriptor c, MultiVersionConcurrencyControl mvcc) throws IOException { WALKeyImpl walKey = writeMarker(wal, replicationScope, hri, WALEdit.createCompaction(hri, c), mvcc); if (LOG.isTraceEnabled()) { LOG.trace("Appended compaction marker " + TextFormat.shortDebugString(c)); } return walKey; }
private void replayWALFlushCannotFlushMarker(FlushDescriptor flush, long replaySeqId) { synchronized (writestate) { if (this.lastReplayedOpenRegionSeqId > replaySeqId) { LOG.warn(getRegionInfo().getEncodedName() + " : " + "Skipping replaying flush event :" + TextFormat.shortDebugString(flush) + " because its sequence id " + replaySeqId + " is smaller than this regions " + "lastReplayedOpenRegionSeqId of " + lastReplayedOpenRegionSeqId); return; } // If we were waiting for observing a flush or region opening event for not showing partial // data after a secondary region crash, we can allow reads now. This event means that the // primary was not able to flush because memstore is empty when we requested flush. By the // time we observe this, we are guaranteed to have up to date seqId with our previous // assignment. this.setReadsEnabled(true); } }
if (LOG.isTraceEnabled()) { LOG.trace("High priority scanner request " + TextFormat.shortDebugString(request));
/** * Builds the protobuf message to inform the Master of files being archived. * * @param tn The table the files previously belonged to. * @param archivedFiles The files and their size in bytes that were archived. * @return The protobuf representation */ public RegionServerStatusProtos.FileArchiveNotificationRequest buildFileArchiveRequest( TableName tn, Collection<Entry<String,Long>> archivedFiles) { RegionServerStatusProtos.FileArchiveNotificationRequest.Builder builder = RegionServerStatusProtos.FileArchiveNotificationRequest.newBuilder(); HBaseProtos.TableName protoTn = ProtobufUtil.toProtoTableName(tn); for (Entry<String,Long> archivedFile : archivedFiles) { RegionServerStatusProtos.FileArchiveNotificationRequest.FileWithSize fws = RegionServerStatusProtos.FileArchiveNotificationRequest.FileWithSize.newBuilder() .setName(archivedFile.getKey()) .setSize(archivedFile.getValue()) .setTableName(protoTn) .build(); builder.addArchivedFiles(fws); } final RegionServerStatusProtos.FileArchiveNotificationRequest request = builder.build(); if (LOG.isTraceEnabled()) { LOG.trace("Reporting file archival to Master: " + TextFormat.shortDebugString(request)); } return request; }
if (LOG.isTraceEnabled()) { LOG.trace( "Current quota for request(" + TextFormat.shortDebugString(req) + "): " + currentQuota);
private void checkScanNextCallSeq(ScanRequest request, RegionScannerHolder rsh) throws OutOfOrderScannerNextException { // if nextCallSeq does not match throw Exception straight away. This needs to be // performed even before checking of Lease. // See HBASE-5974 if (request.hasNextCallSeq()) { long callSeq = request.getNextCallSeq(); if (!rsh.incNextCallSeq(callSeq)) { throw new OutOfOrderScannerNextException("Expected nextCallSeq: " + rsh.getNextCallSeq() + " But the nextCallSeq got from client: " + request.getNextCallSeq() + "; request=" + TextFormat.shortDebugString(request)); } } }
if (replaySeqId < lastReplayedOpenRegionSeqId) { LOG.warn(getRegionInfo().getEncodedName() + " : " + "Skipping replaying compaction event :" + TextFormat.shortDebugString(compaction) + " because its sequence id " + replaySeqId + " is smaller than this regions " + "lastReplayedOpenRegionSeqId of " + lastReplayedOpenRegionSeqId); + "Skipping replaying compaction event :" + TextFormat.shortDebugString(compaction) + " because its sequence id " + replaySeqId + " is smaller than this regions " + "lastReplayedCompactionSeqId of " + lastReplayedCompactionSeqId); + "Replaying compaction marker " + TextFormat.shortDebugString(compaction) + " with seqId=" + replaySeqId + " and lastReplayedOpenRegionSeqId=" + lastReplayedOpenRegionSeqId); LOG.warn(getRegionInfo().getEncodedName() + " : " + "At least one of the store files in compaction: " + TextFormat.shortDebugString(compaction) + " doesn't exist any more. Skip loading the file(s)", ex); } finally {
LOG.info("Failed report procedure " + TextFormat.shortDebugString(request) + "; retry (#" + tries + ")" + (pause ? " after " + pauseTime + "ms delay (Master is coming online...)." : " immediately."),
if (LOG.isDebugEnabled()) { LOG.debug("DLS Last flushed sequenceid for " + encodedRegionNameAsStr + ": " + TextFormat.shortDebugString(ids));
+ "Replaying flush marker " + TextFormat.shortDebugString(flush)); LOG.warn(getRegionInfo().getEncodedName() + " : " + "Received a flush event with unknown action, ignoring. " + TextFormat.shortDebugString(flush)); break;
if (LOG.isTraceEnabled()) { LOG.trace(CurCall.get().toString() + ", response " + TextFormat.shortDebugString(result) + " queueTime: " + qTime + " processingTime: " + processingTime +
/** * @param msg * @return A String version of the passed in <code>msg</code> */ public static String toText(Message msg) { return TextFormat.shortDebugString(msg); }
+ "Replaying bulkload event marker " + TextFormat.shortDebugString(bulkLoadEvent)); LOG.warn(getRegionInfo().getEncodedName() + " : " + "Skipping replaying bulkload event :" + TextFormat.shortDebugString(bulkLoadEvent) + " because its sequence id is smaller than this region's lastReplayedOpenRegionSeqId" + " =" + lastReplayedOpenRegionSeqId);
if (m instanceof ScanRequest) { return TextFormat.shortDebugString(m); } else if (m instanceof RegionServerReportRequest) { return "server " + TextFormat.shortDebugString(r.getServer()) + " load { numberOfRequests: " + r.getLoad().getNumberOfRequests() + " }"; } else if (m instanceof RegionServerStartupRequest) { return TextFormat.shortDebugString(m); } else if (m instanceof MutationProto) { return toShortString((MutationProto)m);
int id = responseHeader.getCallId(); if (LOG.isTraceEnabled()) { LOG.trace("got response header " + TextFormat.shortDebugString(responseHeader) + ", totalSize: " + totalSize + " bytes");
"SetQuotaRequest has multiple limits: " + TextFormat.shortDebugString(request)); "SetQuotaRequests has multiple limits: " + TextFormat.shortDebugString(request));