Search in sources :

Example 21 with Assert.assertEquals

use of org.junit.Assert.assertEquals in project flink by apache.

the class HiveTableSinkITCase method testBatchAppend.

@Test
public void testBatchAppend() throws Exception {
    TableEnvironment tEnv = HiveTestUtils.createTableEnvInBatchMode(SqlDialect.HIVE);
    tEnv.registerCatalog(hiveCatalog.getName(), hiveCatalog);
    tEnv.useCatalog(hiveCatalog.getName());
    tEnv.executeSql("create database db1");
    tEnv.useDatabase("db1");
    try {
        tEnv.executeSql("create table append_table (i int, j int)");
        tEnv.executeSql("insert into append_table select 1, 1").await();
        tEnv.executeSql("insert into append_table select 2, 2").await();
        List<Row> rows = CollectionUtil.iteratorToList(tEnv.executeSql("select * from append_table").collect());
        rows.sort(Comparator.comparingInt(o -> (int) o.getField(0)));
        Assert.assertEquals(Arrays.asList(Row.of(1, 1), Row.of(2, 2)), rows);
    } finally {
        tEnv.executeSql("drop database db1 cascade");
    }
}
Also used : StreamTableEnvironment(org.apache.flink.table.api.bridge.java.StreamTableEnvironment) Arrays(java.util.Arrays) Schema(org.apache.flink.table.api.Schema) FiniteTestSource(org.apache.flink.streaming.util.FiniteTestSource) ExplainDetail(org.apache.flink.table.api.ExplainDetail) ExceptionUtils(org.apache.flink.util.ExceptionUtils) RowTypeInfo(org.apache.flink.api.java.typeutils.RowTypeInfo) Lists(org.apache.flink.shaded.guava30.com.google.common.collect.Lists) Expressions(org.apache.flink.table.api.Expressions) TableTestUtil.replaceStreamNodeId(org.apache.flink.table.planner.utils.TableTestUtil.replaceStreamNodeId) Path(org.apache.flink.core.fs.Path) Map(java.util.Map) SINK_PARTITION_COMMIT_DELAY(org.apache.flink.connector.file.table.FileSystemConnectorOptions.SINK_PARTITION_COMMIT_DELAY) Assert.fail(org.junit.Assert.fail) URI(java.net.URI) SINK_PARTITION_COMMIT_POLICY_KIND(org.apache.flink.connector.file.table.FileSystemConnectorOptions.SINK_PARTITION_COMMIT_POLICY_KIND) TableEnvironment(org.apache.flink.table.api.TableEnvironment) AfterClass(org.junit.AfterClass) Expressions.$(org.apache.flink.table.api.Expressions.$) Set(java.util.Set) Table(org.apache.flink.table.api.Table) ZoneId(java.time.ZoneId) HiveTestUtils(org.apache.flink.table.catalog.hive.HiveTestUtils) CloseableIterator(org.apache.flink.util.CloseableIterator) List(java.util.List) Row(org.apache.flink.types.Row) StreamExecutionEnvironment(org.apache.flink.streaming.api.environment.StreamExecutionEnvironment) PARTITION_TIME_EXTRACTOR_TIMESTAMP_PATTERN(org.apache.flink.connector.file.table.FileSystemConnectorOptions.PARTITION_TIME_EXTRACTOR_TIMESTAMP_PATTERN) BeforeClass(org.junit.BeforeClass) TableTestUtil.replaceStageId(org.apache.flink.table.planner.utils.TableTestUtil.replaceStageId) HiveCatalog(org.apache.flink.table.catalog.hive.HiveCatalog) HashMap(java.util.HashMap) RestartStrategies(org.apache.flink.api.common.restartstrategy.RestartStrategies) ObjectPath(org.apache.flink.table.catalog.ObjectPath) ArrayList(java.util.ArrayList) TableTestUtil.readFromResource(org.apache.flink.table.planner.utils.TableTestUtil.readFromResource) Types(org.apache.flink.api.common.typeinfo.Types) TableTestUtil.replaceNodeIdInOperator(org.apache.flink.table.planner.utils.TableTestUtil.replaceNodeIdInOperator) Iterator(java.util.Iterator) Assert.assertTrue(org.junit.Assert.assertTrue) DataTypes(org.apache.flink.table.api.DataTypes) Test(org.junit.Test) IOException(java.io.IOException) CollectionUtil(org.apache.flink.util.CollectionUtil) File(java.io.File) DataStream(org.apache.flink.streaming.api.datastream.DataStream) Consumer(java.util.function.Consumer) SINK_PARTITION_COMMIT_POLICY_CLASS(org.apache.flink.connector.file.table.FileSystemConnectorOptions.SINK_PARTITION_COMMIT_POLICY_CLASS) SqlDialect(org.apache.flink.table.api.SqlDialect) Assert(org.junit.Assert) Comparator(java.util.Comparator) SINK_PARTITION_COMMIT_SUCCESS_FILE_NAME(org.apache.flink.connector.file.table.FileSystemConnectorOptions.SINK_PARTITION_COMMIT_SUCCESS_FILE_NAME) Assert.assertEquals(org.junit.Assert.assertEquals) StreamTableEnvironment(org.apache.flink.table.api.bridge.java.StreamTableEnvironment) TableEnvironment(org.apache.flink.table.api.TableEnvironment) Row(org.apache.flink.types.Row) Test(org.junit.Test)

