本文整理了Java中org.apache.hadoop.hbase.client.Get.hasFamilies()
方法的一些代码示例,展示了Get.hasFamilies()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Get.hasFamilies()
方法的具体详情如下:
包路径:org.apache.hadoop.hbase.client.Get
类名称:Get
方法名:hasFamilies
[英]Method for checking if any families have been inserted into this Get
[中]用于检查是否已将任何族插入此Get的方法
代码示例来源:origin: apache/kylin
byte[] row = get.getRow();
List<KeyValue> kvs = new ArrayList<KeyValue>();
if (!get.hasFamilies()) {
kvs = toKeyValue(row, data.get(row), get.getMaxVersions());
} else {
代码示例来源: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: apache/hbase
if (get.hasFamilies()) {
Column.Builder columnBuilder = Column.newBuilder();
Map<byte[], NavigableSet<byte[]>> families = get.getFamilyMap();
代码示例来源:origin: apache/hbase
if (get.hasFamilies()) {
Column.Builder columnBuilder = Column.newBuilder();
Map<byte[], NavigableSet<byte[]>> families = get.getFamilyMap();
代码示例来源:origin: apache/metron
byte[] row = get.getRow();
List<KeyValue> kvs = new ArrayList<KeyValue>();
if (!get.hasFamilies()) {
kvs = toKeyValue(row, data.get(row), get.getMaxVersions());
} else {
代码示例来源:origin: org.apache.hbase/hbase-client
if (get.hasFamilies()) {
Column.Builder columnBuilder = Column.newBuilder();
Map<byte[], NavigableSet<byte[]>> families = get.getFamilyMap();
代码示例来源:origin: org.apache.hbase/hbase-client
if (get.hasFamilies()) {
Column.Builder columnBuilder = Column.newBuilder();
Map<byte[], NavigableSet<byte[]>> families = get.getFamilyMap();
代码示例来源:origin: rayokota/hgraphdb
int maxResults = get.getMaxResultsPerColumnFamily();
if (!get.hasFamilies()) {
kvs = toKeyValue(row, data.get(row), get.getMaxVersions());
if (filter != null) {
代码示例来源:origin: yahoo/simplified-lambda
byte[] row = get.getRow();
List<KeyValue> kvs = new ArrayList<KeyValue>();
if (!get.hasFamilies()) {
kvs = toKeyValue(row, data.get(row), get.getMaxVersions());
} else {
代码示例来源:origin: com.moz.fiji.schema/fiji-schema
/** {@inheritDoc} */
@Override
public FijiRowData get(EntityId entityId, FijiDataRequest dataRequest)
throws IOException {
final State state = mState.get();
Preconditions.checkState(state == State.OPEN,
"Cannot get row from FijiTableReader instance %s in state %s.", this, state);
final ReaderLayoutCapsule capsule = mReaderLayoutCapsule;
// Make sure the request validates against the layout of the table.
final FijiTableLayout tableLayout = capsule.getLayout();
validateRequestAgainstLayout(dataRequest, tableLayout);
// Construct an HBase Get to send to the HTable.
HBaseDataRequestAdapter hbaseRequestAdapter =
new HBaseDataRequestAdapter(dataRequest, capsule.getColumnNameTranslator());
Get hbaseGet;
try {
hbaseGet = hbaseRequestAdapter.toGet(entityId, tableLayout);
} catch (InvalidLayoutException e) {
// The table layout should never be invalid at this point, since we got it from a valid
// opened table. If it is, there's something seriously wrong.
throw new InternalFijiError(e);
}
// Send the HTable Get.
final Result result = hbaseGet.hasFamilies() ? doHBaseGet(hbaseGet) : new Result();
// Parse the result.
return new HBaseFijiRowData(
mTable, dataRequest, entityId, result, capsule.getCellDecoderProvider());
}
代码示例来源:origin: XiaoMi/themis
public static void prepareGet(Get get, Collection<HColumnDescriptor> families) {
if (!get.hasFamilies()) {
for (HColumnDescriptor family : families) {
if (!Bytes.equals(family.getName(), ColumnUtil.LOCK_FAMILY_NAME)) {
if (ColumnUtil.isCommitToSameFamily() || !ColumnUtil.isCommitFamily(family.getName())) {
get.addFamily(family.getName());
}
}
}
}
}
代码示例来源:origin: com.moz.fiji.schema/fiji-schema
new HBaseDataRequestAdapter(dataRequest, capsule.getColumnNameTranslator());
final Get get = hbaseDataRequestAdapter.toGet(entityId, tableLayout);
final Result result = get.hasFamilies() ? doHBaseGet(get) : new Result();
return HBaseFijiResult.create(
entityId,
代码示例来源: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);
}
代码示例来源:origin: harbby/presto-connectors
if (get.hasFamilies()) {
Column.Builder columnBuilder = Column.newBuilder();
Map<byte[], NavigableSet<byte[]>> families = get.getFamilyMap();
代码示例来源:origin: domino-succ/domino
@SuppressWarnings("deprecation")
@Override
public DResult get(Get get, long startId) throws IOException {
if (get.hasFamilies()) get.addFamily(DominoConst.INNER_FAMILY);
get.setTimeRange(0, startId + 1); // [x, y)
get.setMaxVersions();
Result preRead = region.get(get);
List<KeyValue> status = preRead.getColumn(DominoConst.INNER_FAMILY,
DominoConst.STATUS_COL);
if (status == null || status.size() == 0) {
Result ret = MVCC.handleResult(this, getTrxMetaTable(), preRead, startId,
null);
return new DResult(ret, null);
}
Integer lockId = region.getLock(null, get.getRow(), true);
try {
Result r = MVCC.handleResult(this, getTrxMetaTable(),
region.get(get, lockId), startId, lockId);
return new DResult(r, null);
}
catch (TransactionOutOfDateException oode) {
return new DResult(null, oode.getMessage());
}
catch (InvalidRowStatusException e) {
return new DResult(null, e.getMessage());
}
finally {
region.releaseRowLock(lockId);
}
}
代码示例来源:origin: com.aliyun.hbase/alihbase-client
if (get.hasFamilies()) {
Column.Builder columnBuilder = Column.newBuilder();
Map<byte[], NavigableSet<byte[]>> families = get.getFamilyMap();
代码示例来源:origin: com.aliyun.hbase/alihbase-client
if (get.hasFamilies()) {
Column.Builder columnBuilder = Column.newBuilder();
Map<byte[], NavigableSet<byte[]>> families = get.getFamilyMap();
内容来源于网络,如有侵权,请联系作者删除!