Java Doc for CleanerTest.java in  » JMX » je » com » sleepycat » je » cleaner » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » JMX » je » com.sleepycat.je.cleaner 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.sleepycat.je.cleaner.CleanerTest

CleanerTest
public class CleanerTest extends TestCase (Code)


Field Summary
protected  Databasedb
    
protected  FileenvHome
    

Constructor Summary
public  CleanerTest()
    

Method Summary
public  voidsetUp()
    
public  voidtearDown()
    
public  voidtestCleanFileHole()
     See if we can clean in the middle of the file set.
public  voidtestCleanInternalNodes()
     Ensure that INs are cleaned.
public  voidtestCleanerNoDupes()
    
public  voidtestCleanerStop()
     Tests that setting je.env.runCleaner=false stops the cleaner from processing more files even if the target minUtilization is not met [#15158].
public  voidtestCleanerWithDupes()
    
public  voidtestFileSummaryLNMemoryUsage()
     Tests that memory is budgeted correctly for FileSummaryLNs that are inserted and deleted after calling setTrackedSummary.
public  voidtestMutableConfig()
     Tests that cleaner mutable configuration parameters can be changed and that the changes actually take effect.
public  voidtestSR13191()
     Test for SR13191.
public  voidtestTrackerMemoryBudget()
     Checks that the memory budget is updated properly by the UtilizationTracker.
public  voidtestUnexpectedFileDeletion()
     Tests that when a file being cleaned is deleted, we ignore the error and don't repeatedly try to clean it.

Field Detail
db
protected Database db(Code)



envHome
protected File envHome(Code)




Constructor Detail
CleanerTest
public CleanerTest()(Code)




Method Detail
setUp
public void setUp() throws IOException, DatabaseException(Code)



tearDown
public void tearDown() throws IOException, DatabaseException(Code)



testCleanFileHole
public void testCleanFileHole() throws Throwable(Code)
See if we can clean in the middle of the file set.



testCleanInternalNodes
public void testCleanInternalNodes() throws DatabaseException(Code)
Ensure that INs are cleaned.



testCleanerNoDupes
public void testCleanerNoDupes() throws Throwable(Code)



testCleanerStop
public void testCleanerStop() throws Throwable(Code)
Tests that setting je.env.runCleaner=false stops the cleaner from processing more files even if the target minUtilization is not met [#15158].



testCleanerWithDupes
public void testCleanerWithDupes() throws Throwable(Code)



testFileSummaryLNMemoryUsage
public void testFileSummaryLNMemoryUsage() throws DatabaseException(Code)
Tests that memory is budgeted correctly for FileSummaryLNs that are inserted and deleted after calling setTrackedSummary. The size of the FileSummaryLN changes during logging when setTrackedSummary is called, and this is accounted for specially in Tree.logLNAfterInsert. [#15831]



testMutableConfig
public void testMutableConfig() throws DatabaseException(Code)
Tests that cleaner mutable configuration parameters can be changed and that the changes actually take effect.



testSR13191
public void testSR13191() throws Throwable(Code)
Test for SR13191. This SR shows a problem where a MapLN is initialized with a DatabaseImpl that has a null EnvironmentImpl. When the Database gets used, a NullPointerException occurs in the Cursor code which expects there to be an EnvironmentImpl present. The MapLN gets init'd by the Cleaner reading through a log file and encountering a MapLN which is not presently in the DbTree. As an efficiency, the Cleaner calls updateEntry on the BIN to try to insert the MapLN into the BIN so that it won't have to fetch it when it migrates the BIN. But this is bad since the MapLN has not been init'd properly. The fix was to ensure that the MapLN is init'd correctly by calling postFetchInit on it just prior to inserting it into the BIN. This test first creates an environment and two databases. The first database it just adds to the tree with no data. This will be the MapLN that eventually gets instantiated by the cleaner. The second database is used just to create a bunch of data that will get deleted so as to create a low utilization for one of the log files. Once the data for db2 is created, the log is flipped (so file 0 is the one with the MapLN for db1 in it), and the environment is closed and reopened. We insert more data into db2 until we have enough .jdb files that file 0 is attractive to the cleaner. Call the cleaner to have it instantiate the MapLN and then use the MapLN in a Database.get() call.



testTrackerMemoryBudget
public void testTrackerMemoryBudget() throws DatabaseException(Code)
Checks that the memory budget is updated properly by the UtilizationTracker. Prior to a bug fix [#15505] amounts were added to the budget but not subtracted when two TrackedFileSummary objects were merged. Merging occurs when a local tracker is added to the global tracker. Local trackers are used during recovery, checkpoints, lazy compression, and reverse splits.



testUnexpectedFileDeletion
public void testUnexpectedFileDeletion() throws DatabaseException, IOException(Code)
Tests that when a file being cleaned is deleted, we ignore the error and don't repeatedly try to clean it. This is happening when we mistakedly clean a file after it has been queued for deletion. The workaround is to catch LogFileNotFoundException in the cleaner and ignore the error. We're testing the workaround here by forcing cleaning of deleted files. [#15528]



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.