Example 22 with Assert.assertEquals

use of org.junit.Assert.assertEquals in project flink by apache.

the class StateAssignmentOperationTest method verifyAndCollectStateInfo.

// ------------------------------------------------------------------------
/**
 * Verify that after repartition states, state of different modes works as expected and collect
 * the information of state-name -> how many operator stat handles would be used for new
 * sub-tasks to initialize in total.
 */
private void verifyAndCollectStateInfo(OperatorState operatorState, OperatorID operatorID, int oldParallelism, int newParallelism, Map<String, Integer> stateInfoCounts) {
    final Map<OperatorInstanceID, List<OperatorStateHandle>> newManagedOperatorStates = new HashMap<>();
    StateAssignmentOperation.reDistributePartitionableStates(Collections.singletonMap(operatorID, operatorState), newParallelism, OperatorSubtaskState::getManagedOperatorState, RoundRobinOperatorStateRepartitioner.INSTANCE, newManagedOperatorStates);
    // Verify the repartitioned managed operator states per sub-task.
    for (List<OperatorStateHandle> operatorStateHandles : newManagedOperatorStates.values()) {
        final EnumMap<OperatorStateHandle.Mode, Map<String, Integer>> stateModeOffsets = new EnumMap<>(OperatorStateHandle.Mode.class);
        for (OperatorStateHandle.Mode mode : OperatorStateHandle.Mode.values()) {
            stateModeOffsets.put(mode, new HashMap<>());
        }
        for (OperatorStateHandle operatorStateHandle : operatorStateHandles) {
            for (Map.Entry<String, OperatorStateHandle.StateMetaInfo> stateNameToMetaInfo : operatorStateHandle.getStateNameToPartitionOffsets().entrySet()) {
                String stateName = stateNameToMetaInfo.getKey();
                stateInfoCounts.merge(stateName, 1, (count, inc) -> count + inc);
                OperatorStateHandle.StateMetaInfo stateMetaInfo = stateNameToMetaInfo.getValue();
                stateModeOffsets.get(stateMetaInfo.getDistributionMode()).merge(stateName, stateMetaInfo.getOffsets().length, (count, inc) -> count + inc);
            }
        }
        for (Map.Entry<OperatorStateHandle.Mode, Map<String, Integer>> modeMapEntry : stateModeOffsets.entrySet()) {
            OperatorStateHandle.Mode mode = modeMapEntry.getKey();
            Map<String, Integer> stateOffsets = modeMapEntry.getValue();
            if (OperatorStateHandle.Mode.SPLIT_DISTRIBUTE.equals(mode)) {
                if (oldParallelism < newParallelism) {
                    // SPLIT_DISTRIBUTE: when rescale up, split the state and re-distribute it
                    // -> each one will go to one task
                    stateOffsets.values().forEach(length -> Assert.assertEquals(1, (int) length));
                } else {
                    // SPLIT_DISTRIBUTE: when rescale down to 1 or not rescale, not
                    // re-distribute them.
                    stateOffsets.values().forEach(length -> Assert.assertEquals(2, (int) length));
                }
            } else if (OperatorStateHandle.Mode.UNION.equals(mode)) {
                // UNION: all to all
                stateOffsets.values().forEach(length -> Assert.assertEquals(2, (int) length));
            } else {
                // BROADCAST: so all to all
                stateOffsets.values().forEach(length -> Assert.assertEquals(3, (int) length));
            }
        }
    }
}
Also used : OperatorInstanceID(org.apache.flink.runtime.jobgraph.OperatorInstanceID) InflightDataRescalingDescriptorUtil.set(org.apache.flink.runtime.checkpoint.InflightDataRescalingDescriptorUtil.set) StateHandleDummyUtil.createNewOperatorStateHandle(org.apache.flink.runtime.checkpoint.StateHandleDummyUtil.createNewOperatorStateHandle) CoreMatchers.is(org.hamcrest.CoreMatchers.is) Arrays(java.util.Arrays) TestingDefaultExecutionGraphBuilder(org.apache.flink.runtime.executiongraph.TestingDefaultExecutionGraphBuilder) RANGE(org.apache.flink.runtime.io.network.api.writer.SubtaskStateMapper.RANGE) JobGraph(org.apache.flink.runtime.jobgraph.JobGraph) SubtaskStateMapper(org.apache.flink.runtime.io.network.api.writer.SubtaskStateMapper) Random(java.util.Random) RESCALING(org.apache.flink.runtime.checkpoint.InflightDataRescalingDescriptor.InflightDataGateOrPartitionRescalingDescriptor.MappingType.RESCALING) Collections.singletonList(java.util.Collections.singletonList) ARBITRARY(org.apache.flink.runtime.io.network.api.writer.SubtaskStateMapper.ARBITRARY) Arrays.asList(java.util.Arrays.asList) Map(java.util.Map) TestLogger(org.apache.flink.util.TestLogger) InflightDataGateOrPartitionRescalingDescriptor(org.apache.flink.runtime.checkpoint.InflightDataRescalingDescriptor.InflightDataGateOrPartitionRescalingDescriptor) StateHandleDummyUtil.createNewResultSubpartitionStateHandle(org.apache.flink.runtime.checkpoint.StateHandleDummyUtil.createNewResultSubpartitionStateHandle) KeyGroupRange(org.apache.flink.runtime.state.KeyGroupRange) EnumMap(java.util.EnumMap) KeyedStateHandle(org.apache.flink.runtime.state.KeyedStateHandle) Set(java.util.Set) Collectors(java.util.stream.Collectors) List(java.util.List) StateHandleDummyUtil.createNewInputChannelStateHandle(org.apache.flink.runtime.checkpoint.StateHandleDummyUtil.createNewInputChannelStateHandle) Stream(java.util.stream.Stream) OperatorInstanceID(org.apache.flink.runtime.jobgraph.OperatorInstanceID) Matchers.containsInAnyOrder(org.hamcrest.Matchers.containsInAnyOrder) OperatorID(org.apache.flink.runtime.jobgraph.OperatorID) InflightDataRescalingDescriptorUtil.rescalingDescriptor(org.apache.flink.runtime.checkpoint.InflightDataRescalingDescriptorUtil.rescalingDescriptor) IntStream(java.util.stream.IntStream) JobEdge(org.apache.flink.runtime.jobgraph.JobEdge) JobVertex(org.apache.flink.runtime.jobgraph.JobVertex) ExecutionGraph(org.apache.flink.runtime.executiongraph.ExecutionGraph) ResultPartitionType(org.apache.flink.runtime.io.network.partition.ResultPartitionType) HashMap(java.util.HashMap) StateHandleDummyUtil.createNewKeyedStateHandle(org.apache.flink.runtime.checkpoint.StateHandleDummyUtil.createNewKeyedStateHandle) OperatorStreamStateHandle(org.apache.flink.runtime.state.OperatorStreamStateHandle) Function(java.util.function.Function) InflightDataRescalingDescriptorUtil.array(org.apache.flink.runtime.checkpoint.InflightDataRescalingDescriptorUtil.array) JobVertexID(org.apache.flink.runtime.jobgraph.JobVertexID) HashSet(java.util.HashSet) JobException(org.apache.flink.runtime.JobException) InflightDataRescalingDescriptorUtil.to(org.apache.flink.runtime.checkpoint.InflightDataRescalingDescriptorUtil.to) JobGraphTestUtils(org.apache.flink.runtime.jobgraph.JobGraphTestUtils) OperatorStateHandle(org.apache.flink.runtime.state.OperatorStateHandle) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) JobExecutionException(org.apache.flink.runtime.client.JobExecutionException) DistributionPattern(org.apache.flink.runtime.jobgraph.DistributionPattern) ExecutionJobVertex(org.apache.flink.runtime.executiongraph.ExecutionJobVertex) Matchers.empty(org.hamcrest.Matchers.empty) Collections.emptySet(java.util.Collections.emptySet) ExecutionGraphTestUtils(org.apache.flink.runtime.executiongraph.ExecutionGraphTestUtils) ROUND_ROBIN(org.apache.flink.runtime.io.network.api.writer.SubtaskStateMapper.ROUND_ROBIN) Test(org.junit.Test) OperatorIDPair(org.apache.flink.runtime.OperatorIDPair) InflightDataRescalingDescriptorUtil.mappings(org.apache.flink.runtime.checkpoint.InflightDataRescalingDescriptorUtil.mappings) ByteStreamStateHandle(org.apache.flink.runtime.state.memory.ByteStreamStateHandle) Assert(org.junit.Assert) ExecutionVertex(org.apache.flink.runtime.executiongraph.ExecutionVertex) Collections(java.util.Collections) Assert.assertEquals(org.junit.Assert.assertEquals) NoOpInvokable(org.apache.flink.runtime.testtasks.NoOpInvokable) HashMap(java.util.HashMap) Collections.singletonList(java.util.Collections.singletonList) Arrays.asList(java.util.Arrays.asList) List(java.util.List) StateHandleDummyUtil.createNewOperatorStateHandle(org.apache.flink.runtime.checkpoint.StateHandleDummyUtil.createNewOperatorStateHandle) OperatorStateHandle(org.apache.flink.runtime.state.OperatorStateHandle) Map(java.util.Map) EnumMap(java.util.EnumMap) HashMap(java.util.HashMap) EnumMap(java.util.EnumMap)

