DumpGenerator generates a dump of a given set of entities, excluding redirects.
More...
DumpGenerator generates a dump of a given set of entities, excluding redirects.
- Copyright
- GPL-2.0-or-later
- Author
- Daniel Kinzler
◆ __construct()
Wikibase\Repo\Dumpers\DumpGenerator::__construct |
( |
|
$out, |
|
|
EntityPrefetcher |
$entityPrefetcher |
|
) |
| |
- Parameters
-
resource | $out | |
EntityPrefetcher | $entityPrefetcher | |
- Exceptions
-
◆ dumpEntities()
Wikibase\Repo\Dumpers\DumpGenerator::dumpEntities |
( |
array |
$entityIds, |
|
|
& |
$dumpCount |
|
) |
| |
|
private |
Dump list of entities.
- Parameters
-
EntityId[] | $entityIds | |
int | &$dumpCount | The number of entities already dumped (will be updated). |
◆ generateDump()
Wikibase\Repo\Dumpers\DumpGenerator::generateDump |
( |
EntityIdPager |
$idPager | ) |
|
Generates a dump, writing to the file handle provided to the constructor.
- Parameters
-
◆ generateDumpForEntityId()
Wikibase\Repo\Dumpers\DumpGenerator::generateDumpForEntityId |
( |
EntityId |
$entityId | ) |
|
|
abstractprotected |
◆ idMatchesFilters()
Wikibase\Repo\Dumpers\DumpGenerator::idMatchesFilters |
( |
EntityId |
$entityId | ) |
|
|
private |
◆ idMatchesShard()
Wikibase\Repo\Dumpers\DumpGenerator::idMatchesShard |
( |
EntityId |
$entityId | ) |
|
|
private |
◆ idMatchesType()
Wikibase\Repo\Dumpers\DumpGenerator::idMatchesType |
( |
EntityId |
$entityId | ) |
|
|
private |
◆ postDump()
Wikibase\Repo\Dumpers\DumpGenerator::postDump |
( |
| ) |
|
|
protected |
◆ postEntityDump()
Wikibase\Repo\Dumpers\DumpGenerator::postEntityDump |
( |
|
$dumpCount | ) |
|
|
protected |
Do something after dumping entity.
- Parameters
-
◆ preBatchDump()
Wikibase\Repo\Dumpers\DumpGenerator::preBatchDump |
( |
|
$entities | ) |
|
|
protected |
Do something before dumping a batch of entities.
- Parameters
-
◆ preDump()
Wikibase\Repo\Dumpers\DumpGenerator::preDump |
( |
| ) |
|
|
protected |
◆ preEntityDump()
Wikibase\Repo\Dumpers\DumpGenerator::preEntityDump |
( |
|
$dumpCount | ) |
|
|
protected |
◆ setBatchSize()
Wikibase\Repo\Dumpers\DumpGenerator::setBatchSize |
( |
|
$batchSize | ) |
|
Sets the batch size for processing.
The batch size is used as the limit when listing IDs via the EntityIdPager::getNextBatchOfIds() method, and also controls the interval of progress reports.
- Parameters
-
- Exceptions
-
◆ setEntityTypesFilter()
Wikibase\Repo\Dumpers\DumpGenerator::setEntityTypesFilter |
( |
|
$types | ) |
|
Set the entity types to be included in the output.
- Parameters
-
string[] | null | $types | The desired types (use null for any type). |
◆ setExceptionHandler()
Wikibase\Repo\Dumpers\DumpGenerator::setExceptionHandler |
( |
ExceptionHandler |
$exceptionHandler | ) |
|
◆ setLimit()
Wikibase\Repo\Dumpers\DumpGenerator::setLimit |
( |
|
$limit | ) |
|
Set maximum number of entities produced.
- Parameters
-
◆ setProgressReporter()
Wikibase\Repo\Dumpers\DumpGenerator::setProgressReporter |
( |
MessageReporter |
$progressReporter | ) |
|
◆ setShardingFilter()
Wikibase\Repo\Dumpers\DumpGenerator::setShardingFilter |
( |
|
$shardingFactor, |
|
|
|
$shard |
|
) |
| |
Set the sharding factor and desired shard.
For instance, to generate four dumps in parallel, use setShardingFilter( 4, 0 ) for the first dump, setShardingFilter( 4, 1 ) for the second dump, etc.
- Parameters
-
int | $shardingFactor | |
int | $shard | |
- Exceptions
-
◆ writeToDump()
Wikibase\Repo\Dumpers\DumpGenerator::writeToDump |
( |
|
$data | ) |
|
|
protected |
Writers the given string to the output provided to the constructor.
- Parameters
-
◆ $batchSize
Wikibase\Repo\Dumpers\DumpGenerator::$batchSize = 100 |
|
protected |
◆ $entityPrefetcher
Wikibase\Repo\Dumpers\DumpGenerator::$entityPrefetcher |
|
protected |
◆ $entityTypes
Wikibase\Repo\Dumpers\DumpGenerator::$entityTypes |
|
protected |
◆ $exceptionHandler
Wikibase\Repo\Dumpers\DumpGenerator::$exceptionHandler |
|
protected |
◆ $limit
Wikibase\Repo\Dumpers\DumpGenerator::$limit = 0 |
|
protected |
◆ $out
Wikibase\Repo\Dumpers\DumpGenerator::$out |
|
protected |
◆ $progressReporter
Wikibase\Repo\Dumpers\DumpGenerator::$progressReporter |
|
protected |
◆ $shard
Wikibase\Repo\Dumpers\DumpGenerator::$shard = 0 |
|
protected |
◆ $shardingFactor
Wikibase\Repo\Dumpers\DumpGenerator::$shardingFactor = 1 |
|
protected |
The documentation for this class was generated from the following file: