本文整理了Java中org.apache.hadoop.hbase.client.Get.familySet()
方法的一些代码示例,展示了Get.familySet()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Get.familySet()
方法的具体详情如下:
包路径:org.apache.hadoop.hbase.client.Get
类名称:Get
方法名:familySet
[英]Method for retrieving the keys in the familyMap
[中]在familyMap中检索密钥的方法
代码示例来源:origin: apache/hbase
void prepareGet(final Get get) throws IOException {
checkRow(get.getRow(), "Get");
// Verify families are all valid
if (get.hasFamilies()) {
for (byte[] family : get.familySet()) {
checkFamily(family);
}
} else { // Adding all families to scanner
for (byte[] family : this.htableDescriptor.getColumnFamilyNames()) {
get.addFamily(family);
}
}
}
代码示例来源:origin: com.moz.fiji.schema/fiji-schema
/**
* Adds a fully-qualified column to an HBase Get request, if necessary.
*
* <p>
* If the entire HBase family is already requested, the column does not need to be added.
* </p>
*
* @param get Adds the column to this Get request.
* @param column Fully-qualified HBase column to add to the Get request.
* @return the Get request.
*/
private static Get addColumn(final Get get, final HBaseColumnName column) {
// Calls to Get.addColumn() invalidate previous calls to Get.addFamily(),
// so we only do it if:
// 1. No data from the family has been added to the request yet,
// OR
// 2. Only specific columns from the family have been requested so far.
// Note: the Get family-map uses null values to indicate requests for an entire HBase family.
if (!get.familySet().contains(column.getFamily())
|| (get.getFamilyMap().get(column.getFamily()) != null)) {
get.addColumn(column.getFamily(), column.getQualifier());
}
return get;
}
代码示例来源:origin: co.cask.hbase/hbase
private List<KeyValue> get(Get get, boolean withCoprocessor)
throws IOException {
long now = EnvironmentEdgeManager.currentTimeMillis();
List<KeyValue> results = new ArrayList<KeyValue>();
// pre-get CP hook
if (withCoprocessor && (coprocessorHost != null)) {
if (coprocessorHost.preGet(get, results)) {
return results;
}
}
Scan scan = new Scan(get);
RegionScanner scanner = null;
try {
scanner = getScanner(scan);
scanner.next(results, SchemaMetrics.METRIC_GETSIZE);
} finally {
if (scanner != null)
scanner.close();
}
// post-get CP hook
if (withCoprocessor && (coprocessorHost != null)) {
coprocessorHost.postGet(get, results);
}
// do after lock
final long after = EnvironmentEdgeManager.currentTimeMillis();
this.opMetrics.updateGetMetrics(get.familySet(), after - now);
return results;
}
代码示例来源:origin: harbby/presto-connectors
@Override
public Result get(final Get get) throws IOException {
checkRow(get.getRow(), "Get");
// Verify families are all valid
if (get.hasFamilies()) {
for (byte [] family: get.familySet()) {
checkFamily(family);
}
} else { // Adding all families to scanner
for (byte[] family: this.htableDescriptor.getFamiliesKeys()) {
get.addFamily(family);
}
}
List<Cell> results = get(get, true);
boolean stale = this.getRegionInfo().getReplicaId() != 0;
return Result.create(results, get.isCheckExistenceOnly() ? !results.isEmpty() : null, stale);
}
代码示例来源:origin: co.cask.hbase/hbase
/**
* @param get get object
* @param lockid existing lock id, or null for no previous lock
* @return result
* @throws IOException read exceptions
* @deprecated row locks (lockId) held outside the extent of the operation are deprecated.
*/
public Result get(final Get get, final Integer lockid) throws IOException {
checkRow(get.getRow(), "Get");
// Verify families are all valid
if (get.hasFamilies()) {
for (byte [] family: get.familySet()) {
checkFamily(family);
}
} else { // Adding all families to scanner
for (byte[] family: this.htableDescriptor.getFamiliesKeys()) {
get.addFamily(family);
}
}
List<KeyValue> results = get(get, true);
return new Result(results);
}
内容来源于网络,如有侵权,请联系作者删除!