Skip to content

Commit 17e1b5d

Browse files
committed
comments and whitespaces
1 parent e3482ee commit 17e1b5d

File tree

9 files changed

+20
-11
lines changed

9 files changed

+20
-11
lines changed

hbase-client/src/main/java/org/apache/omid/transaction/TTable.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,7 @@ static public Put markPutAsCommitted(Put put, long timestamp, long commitTimesta
368368
Map<byte[], List<Cell>> kvs = put.getFamilyCellMap();
369369
for (List<Cell> kvl : kvs.values()) {
370370
for (Cell c : kvl) {
371+
//Cast needed for HBase 3+
371372
KeyValue kv = KeyValueUtil.ensureKeyValue((ExtendedCell)c);
372373
Bytes.putLong(kv.getValueArray(), kv.getTimestampOffset(), timestamp);
373374
try {
@@ -417,6 +418,7 @@ private Put putInternal(Transaction tx, Put put, boolean addShadowCell) throws I
417418
// Reach into keyvalue to update timestamp.
418419
// It's not nice to reach into keyvalue internals,
419420
// but we want to avoid having to copy the whole thing
421+
// Cast needed for HBase 3+
420422
KeyValue kv = KeyValueUtil.ensureKeyValue((ExtendedCell)c);
421423
Bytes.putLong(kv.getValueArray(), kv.getTimestampOffset(), writeTimestamp);
422424
tsput.add(kv);

hbase-common/pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
<version>2.5.0</version>
4646
</dependency>
4747

48-
4948
<dependency>
5049
<groupId>com.google.inject</groupId>
5150
<artifactId>guice</artifactId>

hbase-common/src/main/java/org/apache/omid/transaction/CellUtils.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,7 @@ public static SortedMap<Cell, Optional<Cell>> mapCellsToShadowCells(List<Cell> c
338338
// TODO: Should we check also here the MVCC and swap if its greater???
339339
// Values are the same, ignore
340340
} else {
341+
//Casts needed for HBase 3+
341342
if (((ExtendedCell)cell).getSequenceId() > ((ExtendedCell)storedCell).getSequenceId()) { // Swap values
342343
Optional<Cell> previousValue = cellToShadowCellMap.remove(storedCell);
343344
Preconditions.checkNotNull(previousValue, "Should contain an Optional<Cell> value");

hbase-coprocessor/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionObserver.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
public abstract class BaseRegionObserver implements RegionObserver, RegionCoprocessor {
3030
@Override
31+
// No generics to work around API change in HBase 3+
3132
public InternalScanner preCompact(ObserverContext c,
3233
Store store,
3334
InternalScanner scanner,

hbase-coprocessor/src/main/java/org/apache/hadoop/hbase/regionserver/CompactorScanner.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public CompactorScanner(ObserverContext c,
7272
Client commitTableClient,
7373
boolean isMajorCompaction,
7474
boolean preserveNonTransactionallyDeletedCells) throws IOException {
75-
RegionCoprocessorEnvironment env = (RegionCoprocessorEnvironment)c.getEnvironment();
75+
RegionCoprocessorEnvironment env = (RegionCoprocessorEnvironment)c.getEnvironment();
7676
this.internalScanner = internalScanner;
7777
this.commitTableClient = commitTableClient;
7878
this.isMajorCompaction = isMajorCompaction;
@@ -86,17 +86,20 @@ public CompactorScanner(ObserverContext c,
8686
}
8787

8888
@Override
89+
// No generics to work around API change in HBase 3+
8990
public boolean next(List results) throws IOException {
9091
return next(results, -1);
9192
}
9293

9394
@Override
95+
// No generics to work around API change in HBase 3+
9496
public boolean next(List result, ScannerContext scannerContext) throws IOException {
9597
int limit = scannerContext.getBatchLimit();
9698
return next(result, limit);
9799
}
98100

99-
protected boolean next(List result, int limit) throws IOException {
101+
// No generics to work around API change in HBase 3+
102+
protected boolean next(List result, int limit) throws IOException {
100103

101104
if (currentRowWorthValues.isEmpty()) {
102105
// 1) Read next row

hbase-coprocessor/src/main/java/org/apache/omid/transaction/CellSkipFilter.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
import java.lang.invoke.MethodHandle;
3030
import java.lang.invoke.MethodHandles;
3131
import java.lang.invoke.MethodType;
32-
import java.lang.reflect.Method;
3332
import java.util.List;
3433

3534
/**
@@ -41,9 +40,9 @@
4140
*/
4241

4342
public class CellSkipFilter extends FilterBase {
44-
43+
4544
private static final Logger LOG = LoggerFactory.getLogger(CellSkipFilter.class);
46-
45+
4746
private final Filter filter;
4847
// remember the previous cell processed by filter when the return code was NEXT_COL or INCLUDE_AND_NEXT_COL
4948
private Cell skipColumn = null;
@@ -84,7 +83,7 @@ private boolean skipCellVersion(Cell cell) {
8483
/**
8584
* This deprecated method is implemented for backwards compatibility reasons.
8685
* use {@link CellSkipFilter#filterKeyValue(Cell)}
87-
*
86+
*
8887
* No @Override because HBase 3 completely removes this method
8988
*/
9089
public ReturnCode filterKeyValue(Cell cell) throws IOException {
@@ -128,7 +127,7 @@ public void reset() throws IOException {
128127
/**
129128
* This deprecated method is implemented for backwards compatibility reasons.
130129
* use {@link CellSkipFilter#filterRowKey(Cell)}
131-
*
130+
*
132131
* No @Override so that this compiles with HBase 3
133132
*/
134133
public boolean filterRowKey(byte[] buffer, int offset, int length) throws IOException {

hbase-coprocessor/src/main/java/org/apache/omid/transaction/OmidCompactor.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ public void stop(CoprocessorEnvironment e) throws IOException {
111111

112112

113113
@Override
114+
// No generics to work around API change in HBase 3+
114115
public InternalScanner preCompact(ObserverContext c,
115116
Store store,
116117
InternalScanner scanner,

hbase-coprocessor/src/main/java/org/apache/omid/transaction/OmidSnapshotFilter.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ public void stop(CoprocessorEnvironment e) throws IOException {
9999
}
100100

101101
@Override
102+
// No generics to work around API change in HBase 3+
102103
public void postGetOp(ObserverContext e, Get get, List results) {
103104
SnapshotFilterImpl snapshotFilter = snapshotFilterMap.get(get);
104105
if (snapshotFilter != null) {
@@ -108,6 +109,7 @@ public void postGetOp(ObserverContext e, Get get, List results) {
108109

109110

110111
@Override
112+
// No generics to work around API change in HBase 3+
111113
public void preGetOp(ObserverContext e, Get get, List results)
112114
throws IOException {
113115

@@ -136,6 +138,7 @@ private SnapshotFilterImpl getSnapshotFilter(ObserverContext<RegionCoprocessorEn
136138
}
137139

138140
@Override
141+
// No generics to work around API change in HBase 3+
139142
public void preScannerOpen(ObserverContext e,
140143
Scan scan) throws IOException {
141144
byte[] byteTransaction = scan.getAttribute(CellUtils.TRANSACTION_ATTRIBUTE);

hbase-coprocessor/src/main/java/org/apache/omid/transaction/TransactionVisibilityFilter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public TransactionVisibilityFilter(Filter cellFilter,
100100
/**
101101
* This deprecated method is implemented for backwards compatibility reasons.
102102
* use {@link TransactionVisibilityFilter#filterCell(Cell)}
103-
*
103+
*
104104
* No @Override so that it compiles with HBase 3.x
105105
*/
106106
public ReturnCode filterKeyValue(Cell cell) throws IOException {
@@ -238,10 +238,10 @@ public boolean filterRow() throws IOException {
238238
return super.filterRow();
239239
}
240240

241-
/**
241+
/**
242242
* This deprecated method is implemented for backwards compatibility reasons.
243243
* use {@link TransactionVisibilityFilter#filterRowKey(Cell)}
244-
*
244+
*
245245
* No @Override so that it compiles with HBase 3.x
246246
*/
247247
public boolean filterRowKey(byte[] buffer, int offset, int length) throws IOException {

0 commit comments

Comments
 (0)