1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.hadoop.hbase.regionserver;
20
21 import org.apache.hadoop.hbase.classification.InterfaceAudience;
22 import org.apache.hadoop.hbase.HColumnDescriptor;
23 import org.apache.hadoop.hbase.KeepDeletedCells;
24 import org.apache.hadoop.hbase.KeyValue.KVComparator;
25 import org.apache.hadoop.hbase.util.Bytes;
26 import org.apache.hadoop.hbase.util.ClassSize;
27
28
29
30
31 @InterfaceAudience.Private
32 public class ScanInfo {
33 private byte[] family;
34 private int minVersions;
35 private int maxVersions;
36 private long ttl;
37 private KeepDeletedCells keepDeletedCells;
38 private long timeToPurgeDeletes;
39 private KVComparator comparator;
40
41 public static final long FIXED_OVERHEAD = ClassSize.align(ClassSize.OBJECT
42 + (2 * ClassSize.REFERENCE) + (2 * Bytes.SIZEOF_INT)
43 + (2 * Bytes.SIZEOF_LONG) + Bytes.SIZEOF_BOOLEAN);
44
45
46
47
48
49
50
51
52 public ScanInfo(final HColumnDescriptor family, final long ttl, final long timeToPurgeDeletes,
53 final KVComparator comparator) {
54 this(family.getName(), family.getMinVersions(), family.getMaxVersions(), ttl, family
55 .getKeepDeletedCells(), timeToPurgeDeletes, comparator);
56 }
57
58
59
60
61
62
63
64
65
66
67
68 public ScanInfo(final byte[] family, final int minVersions, final int maxVersions,
69 final long ttl, final KeepDeletedCells keepDeletedCells, final long timeToPurgeDeletes,
70 final KVComparator comparator) {
71 this.family = family;
72 this.minVersions = minVersions;
73 this.maxVersions = maxVersions;
74 this.ttl = ttl;
75 this.keepDeletedCells = keepDeletedCells;
76 this.timeToPurgeDeletes = timeToPurgeDeletes;
77 this.comparator = comparator;
78 }
79
80 public byte[] getFamily() {
81 return family;
82 }
83
84 public int getMinVersions() {
85 return minVersions;
86 }
87
88 public int getMaxVersions() {
89 return maxVersions;
90 }
91
92 public long getTtl() {
93 return ttl;
94 }
95
96 public KeepDeletedCells getKeepDeletedCells() {
97 return keepDeletedCells;
98 }
99
100 public long getTimeToPurgeDeletes() {
101 return timeToPurgeDeletes;
102 }
103
104 public KVComparator getComparator() {
105 return comparator;
106 }
107 }