maedhroz commented on code in PR #2267:
URL: https://github.com/apache/cassandra/pull/2267#discussion_r1170677847


##########
src/java/org/apache/cassandra/io/tries/IncrementalTrieWriterSimple.java:
##########
@@ -0,0 +1,126 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cassandra.io.tries;
+
+import java.io.IOException;
+
+import org.apache.cassandra.io.util.DataOutputBuffer;
+import org.apache.cassandra.io.util.DataOutputPlus;
+
+/**
+ * Incremental builder of on-disk tries. Takes sorted input.
+ * <p>
+ * Incremental building is done by maintaining a stack of nodes in progress 
which follows the path to reach the last
+ * added entry. When a new entry is needed, comparison with the previous can 
tell us how much of the parents stack
+ * remains the same. The rest of the stack is complete as no new entry can 
affect them due to the input sorting.
+ * The completed nodes can be written to disk and discarded, keeping only a 
pointer to their location in the file
+ * (this pointer will be discarded too when the parent node is completed). 
This ensures that a very limited amount of
+ * data is kept in memory at all times.
+ * <p>
+ * Note: This class is currently unused and stands only as form of 
documentation for {@link IncrementalTrieWriterPageAware}.

Review Comment:
   It's used in `WalkerTest`...perhaps we could just move it to the `test` 
folder?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to