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