MediaWiki 1.42.1
|
Readahead helper for making large MediaWiki data dumps; reads in a previous XML dump to sequentially prefetch text records already normalized and decompressed. More...
Public Member Functions | |
__construct ( $infile) | |
close () | |
prefetch ( $page, $rev, $slot=SlotRecord::MAIN) | |
Attempts to fetch the text of a particular page revision from the dump stream. | |
Protected Member Functions | |
debug ( $str) | |
Protected Attributes | |
bool | $atEnd = false |
bool | $atPageEnd = false |
string[] null | $infiles = null |
int | $lastPage = 0 |
int | $lastRev = 0 |
XMLReader null | $reader = null |
Readahead helper for making large MediaWiki data dumps; reads in a previous XML dump to sequentially prefetch text records already normalized and decompressed.
This can save load on the external database servers, hopefully.
Assumes that dumps will be recorded in the canonical order:
Definition at line 44 of file BaseDump.php.
BaseDump::__construct | ( | $infile | ) |
BaseDump::close | ( | ) |
Definition at line 234 of file BaseDump.php.
|
protected |
string | $str |
Definition at line 126 of file BaseDump.php.
References wfDebug().
Referenced by __construct(), and prefetch().
BaseDump::prefetch | ( | $page, | |
$rev, | |||
$slot = SlotRecord::MAIN ) |
Attempts to fetch the text of a particular page revision from the dump stream.
May return null if the page is unavailable.
int | $page | ID number of page to read |
int | $rev | ID number of revision to read |
string | $slot | Role name of the slot to read |
Definition at line 81 of file BaseDump.php.
References debug().
|
protected |
Definition at line 48 of file BaseDump.php.
|
protected |
Definition at line 50 of file BaseDump.php.
|
protected |
Definition at line 56 of file BaseDump.php.
|
protected |
Definition at line 52 of file BaseDump.php.
|
protected |
Definition at line 54 of file BaseDump.php.
|
protected |
Definition at line 46 of file BaseDump.php.