Skip to content
Permalink
Browse files
Merge pull request #161 from apache/prepare-for-release
Minor updates before release
  • Loading branch information
davecromberge committed May 13, 2022
2 parents 6f8e814 + 847a322 commit a3e70bc75ee974b42b1ee837276c9cb02cd16b8f
Showing 63 changed files with 30 additions and 105 deletions.
10 NOTICE
@@ -1,12 +1,12 @@
Apache DataSketches Memory
Copyright 2022 - The Apache Software Foundation

Copyright 2021 - The Apache Software Foundation

Copyright 2015-2018 Yahoo
Copyright 2019 Verizon Media
Copyright 2015-2018 Yahoo Inc.
Copyright 2019-2020 Verizon Media
Copyright 2021 Yahoo Inc.

This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).

Prior to moving to ASF, the software for this project was developed at
Yahoo (now Verizon Media) (https://developer.yahoo.com).
Yahoo Inc. (https://developer.yahoo.com).
@@ -179,15 +179,15 @@ For example, if the project base directory is `/src/datasketches-memory`;

To run the script for a release version:

./tools/scripts/compile-package-jar.sh $JAVA_HOME 2.0.0 /src/datasketches-memory
./tools/scripts/compile-package-jar.sh $JAVA_HOME 2.1.0 /src/datasketches-memory

To run the script for a snapshot version:

./tools/scripts/compile-package-jar.sh $JAVA_HOME 2.1.0-SNAPSHOT /src/datasketches-memory
./tools/scripts/compile-package-jar.sh $JAVA_HOME 2.2.0-SNAPSHOT /src/datasketches-memory

To run the script for an RC version:

./tools/scripts/compile-package-jar.sh $JAVA_HOME 2.0.0-RC1 /src/datasketches-memory
./tools/scripts/compile-package-jar.sh $JAVA_HOME 2.1.0-RC1 /src/datasketches-memory

Note that the script does **not** use the _Git Version Tag_ to adjust the working copy to a remote tag - it is expected that the user has a pristine copy of the desired branch/tag available **before** using the script.

@@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
@SuppressWarnings("javadoc")
module org.apache.datasketches.memory {
requires java.base;
requires java.logging;
@@ -43,4 +43,4 @@ public interface Map extends AutoCloseable {
*/
boolean isLoaded();

}
}
@@ -47,4 +47,4 @@ public MemoryCleaner(final Object referent, final Runnable deallocator) {
public void clean() {
cleaner.clean();
}
}
}
@@ -38,7 +38,6 @@
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;

@SuppressWarnings({"javadoc", "unused"})
public class AllocateDirectMapMemoryTest {
private static final String LS = System.getProperty("line.separator");
MapHandle hand = null;
@@ -32,7 +32,6 @@
import org.testng.annotations.AfterClass;
import org.testng.annotations.Test;

@SuppressWarnings("javadoc")
public class AllocateDirectMemoryTest {

@Test
@@ -50,7 +50,6 @@
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;

@SuppressWarnings("javadoc")
public class AllocateDirectWritableMapMemoryTest {
private static final String LS = System.getProperty("line.separator");

@@ -154,7 +153,6 @@ public void checkNonNativeFile() throws Exception {
}
}

@SuppressWarnings("resource")
@Test(expectedExceptions = RuntimeException.class)
public void testMapException() throws IOException {
File dummy = createFile("dummy.txt", ""); //zero length
@@ -30,7 +30,6 @@
/**
* @author Lee Rhodes
*/
@SuppressWarnings("javadoc")
public class BaseBufferTest {

@Test
@@ -37,7 +37,6 @@
import org.apache.datasketches.memory.internal.Util;
import org.testng.annotations.Test;

@SuppressWarnings("javadoc")
public class BaseStateTest {

@Test
@@ -35,7 +35,6 @@
import org.apache.datasketches.memory.WritableMemory;
import org.testng.annotations.Test;

@SuppressWarnings("javadoc")
public class Buffer2Test {

@Test
@@ -22,7 +22,6 @@
import org.apache.datasketches.memory.WritableMemory;
import org.testng.annotations.Test;

@SuppressWarnings("javadoc")
public class BufferBoundaryCheckTest {

private final WritableMemory writableMemory = WritableMemory.allocate(8);
@@ -33,7 +33,6 @@
/**
* @author Lee Rhodes
*/
@SuppressWarnings("javadoc")
public class BufferInvariantsTest {

@Test
@@ -27,7 +27,6 @@
import org.apache.datasketches.memory.WritableMemory;
import org.testng.annotations.Test;

@SuppressWarnings("javadoc")
public class BufferReadWriteSafetyTest {

// Test various operations with read-only Buffer
@@ -33,7 +33,6 @@
import org.testng.annotations.Test;
import org.testng.collections.Lists;

@SuppressWarnings("javadoc")
public class BufferTest {

@Test
@@ -283,7 +282,6 @@ public void checkWRegions() {
@Test(expectedExceptions = AssertionError.class)
public void checkParentUseAfterFree() throws Exception {
int bytes = 64 * 8;
@SuppressWarnings("resource") //intentionally not using try-with-resources here
WritableHandle wh = WritableMemory.allocateDirect(bytes);
WritableMemory wmem = wh.getWritable();
WritableBuffer wbuf = wmem.asWritableBuffer();
@@ -293,7 +291,6 @@ public void checkParentUseAfterFree() throws Exception {
wbuf.getLong();
}

@SuppressWarnings("resource")
@Test(expectedExceptions = AssertionError.class)
public void checkRegionUseAfterFree() throws Exception {
int bytes = 64;
@@ -26,7 +26,6 @@
import org.apache.datasketches.memory.WritableMemory;
import org.testng.annotations.Test;

@SuppressWarnings("javadoc")
public class CommonBufferTest {

@Test
@@ -31,7 +31,6 @@
import org.apache.datasketches.memory.WritableMemory;
import org.testng.annotations.Test;

@SuppressWarnings("javadoc")
public class CommonMemoryTest {

@Test
@@ -29,7 +29,6 @@
/**
* @author Lee Rhodes
*/
@SuppressWarnings("javadoc")
public class CopyMemoryOverlapTest {

@Test
@@ -30,7 +30,6 @@
import org.testng.Assert;
import org.testng.annotations.Test;

@SuppressWarnings("javadoc")
public class CopyMemoryTest {

@Test
@@ -48,7 +48,6 @@
* @author Lee Rhodes
*
*/
@SuppressWarnings("javadoc")
public class DruidIssue11544Test {

@Test
@@ -33,14 +33,12 @@
* Examples of how to use the MemoryRequestServer with a memory hungry client.
* @author Lee Rhodes
*/
@SuppressWarnings("javadoc")
public class ExampleMemoryRequestServerTest {

/**
* This version is without a TWR block.all of the memory allocations are done through the MemoryRequestServer
* and each is closed by the MemoryClient when it is done with each.
*/
@SuppressWarnings("resource")
@Test
public void checkExampleMemoryRequestServer1() throws Exception {
int bytes = 8;
@@ -74,7 +72,6 @@ public void checkExampleMemoryRequestServer2() throws Exception {
}
}

@SuppressWarnings("resource")
@Test(expectedExceptions = IllegalArgumentException.class)
public void checkZeroCapacity() throws Exception {
ExampleMemoryRequestServer svr = new ExampleMemoryRequestServer();
@@ -131,7 +128,6 @@ void process() {
public static class ExampleMemoryRequestServer implements MemoryRequestServer {
IdentityHashMap<WritableMemory, WritableHandle> map = new IdentityHashMap<>();

@SuppressWarnings("resource")
@Override
public WritableMemory request(WritableMemory currentWMem, long capacityBytes) {
ByteOrder order = currentWMem.getTypeByteOrder();
@@ -141,7 +137,6 @@ public WritableMemory request(WritableMemory currentWMem, long capacityBytes) {
return wmem;
}

@SuppressWarnings("resource")
@Override
//here we actually release it, in reality it might be a lot more complex.
public void requestClose(WritableMemory memToRelease, WritableMemory newMemory) {
@@ -25,7 +25,6 @@
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;

@SuppressWarnings("javadoc")
public class IgnoredArrayOverflowTest {

private WritableHandle h;
@@ -42,7 +42,6 @@
/**
* @author Lee Rhodes
*/
@SuppressWarnings("javadoc")
public class LeafImplTest {
private static final ByteOrder NBO = ByteOrder.nativeOrder();
private static final ByteOrder NNBO = NON_NATIVE_BYTE_ORDER;
@@ -23,7 +23,6 @@
import org.apache.datasketches.memory.WritableMemory;
import org.testng.annotations.Test;

@SuppressWarnings("javadoc")
public class MemoryBoundaryCheckTest {

private final WritableBuffer writableBuffer = WritableMemory.allocate(8).asWritableBuffer();
@@ -27,7 +27,6 @@
import org.apache.datasketches.memory.internal.MemoryCleaner;
import org.testng.annotations.Test;

@SuppressWarnings("javadoc")
public class MemoryCleanerTest {

@Test
@@ -38,7 +37,6 @@ public void cleanerDeallocates() {
assertTrue(SimpleDeallocator.getHasRun());
}

@SuppressWarnings("unused")
@Test
public void noDeallocation() {
SimpleDeallocator deallocator = new SimpleDeallocator();
@@ -22,7 +22,6 @@
import org.apache.datasketches.memory.MemoryCloseException;
import org.testng.annotations.Test;

@SuppressWarnings("javadoc")
public class MemoryCloseExceptionTest {

@Test
@@ -30,7 +30,6 @@
import org.apache.datasketches.memory.WritableMemory;
import org.testng.annotations.Test;

@SuppressWarnings("javadoc")
public class MemoryReadWriteSafetyTest {

// Test various operations with read-only Memory
@@ -46,7 +46,6 @@
import org.testng.annotations.Test;
import org.testng.collections.Lists;

@SuppressWarnings("javadoc")
public class MemoryTest {
private static final String LS = System.getProperty("line.separator");

@@ -324,7 +323,6 @@ public void checkWRegionsReverseBO() {
@Test(expectedExceptions = AssertionError.class)
public void checkParentUseAfterFree() throws Exception {
int bytes = 64 * 8;
@SuppressWarnings("resource") //intentionally not using try-with-resouces here
WritableHandle wh = WritableMemory.allocateDirect(bytes);
WritableMemory wmem = wh.getWritable();
wh.close();
@@ -336,7 +334,6 @@ public void checkParentUseAfterFree() throws Exception {
@Test(expectedExceptions = AssertionError.class)
public void checkRegionUseAfterFree() throws Exception {
int bytes = 64;
@SuppressWarnings("resource") //intentionally not using try-with-resouces here
WritableHandle wh = WritableMemory.allocateDirect(bytes);
Memory wmem = wh.get();
Memory region = wmem.region(0L, bytes);
@@ -346,7 +343,6 @@ public void checkRegionUseAfterFree() throws Exception {
region.getByte(0);
}

@SuppressWarnings({ "resource"})
@Test
public void checkMonitorDirectStats() throws Exception {
int bytes = 1024;
@@ -369,7 +365,6 @@ public void checkMonitorDirectStats() throws Exception {
assertEquals(BaseState.getCurrentDirectMemoryAllocated(), 0L + curAllocated);
}

@SuppressWarnings({ "resource"})
@Test
public void checkMonitorDirectMapStats() throws Exception {
File file = getResourceFile("GettysburgAddress.txt");
@@ -33,7 +33,6 @@
import org.testng.Assert;
import org.testng.annotations.Test;

@SuppressWarnings("javadoc")
public class MemoryWriteToTest {

@Test
@@ -36,7 +36,6 @@
*
* @author Lee Rhodes
*/
@SuppressWarnings("javadoc")
public class MurmurHash3v2Test {

@Test
@@ -38,12 +38,10 @@
import org.testng.Assert;
import org.testng.annotations.Test;

@SuppressWarnings("javadoc")
public class NativeWritableBufferImplTest {

//Simple Native direct

@SuppressWarnings("resource")
@Test
public void checkNativeCapacityAndClose() throws Exception {
int memCapacity = 64;
@@ -37,12 +37,10 @@
import org.apache.datasketches.memory.WritableMemory;
import org.testng.annotations.Test;

@SuppressWarnings("javadoc")
public class NativeWritableMemoryImplTest {

//Simple Native direct

@SuppressWarnings("resource")
@Test
public void checkNativeCapacityAndClose() throws Exception {
int memCapacity = 64;
@@ -26,7 +26,6 @@
/**
* @author Lee Rhodes
*/
@SuppressWarnings("javadoc")
public class NioBitsTest {

@Test