http://git-wip-us.apache.org/repos/asf/kylin/blob/545201f6/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v1/filter/generated/FilterProtosExt.java ---------------------------------------------------------------------- diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v1/filter/generated/FilterProtosExt.java b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v1/filter/generated/FilterProtosExt.java deleted file mode 100644 index 1bd92e6..0000000 --- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v1/filter/generated/FilterProtosExt.java +++ /dev/null @@ -1,1298 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v1/filter/protobuf/FilterExt.proto - -package org.apache.kylin.storage.hbase.cube.v1.filter.generated; - -public final class FilterProtosExt { - private FilterProtosExt() { - } - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - } - - public interface BytesBytesPairOrBuilder extends com.google.protobuf.MessageOrBuilder { - - // required bytes first = 1; - /** - * <code>required bytes first = 1;</code> - */ - boolean hasFirst(); - - /** - * <code>required bytes first = 1;</code> - */ - com.google.protobuf.ByteString getFirst(); - - // required bytes second = 2; - /** - * <code>required bytes second = 2;</code> - */ - boolean hasSecond(); - - /** - * <code>required bytes second = 2;</code> - */ - com.google.protobuf.ByteString getSecond(); - } - - /** - * Protobuf type {@code BytesBytesPair} - */ - public static final class BytesBytesPair extends com.google.protobuf.GeneratedMessage implements BytesBytesPairOrBuilder { - // Use BytesBytesPair.newBuilder() to construct. - private BytesBytesPair(com.google.protobuf.GeneratedMessage.Builder<?> builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - - private BytesBytesPair(boolean noInit) { - this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - - private static final BytesBytesPair defaultInstance; - - public static BytesBytesPair getDefaultInstance() { - return defaultInstance; - } - - public BytesBytesPair getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private BytesBytesPair(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - bitField0_ |= 0x00000001; - first_ = input.readBytes(); - break; - } - case 18: { - bitField0_ |= 0x00000002; - second_ = input.readBytes(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.internal_static_BytesBytesPair_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.internal_static_BytesBytesPair_fieldAccessorTable.ensureFieldAccessorsInitialized(org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair.class, org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair.Builder.class); - } - - public static com.google.protobuf.Parser<BytesBytesPair> PARSER = new com.google.protobuf.AbstractParser<BytesBytesPair>() { - public BytesBytesPair parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BytesBytesPair(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser<BytesBytesPair> getParserForType() { - return PARSER; - } - - private int bitField0_; - // required bytes first = 1; - public static final int FIRST_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString first_; - - /** - * <code>required bytes first = 1;</code> - */ - public boolean hasFirst() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - - /** - * <code>required bytes first = 1;</code> - */ - public com.google.protobuf.ByteString getFirst() { - return first_; - } - - // required bytes second = 2; - public static final int SECOND_FIELD_NUMBER = 2; - private com.google.protobuf.ByteString second_; - - /** - * <code>required bytes second = 2;</code> - */ - public boolean hasSecond() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - - /** - * <code>required bytes second = 2;</code> - */ - public com.google.protobuf.ByteString getSecond() { - return second_; - } - - private void initFields() { - first_ = com.google.protobuf.ByteString.EMPTY; - second_ = com.google.protobuf.ByteString.EMPTY; - } - - private byte memoizedIsInitialized = -1; - - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) - return isInitialized == 1; - - if (!hasFirst()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasSecond()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, first_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, second_); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) - return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, first_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, second_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - - @java.lang.Override - protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair)) { - return super.equals(obj); - } - org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair other = (org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair) obj; - - boolean result = true; - result = result && (hasFirst() == other.hasFirst()); - if (hasFirst()) { - result = result && getFirst().equals(other.getFirst()); - } - result = result && (hasSecond() == other.hasSecond()); - if (hasSecond()) { - result = result && getSecond().equals(other.getSecond()); - } - result = result && getUnknownFields().equals(other.getUnknownFields()); - return result; - } - - private int memoizedHashCode = 0; - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptorForType().hashCode(); - if (hasFirst()) { - hash = (37 * hash) + FIRST_FIELD_NUMBER; - hash = (53 * hash) + getFirst().hashCode(); - } - if (hasSecond()) { - hash = (37 * hash) + SECOND_FIELD_NUMBER; - hash = (53 * hash) + getSecond().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); - } - - public static org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - - public static org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - - public static org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); - } - - public static org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { - return Builder.create(); - } - - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder(org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair prototype) { - return newBuilder().mergeFrom(prototype); - } - - public Builder toBuilder() { - return newBuilder(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * Protobuf type {@code BytesBytesPair} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPairOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.internal_static_BytesBytesPair_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.internal_static_BytesBytesPair_fieldAccessorTable.ensureFieldAccessorsInitialized(org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair.class, org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair.Builder.class); - } - - // Construct using org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - first_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - second_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.internal_static_BytesBytesPair_descriptor; - } - - public org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair getDefaultInstanceForType() { - return org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair.getDefaultInstance(); - } - - public org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair build() { - org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair buildPartial() { - org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair result = new org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.first_ = first_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.second_ = second_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair) { - return mergeFrom((org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair other) { - if (other == org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair.getDefaultInstance()) - return this; - if (other.hasFirst()) { - setFirst(other.getFirst()); - } - if (other.hasSecond()) { - setSecond(other.getSecond()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - if (!hasFirst()) { - - return false; - } - if (!hasSecond()) { - - return false; - } - return true; - } - - public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - // required bytes first = 1; - private com.google.protobuf.ByteString first_ = com.google.protobuf.ByteString.EMPTY; - - /** - * <code>required bytes first = 1;</code> - */ - public boolean hasFirst() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - - /** - * <code>required bytes first = 1;</code> - */ - public com.google.protobuf.ByteString getFirst() { - return first_; - } - - /** - * <code>required bytes first = 1;</code> - */ - public Builder setFirst(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - first_ = value; - onChanged(); - return this; - } - - /** - * <code>required bytes first = 1;</code> - */ - public Builder clearFirst() { - bitField0_ = (bitField0_ & ~0x00000001); - first_ = getDefaultInstance().getFirst(); - onChanged(); - return this; - } - - // required bytes second = 2; - private com.google.protobuf.ByteString second_ = com.google.protobuf.ByteString.EMPTY; - - /** - * <code>required bytes second = 2;</code> - */ - public boolean hasSecond() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - - /** - * <code>required bytes second = 2;</code> - */ - public com.google.protobuf.ByteString getSecond() { - return second_; - } - - /** - * <code>required bytes second = 2;</code> - */ - public Builder setSecond(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - second_ = value; - onChanged(); - return this; - } - - /** - * <code>required bytes second = 2;</code> - */ - public Builder clearSecond() { - bitField0_ = (bitField0_ & ~0x00000002); - second_ = getDefaultInstance().getSecond(); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:BytesBytesPair) - } - - static { - defaultInstance = new BytesBytesPair(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:BytesBytesPair) - } - - public interface FuzzyRowFilterV2OrBuilder extends com.google.protobuf.MessageOrBuilder { - - // repeated .BytesBytesPair fuzzy_keys_data = 1; - /** - * <code>repeated .BytesBytesPair fuzzy_keys_data = 1;</code> - */ - java.util.List<org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair> getFuzzyKeysDataList(); - - /** - * <code>repeated .BytesBytesPair fuzzy_keys_data = 1;</code> - */ - org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair getFuzzyKeysData(int index); - - /** - * <code>repeated .BytesBytesPair fuzzy_keys_data = 1;</code> - */ - int getFuzzyKeysDataCount(); - - /** - * <code>repeated .BytesBytesPair fuzzy_keys_data = 1;</code> - */ - java.util.List<? extends org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPairOrBuilder> getFuzzyKeysDataOrBuilderList(); - - /** - * <code>repeated .BytesBytesPair fuzzy_keys_data = 1;</code> - */ - org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPairOrBuilder getFuzzyKeysDataOrBuilder(int index); - } - - /** - * Protobuf type {@code FuzzyRowFilterV2} - */ - public static final class FuzzyRowFilterV2 extends com.google.protobuf.GeneratedMessage implements FuzzyRowFilterV2OrBuilder { - // Use FuzzyRowFilterV2.newBuilder() to construct. - private FuzzyRowFilterV2(com.google.protobuf.GeneratedMessage.Builder<?> builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - - private FuzzyRowFilterV2(boolean noInit) { - this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - - private static final FuzzyRowFilterV2 defaultInstance; - - public static FuzzyRowFilterV2 getDefaultInstance() { - return defaultInstance; - } - - public FuzzyRowFilterV2 getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private FuzzyRowFilterV2(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - fuzzyKeysData_ = new java.util.ArrayList<org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair>(); - mutable_bitField0_ |= 0x00000001; - } - fuzzyKeysData_.add(input.readMessage(org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair.PARSER, extensionRegistry)); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e.getMessage()).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - fuzzyKeysData_ = java.util.Collections.unmodifiableList(fuzzyKeysData_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.internal_static_FuzzyRowFilterV2_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.internal_static_FuzzyRowFilterV2_fieldAccessorTable.ensureFieldAccessorsInitialized(org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.FuzzyRowFilterV2.class, org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.FuzzyRowFilterV2.Builder.class); - } - - public static com.google.protobuf.Parser<FuzzyRowFilterV2> PARSER = new com.google.protobuf.AbstractParser<FuzzyRowFilterV2>() { - public FuzzyRowFilterV2 parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FuzzyRowFilterV2(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser<FuzzyRowFilterV2> getParserForType() { - return PARSER; - } - - // repeated .BytesBytesPair fuzzy_keys_data = 1; - public static final int FUZZY_KEYS_DATA_FIELD_NUMBER = 1; - private java.util.List<org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair> fuzzyKeysData_; - - /** - * <code>repeated .BytesBytesPair fuzzy_keys_data = 1;</code> - */ - public java.util.List<org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair> getFuzzyKeysDataList() { - return fuzzyKeysData_; - } - - /** - * <code>repeated .BytesBytesPair fuzzy_keys_data = 1;</code> - */ - public java.util.List<? extends org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPairOrBuilder> getFuzzyKeysDataOrBuilderList() { - return fuzzyKeysData_; - } - - /** - * <code>repeated .BytesBytesPair fuzzy_keys_data = 1;</code> - */ - public int getFuzzyKeysDataCount() { - return fuzzyKeysData_.size(); - } - - /** - * <code>repeated .BytesBytesPair fuzzy_keys_data = 1;</code> - */ - public org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair getFuzzyKeysData(int index) { - return fuzzyKeysData_.get(index); - } - - /** - * <code>repeated .BytesBytesPair fuzzy_keys_data = 1;</code> - */ - public org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPairOrBuilder getFuzzyKeysDataOrBuilder(int index) { - return fuzzyKeysData_.get(index); - } - - private void initFields() { - fuzzyKeysData_ = java.util.Collections.emptyList(); - } - - private byte memoizedIsInitialized = -1; - - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) - return isInitialized == 1; - - for (int i = 0; i < getFuzzyKeysDataCount(); i++) { - if (!getFuzzyKeysData(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); - for (int i = 0; i < fuzzyKeysData_.size(); i++) { - output.writeMessage(1, fuzzyKeysData_.get(i)); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) - return size; - - size = 0; - for (int i = 0; i < fuzzyKeysData_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, fuzzyKeysData_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - - @java.lang.Override - protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.FuzzyRowFilterV2)) { - return super.equals(obj); - } - org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.FuzzyRowFilterV2 other = (org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.FuzzyRowFilterV2) obj; - - boolean result = true; - result = result && getFuzzyKeysDataList().equals(other.getFuzzyKeysDataList()); - result = result && getUnknownFields().equals(other.getUnknownFields()); - return result; - } - - private int memoizedHashCode = 0; - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptorForType().hashCode(); - if (getFuzzyKeysDataCount() > 0) { - hash = (37 * hash) + FUZZY_KEYS_DATA_FIELD_NUMBER; - hash = (53 * hash) + getFuzzyKeysDataList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.FuzzyRowFilterV2 parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.FuzzyRowFilterV2 parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.FuzzyRowFilterV2 parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.FuzzyRowFilterV2 parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.FuzzyRowFilterV2 parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); - } - - public static org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.FuzzyRowFilterV2 parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.FuzzyRowFilterV2 parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - - public static org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.FuzzyRowFilterV2 parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - - public static org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.FuzzyRowFilterV2 parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); - } - - public static org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.FuzzyRowFilterV2 parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { - return Builder.create(); - } - - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder(org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.FuzzyRowFilterV2 prototype) { - return newBuilder().mergeFrom(prototype); - } - - public Builder toBuilder() { - return newBuilder(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * Protobuf type {@code FuzzyRowFilterV2} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.FuzzyRowFilterV2OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.internal_static_FuzzyRowFilterV2_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.internal_static_FuzzyRowFilterV2_fieldAccessorTable.ensureFieldAccessorsInitialized(org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.FuzzyRowFilterV2.class, org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.FuzzyRowFilterV2.Builder.class); - } - - // Construct using org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.FuzzyRowFilterV2.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getFuzzyKeysDataFieldBuilder(); - } - } - - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - if (fuzzyKeysDataBuilder_ == null) { - fuzzyKeysData_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - fuzzyKeysDataBuilder_.clear(); - } - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.internal_static_FuzzyRowFilterV2_descriptor; - } - - public org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.FuzzyRowFilterV2 getDefaultInstanceForType() { - return org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.FuzzyRowFilterV2.getDefaultInstance(); - } - - public org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.FuzzyRowFilterV2 build() { - org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.FuzzyRowFilterV2 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.FuzzyRowFilterV2 buildPartial() { - org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.FuzzyRowFilterV2 result = new org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.FuzzyRowFilterV2(this); - int from_bitField0_ = bitField0_; - if (fuzzyKeysDataBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - fuzzyKeysData_ = java.util.Collections.unmodifiableList(fuzzyKeysData_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.fuzzyKeysData_ = fuzzyKeysData_; - } else { - result.fuzzyKeysData_ = fuzzyKeysDataBuilder_.build(); - } - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.FuzzyRowFilterV2) { - return mergeFrom((org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.FuzzyRowFilterV2) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.FuzzyRowFilterV2 other) { - if (other == org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.FuzzyRowFilterV2.getDefaultInstance()) - return this; - if (fuzzyKeysDataBuilder_ == null) { - if (!other.fuzzyKeysData_.isEmpty()) { - if (fuzzyKeysData_.isEmpty()) { - fuzzyKeysData_ = other.fuzzyKeysData_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFuzzyKeysDataIsMutable(); - fuzzyKeysData_.addAll(other.fuzzyKeysData_); - } - onChanged(); - } - } else { - if (!other.fuzzyKeysData_.isEmpty()) { - if (fuzzyKeysDataBuilder_.isEmpty()) { - fuzzyKeysDataBuilder_.dispose(); - fuzzyKeysDataBuilder_ = null; - fuzzyKeysData_ = other.fuzzyKeysData_; - bitField0_ = (bitField0_ & ~0x00000001); - fuzzyKeysDataBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getFuzzyKeysDataFieldBuilder() : null; - } else { - fuzzyKeysDataBuilder_.addAllMessages(other.fuzzyKeysData_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - for (int i = 0; i < getFuzzyKeysDataCount(); i++) { - if (!getFuzzyKeysData(i).isInitialized()) { - - return false; - } - } - return true; - } - - public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.FuzzyRowFilterV2 parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.FuzzyRowFilterV2) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - // repeated .BytesBytesPair fuzzy_keys_data = 1; - private java.util.List<org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair> fuzzyKeysData_ = java.util.Collections.emptyList(); - - private void ensureFuzzyKeysDataIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - fuzzyKeysData_ = new java.util.ArrayList<org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair>(fuzzyKeysData_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder<org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair, org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair.Builder, org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPairOrBuilder> fuzzyKeysDataBuilder_; - - /** - * <code>repeated .BytesBytesPair fuzzy_keys_data = 1;</code> - */ - public java.util.List<org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair> getFuzzyKeysDataList() { - if (fuzzyKeysDataBuilder_ == null) { - return java.util.Collections.unmodifiableList(fuzzyKeysData_); - } else { - return fuzzyKeysDataBuilder_.getMessageList(); - } - } - - /** - * <code>repeated .BytesBytesPair fuzzy_keys_data = 1;</code> - */ - public int getFuzzyKeysDataCount() { - if (fuzzyKeysDataBuilder_ == null) { - return fuzzyKeysData_.size(); - } else { - return fuzzyKeysDataBuilder_.getCount(); - } - } - - /** - * <code>repeated .BytesBytesPair fuzzy_keys_data = 1;</code> - */ - public org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair getFuzzyKeysData(int index) { - if (fuzzyKeysDataBuilder_ == null) { - return fuzzyKeysData_.get(index); - } else { - return fuzzyKeysDataBuilder_.getMessage(index); - } - } - - /** - * <code>repeated .BytesBytesPair fuzzy_keys_data = 1;</code> - */ - public Builder setFuzzyKeysData(int index, org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair value) { - if (fuzzyKeysDataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFuzzyKeysDataIsMutable(); - fuzzyKeysData_.set(index, value); - onChanged(); - } else { - fuzzyKeysDataBuilder_.setMessage(index, value); - } - return this; - } - - /** - * <code>repeated .BytesBytesPair fuzzy_keys_data = 1;</code> - */ - public Builder setFuzzyKeysData(int index, org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair.Builder builderForValue) { - if (fuzzyKeysDataBuilder_ == null) { - ensureFuzzyKeysDataIsMutable(); - fuzzyKeysData_.set(index, builderForValue.build()); - onChanged(); - } else { - fuzzyKeysDataBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * <code>repeated .BytesBytesPair fuzzy_keys_data = 1;</code> - */ - public Builder addFuzzyKeysData(org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair value) { - if (fuzzyKeysDataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFuzzyKeysDataIsMutable(); - fuzzyKeysData_.add(value); - onChanged(); - } else { - fuzzyKeysDataBuilder_.addMessage(value); - } - return this; - } - - /** - * <code>repeated .BytesBytesPair fuzzy_keys_data = 1;</code> - */ - public Builder addFuzzyKeysData(int index, org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair value) { - if (fuzzyKeysDataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFuzzyKeysDataIsMutable(); - fuzzyKeysData_.add(index, value); - onChanged(); - } else { - fuzzyKeysDataBuilder_.addMessage(index, value); - } - return this; - } - - /** - * <code>repeated .BytesBytesPair fuzzy_keys_data = 1;</code> - */ - public Builder addFuzzyKeysData(org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair.Builder builderForValue) { - if (fuzzyKeysDataBuilder_ == null) { - ensureFuzzyKeysDataIsMutable(); - fuzzyKeysData_.add(builderForValue.build()); - onChanged(); - } else { - fuzzyKeysDataBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * <code>repeated .BytesBytesPair fuzzy_keys_data = 1;</code> - */ - public Builder addFuzzyKeysData(int index, org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair.Builder builderForValue) { - if (fuzzyKeysDataBuilder_ == null) { - ensureFuzzyKeysDataIsMutable(); - fuzzyKeysData_.add(index, builderForValue.build()); - onChanged(); - } else { - fuzzyKeysDataBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * <code>repeated .BytesBytesPair fuzzy_keys_data = 1;</code> - */ - public Builder addAllFuzzyKeysData(java.lang.Iterable<? extends org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair> values) { - if (fuzzyKeysDataBuilder_ == null) { - ensureFuzzyKeysDataIsMutable(); - super.addAll(values, fuzzyKeysData_); - onChanged(); - } else { - fuzzyKeysDataBuilder_.addAllMessages(values); - } - return this; - } - - /** - * <code>repeated .BytesBytesPair fuzzy_keys_data = 1;</code> - */ - public Builder clearFuzzyKeysData() { - if (fuzzyKeysDataBuilder_ == null) { - fuzzyKeysData_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - fuzzyKeysDataBuilder_.clear(); - } - return this; - } - - /** - * <code>repeated .BytesBytesPair fuzzy_keys_data = 1;</code> - */ - public Builder removeFuzzyKeysData(int index) { - if (fuzzyKeysDataBuilder_ == null) { - ensureFuzzyKeysDataIsMutable(); - fuzzyKeysData_.remove(index); - onChanged(); - } else { - fuzzyKeysDataBuilder_.remove(index); - } - return this; - } - - /** - * <code>repeated .BytesBytesPair fuzzy_keys_data = 1;</code> - */ - public org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair.Builder getFuzzyKeysDataBuilder(int index) { - return getFuzzyKeysDataFieldBuilder().getBuilder(index); - } - - /** - * <code>repeated .BytesBytesPair fuzzy_keys_data = 1;</code> - */ - public org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPairOrBuilder getFuzzyKeysDataOrBuilder(int index) { - if (fuzzyKeysDataBuilder_ == null) { - return fuzzyKeysData_.get(index); - } else { - return fuzzyKeysDataBuilder_.getMessageOrBuilder(index); - } - } - - /** - * <code>repeated .BytesBytesPair fuzzy_keys_data = 1;</code> - */ - public java.util.List<? extends org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPairOrBuilder> getFuzzyKeysDataOrBuilderList() { - if (fuzzyKeysDataBuilder_ != null) { - return fuzzyKeysDataBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(fuzzyKeysData_); - } - } - - /** - * <code>repeated .BytesBytesPair fuzzy_keys_data = 1;</code> - */ - public org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair.Builder addFuzzyKeysDataBuilder() { - return getFuzzyKeysDataFieldBuilder().addBuilder(org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair.getDefaultInstance()); - } - - /** - * <code>repeated .BytesBytesPair fuzzy_keys_data = 1;</code> - */ - public org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair.Builder addFuzzyKeysDataBuilder(int index) { - return getFuzzyKeysDataFieldBuilder().addBuilder(index, org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair.getDefaultInstance()); - } - - /** - * <code>repeated .BytesBytesPair fuzzy_keys_data = 1;</code> - */ - public java.util.List<org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair.Builder> getFuzzyKeysDataBuilderList() { - return getFuzzyKeysDataFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder<org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair, org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair.Builder, org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPairOrBuilder> getFuzzyKeysDataFieldBuilder() { - if (fuzzyKeysDataBuilder_ == null) { - fuzzyKeysDataBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair, org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPair.Builder, org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.BytesBytesPairOrBuilder>(fuzzyKeysData_, ((bitField0_ & 0x00000001) == 0x00000001), getParentForChildren(), isClean()); - fuzzyKeysData_ = null; - } - return fuzzyKeysDataBuilder_; - } - - // @@protoc_insertion_point(builder_scope:FuzzyRowFilterV2) - } - - static { - defaultInstance = new FuzzyRowFilterV2(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:FuzzyRowFilterV2) - } - - private static com.google.protobuf.Descriptors.Descriptor internal_static_BytesBytesPair_descriptor; - private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_BytesBytesPair_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor internal_static_FuzzyRowFilterV2_descriptor; - private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_FuzzyRowFilterV2_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - static { - java.lang.String[] descriptorData = { "\nbstorage-hbase/src/main/java/org/apache" + "/kylin/storage/hbase/cube/v1/filter/prot" + "obuf/FilterExt.proto\"/\n\016BytesBytesPair\022\r" + "\n\005first\030\001 \002(\014\022\016\n\006second\030\002 \002(\014\"<\n\020FuzzyRo" + "wFilterV2\022(\n\017fuzzy_keys_data\030\001 \003(\0132\017.Byt" + "esBytesPairBR\n7org.apache.kylin.storage." + "hbase.cube.v1.filter.generatedB\017FilterPr" + "otosExtH\001\210\001\001\240\001\001" }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors(com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - internal_static_BytesBytesPair_descriptor = getDescriptor().getMessageTypes().get(0); - internal_static_BytesBytesPair_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable(internal_static_BytesBytesPair_descriptor, new java.lang.String[] { "First", "Second", }); - internal_static_FuzzyRowFilterV2_descriptor = getDescriptor().getMessageTypes().get(1); - internal_static_FuzzyRowFilterV2_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable(internal_static_FuzzyRowFilterV2_descriptor, new java.lang.String[] { "FuzzyKeysData", }); - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}, assigner); - } - - // @@protoc_insertion_point(outer_class_scope) -}
http://git-wip-us.apache.org/repos/asf/kylin/blob/545201f6/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v1/filter/protobuf/FilterExt.proto ---------------------------------------------------------------------- diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v1/filter/protobuf/FilterExt.proto b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v1/filter/protobuf/FilterExt.proto deleted file mode 100644 index 29b0069..0000000 --- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v1/filter/protobuf/FilterExt.proto +++ /dev/null @@ -1,39 +0,0 @@ -// -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// usage: -// protoc --java_out=./storage-hbase/src/main/java ./storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v1/filter/protobuf/FilterExt.proto - -option java_package = "org.apache.kylin.storage.hbase.cube.v1.filter.generated"; - -option java_outer_classname = "FilterProtosExt"; - -option java_generic_services = true; - -option java_generate_equals_and_hash = true; - -option optimize_for = SPEED; - -message BytesBytesPair { - required bytes first = 1; - required bytes second = 2; -} - -message FuzzyRowFilterV2 { - repeated BytesBytesPair fuzzy_keys_data = 1; -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/kylin/blob/545201f6/storage-hbase/src/test/java/org/apache/kylin/storage/hbase/cube/MeasureTypeOnlyAggrInBaseTest.java ---------------------------------------------------------------------- diff --git a/storage-hbase/src/test/java/org/apache/kylin/storage/hbase/cube/MeasureTypeOnlyAggrInBaseTest.java b/storage-hbase/src/test/java/org/apache/kylin/storage/hbase/cube/MeasureTypeOnlyAggrInBaseTest.java index e07ea91..f151876 100644 --- a/storage-hbase/src/test/java/org/apache/kylin/storage/hbase/cube/MeasureTypeOnlyAggrInBaseTest.java +++ b/storage-hbase/src/test/java/org/apache/kylin/storage/hbase/cube/MeasureTypeOnlyAggrInBaseTest.java @@ -20,12 +20,9 @@ package org.apache.kylin.storage.hbase.cube; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotEquals; -import static org.junit.Assert.assertTrue; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.Set; @@ -42,7 +39,6 @@ import org.apache.kylin.metadata.MetadataManager; import org.apache.kylin.metadata.model.FunctionDesc; import org.apache.kylin.metadata.model.MeasureDesc; import org.apache.kylin.metadata.model.TblColRef; -import org.apache.kylin.storage.IStorageQuery; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -93,23 +89,6 @@ public class MeasureTypeOnlyAggrInBaseTest extends LocalFileMetadataTestCase { } @Test - public void testIdentifyCuboidV1() throws InvocationTargetException, NoSuchMethodException, IllegalAccessException, NoSuchFieldException { - IStorageQuery query = new org.apache.kylin.storage.hbase.cube.v1.CubeStorageQuery(cube); - long baseCuboidId = cubeDesc.getRowkey().getFullMask(); - - Method method = query.getClass().getDeclaredMethod("identifyCuboid", Set.class, Collection.class); - method.setAccessible(true); - - Object ret = method.invoke(query, Sets.newHashSet(), Lists.newArrayList()); - - assertTrue(ret instanceof Cuboid); - assertNotEquals(baseCuboidId, ((Cuboid) ret).getId()); - - ret = method.invoke(query, dimensions, metrics); - assertEquals(baseCuboidId, ((Cuboid) ret).getId()); - } - - @Test public void testIdentifyCuboidV2() throws InvocationTargetException, NoSuchMethodException, IllegalAccessException, NoSuchFieldException { CubeDesc cubeDesc = cube.getDescriptor(); Cuboid ret = Cuboid.identifyCuboid(cubeDesc, Sets.<TblColRef> newHashSet(), Lists.<FunctionDesc> newArrayList()); http://git-wip-us.apache.org/repos/asf/kylin/blob/545201f6/storage-hbase/src/test/java/org/apache/kylin/storage/hbase/cube/v1/coprocessor/observer/AggregateRegionObserverTest.java ---------------------------------------------------------------------- diff --git a/storage-hbase/src/test/java/org/apache/kylin/storage/hbase/cube/v1/coprocessor/observer/AggregateRegionObserverTest.java b/storage-hbase/src/test/java/org/apache/kylin/storage/hbase/cube/v1/coprocessor/observer/AggregateRegionObserverTest.java deleted file mode 100644 index c25b690..0000000 --- a/storage-hbase/src/test/java/org/apache/kylin/storage/hbase/cube/v1/coprocessor/observer/AggregateRegionObserverTest.java +++ /dev/null @@ -1,339 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. -*/ - -package org.apache.kylin.storage.hbase.cube.v1.coprocessor.observer; - -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -import java.io.IOException; -import java.math.BigDecimal; -import java.nio.ByteBuffer; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; - -import org.apache.hadoop.hbase.Cell; -import org.apache.hadoop.hbase.HConstants; -import org.apache.hadoop.hbase.HRegionInfo; -import org.apache.hadoop.hbase.KeyValue; -import org.apache.hadoop.hbase.KeyValue.Type; -import org.apache.hadoop.hbase.regionserver.RegionScanner; -import org.apache.kylin.common.util.Bytes; -import org.apache.kylin.gridtable.StorageSideBehavior; -import org.apache.kylin.metadata.datatype.LongMutable; -import org.apache.kylin.metadata.model.TableDesc; -import org.apache.kylin.metadata.model.TblColRef; -import org.apache.kylin.storage.hbase.common.coprocessor.CoprocessorFilter; -import org.apache.kylin.storage.hbase.common.coprocessor.CoprocessorProjector; -import org.apache.kylin.storage.hbase.common.coprocessor.CoprocessorRowType; -import org.apache.kylin.storage.hbase.cube.v1.coprocessor.observer.ObserverAggregators.HCol; -import org.junit.Before; -import org.junit.Test; - -import com.google.common.collect.Lists; - -/** - * @author yangli9 - */ -public class AggregateRegionObserverTest { - - byte[] mask = new byte[] { (byte) 0xff, (byte) 0xff, 0, 0 }; - byte[] k1 = new byte[] { 0x01, 0x01, 0, 0x01 }; - byte[] k2 = new byte[] { 0x01, 0x01, 0, 0x02 }; - byte[] k3 = new byte[] { 0x02, 0x02, 0, 0x03 }; - byte[] k4 = new byte[] { 0x02, 0x02, 0, 0x04 }; - - ArrayList<Cell> cellsInput = Lists.newArrayList(); - - byte[] family = Bytes.toBytes("f"); - byte[] q1 = Bytes.toBytes("q1"); - byte[] q2 = Bytes.toBytes("q2"); - - HCol c1 = new HCol(family, q1, new String[] { "SUM", "COUNT" }, new String[] { "decimal", "long" }); - HCol c2 = new HCol(family, q2, new String[] { "SUM" }, new String[] { "decimal" }); - - @Before - public void setup() { - cellsInput.add(newCell(k1, c1, "10.5", 1)); - cellsInput.add(newCell(k2, c1, "11.5", 2)); - cellsInput.add(newCell(k3, c1, "12.5", 3)); - cellsInput.add(newCell(k4, c1, "13.5", 4)); - - cellsInput.add(newCell(k1, c2, "21.5")); - cellsInput.add(newCell(k2, c2, "22.5")); - cellsInput.add(newCell(k3, c2, "23.5")); - cellsInput.add(newCell(k4, c2, "24.5")); - - } - - private Cell newCell(byte[] key, HCol col, String decimal) { - return newCell(key, col, decimal, Integer.MIN_VALUE); - } - - private Cell newCell(byte[] key, HCol col, String decimal, int number) { - Object[] values = number == Integer.MIN_VALUE ? // - new Object[] { new BigDecimal(decimal) } // - : new Object[] { new BigDecimal(decimal), new LongMutable(number) }; - ByteBuffer buf = col.measureCodec.encode(values); - - Cell keyValue = new KeyValue(key, 0, key.length, // - col.family, 0, col.family.length, // - col.qualifier, 0, col.qualifier.length, // - HConstants.LATEST_TIMESTAMP, Type.Put, // - buf.array(), 0, buf.position()); - - return keyValue; - } - - @Test - public void test() throws IOException { - - CoprocessorRowType rowType = newRowType(); - CoprocessorProjector projector = new CoprocessorProjector(mask, true); - ObserverAggregators aggregators = new ObserverAggregators(new HCol[] { c1, c2 }); - CoprocessorFilter filter = CoprocessorFilter.deserialize(null); // a default, - // always-true, - // filter - HashSet<String> expectedResult = new HashSet<String>(); - - expectedResult.add("\\x02\\x02\\x00\\x00, f:q1, [26.0, 7]"); - expectedResult.add("\\x02\\x02\\x00\\x00, f:q2, [48.0]"); - expectedResult.add("\\x01\\x01\\x00\\x00, f:q1, [22.0, 3]"); - expectedResult.add("\\x01\\x01\\x00\\x00, f:q2, [44.0]"); - - MockupRegionScanner innerScanner = new MockupRegionScanner(cellsInput); - - RegionScanner aggrScanner = new AggregationScanner(rowType, filter, projector, aggregators, innerScanner, StorageSideBehavior.SCAN_FILTER_AGGR_CHECKMEM); - ArrayList<Cell> result = Lists.newArrayList(); - boolean hasMore = true; - while (hasMore) { - result.clear(); - hasMore = aggrScanner.next(result); - if (result.isEmpty()) - continue; - - Cell cell = result.get(0); - HCol hcol = null; - if (ObserverAggregators.match(c1, cell)) { - hcol = c1; - } else if (ObserverAggregators.match(c2, cell)) { - hcol = c2; - } else - fail(); - - hcol.measureCodec.decode(ByteBuffer.wrap(cell.getValueArray(), cell.getValueOffset(), cell.getValueLength()), hcol.measureValues); - - String rowKey = toString(cell.getRowArray(), cell.getRowOffset(), cell.getRowLength(), mask); - String col = Bytes.toString(hcol.family) + ":" + Bytes.toString(hcol.qualifier); - String values = Arrays.toString(hcol.measureValues); - - System.out.println(rowKey); - System.out.println(col); - System.out.println(values); - - assertTrue(expectedResult.contains(rowKey + ", " + col + ", " + values)); - } - aggrScanner.close(); - } - - @Test - public void testNoMeasure() throws IOException { - - CoprocessorRowType rowType = newRowType(); - CoprocessorProjector projector = new CoprocessorProjector(mask, true); - ObserverAggregators aggregators = new ObserverAggregators(new HCol[] {}); - CoprocessorFilter filter = CoprocessorFilter.deserialize(null); // a default, - // always-true, - // filter - HashSet<String> expectedResult = new HashSet<String>(); - - expectedResult.add("\\x02\\x02\\x00\\x00"); - expectedResult.add("\\x01\\x01\\x00\\x00"); - - MockupRegionScanner innerScanner = new MockupRegionScanner(cellsInput); - - RegionScanner aggrScanner = new AggregationScanner(rowType, filter, projector, aggregators, innerScanner, StorageSideBehavior.SCAN_FILTER_AGGR_CHECKMEM); - ArrayList<Cell> result = Lists.newArrayList(); - boolean hasMore = true; - while (hasMore) { - result.clear(); - hasMore = aggrScanner.next(result); - if (result.isEmpty()) - continue; - - Cell cell = result.get(0); - - String rowKey = toString(cell.getRowArray(), cell.getRowOffset(), cell.getRowLength(), mask); - - assertTrue(expectedResult.contains(rowKey)); - } - aggrScanner.close(); - } - - private String toString(byte[] array, int offset, short length, byte[] mask) { - StringBuilder result = new StringBuilder(); - for (int i = 0; i < length; i++) { - int ch = array[offset + i] & 0xFF & mask[i]; - result.append(String.format("\\x%02X", ch)); - } - return result.toString(); - } - - private CoprocessorRowType newRowType() { - TableDesc t = new TableDesc(); - t.setName("TABLE"); - t.setDatabase("DEFAULT"); - TblColRef[] cols = new TblColRef[] { newCol(1, "A", t), newCol(2, "B", t), newCol(3, "C", t), newCol(4, "D", t) }; - int[] sizes = new int[] { 1, 1, 1, 1 }; - return new CoprocessorRowType(cols, sizes, 0); - } - - private TblColRef newCol(int i, String name, TableDesc t) { - return TblColRef.mockup(t, i, name, null); - } - - public static class MockupRegionScanner implements RegionScanner { - List<Cell> input; - int i = 0; - - public MockupRegionScanner(List<Cell> cellInputs) { - this.input = cellInputs; - } - - /* - * (non-Javadoc) - * - * @see - * org.apache.hadoop.hbase.regionserver.InternalScanner#next(java.util - * .List) - */ - @Override - public boolean next(List<Cell> results) throws IOException { - return nextRaw(results); - } - - /* - * (non-Javadoc) - * - * @see - * org.apache.hadoop.hbase.regionserver.InternalScanner#next(java.util - * .List, int) - */ - @Override - public boolean next(List<Cell> result, int limit) throws IOException { - return next(result); - } - - /* - * (non-Javadoc) - * - * @see org.apache.hadoop.hbase.regionserver.InternalScanner#close() - */ - @Override - public void close() throws IOException { - - } - - /* - * (non-Javadoc) - * - * @see - * org.apache.hadoop.hbase.regionserver.RegionScanner#getRegionInfo() - */ - @Override - public HRegionInfo getRegionInfo() { - return null; - } - - /* - * (non-Javadoc) - * - * @see - * org.apache.hadoop.hbase.regionserver.RegionScanner#isFilterDone() - */ - @Override - public boolean isFilterDone() throws IOException { - return false; - } - - /* - * (non-Javadoc) - * - * @see - * org.apache.hadoop.hbase.regionserver.RegionScanner#reseek(byte[]) - */ - @Override - public boolean reseek(byte[] row) throws IOException { - return false; - } - - /* - * (non-Javadoc) - * - * @see - * org.apache.hadoop.hbase.regionserver.RegionScanner#getMaxResultSize() - */ - @Override - public long getMaxResultSize() { - return 0; - } - - /* - * (non-Javadoc) - * - * @see - * org.apache.hadoop.hbase.regionserver.RegionScanner#getMvccReadPoint() - */ - @Override - public long getMvccReadPoint() { - return 0; - } - - /* - * (non-Javadoc) - * - * @see - * org.apache.hadoop.hbase.regionserver.RegionScanner#nextRaw(java.util - * .List) - */ - @Override - public boolean nextRaw(List<Cell> result) throws IOException { - if (i < input.size()) { - result.add(input.get(i)); - i++; - } - return i < input.size(); - } - - /* - * (non-Javadoc) - * - * @see - * org.apache.hadoop.hbase.regionserver.RegionScanner#nextRaw(java.util - * .List, int) - */ - @Override - public boolean nextRaw(List<Cell> result, int limit) throws IOException { - return nextRaw(result); - } - - } - -} http://git-wip-us.apache.org/repos/asf/kylin/blob/545201f6/storage-hbase/src/test/java/org/apache/kylin/storage/hbase/cube/v1/coprocessor/observer/RowAggregatorsTest.java ---------------------------------------------------------------------- diff --git a/storage-hbase/src/test/java/org/apache/kylin/storage/hbase/cube/v1/coprocessor/observer/RowAggregatorsTest.java b/storage-hbase/src/test/java/org/apache/kylin/storage/hbase/cube/v1/coprocessor/observer/RowAggregatorsTest.java deleted file mode 100644 index da34ff6..0000000 --- a/storage-hbase/src/test/java/org/apache/kylin/storage/hbase/cube/v1/coprocessor/observer/RowAggregatorsTest.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. -*/ - -package org.apache.kylin.storage.hbase.cube.v1.coprocessor.observer; - -import static org.junit.Assert.assertTrue; - -import java.util.Arrays; - -import org.apache.kylin.common.util.Bytes; -import org.junit.Test; - -/** - * @author yangli9 - * - */ -public class RowAggregatorsTest { - - @Test - public void testSerialize() { - ObserverAggregators.HCol[] hcols = new ObserverAggregators.HCol[] { // - newHCol("f", "c1", new String[] { "SUM", "COUNT" }, new String[] { "decimal", "long" }), // - newHCol("f", "c2", new String[] { "SUM", "SUM" }, new String[] { "long", "long" }) }; - ObserverAggregators sample = new ObserverAggregators(hcols); - - byte[] bytes = ObserverAggregators.serialize(sample); - ObserverAggregators copy = ObserverAggregators.deserialize(bytes); - - assertTrue(sample.nHCols == copy.nHCols); - assertTrue(sample.nTotalMeasures == copy.nTotalMeasures); - assertEquals(sample.hcols[0], copy.hcols[0]); - assertEquals(sample.hcols[1], copy.hcols[1]); - } - - private static ObserverAggregators.HCol newHCol(String family, String qualifier, String[] funcNames, String[] dataTypes) { - return new ObserverAggregators.HCol(Bytes.toBytes(family), Bytes.toBytes(qualifier), funcNames, dataTypes); - } - - private static void assertEquals(ObserverAggregators.HCol a, ObserverAggregators.HCol b) { - assertTrue(a.nMeasures == b.nMeasures); - assertTrue(Arrays.equals(a.family, b.family)); - assertTrue(Arrays.equals(a.qualifier, b.qualifier)); - assertTrue(Arrays.equals(a.funcNames, b.funcNames)); - assertTrue(Arrays.equals(a.dataTypes, b.dataTypes)); - } - -}
