Skip to content

Mostly spelling errors and documentation corrections. #587

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ private static int computeLogBufferSize(final int lgNomLongs, final long exactSi
* @param hash to be propagated
*/
private boolean propagateToSharedSketch(final long hash) {
//noinspection StatementWithEmptyBody
//no inspection StatementWithEmptyBody
while (localPropagationInProgress.get()) {
} //busy wait until previous propagation completed
localPropagationInProgress.set(true);
Expand All @@ -108,7 +108,7 @@ private boolean propagateToSharedSketch(final long hash) {
* Propagates the content of the buffer as a sketch to the shared sketch
*/
private void propagateToSharedSketch() {
//noinspection StatementWithEmptyBody
//no inspection StatementWithEmptyBody
while (localPropagationInProgress.get()) {
} //busy wait until previous propagation completed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ static long computeExactLimit(long k, double error) {
void endPropagation(AtomicBoolean localPropagationInProgress, boolean isEager);

/**
* Returns the value of the volatile theta manged by the shared sketch
* @return the value of the volatile theta manged by the shared sketch
* Returns the value of the volatile theta managed by the shared sketch
* @return the value of the volatile theta managed by the shared sketch
*/
long getVolatileTheta();

Expand Down Expand Up @@ -124,7 +124,7 @@ boolean propagate(final AtomicBoolean localPropagationInProgress, final Sketch s
//
//For the external user all of the below methods can be obtained by casting the shared
//sketch to UpdateSketch. However, these methods here also act as an alias so that an
//attempt to access these methods from the local buffer will be divered to the shared
//attempt to access these methods from the local buffer will be diverted to the shared
//sketch.

//From Sketch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,10 @@ UpdateReturnState hashUpdate(final long hash) {

memReqSvr_ = (memReqSvr_ == null) ? wmem_.getMemoryRequestServer() : memReqSvr_;

if (memReqSvr_ == null) { //in case the MRS is not enabled or null.
throw new SketchesArgumentException("Out of Memory, MemoryRequestServer is null, cannot expand.");
}

final WritableMemory newDstMem = memReqSvr_.request(wmem_,reqBytes);

moveAndResize(wmem_, preambleLongs, lgArrLongs, newDstMem, tgtLgArrLongs, thetaLong);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/apache/datasketches/theta/Rebuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ static final void quickSelectAndRebuild(final WritableMemory mem, final int prea
}

/**
* Moves me (the entire sketch) to a new larger Memory location and rebuilds the hash table.
* Moves me (the entire updatable sketch) to a new larger Memory location and rebuilds the hash table.
* This assumes a Memory preamble of standard form with the correct value of thetaLong.
* Afterwards, the caller must update the local Memory reference, lgArrLongs
* and hashTableThreshold from the dstMemory and free the source Memory.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ public static int getMaxAnotBResultBytes(final int nomEntries) {
* <p>Note: Only certain set operators during stateful operations can be serialized.
* Only when they are stored into Memory will this be relevant.</p>
*
* @param that A different non-null object
* @param that A different non-null and alive object
* @return true if the backing resource of <i>this</i> is the same as the backing resource
* of <i>that</i>.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public SetOperationBuilder() {
* Sets the Maximum Nominal Entries (max K) for this set operation. The effective value of K of the result of a
* Set Operation can be less than max K, but never greater.
* The minimum value is 16 and the maximum value is 67,108,864, which is 2^26.
* @param nomEntries <a href="{@docRoot}/resources/dictionary.html#nomEntries">Nominal Entres</a>
* @param nomEntries <a href="{@docRoot}/resources/dictionary.html#nomEntries">Nominal Entries</a>
* This will become the ceiling power of 2 if it is not a power of 2.
* @return this SetOperationBuilder
*/
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/apache/datasketches/theta/Sketch.java
Original file line number Diff line number Diff line change
Expand Up @@ -602,8 +602,8 @@ public static String toString(final Memory mem) {
abstract int getCurrentPreambleLongs();

/**
* Returns the Memory object if it exists, otherwise null.
* @return the Memory object if it exists, otherwise null.
* Returns the backing Memory object if it exists, otherwise null.
* @return the backing Memory object if it exists, otherwise null.
*/
abstract Memory getMemory();

Expand Down
Loading