本文整理汇总了Java中org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ScanRequest.getNextCallSeq方法的典型用法代码示例。如果您正苦于以下问题:Java ScanRequest.getNextCallSeq方法的具体用法?Java ScanRequest.getNextCallSeq怎么用?Java ScanRequest.getNextCallSeq使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ScanRequest
的用法示例。
在下文中一共展示了ScanRequest.getNextCallSeq方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: scan
import org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ScanRequest; //导入方法依赖的package包/类
@Override
public ScanResponse scan(final RpcController controller, final ScanRequest request)
throws ServiceException {
if (request.hasScannerId()) {
ScanResponse scanResponse = super.scan(controller, request);
if (this.tableScannerId == request.getScannerId() &&
(sleepAlways || (!slept && seqNoToSleepOn == request.getNextCallSeq()))) {
try {
LOG.info("SLEEPING " + (rpcTimeout + 500));
Thread.sleep(rpcTimeout + 500);
} catch (InterruptedException e) {
}
slept = true;
tryNumber++;
if (tryNumber > 2 * CLIENT_RETRIES_NUMBER) {
sleepAlways = false;
}
}
return scanResponse;
} else {
ScanResponse scanRes = super.scan(controller, request);
String regionName = Bytes.toString(request.getRegion().getValue().toByteArray());
if (!regionName.contains(TableName.META_TABLE_NAME.getNameAsString())) {
tableScannerId = scanRes.getScannerId();
}
return scanRes;
}
}
示例2: scan
import org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ScanRequest; //导入方法依赖的package包/类
@Override
public ScanResponse scan(final RpcController controller, final ScanRequest request)
throws ServiceException {
if (request.hasScannerId()) {
ScanResponse scanResponse = super.scan(controller, request);
if (this.tableScannerId == request.getScannerId() &&
(sleepAlways || (!slept && seqNoToSleepOn == request.getNextCallSeq()))) {
try {
Thread.sleep(rpcTimeout + 500);
} catch (InterruptedException e) {
}
slept = true;
tryNumber++;
if (tryNumber > 2 * CLIENT_RETRIES_NUMBER) {
sleepAlways = false;
}
}
return scanResponse;
} else {
ScanResponse scanRes = super.scan(controller, request);
String regionName = Bytes.toString(request.getRegion().getValue().toByteArray());
if (!regionName.contains("-ROOT-") && !regionName.contains(".META.")) {
tableScannerId = scanRes.getScannerId();
}
return scanRes;
}
}