Skip to content

Instantly share code, notes, and snippets.

private final ConcurrentMap<Integer, ConcurrentMap<Integer, AtomicLong>> sizeDeltas = new ConcurrentHashMap<>();
// Good old approach
@Override public void accumulateSizeDelta(int cacheId, int part, long delta) {
ConcurrentMap<Integer, AtomicLong> partDeltas = sizeDeltas.get(cacheId);
if (partDeltas == null) {
ConcurrentMap<Integer, AtomicLong> partDeltas0 =
sizeDeltas.putIfAbsent(cacheId, partDeltas = new ConcurrentHashMap<>());
if (partDeltas0 != null)
partDeltas = partDeltas0;
@pavlukhin
pavlukhin / hs_err_pid5763.log
Created October 31, 2018 09:35
Allocation failures
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 262144 bytes for committing reserved memory.
# Possible reasons:
# The system is out of physical RAM or swap space
# In 32 bit mode, the process size limit was hit
# Possible solutions:
# Reduce memory load on the system
# Increase physical memory or swap space
# Check if swap backing store is full
package org.apache.ignite.internal.processors.cache.ivan;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.BrokenBarrierException;
import java.util.concurrent.CyclicBarrier;
import java.util.concurrent.TimeUnit;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.cache.CacheAtomicityMode;
import org.apache.ignite.cache.CacheMode;
package org.apache.ignite.internal.processors.cache.ivan;
import java.io.Serializable;
import java.util.Collections;
import org.apache.ignite.Ignite;
import org.apache.ignite.Ignition;
import org.apache.ignite.cache.CacheInterceptorAdapter;
import org.apache.ignite.client.IgniteClient;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.configuration.ClientConfiguration;
import java.util.Collections;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.IgniteDataStreamer;
import org.apache.ignite.Ignition;
import org.apache.ignite.cache.QueryEntity;
import org.apache.ignite.cache.query.SqlFieldsQuery;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
package org.ivan.experiments.agent;
import java.lang.instrument.Instrumentation;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
public class WeakeningAgent {
@pavlukhin
pavlukhin / TC.kt
Created June 20, 2019 05:44
AI TC RunAll configuration in Kotlin DSL
package _Self.buildTypes
import jetbrains.buildServer.configs.kotlin.v2018_2.*
import jetbrains.buildServer.configs.kotlin.v2018_2.buildSteps.script
object RunAll : BuildType({
name = "--> Run :: All"
description = "Dummy build for run all build in project by one click"
artifactRules = "report.html"
@pavlukhin
pavlukhin / Test.java
Created October 17, 2019 12:08
Nested POJO and QueryEntity bug
class User {
String userName;
Address address;
public User(String userName, Address address) {
this.userName = userName;
this.address = address;
}
}