public JsonSubScanSpec(String tableName, IndexDesc indexDesc, String regionServer, QueryCondition scanRangeCondition, QueryCondition userCondition, byte[] startRow, byte[] stopRow, String userName) { super(tableName, indexDesc, regionServer, startRow, stopRow, null, null, userName); condition = MapRDBImpl.newCondition().and(); if (userCondition != null && !userCondition.isEmpty()) { condition.condition(userCondition); } if (scanRangeCondition != null && !scanRangeCondition.isEmpty()) { condition.condition(scanRangeCondition); } condition.close().build(); }
cond = MapRDBImpl.newCondition().notExists(fieldPath); break; cond = MapRDBImpl.newCondition().exists(fieldPath); break; cond = MapRDBImpl.newCondition().is(fieldPath, Op.EQUAL, true); break; cond = MapRDBImpl.newCondition().is(fieldPath, Op.NOT_EQUAL, false); break; cond = MapRDBImpl.newCondition().is(fieldPath, Op.EQUAL, false); break; cond = MapRDBImpl.newCondition().is(fieldPath, Op.NOT_EQUAL, true); break; cond = MapRDBImpl.newCondition().like(fieldPath, fieldValue.getString()); break;
@Override public byte[] getSerializedFilter() { if (this.condition != null) { ByteBuffer bbuf = ((ConditionImpl)this.condition).getDescriptor().getSerialized(); byte[] serFilter = new byte[bbuf.limit() - bbuf.position()]; bbuf.get(serFilter); return serFilter; } return null; } }
final long size = getLongArg(call.args.get(2)); queryCond = MapRDBImpl.newCondition() .sizeOf(fieldName, STRING_TO_RELOP.get(relOp), size) .build(); break; if (functionName.equals("ojai_matches")) { queryCond = MapRDBImpl.newCondition() .matches(fieldName, regex); } else { queryCond = MapRDBImpl.newCondition() .notMatches(fieldName, regex); final byte[] condBytes = Base64.decodeBase64(condString); final ByteBuffer condBuffer = ByteBuffer.wrap(condBytes); queryCond = ConditionImpl.parseFrom(condBuffer); break;
@JsonCreator public JsonScanSpec(@JsonProperty("tableName") String tableName, @JsonProperty("indexDesc") IndexDesc indexDesc, @JsonProperty("condition") QueryCondition condition) { this.tableName = tableName; this.indexDesc = indexDesc; this.condition = condition; if (this.condition != null) { List<RowkeyRange> rkRanges = ((ConditionImpl)this.condition).getRowkeyRanges(); if (rkRanges.size() > 0) { startRow = rkRanges.get(0).getStartRow(); stopRow = rkRanges.get(rkRanges.size() - 1).getStopRow(); } else { startRow = HConstants.EMPTY_START_ROW; stopRow = HConstants.EMPTY_END_ROW; } } }
condition = com.mapr.db.impl.ConditionImpl.parseFrom(ByteBufs.wrap(serializedFilter));
final long size = getLongArg(call.args.get(2)); queryCond = MapRDBImpl.newCondition() .sizeOf(fieldName, STRING_TO_RELOP.get(relOp), size) .build(); break; if (functionName.equals("ojai_matches")) { queryCond = MapRDBImpl.newCondition() .matches(fieldName, regex); } else { queryCond = MapRDBImpl.newCondition() .notMatches(fieldName, regex); final byte[] condBytes = Base64.decodeBase64(condString); final ByteBuffer condBuffer = ByteBuffer.wrap(condBytes); queryCond = ConditionImpl.parseFrom(condBuffer); break;
for (ScanRange r : ranges) { QueryCondition condition = r.getCondition(); List<RowkeyRange> rowkeyRanges = ((ConditionImpl)condition).getRowkeyRanges(); byte[] start = rowkeyRanges.get(0).getStartRow(); byte[] stop = rowkeyRanges.get(rowkeyRanges.size() - 1).getStopRow();
condition = com.mapr.db.impl.ConditionImpl.parseFrom(ByteBufs.wrap(serializedFilter));
cond = MapRDBImpl.newCondition().notExists(fieldPath); break; cond = MapRDBImpl.newCondition().exists(fieldPath); break; cond = MapRDBImpl.newCondition().is(fieldPath, Op.EQUAL, true); break; cond = MapRDBImpl.newCondition().is(fieldPath, Op.NOT_EQUAL, false); break; cond = MapRDBImpl.newCondition().is(fieldPath, Op.EQUAL, false); break; cond = MapRDBImpl.newCondition().is(fieldPath, Op.NOT_EQUAL, true); break; cond = MapRDBImpl.newCondition().like(fieldPath, fieldValue.getString()); break;
protected MapRDBSubScanSpec getSubScanSpec(final TabletFragmentInfo tfi) { // XXX/TODO check filter/Condition final JsonScanSpec spec = scanSpec; final String serverHostName = getRegionsToScan().get(tfi); QueryCondition condition = tfi.getTabletInfoImpl().getCondition(); byte[] startRow = condition == null ? null : ((ConditionImpl) condition).getRowkeyRanges().get(0).getStartRow(); byte[] stopRow = condition == null ? null : ((ConditionImpl) condition).getRowkeyRanges().get(0).getStopRow(); JsonSubScanSpec subScanSpec = new JsonSubScanSpec( spec.getTableName(), spec.getIndexDesc(), serverHostName, tfi.getTabletInfoImpl().getCondition(), spec.getCondition(), startRow, stopRow, getUserName()); return subScanSpec; }
public byte[] getSerializedFilter() { if (this.condition != null) { ByteBuffer bbuf = ((ConditionImpl)this.condition).getDescriptor().getSerialized(); byte[] serFilter = new byte[bbuf.limit() - bbuf.position()]; bbuf.get(serFilter); return serFilter; } return null; }
public JsonSubScanSpec(String tableName, IndexDesc indexDesc, String regionServer, QueryCondition scanRangeCondition, QueryCondition userCondition, byte[] startRow, byte[] stopRow, String userName) { super(tableName, indexDesc, regionServer, startRow, stopRow, null, null, userName); condition = MapRDBImpl.newCondition().and(); if (userCondition != null && !userCondition.isEmpty()) { condition.condition(userCondition); } if (scanRangeCondition != null && !scanRangeCondition.isEmpty()) { condition.condition(scanRangeCondition); } condition.close().build(); }
byte[] firstStartRow = ((ConditionImpl) firstCondition).getRowkeyRanges().get(0).getStartRow(); scanSpec.setStartRow(firstStartRow); List<RowkeyRange> rowkeyRanges = ((ConditionImpl) lastCondition).getRowkeyRanges(); byte[] lastStopRow = rowkeyRanges.get(rowkeyRanges.size() - 1).getStopRow(); scanSpec.setStopRow(lastStopRow);
public byte[] getSerializedFilter() { if (this.condition != null) { ByteBuffer bbuf = ((ConditionImpl)this.condition).getDescriptor().getSerialized(); byte[] serFilter = new byte[bbuf.limit() - bbuf.position()]; bbuf.get(serFilter); return serFilter; } return null; }
@JsonCreator public JsonScanSpec(@JsonProperty("tableName") String tableName, @JsonProperty("indexDesc") IndexDesc indexDesc, @JsonProperty("condition") QueryCondition condition) { this.tableName = tableName; this.indexDesc = indexDesc; this.condition = condition; if (this.condition != null) { List<RowkeyRange> rkRanges = ((ConditionImpl)this.condition).getRowkeyRanges(); if (rkRanges.size() > 0) { startRow = rkRanges.get(0).getStartRow(); stopRow = rkRanges.get(rkRanges.size() - 1).getStopRow(); } else { startRow = HConstants.EMPTY_START_ROW; stopRow = HConstants.EMPTY_END_ROW; } } }
@Override public byte[] getSerializedFilter() { if (this.condition != null) { ByteBuffer bbuf = ((ConditionImpl)this.condition).getDescriptor().getSerialized(); byte[] serFilter = new byte[bbuf.limit() - bbuf.position()]; bbuf.get(serFilter); return serFilter; } return null; } }
for (ScanRange r : ranges) { QueryCondition condition = r.getCondition(); List<RowkeyRange> rowkeyRanges = ((ConditionImpl)condition).getRowkeyRanges(); byte[] start = rowkeyRanges.get(0).getStartRow(); byte[] stop = rowkeyRanges.get(rowkeyRanges.size() - 1).getStopRow();
protected MapRDBSubScanSpec getSubScanSpec(final TabletFragmentInfo tfi) { // XXX/TODO check filter/Condition final JsonScanSpec spec = scanSpec; final String serverHostName = getRegionsToScan().get(tfi); QueryCondition condition = tfi.getTabletInfoImpl().getCondition(); byte[] startRow = condition == null ? null : ((ConditionImpl) condition).getRowkeyRanges().get(0).getStartRow(); byte[] stopRow = condition == null ? null : ((ConditionImpl) condition).getRowkeyRanges().get(0).getStopRow(); JsonSubScanSpec subScanSpec = new JsonSubScanSpec( spec.getTableName(), spec.getIndexDesc(), serverHostName, tfi.getTabletInfoImpl().getCondition(), spec.getCondition(), startRow, stopRow, getUserName()); return subScanSpec; }
byte[] firstStartRow = ((ConditionImpl) firstCondition).getRowkeyRanges().get(0).getStartRow(); scanSpec.setStartRow(firstStartRow); List<RowkeyRange> rowkeyRanges = ((ConditionImpl) lastCondition).getRowkeyRanges(); byte[] lastStopRow = rowkeyRanges.get(rowkeyRanges.size() - 1).getStopRow(); scanSpec.setStopRow(lastStopRow);