Class D_DiagnosticUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringdiag_conglomid(String db_name, long conglomid) Given a Database name and conglomid, return diagnositic string.static Stringdiag_conglomid_print(String db_name, long conglomid) Given a Database name and conglomid print out diagnostic info.static longdiag_conglomid_to_containerid(Object module, long conglomid) static longdiag_conglomid_to_containerid(String db_name, long conglomid) Given a Database name and containerid, return conglomerate id.static longdiag_containerid_to_conglomid(Object module, long containerid) static longdiag_containerid_to_conglomid(String db_name, long containerid) Given a Database name and conglomid, return container id.static voiddiag_dump_page(String db_name, long segmentid, long containerid, long pagenumber) Dump raw contents of a page.private static ObjectfindService(String factoryInterface, String serviceName) Privileged service lookup.private static ObjectfindServiceModule(Object serviceModule, String factoryInterface) Privileged startup.private static ObjectgetModuleFromDbName(String db_name) Given a database name come up with a module.private static ObjectgetServiceModule(Object serviceModule, String factoryInterface) Privileged module lookup.
-
Constructor Details
-
D_DiagnosticUtil
public D_DiagnosticUtil()No arg Constructor.
-
-
Method Details
-
getModuleFromDbName
Given a database name come up with a module.- Parameters:
db_name- name of the database.- Returns:
- The store module associated with given database name.
- Throws:
StandardException- Standard exception policy.
-
diag_conglomid_print
Given a Database name and conglomid print out diagnostic info.Print diagnostic information about a particular conglomerate, can be called for either a btree or heap conglomerate. This routine prints out the string to "System.out"; "ij", depending on it's configuration, will only print out a fixed length (default 128 bytes), so having ij print the string can be a problem.
Can be called from ij to find out info about conglomid 19 in database 'msgdb' by using the following syntax: maximumdisplaywidth 9000; CREATE FUNCTION D_CONGLOMID_PRINT(DBNAME VARCHAR(128), CONGLOMID INT) RETURNS VARCHAR(32000) RETURNS NULL ON NULL INPUT EXTERNAL NAME 'org.apache.derby.impl.store.raw.data.D_DiagnosticUtil.diag_conglomid_print' LANGUAGE JAVA PARAMETER STYLE JAVA; values D_CONGLOMID_PRINT('msgdb', 19); com.ibm.db2j.protocol.BasicServices.Diagnostic.T_Diagnosticable:: diag_conglomid_print('msgdb', 19); RESOLVE - An interface that takes a table name would be nice.
- Parameters:
db_name- name of the databaseconglomid- conglomerate id of the conglomerate to debug- Throws:
StandardException- Standard exception policy.
-
diag_conglomid
Given a Database name and conglomid, return diagnositic string.Return a string with diagnostic information about a particular conglomerate, can be called for any type of conglomerate (some types may not return any info though).
Can be called from ij to find out info about conglomid 19 in database 'msgdb' by using the following syntax: values com.ibm.db2j.protocol.BasicServices.Diagnostic.T_Diagnosticable:: diag_conglomid('msgdb', 19); maximumdisplaywidth 9000; CREATE FUNCTION DIAG_CONGLOMID(DBNAME VARCHAR(128), CONGLOMID INT) RETURNS VARCHAR(32000) RETURNS NULL ON NULL INPUT EXTERNAL NAME 'org.apache.derby.impl.store.raw.data.D_DiagnosticUtil.diag_conglomid' LANGUAGE JAVA PARAMETER STYLE JAVA; values DIAG_CONGLOMID('msgdb', 19); com.ibm.db2j.protocol.BasicServices.Diagnostic.T_Diagnosticable:: diag_conglomid_print('msgdb', 19); RESOLVE - An interface that takes a table name would be nice.
- Parameters:
db_name- name of the databaseconglomid- conglomerate id of the conglomerate to debug- Throws:
StandardException- Standard exception policy.
-
diag_dump_page
public static void diag_dump_page(String db_name, long segmentid, long containerid, long pagenumber) Dump raw contents of a page.A utility routine that can be called from an ij session that will dump the raw contents of a page, in the raw store dump format.
- Parameters:
db_name- name of the databasesegmentid- segmentid of the table (usually 0)containerid- containerid of the table (not conglomid)pagenumber- pagenumber of page to dump.
-
diag_containerid_to_conglomid
public static long diag_containerid_to_conglomid(String db_name, long containerid) throws StandardException Given a Database name and conglomid, return container id.Return the containerid of a given conglomerate id.
Can be called from ij to find out info about conglomid 19 in database 'msgdb' by using the following syntax: values com.ibm.db2j.protocol.BasicServices.Diagnostic.T_Diagnosticable). diag_containerid_to_conglomid('msgdb', 924300359390); RESOLVE - An interface that takes a table name would be nice.
- Parameters:
db_name- name of the databasecontainerid- container id of the conglomerate to look up- Throws:
StandardException- Standard exception policy.
-
diag_containerid_to_conglomid
-
diag_conglomid_to_containerid
public static long diag_conglomid_to_containerid(String db_name, long conglomid) throws StandardException Given a Database name and containerid, return conglomerate id.Return the conglomerate id of a given conainer id.
Can be called from ij to find out info about conglomid 19 in database 'msgdb' by using the following syntax: values com.ibm.db2j.protocol.BasicServices.Diagnostic.T_Diagnosticable). diag_conglomid_to_containerid('msgdb', 19); RESOLVE - An interface that takes a table name would be nice.
- Parameters:
db_name- name of the databaseconglomid- conglomerate id of the conglomerate to debug- Throws:
StandardException- Standard exception policy.
-
diag_conglomid_to_containerid
-
findServiceModule
private static Object findServiceModule(Object serviceModule, String factoryInterface) throws StandardException Privileged startup. Must be private so that user code can't call this entry point.- Throws:
StandardException
-
getServiceModule
-
findService
-