Top Description Inners Constructors Methods
org.hsqldb.index

public Class IndexAVLCheck

extends Object
Class Inheritance
Imports
org.hsqldb.HsqlException, .Row, .Session, .Table, .TableBase, org.hsqldb.lib.HsqlArrayList, .IntKeyHashMap, .OrderedLongHashSet, org.hsqldb.map.BitMap, org.hsqldb.persist.DataFileCache, .PersistentStore, .RowStoreAVL, org.hsqldb.result.Result, org.hsqldb.rowio.RowInputBinary

Checks indexes for inconsistencies
Author
Fred Toussi (fredt@users dot sourceforge.net)
Since
2.5.1
Version
2.7.3

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static Result
checkAllTables(Session session, int type)

public static Result
checkTable(Session session, Table table, int type)

public static void
checkTable(Session session, Table table, Result result, int type)

public static void
reindexTable(Session session, Table table, PersistentStore store, IndexStats[] indexStats)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

IndexAVLCheckback to summary
public IndexAVLCheck()

Method Detail

checkAllTablesback to summary
public static Result checkAllTables(Session session, int type)
checkTableback to summary
public static Result checkTable(Session session, Table table, int type)
checkTableback to summary
public static void checkTable(Session session, Table table, Result result, int type)
reindexTableback to summary
public static void reindexTable(Session session, Table table, PersistentStore store, IndexStats[] indexStats)
org.hsqldb.index back to summary

public Class IndexAVLCheck.IndexAVLProbe

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv OrderedLongHashSet
pack-priv IntKeyHashMap<BitMap>
pack-priv IntKeyHashMap<BitMap>
pack-priv int
pack-priv final int
pack-priv long
pack-priv final int
pack-priv OrderedLongHashSet
pack-priv final IndexAVL
pack-priv int
pack-priv long
pack-priv OrderedLongHashSet
pack-priv static final int
pack-priv boolean
pack-priv final NodeAVLDisk
pack-priv long
pack-priv final Session
pack-priv final PersistentStore
pack-priv HsqlArrayList<String>

Constructor Summary

AccessConstructor and Description
public
IndexAVLProbe(Session session, PersistentStore store, IndexAVL index, NodeAVL rootNode)

Uses one arraylist for the nodes near the root and another array list for leaves.

Method Summary

Modifier and TypeMethod and Description
public void
pack-priv int
public OrderedLongHashSet
pack-priv BitMap
getBitMap(int blockIndex)

public IntKeyHashMap<BitMap>
public TableBase
public long
private void
getNodesFrom(int depth, NodeAVLDisk node, boolean include)

goes to maxDepth include is false to exclude a node that has readable index pointers but unreadable data

pack-priv BitMap
getPosSet(int blockIndex)

public IndexStats
public boolean
public void
pack-priv boolean
recordRowPos(long position)

pack-priv boolean
setSpaceForRow(Row object)

returns false if a node appears more than once in the index

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

badRowsback to summary
pack-priv OrderedLongHashSet badRows
bitMapsback to summary
pack-priv IntKeyHashMap<BitMap> bitMaps
bitMapsPosback to summary
pack-priv IntKeyHashMap<BitMap> bitMapsPos
branchPositionback to summary
pack-priv int branchPosition
cacheScaleback to summary
pack-priv final int cacheScale
errorRowCountback to summary
pack-priv long errorRowCount
fileBlockItemCountback to summary
pack-priv final int fileBlockItemCount
ignoreRowsback to summary
pack-priv OrderedLongHashSet ignoreRows
indexback to summary
pack-priv final IndexAVL index
leafPositionback to summary
pack-priv int leafPosition
loopCountback to summary
pack-priv long loopCount
loopedRowsback to summary
pack-priv OrderedLongHashSet loopedRows
maxDepthback to summary
pack-priv static final int maxDepth
printErrorsback to summary
pack-priv boolean printErrors
rootNodeback to summary
pack-priv final NodeAVLDisk rootNode
rowCountback to summary
pack-priv long rowCount
sessionback to summary
pack-priv final Session session
storeback to summary
pack-priv final PersistentStore store
unorderedRowsback to summary
pack-priv HsqlArrayList<String> unorderedRows

Constructor Detail

IndexAVLProbeback to summary
public IndexAVLProbe(Session session, PersistentStore store, IndexAVL index, NodeAVL rootNode)

Uses one arraylist for the nodes near the root and another array list for leaves. Returns nodes to depth of 32

Method Detail

checkIndexOrderback to summary
public void checkIndexOrder()
checkNodesback to summary
pack-priv int checkNodes(NodeAVL p, HsqlArrayList<String> list)
getBadRowPosListback to summary
public OrderedLongHashSet getBadRowPosList()
getBitMapback to summary
pack-priv BitMap getBitMap(int blockIndex)
getBitMapsback to summary
public IntKeyHashMap<BitMap> getBitMaps()
getCurrentTableback to summary
public TableBase getCurrentTable()
getErrorCountback to summary
public long getErrorCount()
getNodesFromback to summary
private void getNodesFrom(int depth, NodeAVLDisk node, boolean include)

goes to maxDepth include is false to exclude a node that has readable index pointers but unreadable data

getPosSetback to summary
pack-priv BitMap getPosSet(int blockIndex)
getStatsback to summary
public IndexStats getStats()
hasErrorsback to summary
public boolean hasErrors()
probeback to summary
public void probe()
recordRowPosback to summary
pack-priv boolean recordRowPos(long position)
setSpaceForRowback to summary
pack-priv boolean setSpaceForRow(Row object)

returns false if a node appears more than once in the index