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 void logNoSuccessWarning(long now) { long lastUpdateNanos = now - noSuccessCheckDeadlineNanos + INTERVAL_NO_SUCCESS_WARNING_NANOS; long lastUpdated = TimeUnit.NANOSECONDS.toSeconds(lastUpdateNanos); LOG.warn( "No operations completed within the last %d seconds. " + "There are still %d operations in progress.", lastUpdated, count.get()); noSuccessWarningCount++; }
/** {@inheritDoc} */ @Override public void modifyNamespace(NamespaceDescriptor descriptor) throws IOException { if (provideWarningsForNamespaces()) { LOG.warn("modifyNamespace is a no-op"); } else { throw new UnsupportedOperationException("modifyNamespace"); // TODO } }
/** {@inheritDoc} */ @Override public void deleteNamespace(String name) throws IOException { if (provideWarningsForNamespaces()) { LOG.warn("deleteNamespace is a no-op"); } else { throw new UnsupportedOperationException("deleteNamespace"); // TODO } }
/** {@inheritDoc} */ @Override public NamespaceDescriptor getNamespaceDescriptor(String name) throws IOException { if (provideWarningsForNamespaces()) { LOG.warn("getNamespaceDescriptor is a no-op"); return null; } else { throw new UnsupportedOperationException("getNamespaceDescriptor"); // TODO } }
/** {@inheritDoc} */ @Override public HTableDescriptor[] listTableDescriptorsByNamespace(String name) throws IOException { if (provideWarningsForNamespaces()) { LOG.warn("listTableDescriptorsByNamespace is a no-op"); return new HTableDescriptor[0]; } else { throw new UnsupportedOperationException("listTableDescriptorsByNamespace"); // TODO } }
/** {@inheritDoc} */ @Override public TableName[] listTableNamesByNamespace(String name) throws IOException { if (provideWarningsForNamespaces()) { LOG.warn("listTableNamesByNamespace is a no-op"); return new TableName[0]; } else { throw new UnsupportedOperationException("listTableNamesByNamespace"); // TODO } }
/** {@inheritDoc} */ @Override public HTableDescriptor[] listTableDescriptorsByNamespace(String name) throws IOException { if (provideWarningsForNamespaces()) { LOG.warn("listTableDescriptorsByNamespace is a no-op"); return new HTableDescriptor[0]; } else { throw new UnsupportedOperationException("listTableDescriptorsByNamespace"); // TODO } }
/** {@inheritDoc} */ @Override public void createNamespace(NamespaceDescriptor descriptor) throws IOException { if (provideWarningsForNamespaces()) { LOG.warn("createNamespace is a no-op"); } else { throw new UnsupportedOperationException("createNamespace"); // TODO } }
/** {@inheritDoc} */ @Override public void modifyNamespace(NamespaceDescriptor descriptor) throws IOException { if (provideWarningsForNamespaces()) { LOG.warn("modifyNamespace is a no-op"); } else { throw new UnsupportedOperationException("modifyNamespace"); // TODO } }
/** {@inheritDoc} */ @Override public void deleteNamespace(String name) throws IOException { if (provideWarningsForNamespaces()) { LOG.warn("deleteNamespace is a no-op"); } else { throw new UnsupportedOperationException("deleteNamespace"); // TODO } }
/** {@inheritDoc} */ @Override public NamespaceDescriptor[] listNamespaceDescriptors() throws IOException { if (provideWarningsForNamespaces()) { LOG.warn("listNamespaceDescriptors is a no-op"); return new NamespaceDescriptor[0]; } else { throw new UnsupportedOperationException("listNamespaceDescriptors"); // TODO } }
/** {@inheritDoc} */ @Override public void createNamespace(NamespaceDescriptor descriptor) throws IOException { if (provideWarningsForNamespaces()) { LOG.warn("createNamespace is a no-op"); } else { throw new UnsupportedOperationException("createNamespace"); // TODO } }
/** {@inheritDoc} */ @Override public void snapshotAsync(SnapshotDescription snapshot) throws IOException, SnapshotCreationException { asyncAdmin.snapshot(snapshot); LOG.warn("isSnapshotFinished() is not currently supported by BigtableAdmin.\n" + "You may poll for existence of the snapshot with listSnapshots(snpashotName)"); }
/** {@inheritDoc} */ @Override public void createTableAsync(final HTableDescriptor desc, byte[][] splitKeys) throws IOException { LOG.warn("Creating the table synchronously"); createTableAsync(desc.getTableName(), TableAdapter.adapt(desc, splitKeys)); }
/** {@inheritDoc} */ @Override public void createTableAsync(final HTableDescriptor desc, byte[][] splitKeys) throws IOException { LOG.warn("Creating the table synchronously"); createTableAsync(desc.getTableName(), TableAdapter.adapt(desc, splitKeys)); }
/** {@inheritDoc} */ @Override public void enableTable(TableName tableName) throws IOException { TableName.isLegalFullyQualifiedTableName(tableName.getName()); if (!tableExists(tableName)) { throw new TableNotFoundException(tableName); } disabledTables.remove(tableName); LOG.warn("Table " + tableName + " was enabled in memory only."); }
/** {@inheritDoc} */ @Override public MasterProtos.SnapshotResponse takeSnapshotAsync( HBaseProtos.SnapshotDescription snapshot) throws IOException, SnapshotCreationException { snapshotTable(snapshot.getName(), TableName.valueOf(snapshot.getTable())); LOG.warn("isSnapshotFinished() is not currently supported by BigtableAdmin.\n" + "You may poll for existence of the snapshot with listSnapshots(snpashotName)"); return MasterProtos.SnapshotResponse.newBuilder() .setExpectedTimeout(TimeUnit.MINUTES.toMillis(5)).build(); }
/** {@inheritDoc} */ @Override public void disableTable(TableName tableName) throws IOException { TableName.isLegalFullyQualifiedTableName(tableName.getName()); if (!tableExists(tableName)) { throw new TableNotFoundException(tableName); } if (isTableDisabled(tableName)) { throw new TableNotEnabledException(tableName); } disabledTables.add(tableName); LOG.warn("Table " + tableName + " was disabled in memory only."); }
HeaderToken getHeader(long timeout, TimeUnit timeUnit) { try { return getHeaderUnsafe(timeout, timeUnit).getToken(); } catch (Exception e) { LOG.warn("Got an unexpected exception while trying to refresh google credentials.", e); Status status = Status.UNAUTHENTICATED .withDescription("Unexpected failure get auth token") .withCause(e); return new HeaderToken(status, null); } }