Skip to content

Commit

Permalink
chore: clean up classic wrapper for beta release (#3217)
Browse files Browse the repository at this point in the history
  • Loading branch information
mutianf authored Sep 17, 2021
1 parent 3e6a05f commit c589d38
Show file tree
Hide file tree
Showing 26 changed files with 12 additions and 2,069 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ class BigtableEnv extends SharedTestEnv {
"google.bigtable.instance.id",
"google.bigtable.use.bulk.api",
"google.bigtable.use.plaintext.negotiation",
"google.bigtable.snapshot.cluster.id",
"google.bigtable.use.gcj.client");
"google.bigtable.snapshot.cluster.id");

@Override
protected void setup() throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,13 +322,6 @@ public class BigtableOptionsFactory {
/** Allow namespace methods to be no-ops */
public static final String BIGTABLE_NAMESPACE_WARNING_KEY = "google.bigtable.namespace.warnings";

/**
* A flag to decide which implementation to use for data & admin operation.
*
* <p>This will be removed after the transition to java-bigtable.
*/
@BetaApi public static final String BIGTABLE_USE_GCJ_CLIENT = "google.bigtable.use.gcj.client";

/** Tracing cookie to send in the header with the requests */
@BetaApi("The API for setting tracing cookie is not yet stable and may change in the future")
public static final String BIGTABLE_TRACING_COOKIE = "google.bigtable.tracing.cookie.header";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
package com.google.cloud.bigtable.hbase.wrappers;

import com.google.api.core.InternalApi;
import com.google.cloud.bigtable.hbase.wrappers.classic.BigtableClassicApi;
import com.google.cloud.bigtable.hbase.wrappers.classic.BigtableHBaseClassicSettings;
import com.google.cloud.bigtable.hbase.wrappers.veneer.BigtableHBaseVeneerSettings;
import com.google.cloud.bigtable.hbase.wrappers.veneer.BigtableVeneerApi;
import java.io.IOException;
Expand All @@ -33,11 +31,7 @@ public abstract class BigtableApi implements AutoCloseable {
private final BigtableHBaseSettings hBaseSettings;

public static BigtableApi create(BigtableHBaseSettings settings) throws IOException {
if (settings instanceof BigtableHBaseVeneerSettings) {
return new BigtableVeneerApi((BigtableHBaseVeneerSettings) settings);
} else {
return new BigtableClassicApi((BigtableHBaseClassicSettings) settings);
}
return new BigtableVeneerApi((BigtableHBaseVeneerSettings) settings);
}

protected BigtableApi(BigtableHBaseSettings hbaseSettings) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,13 @@
*/
package com.google.cloud.bigtable.hbase.wrappers;

import static com.google.cloud.bigtable.hbase.BigtableOptionsFactory.BIGTABLE_USE_GCJ_CLIENT;
import static com.google.cloud.bigtable.hbase.BigtableOptionsFactory.INSTANCE_ID_KEY;
import static com.google.cloud.bigtable.hbase.BigtableOptionsFactory.PROJECT_ID_KEY;
import static com.google.common.base.Strings.isNullOrEmpty;

import com.google.api.core.InternalApi;
import com.google.cloud.bigtable.hbase.BigtableOptionsFactory;
import com.google.cloud.bigtable.hbase.util.Logger;
import com.google.cloud.bigtable.hbase.wrappers.classic.BigtableHBaseClassicSettings;
import com.google.cloud.bigtable.hbase.wrappers.veneer.BigtableHBaseVeneerSettings;
import com.google.common.base.Preconditions;
import java.io.IOException;
Expand All @@ -41,11 +39,7 @@ public abstract class BigtableHBaseSettings {
private final int ttlSecondsForBackup;

public static BigtableHBaseSettings create(Configuration configuration) throws IOException {
if (configuration.getBoolean(BIGTABLE_USE_GCJ_CLIENT, true)) {
return BigtableHBaseVeneerSettings.create(configuration);
} else {
return new BigtableHBaseClassicSettings(configuration);
}
return BigtableHBaseVeneerSettings.create(configuration);
}

public BigtableHBaseSettings(Configuration configuration) {
Expand Down

This file was deleted.

Loading

0 comments on commit c589d38

Please sign in to comment.