@Override public int hashCode() { return Objects.hash(Bytes.hashCode(getMinColumn()), getMinColumnInclusive(), Bytes.hashCode(getMaxColumn()), getMaxColumnInclusive()); } }
/** * @param o filter to serialize. * @return true if and only if the fields of the filter that are serialized are equal to the * corresponding fields in other. Used for testing. */ @Override boolean areSerializedFieldsEqual(Filter o) { if (o == this) { return true; } if (!(o instanceof ColumnRangeFilter)) { return false; } ColumnRangeFilter other = (ColumnRangeFilter) o; return Bytes.equals(this.getMinColumn(), other.getMinColumn()) && this.getMinColumnInclusive() == other.getMinColumnInclusive() && Bytes.equals(this.getMaxColumn(), other.getMaxColumn()) && this.getMaxColumnInclusive() == other.getMaxColumnInclusive(); }
this.minColumnInclusive = crf.getMinColumnInclusive(); this.maxColumn = Bytes.toString(Base64.getEncoder().encode(crf.getMaxColumn())); this.maxColumnInclusive = crf.getMaxColumnInclusive(); break; case DependentColumnFilter: {
/** * @param o filter to serialize. * @return true if and only if the fields of the filter that are serialized are equal to the * corresponding fields in other. Used for testing. */ @Override boolean areSerializedFieldsEqual(Filter o) { if (o == this) { return true; } if (!(o instanceof ColumnRangeFilter)) { return false; } ColumnRangeFilter other = (ColumnRangeFilter) o; return Bytes.equals(this.getMinColumn(), other.getMinColumn()) && this.getMinColumnInclusive() == other.getMinColumnInclusive() && Bytes.equals(this.getMaxColumn(), other.getMaxColumn()) && this.getMaxColumnInclusive() == other.getMaxColumnInclusive(); }
/** * @param other * @return true if and only if the fields of the filter that are serialized * are equal to the corresponding fields in other. Used for testing. */ @Override boolean areSerializedFieldsEqual(Filter o) { if (o == this) return true; if (!(o instanceof ColumnRangeFilter)) return false; ColumnRangeFilter other = (ColumnRangeFilter)o; return Bytes.equals(this.getMinColumn(),other.getMinColumn()) && this.getMinColumnInclusive() == other.getMinColumnInclusive() && Bytes.equals(this.getMaxColumn(), other.getMaxColumn()) && this.getMaxColumnInclusive() == other.getMaxColumnInclusive(); }
/** * @param other * @return true if and only if the fields of the filter that are serialized * are equal to the corresponding fields in other. Used for testing. */ boolean areSerializedFieldsEqual(Filter o) { if (o == this) return true; if (!(o instanceof ColumnRangeFilter)) return false; ColumnRangeFilter other = (ColumnRangeFilter)o; return Bytes.equals(this.getMinColumn(),other.getMinColumn()) && this.getMinColumnInclusive() == other.getMinColumnInclusive() && Bytes.equals(this.getMaxColumn(), other.getMaxColumn()) && this.getMaxColumnInclusive() == other.getMaxColumnInclusive(); }
this.minColumnInclusive = crf.getMinColumnInclusive(); this.maxColumn = Bytes.toString(Base64.getEncoder().encode(crf.getMaxColumn())); this.maxColumnInclusive = crf.getMaxColumnInclusive(); break; case DependentColumnFilter: {
/** {@inheritDoc} */ @Override public Filter adapt(FilterAdapterContext context, ColumnRangeFilter filter) throws IOException { byte[] familyName = getSingleFamily(context.getScan()); QualifierRangeFilter rangeBuilder = FILTERS.qualifier().rangeWithinFamily(Bytes.toString(familyName)); if (filter.getMinColumn() != null) { ByteString startQualifier = ByteString.copyFrom(filter.getMinColumn()); if (filter.getMinColumnInclusive()) { rangeBuilder.startClosed(startQualifier); } else { rangeBuilder.startOpen(startQualifier); } } if (filter.getMaxColumn() != null) { ByteString endQualifier = ByteString.copyFrom(filter.getMaxColumn()); if (filter.getMaxColumnInclusive()) { rangeBuilder.endClosed(endQualifier); } else { rangeBuilder.endOpen(endQualifier); } } return rangeBuilder; }
/** {@inheritDoc} */ @Override public Filter adapt(FilterAdapterContext context, ColumnRangeFilter filter) throws IOException { byte[] familyName = getSingleFamily(context.getScan()); QualifierRangeFilter rangeBuilder = FILTERS.qualifier().rangeWithinFamily(Bytes.toString(familyName)); if (filter.getMinColumn() != null) { ByteString startQualifier = ByteString.copyFrom(filter.getMinColumn()); if (filter.getMinColumnInclusive()) { rangeBuilder.startClosed(startQualifier); } else { rangeBuilder.startOpen(startQualifier); } } if (filter.getMaxColumn() != null) { ByteString endQualifier = ByteString.copyFrom(filter.getMaxColumn()); if (filter.getMaxColumnInclusive()) { rangeBuilder.endClosed(endQualifier); } else { rangeBuilder.endOpen(endQualifier); } } return rangeBuilder; }
this.minColumnInclusive = ((ColumnRangeFilter)filter).getMinColumnInclusive(); this.maxColumn = Base64.encodeBytes(((ColumnRangeFilter)filter).getMaxColumn()); this.maxColumnInclusive = ((ColumnRangeFilter)filter).getMaxColumnInclusive(); break; case DependentColumnFilter: {
this.minColumnInclusive = ((ColumnRangeFilter)filter).getMinColumnInclusive(); this.maxColumn = Base64.encodeBytes(((ColumnRangeFilter)filter).getMaxColumn()); this.maxColumnInclusive = ((ColumnRangeFilter)filter).getMaxColumnInclusive(); break; case DependentColumnFilter: {