Revert "HBASE-26479 Print too slow/big scan's operation_id in region server log (#3870)"
This reverts commit b437a96272
.
This commit is contained in:
parent
9275159289
commit
52ce87780a
|
@ -77,7 +77,6 @@ import org.apache.hadoop.hbase.client.Durability;
|
||||||
import org.apache.hadoop.hbase.client.Get;
|
import org.apache.hadoop.hbase.client.Get;
|
||||||
import org.apache.hadoop.hbase.client.Increment;
|
import org.apache.hadoop.hbase.client.Increment;
|
||||||
import org.apache.hadoop.hbase.client.Mutation;
|
import org.apache.hadoop.hbase.client.Mutation;
|
||||||
import org.apache.hadoop.hbase.client.OperationWithAttributes;
|
|
||||||
import org.apache.hadoop.hbase.client.Put;
|
import org.apache.hadoop.hbase.client.Put;
|
||||||
import org.apache.hadoop.hbase.client.RegionInfo;
|
import org.apache.hadoop.hbase.client.RegionInfo;
|
||||||
import org.apache.hadoop.hbase.client.RegionReplicaUtil;
|
import org.apache.hadoop.hbase.client.RegionReplicaUtil;
|
||||||
|
@ -1367,7 +1366,6 @@ public class RSRpcServices implements HBaseRPCErrorHandler, AdminService.Blockin
|
||||||
StringBuilder builder = new StringBuilder();
|
StringBuilder builder = new StringBuilder();
|
||||||
builder.append("table: ").append(scanner.getRegionInfo().getTable().getNameAsString());
|
builder.append("table: ").append(scanner.getRegionInfo().getTable().getNameAsString());
|
||||||
builder.append(" region: ").append(scanner.getRegionInfo().getRegionNameAsString());
|
builder.append(" region: ").append(scanner.getRegionInfo().getRegionNameAsString());
|
||||||
builder.append(" operation_id: ").append(scanner.getOperationId());
|
|
||||||
return builder.toString();
|
return builder.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1380,12 +1378,6 @@ public class RSRpcServices implements HBaseRPCErrorHandler, AdminService.Blockin
|
||||||
StringBuilder builder = new StringBuilder();
|
StringBuilder builder = new StringBuilder();
|
||||||
builder.append("table: ").append(region.getRegionInfo().getTable().getNameAsString());
|
builder.append("table: ").append(region.getRegionInfo().getTable().getNameAsString());
|
||||||
builder.append(" region: ").append(region.getRegionInfo().getRegionNameAsString());
|
builder.append(" region: ").append(region.getRegionInfo().getRegionNameAsString());
|
||||||
for (NameBytesPair pair : request.getScan().getAttributeList()) {
|
|
||||||
if (OperationWithAttributes.ID_ATRIBUTE.equals(pair.getName())) {
|
|
||||||
builder.append(" operation_id: ").append(Bytes.toString(pair.getValue().toByteArray()));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return builder.toString();
|
return builder.toString();
|
||||||
} catch (IOException ignored) {
|
} catch (IOException ignored) {
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -73,14 +73,6 @@ public interface RegionScanner extends InternalScanner {
|
||||||
*/
|
*/
|
||||||
int getBatch();
|
int getBatch();
|
||||||
|
|
||||||
/**
|
|
||||||
* @return The Scanner's {@link org.apache.hadoop.hbase.client.Scan#ID_ATRIBUTE} value,
|
|
||||||
* or null if not set.
|
|
||||||
*/
|
|
||||||
default String getOperationId() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Grab the next row's worth of values. This is a special internal method to be called from
|
* Grab the next row's worth of values. This is a special internal method to be called from
|
||||||
* coprocessor hooks to avoid expensive setup. Caller must set the thread's readpoint, start and
|
* coprocessor hooks to avoid expensive setup. Caller must set the thread's readpoint, start and
|
||||||
|
|
|
@ -89,7 +89,6 @@ class RegionScannerImpl implements RegionScanner, Shipper, RpcCallback {
|
||||||
private final long maxResultSize;
|
private final long maxResultSize;
|
||||||
private final ScannerContext defaultScannerContext;
|
private final ScannerContext defaultScannerContext;
|
||||||
private final FilterWrapper filter;
|
private final FilterWrapper filter;
|
||||||
private final String operationId;
|
|
||||||
|
|
||||||
private RegionServerServices rsServices;
|
private RegionServerServices rsServices;
|
||||||
|
|
||||||
|
@ -122,7 +121,6 @@ class RegionScannerImpl implements RegionScanner, Shipper, RpcCallback {
|
||||||
defaultScannerContext = ScannerContext.newBuilder().setBatchLimit(scan.getBatch()).build();
|
defaultScannerContext = ScannerContext.newBuilder().setBatchLimit(scan.getBatch()).build();
|
||||||
this.stopRow = scan.getStopRow();
|
this.stopRow = scan.getStopRow();
|
||||||
this.includeStopRow = scan.includeStopRow();
|
this.includeStopRow = scan.includeStopRow();
|
||||||
this.operationId = scan.getId();
|
|
||||||
|
|
||||||
// synchronize on scannerReadPoints so that nobody calculates
|
// synchronize on scannerReadPoints so that nobody calculates
|
||||||
// getSmallestReadPoint, before scannerReadPoints is updated.
|
// getSmallestReadPoint, before scannerReadPoints is updated.
|
||||||
|
@ -217,11 +215,6 @@ class RegionScannerImpl implements RegionScanner, Shipper, RpcCallback {
|
||||||
return this.defaultScannerContext.getBatchLimit();
|
return this.defaultScannerContext.getBatchLimit();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getOperationId() {
|
|
||||||
return operationId;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reset both the filter and the old filter.
|
* Reset both the filter and the old filter.
|
||||||
* @throws IOException in case a filter raises an I/O exception.
|
* @throws IOException in case a filter raises an I/O exception.
|
||||||
|
|
|
@ -4439,23 +4439,6 @@ public class TestHRegion {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testScannerOperationId() throws IOException {
|
|
||||||
region = initHRegion(tableName, method, CONF, COLUMN_FAMILY_BYTES);
|
|
||||||
Scan scan = new Scan();
|
|
||||||
RegionScanner scanner = region.getScanner(scan);
|
|
||||||
assertNull(scanner.getOperationId());
|
|
||||||
scanner.close();
|
|
||||||
|
|
||||||
String operationId = "test_operation_id_0101";
|
|
||||||
scan = new Scan().setId(operationId);
|
|
||||||
scanner = region.getScanner(scan);
|
|
||||||
assertEquals(operationId, scanner.getOperationId());
|
|
||||||
scanner.close();
|
|
||||||
|
|
||||||
HBaseTestingUtil.closeRegionAndWAL(this.region);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Write an HFile block full with Cells whose qualifier that are identical between
|
* Write an HFile block full with Cells whose qualifier that are identical between
|
||||||
* 0 and Short.MAX_VALUE. See HBASE-13329.
|
* 0 and Short.MAX_VALUE. See HBASE-13329.
|
||||||
|
|
Loading…
Reference in New Issue