Refine search
private void markOperationComplete(Long operationSequenceId) { Long heapSize = pendingOperationsWithSize.remove(operationSequenceId); if (heapSize != null) { currentWriteBufferSize -= heapSize; } else { LOG.warn("An operation completed successfully but provided multiple completion notifications." + " Please notify Google that this occurred."); } }
private static String getHost(Configuration configuration, String key, String defaultVal, String type) { String hostName = configuration.get(key, defaultVal); LOG.debug("%s endpoint host %s.", type, hostName); return hostName; }
/** {@inheritDoc} */ @Override public CoprocessorRpcChannel coprocessorService(byte[] row) { LOG.error("Unsupported coprocessorService(byte[]) called."); throw new UnsupportedOperationException(); // TODO }
@Override public void run() { for (BigtableBufferedMutator bbm : ACTIVE_BUFFERED_MUTATORS.values()) { if (bbm.hasInflightRequests()) { int size = ACTIVE_BUFFERED_MUTATORS.size(); new Logger(AbstractBigtableConnection.class).warn( "Shutdown is commencing and you have open %d buffered mutators." + "You need to close() or flush() them so that is not lost", size); break; } } } };
/** {@inheritDoc} */ @Override public void majorCompactRegion(byte[] bytes) throws IOException { LOG.info("majorCompactRegion is a no-op"); }
/** {@inheritDoc} */ @Deprecated @Override public Object[] batch(List<? extends Row> actions) throws IOException, InterruptedException { LOG.trace("batch(List<>)"); try (Scope scope = TRACER.spanBuilder("BigtableTable.batch").startScopedSpan()) { addBatchSizeAnnotation(actions); return getBatchExecutor().batch(actions); } }
/** {@inheritDoc} */ @Override public Result get(Get get) throws IOException { LOG.trace("get(Get)"); try (Scope scope = TRACER.spanBuilder("BigtableTable.get").startScopedSpan()) { return convertToResult(getResults(get, "get")); } }
public BigtableAsyncConnection(Configuration conf, AsyncRegistry ignoredRegistry, String ignoredClusterId, User ignoredUser) throws IOException { LOG.debug("Creating BigtableAsyncConnection"); this.conf = conf; BigtableOptions opts; try { opts = BigtableOptionsFactory.fromConfiguration(conf); } catch (IOException ioe) { LOG.error("Error loading BigtableOptions from Configuration.", ioe); throw ioe; } this.closed = false; this.session = new BigtableSession(opts); this.options = this.session.getOptions(); }
/** {@inheritDoc} */ @Override public ResultScanner getScanner(byte[] family) throws IOException { LOG.trace("getScanner(byte[])"); return getScanner(new Scan().addFamily(family)); }
if (configuration.getBoolean( BIGTABLE_USE_SERVICE_ACCOUNTS_KEY, BIGTABLE_USE_SERVICE_ACCOUNTS_DEFAULT)) { LOG.debug("Using service accounts"); } else if (configuration.get(BIGTABLE_SERVICE_ACCOUNT_JSON_VALUE_KEY) != null) { String jsonValue = configuration.get(BIGTABLE_SERVICE_ACCOUNT_JSON_VALUE_KEY); LOG.debug("Using json value"); builder.setCredentialOptions( CredentialOptions.jsonCredentials(jsonValue)); String keyFileLocation = configuration.get(BIGTABLE_SERVICE_ACCOUNT_JSON_KEYFILE_LOCATION_KEY); LOG.debug("Using json keyfile: %s", keyFileLocation); builder.setCredentialOptions( CredentialOptions.jsonCredentials( } else if (configuration.get(BIGTABLE_SERVICE_ACCOUNT_EMAIL_KEY) != null) { String serviceAccount = configuration.get(BIGTABLE_SERVICE_ACCOUNT_EMAIL_KEY); LOG.debug("Service account %s specified.", serviceAccount); String keyFileLocation = configuration.get(BIGTABLE_SERVICE_ACCOUNT_P12_KEYFILE_LOCATION_KEY); Preconditions.checkState(!isNullOrEmpty(keyFileLocation), "Key file location must be specified when setting service account email"); LOG.debug("Using p12 keyfile: %s", keyFileLocation); builder.setCredentialOptions( CredentialOptions.p12Credential(serviceAccount, keyFileLocation)); } else { LOG.debug("Using default credentials."); builder.setCredentialOptions(
/** {@inheritDoc} */ @Override public void delete(List<Delete> deletes) throws IOException { LOG.trace("delete(List<Delete>)"); try (Scope scope = TRACER.spanBuilder("BigtableTable.delete").startScopedSpan()) { getBatchExecutor().batch(deletes); } }
private IOException logAndCreateIOException(String type, byte[] row, Throwable t) { LOG.error("Encountered exception when executing " + type + ".", t); return new DoNotRetryIOException( makeGenericExceptionMessage( type, options.getProjectId(), tableName.getQualifierAsString(), row), t); }
/** {@inheritDoc} */ @Override public long incrementColumnValue(byte[] row, byte[] family, byte[] qualifier, long amount, Durability durability) throws IOException { LOG.trace("incrementColumnValue(byte[], byte[], byte[], long, Durability)"); return incrementColumnValue(row, family, qualifier, amount); }
/** {@inheritDoc} */ @Override public void majorCompactRegion(byte[] bytes, byte[] bytes2) throws IOException { LOG.info("majorCompactRegion is a no-op"); }
/** {@inheritDoc} */ @Deprecated @Override public Object[] batch(List<? extends Row> actions) throws IOException, InterruptedException { LOG.trace("batch(List<>)"); try (Scope scope = TRACER.spanBuilder("BigtableTable.batch").startScopedSpan()) { addBatchSizeAnnotation(actions); return getBatchExecutor().batch(actions); } }
/** {@inheritDoc} */ @Override public Result get(Get get) throws IOException { LOG.trace("get(Get)"); try (Scope scope = TRACER.spanBuilder("BigtableTable.get").startScopedSpan()) { return convertToResult(getResults(get, "get")); } }
@Override public void run() { for (BigtableBufferedMutator bbm : ACTIVE_BUFFERED_MUTATORS.values()) { if (bbm.hasInflightRequests()) { int size = ACTIVE_BUFFERED_MUTATORS.size(); new Logger(AbstractBigtableConnection.class).warn( "Shutdown is commencing and you have open %d buffered mutators." + "You need to close() or flush() them so that is not lost", size); break; } } } };