Skip to content
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

feat: add deprecated annotation and tag to bq storage alpha api #978

Merged
merged 4 commits into from
Apr 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@
* Converts a BQ table schema to protobuf descriptor. All field names will be converted to lowercase
* when constructing the protobuf descriptor. The mapping between field types and field modes are
* shown in the ImmutableMaps below.
*
* @deprecated Use {@link com.google.cloud.bigquery.storage.v1beta2.BQTableSchemaToProtoDescriptor}
*/
@Deprecated
public class BQTableSchemaToProtoDescriptor {
private static ImmutableMap<Table.TableFieldSchema.Mode, FieldDescriptorProto.Label>
BQTableSchemaModeMap =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@
*
* <p>{@link DirectWriter} will use the credentials set on the channel, which uses application
* default credentials through {@link GoogleCredentials#getApplicationDefault} by default.
*
* @deprecated no longer supported
*/
@Deprecated
public class DirectWriter {
private static final Logger LOG = Logger.getLogger(DirectWriter.class.getName());
private static WriterCache cache = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@
* functions, but also provides an additional feature: schema update support, where if the BigQuery
* table schema is updated, users will be able to ingest data on the new schema after some time (in
* order of minutes).
*
* @deprecated Use {@link com.google.cloud.bigquery.storage.v1alpha2.JsonStreamWriter}
*/
@Deprecated
public class JsonStreamWriter implements AutoCloseable {
private static String streamPatternString =
"projects/[^/]+/datasets/[^/]+/tables/[^/]+/streams/[^/]+";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@
/**
* Converts Json data to protocol buffer messages given the protocol buffer descriptor. The protobuf
* descriptor must have all fields lowercased.
*
* @deprecated Use {@link com.google.cloud.bigquery.storage.v1beta2.JsonToProtoMessage}
*/
@Deprecated
public class JsonToProtoMessage {
private static ImmutableMap<FieldDescriptor.Type, String> FieldTypeToDebugMessage =
new ImmutableMap.Builder<FieldDescriptor.Type, String>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@
* A cache of JsonStreamWriters that can be looked up by Table Name. The entries will expire after 5
* minutes if not used. Code sample: JsonWriterCache cache = JsonWriterCache.getInstance();
* JsonStreamWriter writer = cache.getWriter(); // Use... cache.returnWriter(writer);
*
* @deprecated No longer supported
*/
@Deprecated
public class JsonWriterCache {
private static final Logger LOG = Logger.getLogger(JsonWriterCache.class.getName());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
* A abstract class that implements the Runnable interface and provides access to the current
* StreamWriter and updatedSchema. This runnable will only be called when a updated schema has been
* passed back through the AppendRowsResponse. Users should only implement the run() function.
*
* @deprecated Use {@link com.google.cloud.bigquery.storage.v1beta2.OnSchemaUpdateRunnable}
*/
@Deprecated
public abstract class OnSchemaUpdateRunnable implements Runnable {
private StreamWriter streamWriter;
private Table.TableSchema updatedSchema;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
// A Converter class that turns a native protobuf::DescriptorProto to a self contained
// protobuf::DescriptorProto
// that can be reconstructed by the backend.
// @deprecated Use {@link com.google.cloud.bigquery.storage.v1beta2.ProtoSchemaConverter}
@Deprecated
public class ProtoSchemaConverter {
private static String getNameFromFullName(String fullName) {
return fullName.replace('.', '_');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@
*
* <p>The implementation as of now is not complete, which measn, if this check passed, there is
* still a possbility of writing will fail.
*
* @deprecated Use {@link com.google.cloud.bigquery.storage.v1beta2.SchemaCompatibility}
*/
@Deprecated
public class SchemaCompatibility {
private BigQuery bigquery;
private static SchemaCompatibility compat;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@
*
* <p>{@link StreamWriter} will use the credentials set on the channel, which uses application
* default credentials through {@link GoogleCredentials#getApplicationDefault} by default.
*
* @deprecated Use {@link com.google.cloud.bigquery.storage.v1alpha2.JsonStreamWriterV2}
*/
@Deprecated
public class StreamWriter implements AutoCloseable {
private static final Logger LOG = Logger.getLogger(StreamWriter.class.getName());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@
/**
* A barrier kind of object that helps keep track of pending actions and synchronously wait until
* all have completed.
*
* @deprecated No longer supported
*/
@Deprecated
class Waiter {
private static final Logger LOG = Logger.getLogger(Waiter.class.getName());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@
* A cache of StreamWriters that can be looked up by Table Name. The entries will expire after 5
* minutes if not used. Code sample: WriterCache cache = WriterCache.getInstance(); StreamWriter
* writer = cache.getWriter(); // Use... cache.returnWriter(writer);
*
* @deprecated No longer supported
*/
@Deprecated
public class WriterCache {
private static final Logger LOG = Logger.getLogger(WriterCache.class.getName());

Expand Down