Skip to content

Commit

Permalink
adjustments for branch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
ndimiduk committed Dec 20, 2024
1 parent 636e6c5 commit 0e9619e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,8 @@ public void postStartMaster(ObserverContext<MasterCoprocessorEnvironment> ctx)
LOG.info("Table {} already exists. Skipping table creation process.",
NAMESPACED_TABLE_NAME);
} else {
boolean shouldCreateNamespace =
Arrays.stream(admin.listNamespaces()).filter(namespace -> namespace.equals(NAMESPACE))
.collect(Collectors.toUnmodifiableSet()).isEmpty();
boolean shouldCreateNamespace = Arrays.stream(admin.listNamespaces())
.filter(namespace -> namespace.equals(NAMESPACE)).collect(Collectors.toSet()).isEmpty();
if (shouldCreateNamespace) {
NamespaceDescriptor nd = NamespaceDescriptor.create(NAMESPACE).build();
try {
Expand All @@ -180,7 +179,7 @@ public void postStartMaster(ObserverContext<MasterCoprocessorEnvironment> ctx)
}
}
ColumnFamilyDescriptor cfd = ColumnFamilyDescriptorBuilder.newBuilder(CF).setMaxVersions(25)
.setTimeToLive((int) Duration.ofDays(7).toSeconds()).build();
.setTimeToLive((int) Duration.ofDays(7).getSeconds()).build();
TableDescriptor td =
TableDescriptorBuilder.newBuilder(NAMESPACED_TABLE_NAME).setColumnFamily(cfd).build();
LOG.info("Creating table {}", NAMESPACED_TABLE_NAME);
Expand All @@ -197,7 +196,7 @@ public void postStartMaster(ObserverContext<MasterCoprocessorEnvironment> ctx)
}

@Override
public InternalScanner preCompact(ObserverContext<? extends RegionCoprocessorEnvironment> context,
public InternalScanner preCompact(ObserverContext<RegionCoprocessorEnvironment> context,
Store store, InternalScanner scanner, ScanType scanType, CompactionLifeCycleTracker tracker,
CompactionRequest request) {
if (store.getTableName().isSystemTable()) {
Expand Down Expand Up @@ -242,15 +241,14 @@ public RowStatisticsScanner(InternalScanner scanner, RowStatisticsImpl rowStatis
}

@Override
public boolean next(List<? super ExtendedCell> result, ScannerContext scannerContext)
throws IOException {
public boolean next(List<Cell> result, ScannerContext scannerContext) throws IOException {
boolean ret = scanner.next(result, scannerContext);
consumeCells(result);
return ret;
}

@Override
public boolean next(List<? super ExtendedCell> result) throws IOException {
public boolean next(List<Cell> result) throws IOException {
boolean ret = scanner.next(result);
consumeCells(result);
return ret;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import org.apache.hadoop.hbase.Cell;
import org.apache.hadoop.hbase.CellScanner;
import org.apache.hadoop.hbase.HConstants;
import org.apache.hadoop.hbase.SingleProcessHBaseCluster;
import org.apache.hadoop.hbase.MiniHBaseCluster;
import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.client.Connection;
import org.apache.hadoop.hbase.client.ConnectionFactory;
Expand All @@ -47,7 +47,7 @@ public class TestRowStatisticsCompactionObserver {
public static final TestableRowStatisticsRecorder RECORDER = new TestableRowStatisticsRecorder();
private static final TableName TABLE_NAME = TableName.valueOf("test-table");
private static final byte[] FAMILY = Bytes.toBytes("0");
private static SingleProcessHBaseCluster cluster;
private static MiniHBaseCluster cluster;
private static Connection connection;
private static Table table;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
import java.io.IOException;
import java.util.Optional;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.MiniHBaseCluster;
import org.apache.hadoop.hbase.NamespaceDescriptor;
import org.apache.hadoop.hbase.SingleProcessHBaseCluster;
import org.apache.hadoop.hbase.client.BufferedMutatorParams;
import org.apache.hadoop.hbase.client.Connection;
import org.apache.hadoop.hbase.client.ConnectionFactory;
Expand All @@ -50,7 +50,7 @@ public class TestRowStatisticsTableRecorder {
private static final NamespaceDescriptor NAMESPACE_DESCRIPTOR =
NamespaceDescriptor.create(RowStatisticsTableUtil.NAMESPACE).build();
private static final byte[] FULL_REGION_NAME = Bytes.toBytes("fullRegionName");
private static SingleProcessHBaseCluster cluster;
private static MiniHBaseCluster cluster;
private static Connection connection;
private RowStatisticsImpl rowStatistics;
private Counter counter;
Expand Down

0 comments on commit 0e9619e

Please sign in to comment.