Comparator.proto 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /**
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF licenses this file
  6. * to you under the Apache License, Version 2.0 (the
  7. * "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. */
  18. // This file contains protocol buffers that are used for filters
  19. package pb;
  20. option java_package = "org.apache.hadoop.hbase.protobuf.generated";
  21. option java_outer_classname = "ComparatorProtos";
  22. option java_generic_services = true;
  23. option java_generate_equals_and_hash = true;
  24. option optimize_for = SPEED;
  25. // This file contains protocol buffers that are used for comparators (e.g. in filters)
  26. message Comparator {
  27. required string name = 1;
  28. optional bytes serialized_comparator = 2;
  29. }
  30. message ByteArrayComparable {
  31. optional bytes value = 1;
  32. }
  33. message BinaryComparator {
  34. required ByteArrayComparable comparable = 1;
  35. }
  36. message LongComparator {
  37. required ByteArrayComparable comparable = 1;
  38. }
  39. message BinaryPrefixComparator {
  40. required ByteArrayComparable comparable = 1;
  41. }
  42. message BitComparator {
  43. required ByteArrayComparable comparable = 1;
  44. required BitwiseOp bitwise_op = 2;
  45. enum BitwiseOp {
  46. AND = 1;
  47. OR = 2;
  48. XOR = 3;
  49. }
  50. }
  51. message NullComparator {
  52. }
  53. message RegexStringComparator {
  54. required string pattern = 1;
  55. required int32 pattern_flags = 2;
  56. required string charset = 3;
  57. optional string engine = 4;
  58. }
  59. message SubstringComparator {
  60. required string substr = 1;
  61. }