skoppu22 commented on code in PR #206: URL: https://github.com/apache/cassandra-analytics/pull/206#discussion_r3776006259
########## cassandra-analytics-core/src/main/spark3/org/apache/cassandra/spark/sparksql/S3CassandraDataSource.java: ########## @@ -0,0 +1,96 @@ +/* + * 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.spark.sparksql; + +import org.apache.cassandra.spark.data.DataLayer; +import org.apache.cassandra.spark.data.S3CassandraDataLayer; +import org.apache.cassandra.spark.data.S3DataSourceClientConfig; +import org.apache.cassandra.spark.data.SSTableTokenIndex; + +import org.apache.spark.broadcast.Broadcast; +import org.apache.spark.sql.connector.catalog.SessionConfigSupport; +import org.apache.spark.sql.util.CaseInsensitiveStringMap; +import org.jetbrains.annotations.Nullable; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class S3CassandraDataSource extends CassandraTableProvider implements SessionConfigSupport +{ + private static final Logger LOGGER = LoggerFactory.getLogger(S3CassandraDataSource.class); + + /** + * Driver-local handle produced by {@link S3CassandraTokenIndexPrebuilder}. This is intentionally + * not a durable DataSource option: saved/replayed plans and remote client/server boundaries must + * rebuild the context in the JVM that plans the read. + */ + public static final String READ_CONTEXT_ID_KEY = "s3CassandraReadContextId"; + + @Override + public String shortName() + { + return "s3CassandraBulkRead"; Review Comment: S3 is in the public API, even though the interfaces (BackupReader/BackupReaderRegistry) are storage-neutral and backupReaderType already selects the backend. Combined with the s3-region / s3-bucket / s3-* option keys, callers of a non-S3 backend still type s3CassandraBulkRead and s3- options. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
