@InterfaceAudience.Private @InterfaceStability.Unstable public class PurgeS3GuardDynamoTable extends AbstractS3GuardDynamoDBDiagnostic
hadoop org.apache.hadoop.fs.s3a.s3guard.PurgeS3GuardDynamoTable \ -force s3a://example-bucket/
| Modifier and Type | Field and Description |
|---|---|
static String |
FORCE
Name of the force option.
|
static String |
NAME |
| Constructor and Description |
|---|
PurgeS3GuardDynamoTable() |
PurgeS3GuardDynamoTable(S3AFileSystem filesystem,
DynamoDBMetadataStore store,
URI uri,
boolean force) |
PurgeS3GuardDynamoTable(String name) |
| Modifier and Type | Method and Description |
|---|---|
int |
execute()
Extract the host from the FS URI, then scan and
delete all entries from that bucket.
|
static void |
main(String[] args)
This is the Main entry point for the service launcher.
|
static org.apache.commons.lang3.tuple.Pair<Long,Long> |
purgeStore(S3AFileSystem fs,
DynamoDBMetadataStore store,
org.apache.hadoop.conf.Configuration conf,
URI uri,
boolean force)
API Entry point to dump the metastore and S3 store world views
|
protected void |
serviceStart()
Bind to the argument list, including validating the CLI.
|
bindArgs, bindFromCLI, failure, failure, getArgumentList, getArguments, getFilesystem, getStore, getUri, require, setUri, setUriclose, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, serviceInit, serviceStop, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStoppublic static final String NAME
public static final String FORCE
public PurgeS3GuardDynamoTable(String name)
public PurgeS3GuardDynamoTable()
public PurgeS3GuardDynamoTable(S3AFileSystem filesystem, DynamoDBMetadataStore store, URI uri, boolean force)
protected void serviceStart()
throws Exception
serviceStart in class org.apache.hadoop.service.AbstractServiceException - failure.public int execute()
throws org.apache.hadoop.service.launcher.ServiceLaunchException,
IOException
execute in interface org.apache.hadoop.service.launcher.LaunchableServiceexecute in class org.apache.hadoop.service.launcher.AbstractLaunchableServiceorg.apache.hadoop.service.launcher.ServiceLaunchException - on failure.IOException - IO failure.public static void main(String[] args)
args - command line arguments.@InterfaceAudience.Private @InterfaceStability.Unstable public static org.apache.commons.lang3.tuple.Pair<Long,Long> purgeStore(@Nullable S3AFileSystem fs, @Nullable DynamoDBMetadataStore store, @Nullable org.apache.hadoop.conf.Configuration conf, @Nullable URI uri, boolean force) throws org.apache.hadoop.util.ExitUtil.ExitException
Both the FS and the store will be dumped: the store is scanned before and after the sequence to show what changes were made to the store during the list operation.
fs - fs to dump. If null a store must be provided.store - store to dump (fallback to FS)conf - configuration to use (fallback to fs)uri - URI of store -only needed if FS is null.force - force the actual deleteExitUtil.ExitException - failure.Copyright © 2008–2022 Apache Software Foundation. All rights reserved.