Example 23 with Assert.assertEquals

use of org.junit.Assert.assertEquals in project flink by apache.

the class ReporterSetupTest method testSeveralReportersWithArgumentForwarding.

/**
 * Verifies that multiple reporters can be configured with all their arguments being forwarded.
 */
@Test
public void testSeveralReportersWithArgumentForwarding() {
    final Configuration config = new Configuration();
    configureReporter1(config);
    configureReporter2(config);
    final List<ReporterSetup> reporterSetups = ReporterSetup.fromConfiguration(config, null);
    Assert.assertEquals(2, reporterSetups.size());
    final Optional<ReporterSetup> reporter1Config = reporterSetups.stream().filter(c -> "reporter1".equals(c.getName())).findFirst();
    Assert.assertTrue(reporter1Config.isPresent());
    assertReporter1Configured(reporter1Config.get());
    final Optional<ReporterSetup> reporter2Config = reporterSetups.stream().filter(c -> "reporter2".equals(c.getName())).findFirst();
    Assert.assertTrue(reporter2Config.isPresent());
    assertReporter2Configured(reporter2Config.get());
}
Also used : TestingPluginManager(org.apache.flink.core.plugin.TestingPluginManager) MetricConfig(org.apache.flink.metrics.MetricConfig) MetricReporterFactory(org.apache.flink.metrics.reporter.MetricReporterFactory) Properties(java.util.Properties) IsInstanceOf.instanceOf(org.hamcrest.core.IsInstanceOf.instanceOf) Configuration(org.apache.flink.configuration.Configuration) InterceptInstantiationViaReflection(org.apache.flink.metrics.reporter.InterceptInstantiationViaReflection) Assert.assertTrue(org.junit.Assert.assertTrue) Test(org.junit.Test) MetricOptions(org.apache.flink.configuration.MetricOptions) MetricReporter(org.apache.flink.metrics.reporter.MetricReporter) List(java.util.List) IsCollectionContaining.hasItems(org.hamcrest.core.IsCollectionContaining.hasItems) InstantiateViaFactory(org.apache.flink.metrics.reporter.InstantiateViaFactory) ScopeFormat(org.apache.flink.runtime.metrics.scope.ScopeFormat) ConfigConstants(org.apache.flink.configuration.ConfigConstants) TestLogger(org.apache.flink.util.TestLogger) Optional(java.util.Optional) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) Assert(org.junit.Assert) Collections(java.util.Collections) Assert.assertEquals(org.junit.Assert.assertEquals) TestReporter(org.apache.flink.runtime.metrics.util.TestReporter) IsMapContaining.hasEntry(org.hamcrest.collection.IsMapContaining.hasEntry) Configuration(org.apache.flink.configuration.Configuration) Test(org.junit.Test)

