@Override public long getCommittedWindowId(String appId, int operatorId) { try { lastWindowFetchCommand.setFilters(Filter.equal(metaTableOperatorIdColumn, operatorId)); lastWindowFetchCommand.setFilters(Filter.equal(metaTableAppIdColumn, appId)); long lastWindow = -1; RecordSet recordSet = client.query(null, lastWindowFetchCommand); while (recordSet.next()) { lastWindow = Long.parseLong(recordSet.getRecord().getValue(metaTableWindowColumn).toString()); } return lastWindow; } catch (AerospikeException ex) { throw new RuntimeException(ex); } }
@Override public long getCommittedWindowId(String appId, int operatorId) { try { lastWindowFetchCommand.setFilters(Filter.equal(metaTableOperatorIdColumn, operatorId)); lastWindowFetchCommand.setFilters(Filter.equal(metaTableAppIdColumn, appId)); long lastWindow = -1; RecordSet recordSet = client.query(null, lastWindowFetchCommand); while(recordSet.next()) { lastWindow = Long.parseLong(recordSet.getRecord().getValue(metaTableWindowColumn).toString()); } return lastWindow; } catch (AerospikeException ex) { throw new RuntimeException(ex); } }
public Scanner<T> filter(String nameOfField, boolean fieldValue) { setIndexName(type, setName, namespace, nameOfField); if (!boolean.class.isAssignableFrom(field.getType()) && !Boolean.class.isAssignableFrom(field.getType())) { throw new SpikeifyError("Can't query with boolean filter on: " + type + "#" + nameOfField + ", not a boolean field!"); } IndexCollectionType collectionType = IndexingService.getIndexCollectionType(type, field.getName()); if (IndexCollectionType.DEFAULT.equals(collectionType)) { return setFilters(Filter.equal(fieldName, fieldValue ? 1 : 0)); } return setFilters(Filter.contains(fieldName, collectionType, fieldValue ? 1 : 0)); }
public Scanner<T> filter(String nameOfField, String fieldValue) { setIndexName(type, setName, namespace, nameOfField); IndexCollectionType collectionType = IndexingService.getIndexCollectionType(type, field.getName()); if (IndexCollectionType.DEFAULT.equals(collectionType)) { return setFilters(Filter.equal(fieldName, fieldValue)); } return setFilters(Filter.contains(fieldName, collectionType, fieldValue)); }
public Scanner<T> filter(String nameOfField, long fieldValue) { setIndexName(type, setName, namespace, nameOfField); IndexCollectionType collectionType = IndexingService.getIndexCollectionType(type, field.getName()); if (IndexCollectionType.DEFAULT.equals(collectionType)) { return setFilters(Filter.equal(fieldName, fieldValue)); } return setFilters(Filter.contains(fieldName, collectionType, fieldValue)); }
stmt.setSetName(params.set); stmt.setBinNames(binName); stmt.setFilter(Filter.equal(binName, filter));
stmt.setNamespace(params.namespace); stmt.setSetName(params.set); stmt.setFilter(Filter.equal(binName, nameFilter)); stmt.setAggregateFunction("filter_example", "profile_filter", Value.get(passFilter));