-
Notifications
You must be signed in to change notification settings - Fork 26
CASSANALYTICS-137: Add end to end test with BTI format sstable #185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,62 @@ | ||||||||||||||||||||||
| /* | ||||||||||||||||||||||
| * Licensed to the Apache Software Foundation (ASF) under one | ||||||||||||||||||||||
| * or more contributor license agreements. See the NOTICE file | ||||||||||||||||||||||
| * distributed with this work for additional information | ||||||||||||||||||||||
| * regarding copyright ownership. The ASF licenses this file | ||||||||||||||||||||||
| * to you under the Apache License, Version 2.0 (the | ||||||||||||||||||||||
| * "License"); you may not use this file except in compliance | ||||||||||||||||||||||
| * with the License. You may obtain a copy of the License at | ||||||||||||||||||||||
| * | ||||||||||||||||||||||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||||||||||||||||||||||
| * | ||||||||||||||||||||||
| * Unless required by applicable law or agreed to in writing, | ||||||||||||||||||||||
| * software distributed under the License is distributed on an | ||||||||||||||||||||||
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||||||||||||||||||||||
| * KIND, either express or implied. See the License for the | ||||||||||||||||||||||
| * specific language governing permissions and limitations | ||||||||||||||||||||||
| * under the License. | ||||||||||||||||||||||
| */ | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| package org.apache.cassandra.analytics; | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| import java.util.HashMap; | ||||||||||||||||||||||
| import java.util.Map; | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| import org.apache.cassandra.bridge.CassandraVersion; | ||||||||||||||||||||||
| import org.apache.cassandra.testing.ClusterBuilderConfiguration; | ||||||||||||||||||||||
| import org.apache.cassandra.testing.TestUtils; | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| import static org.assertj.core.api.Assumptions.assumeThat; | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| /** | ||||||||||||||||||||||
| * A simple test that runs a sample read/write Cassandra Analytics job using BTI format SSTable. | ||||||||||||||||||||||
| */ | ||||||||||||||||||||||
| class CassandraAnalyticsSimpleBtiTest extends CassandraAnalyticsSimpleTest | ||||||||||||||||||||||
| { | ||||||||||||||||||||||
| static | ||||||||||||||||||||||
| { | ||||||||||||||||||||||
| System.setProperty("cassandra.analytics.bridges.sstable_format", "bti"); | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we limit the test to C* 5+?
Suggested change
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Alternatively:
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you both. I liked the check on the feature name (bti) better. |
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| @Override | ||||||||||||||||||||||
| protected void beforeClusterProvisioning() | ||||||||||||||||||||||
| { | ||||||||||||||||||||||
| String version = TestUtils.getDTestClusterVersion().getValue(); | ||||||||||||||||||||||
| assumeThat(CassandraVersion.fromVersion(version) | ||||||||||||||||||||||
| .orElseThrow() | ||||||||||||||||||||||
| .supportedSSTableFormats()) | ||||||||||||||||||||||
| .as("BTI SSTable format is not supported in %s", version) | ||||||||||||||||||||||
| .contains("bti"); | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| @Override | ||||||||||||||||||||||
| protected ClusterBuilderConfiguration testClusterConfiguration() | ||||||||||||||||||||||
| { | ||||||||||||||||||||||
| ClusterBuilderConfiguration conf = super.testClusterConfiguration(); | ||||||||||||||||||||||
| Map<String, Object> additionalConf = new HashMap<>(conf.additionalInstanceConfig); | ||||||||||||||||||||||
| additionalConf.put("sstable", Map.of("selected_format", "bti")); | ||||||||||||||||||||||
| conf.additionalInstanceConfig(additionalConf); | ||||||||||||||||||||||
| return conf; | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please read sstables after bulk write and verify files have bti da format in file name? I have a draft of this