Example 24 with Assert.assertEquals

use of org.junit.Assert.assertEquals in project flink by apache.

the class ZooKeeperUtilsTest method testStartCuratorFrameworkFailed.

@Test
public void testStartCuratorFrameworkFailed() throws Exception {
    TestingFatalErrorHandler handler = new TestingFatalErrorHandler();
    String errorMsg = "unexpected exception";
    final CuratorFrameworkFactory.Builder curatorFrameworkBuilder = CuratorFrameworkFactory.builder().connectString("localhost:2181").retryPolicy(new ExponentialBackoffRetry(1, 1)).zookeeperFactory((s, i, watcher, b) -> {
        throw new RuntimeException(errorMsg);
    }).namespace("flink");
    ZooKeeperUtils.startCuratorFramework(curatorFrameworkBuilder, handler);
    Assert.assertEquals(errorMsg, handler.getErrorFuture().get().getMessage());
}
Also used : Assert.assertThat(org.junit.Assert.assertThat) CuratorFrameworkFactory(org.apache.flink.shaded.curator5.org.apache.curator.framework.CuratorFrameworkFactory) ExponentialBackoffRetry(org.apache.flink.shaded.curator5.org.apache.curator.retry.ExponentialBackoffRetry) Configuration(org.apache.flink.configuration.Configuration) TestLogger(org.apache.flink.util.TestLogger) Test(org.junit.Test) Matchers.is(org.hamcrest.Matchers.is) Assert(org.junit.Assert) HighAvailabilityOptions(org.apache.flink.configuration.HighAvailabilityOptions) Assert.assertEquals(org.junit.Assert.assertEquals) CuratorFrameworkFactory(org.apache.flink.shaded.curator5.org.apache.curator.framework.CuratorFrameworkFactory) ExponentialBackoffRetry(org.apache.flink.shaded.curator5.org.apache.curator.retry.ExponentialBackoffRetry) Test(org.junit.Test)

