diff --git a/doc/lab1design.txt b/doc/lab1design.txt new file mode 100644 index 0000000000000000000000000000000000000000..0f599d1972e830d80cd983b255fb60907d8f811e --- /dev/null +++ b/doc/lab1design.txt @@ -0,0 +1,85 @@ +CS122 Assignment 1 - NanoDB Set-Up and Storage Layer - Design Document +====================================================================== + +Fill in answers for all questions based on your team's work on Assignment 1. + +A: Deleting and Updating Tuples +-------------------------------- + +A1. Briefly describe (1-3 sentences) how you reclaim slot entries in the + slotted page. Which slot entries are you able to reclaim? Which + entries are unable to be reclaimed? + +A2. Briefly outline the steps of what your setNullColumnValue() function + does. You don't have to go into much detail; we can look at your + code for the details. Just describe the basic things the function + must do to set a column-value to NULL. + +A3. Similarly, briefly outline the steps of what your + setNonNullColumnValue() function does. + +B: Unpinning Tuples and Pages +------------------------------ + +B1. Briefly describe your strategy for determining when tuples need to be + unpinned. Make sure to comment on both plan-nodes and commands. + +B2. In general, you only need to worry about unpinning tuples because the + backing page will also be unpinned. However, there are some situations + when DBPages themselves must be unpinned directly. Describe any such + situations where you unpin pages directly in your implementation, and + why you do so. (Make sure to answer this question in the context of + your insert-optimization changes, not the initial state of the code.) + +C: NanoDB Storage Performance +------------------------------ + +C1. In 3-6 sentences, describe your general approach for improving the + performance of inserts, including what general file-level structuring + you use of blocks. + +C2. Does your file-level organization have the potential to increase the + number of large disk seeks when performing inserts? What steps do + you take, if any, to reduce the number of disk seeks? + +C3. The storage layer records a number of statistics, e.g. pagesRead, + pagesWritten, fileChanges, and fileDistanceTraveled. What changes in + these statistics did your team observe after changing the heap-file + implementation? Explain why you believe these to be improvements. + +C4. Describe your criteria for when a page is considered to be "full." + +C5. What steps must be taken during a tuple-delete operation to update + your file-level structures? How many pages must be written to? + +C6. What steps must be taken after a tuple-insert operation that fills + the data page? + +C7. An update operation has the potential to grow or shrink a page. How + does your code ensure that updates are handled properly? + +E: Feedback [OPTIONAL] +----------------------- + +WE NEED YOUR FEEDBACK! Thoughtful and constructive input will help us to +improve future versions of the course. These questions are OPTIONAL, and +your answers will not affect your grade in any way (including if you hate +everything about the assignment and databases in general, or Donnie and/or +the TAs in particular). Feel free to answer as many or as few of them as +you wish. + +E1. What parts of the assignment were most time-consuming? Why? + +E2. Did you find any parts of the assignment particularly instructive? + Correspondingly, did any parts feel like unnecessary busy-work? + +E3. Did you particularly enjoy any parts of the assignment? Were there + any parts that you particularly disliked? + +E4. Were there any critical details that you wish had been provided with the + assignment, that we should consider including in subsequent versions of + the assignment? + +E5. Do you have any other suggestions for how future versions of the + assignment can be improved? + diff --git a/doc/lab1info.txt b/doc/lab1info.txt new file mode 100644 index 0000000000000000000000000000000000000000..191747099f4ccc7f97bc17a4177f198299fe57cd --- /dev/null +++ b/doc/lab1info.txt @@ -0,0 +1,32 @@ +CS122 Assignment 1 - NanoDB Set-Up and Storage Layer - Logistics +================================================================ + +Please completely fill out this document so that we know who participated on +the assignment, any late extensions received, and how much time the assignment +took for your team. Thank you! + +L1. List your team name and the people who worked on this assignment. + + <team name> + + <name> + <name> + ... + +L2. Specify the commit-hash of the Git commit you are submitting for your + assignment. (You can list the hashes of your commits with the command + "git log".) + + Commit hash: <hash> + +L3. Specify how many late tokens you are applying to this assignment, if any. + Similarly, if your team received an extension from Donnie then please + indicate how many days extension you received. You may leave this blank + if it is not relevant to this submission. + + <tokens / extension> + +L4. For each teammate, briefly describe what parts of the assignment each + teammate focused on, along with the total hours spent on the assignment. + + diff --git a/pom.xml b/pom.xml index 2ea0a779c71433106c6eb4e6f51ba963bb5b7f12..00fb8b9f951df5ca5dda158268491817d358cae4 100644 --- a/pom.xml +++ b/pom.xml @@ -144,7 +144,7 @@ <suiteXmlFile>testng.xml</suiteXmlFile> </suiteXmlFiles> --> - <groups>framework,parser</groups> + <groups>framework,parser,hw1</groups> </configuration> </plugin> @@ -196,18 +196,37 @@ <goal>prepare-agent</goal> </goals> </execution> + <execution> <id>default-report</id> <goals> <goal>report</goal> </goals> </execution> + <execution> <id>default-check</id> <goals> <goal>check</goal> </goals> </execution> + + <!-- + Extra config to ensure we get a report after testing, + even if the site isn't generated. + --> + <execution> + <id>post-unit-test</id> + <phase>test</phase> + <goals> + <goal>report</goal> + </goals> + <configuration> + <!-- Sets the output directory for the code coverage report. --> + <outputDirectory>${project.build.directory}/coverage-reports</outputDirectory> + </configuration> + </execution> + </executions> </plugin> </plugins> diff --git a/src/test/java/edu/caltech/test/nanodb/storage/heapfile/TestHeapTableFormat.java b/src/test/java/edu/caltech/test/nanodb/storage/heapfile/TestHeapTableFormat.java index 2e3820936f7484dcd2284fd07a51e35d082d6603..d1e2ca34a608b8d89aa3d722044de75c1f58dbb5 100644 --- a/src/test/java/edu/caltech/test/nanodb/storage/heapfile/TestHeapTableFormat.java +++ b/src/test/java/edu/caltech/test/nanodb/storage/heapfile/TestHeapTableFormat.java @@ -15,7 +15,7 @@ import edu.caltech.test.nanodb.storage.TableFormatTestCase; * performing various SQL operations against it. It doesn't test the * implementation class directly. */ -@Test +@Test(groups={"hw1"}) public class TestHeapTableFormat extends TableFormatTestCase { /**