Skip to content
Permalink
Browse files
feat: add deprecated annotation and tag to bq storage alpha api (#978)
* feat: add deprecated annotation and tag to bq storage alpha api

* .

* lint;

* .
  • Loading branch information
yirutang committed Apr 5, 2021
1 parent 235ce1d commit c7da34252ee8c243be3ce737d03e1e12f10a5eba
@@ -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 =
@@ -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;
@@ -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/[^/]+";
@@ -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>()
@@ -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());

@@ -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;
@@ -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('.', '_');
@@ -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;
@@ -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());

@@ -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());

@@ -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());

0 comments on commit c7da342

Please sign in to comment.