Example 25 with Assert.assertEquals

use of org.junit.Assert.assertEquals in project hbase by apache.

the class TestAsyncTableGetMultiThreaded method test.

@Test
public void test() throws Exception {
    LOG.info("====== Test started ======");
    int numThreads = 7;
    AtomicBoolean stop = new AtomicBoolean(false);
    ExecutorService executor = Executors.newFixedThreadPool(numThreads, new ThreadFactoryBuilder().setNameFormat("TestAsyncGet-pool-%d").setDaemon(true).setUncaughtExceptionHandler(Threads.LOGGING_EXCEPTION_HANDLER).build());
    List<Future<?>> futures = new ArrayList<>();
    IntStream.range(0, numThreads).forEach(i -> futures.add(executor.submit(() -> {
        run(stop);
        return null;
    })));
    LOG.info("====== Scheduled {} read threads ======", numThreads);
    Collections.shuffle(Arrays.asList(SPLIT_KEYS), new Random(123));
    Admin admin = TEST_UTIL.getAdmin();
    for (byte[] splitPoint : SPLIT_KEYS) {
        int oldRegionCount = admin.getRegions(TABLE_NAME).size();
        LOG.info("====== Splitting at {} ======, region count before splitting is {}", Bytes.toStringBinary(splitPoint), oldRegionCount);
        admin.split(TABLE_NAME, splitPoint);
        TEST_UTIL.waitFor(30000, new ExplainingPredicate<Exception>() {

            @Override
            public boolean evaluate() throws Exception {
                return TEST_UTIL.getMiniHBaseCluster().getRegions(TABLE_NAME).size() > oldRegionCount;
            }

            @Override
            public String explainFailure() throws Exception {
                return "Split has not finished yet";
            }
        });
        List<HRegion> regions = TEST_UTIL.getMiniHBaseCluster().getRegions(TABLE_NAME);
        LOG.info("====== Split at {} ======, region count after splitting is {}", Bytes.toStringBinary(splitPoint), regions.size());
        for (HRegion region : regions) {
            LOG.info("====== Compact {} ======", region.getRegionInfo());
            region.compact(true);
        }
        for (HRegion region : regions) {
            // Waiting for compaction to complete and references are cleaned up
            LOG.info("====== Waiting for compaction on {} ======", region.getRegionInfo());
            RetryCounter retrier = new RetryCounter(30, 1, TimeUnit.SECONDS);
            for (; ; ) {
                try {
                    if (admin.getCompactionStateForRegion(region.getRegionInfo().getRegionName()) == CompactionState.NONE) {
                        break;
                    }
                } catch (IOException e) {
                    LOG.warn("Failed to query");
                }
                if (!retrier.shouldRetry()) {
                    throw new IOException("Can not finish compaction in time after attempt " + retrier.getAttemptTimes() + " times");
                }
                retrier.sleepUntilNextRetry();
            }
            LOG.info("====== Compaction on {} finished, close and archive compacted files ======", region.getRegionInfo());
            region.getStores().get(0).closeAndArchiveCompactedFiles();
            LOG.info("====== Close and archive compacted files on {} done ======", region.getRegionInfo());
        }
        Thread.sleep(5000);
        LOG.info("====== Balancing cluster ======");
        admin.balance(BalanceRequest.newBuilder().setIgnoreRegionsInTransition(true).build());
        LOG.info("====== Balance cluster done ======");
        Thread.sleep(5000);
        ServerName metaServer = TEST_UTIL.getHBaseCluster().getServerHoldingMeta();
        ServerName newMetaServer = TEST_UTIL.getHBaseCluster().getRegionServerThreads().stream().map(t -> t.getRegionServer().getServerName()).filter(s -> !s.equals(metaServer)).findAny().get();
        LOG.info("====== Moving meta from {} to {} ======", metaServer, newMetaServer);
        admin.move(RegionInfoBuilder.FIRST_META_REGIONINFO.getEncodedNameAsBytes(), newMetaServer);
        LOG.info("====== Move meta done ======");
        Thread.sleep(5000);
    }
    List<LogEntry> balancerDecisionRecords = admin.getLogEntries(null, "BALANCER_DECISION", ServerType.MASTER, 2, null);
    Assert.assertEquals(balancerDecisionRecords.size(), 2);
    LOG.info("====== Read test finished, shutdown thread pool ======");
    stop.set(true);
    executor.shutdown();
    for (int i = 0; i < numThreads; i++) {
        LOG.info("====== Waiting for {} threads to finish, remaining {} ======", numThreads, numThreads - i);
        futures.get(i).get();
    }
    LOG.info("====== Test test finished ======");
}
Also used : IntStream(java.util.stream.IntStream) Arrays(java.util.Arrays) BeforeClass(org.junit.BeforeClass) ThreadFactoryBuilder(org.apache.hbase.thirdparty.com.google.common.util.concurrent.ThreadFactoryBuilder) LoggerFactory(org.slf4j.LoggerFactory) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) Random(java.util.Random) ClientTests(org.apache.hadoop.hbase.testclassification.ClientTests) ArrayList(java.util.ArrayList) Future(java.util.concurrent.Future) Closeables(org.apache.hbase.thirdparty.com.google.common.io.Closeables) ClassRule(org.junit.ClassRule) ExecutorService(java.util.concurrent.ExecutorService) ServerName(org.apache.hadoop.hbase.ServerName) Threads(org.apache.hadoop.hbase.util.Threads) MemoryCompactionPolicy(org.apache.hadoop.hbase.MemoryCompactionPolicy) Bytes(org.apache.hadoop.hbase.util.Bytes) TableName(org.apache.hadoop.hbase.TableName) AfterClass(org.junit.AfterClass) CompactingMemStore(org.apache.hadoop.hbase.regionserver.CompactingMemStore) Logger(org.slf4j.Logger) HBaseTestingUtil(org.apache.hadoop.hbase.HBaseTestingUtil) HRegion(org.apache.hadoop.hbase.regionserver.HRegion) RetryCounter(org.apache.hadoop.hbase.util.RetryCounter) HBaseClassTestRule(org.apache.hadoop.hbase.HBaseClassTestRule) LargeTests(org.apache.hadoop.hbase.testclassification.LargeTests) IOException(java.io.IOException) Test(org.junit.Test) Category(org.junit.experimental.categories.Category) Collectors(java.util.stream.Collectors) Executors(java.util.concurrent.Executors) MAX_BUFFER_COUNT_KEY(org.apache.hadoop.hbase.io.ByteBuffAllocator.MAX_BUFFER_COUNT_KEY) ExecutionException(java.util.concurrent.ExecutionException) TimeUnit(java.util.concurrent.TimeUnit) List(java.util.List) HBASE_CLIENT_META_OPERATION_TIMEOUT(org.apache.hadoop.hbase.HConstants.HBASE_CLIENT_META_OPERATION_TIMEOUT) ExplainingPredicate(org.apache.hadoop.hbase.Waiter.ExplainingPredicate) Assert(org.junit.Assert) Collections(java.util.Collections) Assert.assertEquals(org.junit.Assert.assertEquals) ArrayList(java.util.ArrayList) IOException(java.io.IOException) IOException(java.io.IOException) ExecutionException(java.util.concurrent.ExecutionException) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) HRegion(org.apache.hadoop.hbase.regionserver.HRegion) Random(java.util.Random) RetryCounter(org.apache.hadoop.hbase.util.RetryCounter) ServerName(org.apache.hadoop.hbase.ServerName) ExecutorService(java.util.concurrent.ExecutorService) ThreadFactoryBuilder(org.apache.hbase.thirdparty.com.google.common.util.concurrent.ThreadFactoryBuilder) Future(java.util.concurrent.Future) Test(org.junit.Test)

Aggregations

Assert.assertEquals (org.junit.Assert.assertEquals)68 Assert (org.junit.Assert)67 Test (org.junit.Test)62 List (java.util.List)56 Before (org.junit.Before)42 Assert.assertTrue (org.junit.Assert.assertTrue)41 ArrayList (java.util.ArrayList)39 Assert.assertFalse (org.junit.Assert.assertFalse)39 Arrays (java.util.Arrays)29 Assert.assertNotNull (org.junit.Assert.assertNotNull)29 Collections (java.util.Collections)28 Map (java.util.Map)25 After (org.junit.After)25 HashMap (java.util.HashMap)24 Collectors (java.util.stream.Collectors)24 Assert.assertNull (org.junit.Assert.assertNull)23 Set (java.util.Set)17 SystemEntityType (eu.bcvsolutions.idm.acc.domain.SystemEntityType)15 SysSystemDto (eu.bcvsolutions.idm.acc.dto.SysSystemDto)15 SysSystemService (eu.bcvsolutions.idm.acc.service.api.SysSystemService)15