Comments (3)
The entry size should be a power of two regardless of what you give it. The
count will be a multiple of the number of segments. There should be checks
to enforce this but they might be broken.
On 29 Jan 2014 04:12, "sampath06" [email protected] wrote:
Modifying the existing testcase in HugeHashMapTest giving different values
of count makes it fail.Sample code given below:
@Test public void testPut() throws ExecutionException, InterruptedException { int count = 50; HugeConfig config = HugeConfig.DEFAULT.clone() .setSegments(128) .setSmallEntrySize(72) // TODO 64 corrupts the values !! .setCapacity(count); final HugeHashMap<CharSequence, SampleValues> map = new HugeHashMap<CharSequence, SampleValues>( config, CharSequence.class, SampleValues.class); long start = System.nanoTime(); final SampleValues value = new SampleValues(); StringBuilder user = new StringBuilder(); for (int i = 0; i < count; i++) { value.ee = i; value.gg = i; value.ii = i; map.put(users(user, i), value); } for (int i = 0; i < count; i++) { assertNotNull(map.get(users(user, i), value)); assertEquals(i, value.ee); assertEquals(i, value.gg, 0.0); assertEquals(i, value.ii); } long time = System.nanoTime() - start; System.out.printf("Put/get %,d K operations per second%n", (int) (count * 4 * 1e6 / time)); }
The assertion is
java.lang.AssertionError: expected:<30> but was:<22>
With the count of 100, the assertion is
java.lang.AssertionError: expected:<40> but was:<32>
With count of 2000, the assertion is
java.lang.AssertionError: expected:<1247> but was:<1239>
Seems to work for other counts like 5000, 10000 etc.
Reply to this email directly or view it on GitHubhttps://github.com//issues/5
.from hugecollections-old.
sampath06 commented on September 29, 2024 I tried with these values and it still gives the same error
int count = 32; HugeConfig config = HugeConfig.DEFAULT.clone() .setSegments(16) .setSmallEntrySize(128) // TODO 64 corrupts the values !! .setCapacity(count);
from hugecollections-old.
peter-lawrey commented on September 29, 2024 This needs investigating.
On 29 Jan 2014 08:20, "sampath06" [email protected] wrote:I tried with these values and it still gives the same error
'''
int count = 32;
HugeConfig config = HugeConfig.DEFAULT.clone()
.setSegments(16)
.setSmallEntrySize(128) // TODO 64 corrupts the values !!
.setCapacity(count);
'''Reply to this email directly or view it on GitHubhttps://github.com//issues/5#issuecomment-33564439
.from hugecollections-old.
Related Issues (20)
- setSegments(int) is not public in HugeConfig; cannot be accessed from outside package HOT 3
- Comparing behaviour of HugeHashMap with HashMap HOT 2
- custom marshalling/serialization HOT 16
- remark on replication/distribution HOT 9
- how to get exactly 1 OpenHFT test to run HOT 10
- Using Shared/HugeHashMap HOT 3
- PingPong latency test across /dev/shm/SharedHashMap IPC ... HOT 19
- support for "read through" and "write behind" gettr/settrs (in addition to JBI) HOT 25
- Cache size exceed bug HOT 1
- TCPSocketReplication4WayMapTest testBufferOverflow failed (Windows 8.1) HOT 10
- VanillaShortShortMultiMap is full when capacity is still available HOT 5
- Difference between setSmallEntrySize and setCapacity
- SharedHashMap: iterating using keyset, valueset is very slow for larger tables HOT 8
- problem using SharedHashMapBuilder ... HOT 6
- OpenHFT scope of capability re: SHMEntry fields (user JBI supplied) and "barrier" operations HOT 9
- HugeHashMap with JPA elements HOT 4
- SharedHashMap causing crash on Windows OS HOT 28
- Chronicle Map not thread-safe in certain circumstances HOT 14
- ChronicleMap / ChronicleMapBuilder - actualEntriesPerSegment restricted to minimum of 8 HOT 13
- too many Segment.getKey() invocations HOT 3
Recommend Projects
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
TensorFlow
An Open Source Machine Learning Framework for Everyone
Django
The Web framework for perfectionists with deadlines.
Laravel
A PHP framework for web artisans
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
Recommend Topics
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
web
Some thing interesting about web. New door for the world.
server
A server is a program made to process requests and deliver data to clients.
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Visualization
Some thing interesting about visualization, use data art
Game
Some thing interesting about game, make everyone happy.
Recommend Org
We are working to build community through open source technology. NB: members must have two-factor auth.
Microsoft
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba
Alibaba Open Source for everyone
D3
Data-Driven Documents codes.
Tencent
China tencent open source team.
from hugecollections-old.