@InterfaceAudience.Private @InterfaceStability.Unstable public class DumpS3GuardDynamoTable extends AbstractS3GuardDynamoDBDiagnostic
| Modifier and Type | Field and Description |
|---|---|
static String |
FLAT_CSV
Suffix for the flat list: "-flat.csv".
|
static String |
NAME
Application name.
|
static String |
RAW_CSV
Suffix for the raw S3 dump: "-s3.csv".
|
static String |
SCAN_CSV
Suffix for the DDB scan: "-scan.csv".
|
static String |
SCAN2_CSV
Suffix for the second DDB scan: : "-scan-2.csv".
|
static String |
STORE_CSV
Suffix for a recursive treewalk through the metastore: "-store.csv".
|
static String |
TREE_CSV
Suffix for the treewalk scan of the S3A Filesystem: "-tree.csv".
|
| Constructor and Description |
|---|
DumpS3GuardDynamoTable()
Instantiate with default name.
|
DumpS3GuardDynamoTable(S3AFileSystem fs,
DynamoDBMetadataStore store,
File destFile,
URI uri)
Bind to a specific FS + store.
|
DumpS3GuardDynamoTable(String name)
Instantiate.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
dumpMetastore(org.apache.hadoop.fs.s3a.s3guard.DumpS3GuardDynamoTable.CsvFile csv,
org.apache.hadoop.fs.Path basePath)
list children under the metastore from a base path, through
a recursive query + walk strategy.
|
protected long |
dumpRawS3ObjectStore(org.apache.hadoop.fs.s3a.s3guard.DumpS3GuardDynamoTable.CsvFile csv)
Dump the raw S3 Object Store.
|
static DumpS3GuardDynamoTable |
dumpStore(S3AFileSystem fs,
DynamoDBMetadataStore store,
org.apache.hadoop.conf.Configuration conf,
File destFile,
URI uri)
Entry point to dump the metastore and s3 store world views
|
int |
execute()
Dump the filesystem and the metastore.
|
long |
getListStatusCount() |
long |
getRawObjectStoreCount() |
org.apache.commons.lang3.tuple.Pair<Long,Long> |
getScanEntryResult() |
org.apache.commons.lang3.tuple.Pair<Long,Long> |
getSecondScanResult() |
long |
getTreewalkCount() |
protected long |
listStatusFilesystem(org.apache.hadoop.fs.s3a.s3guard.DumpS3GuardDynamoTable.CsvFile csv,
org.apache.hadoop.fs.Path path)
Dump the filesystem via a recursive listStatus call.
|
static void |
main(String[] args)
This is the JVM entry point for the service launcher.
|
protected void |
serviceStart()
Bind to the argument list, including validating the CLI.
|
protected long |
treewalkFilesystem(org.apache.hadoop.fs.s3a.s3guard.DumpS3GuardDynamoTable.CsvFile csv,
org.apache.hadoop.fs.Path base)
Dump the filesystem via a treewalk.
|
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 FLAT_CSV
public static final String RAW_CSV
public static final String SCAN_CSV
public static final String SCAN2_CSV
public static final String TREE_CSV
public static final String STORE_CSV
public DumpS3GuardDynamoTable(String name)
name - application name.public DumpS3GuardDynamoTable()
public DumpS3GuardDynamoTable(S3AFileSystem fs, DynamoDBMetadataStore store, File destFile, URI uri)
fs - filesystemstore - metastore to usedestFile - the base filename for outputuri - URI of store -only needed if FS is null.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.protected long treewalkFilesystem(org.apache.hadoop.fs.s3a.s3guard.DumpS3GuardDynamoTable.CsvFile csv,
org.apache.hadoop.fs.Path base)
throws IOException
csv - destination.base - base path.IOException - IO failure.protected long listStatusFilesystem(org.apache.hadoop.fs.s3a.s3guard.DumpS3GuardDynamoTable.CsvFile csv,
org.apache.hadoop.fs.Path path)
throws IOException
csv - destination.IOException - IO failure.protected long dumpRawS3ObjectStore(org.apache.hadoop.fs.s3a.s3guard.DumpS3GuardDynamoTable.CsvFile csv)
throws IOException
csv - destination.IOException - IO failure.protected void dumpMetastore(org.apache.hadoop.fs.s3a.s3guard.DumpS3GuardDynamoTable.CsvFile csv,
org.apache.hadoop.fs.Path basePath)
throws IOException
csv - destbasePath - base pathIOException - failure.public long getRawObjectStoreCount()
public long getListStatusCount()
public long getTreewalkCount()
public static void main(String[] args)
serviceMain(List, AbstractS3GuardDynamoDBDiagnostic).args - command line arguments.public static DumpS3GuardDynamoTable dumpStore(@Nullable S3AFileSystem fs, @Nullable DynamoDBMetadataStore store, @Nullable org.apache.hadoop.conf.Configuration conf, File destFile, @Nullable URI uri) 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)destFile - base name of the output files.uri - URI of store -only needed if FS is null.ExitUtil.ExitException - failure.Copyright © 2008–2022 Apache Software Foundation. All rights reserved.