id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
36960637_307
{ "fields": [ { "declarator": "NAMESPACE = Namespace.create(\"test\")", "modifier": "private static final", "original_string": "private static final Namespace NAMESPACE = Namespace.create(\"test\");", "type": "Namespace", "var_name": "NAMESPACE" }, { "declarator": "ROW_...
{ "body": "@Test\n public void putWithTimestamps() throws Exception {\n Multimap<Cell, Value> values = ImmutableMultimap.of(CELL, VALUE);\n kvs.putWithTimestamps(TABLE_REF, values);\n\n checkSpan(\"atlasdb-kvs.putWithTimestamps({table}, 1 values)\");\n verify(delegate).putWithTimestamps...
{ "fields": [ { "declarator": "SERVICE_NAME = \"atlasdb-kvs\"", "modifier": "private static final", "original_string": "private static final String SERVICE_NAME = \"atlasdb-kvs\";", "type": "String", "var_name": "SERVICE_NAME" }, { "declarator": "delegate", "modif...
{ "body": "@Override\n public void putWithTimestamps(TableReference tableRef, Multimap<Cell, Value> values) {\n //noinspection unused - try-with-resources closes trace\n try (CloseableTrace trace = startLocalTrace(\"putWithTimestamps({}, {} values)\",\n LoggingArgs.safeTableOrPlacehold...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_429
{ "fields": [ { "declarator": "LOW_START_TS = 6L", "modifier": "private static final", "original_string": "private static final long LOW_START_TS = 6L;", "type": "long", "var_name": "LOW_START_TS" }, { "declarator": "LOW_COMMIT_TS = 7L", "modifier": "private stati...
{ "body": "@Test\n public void testNoCandidates() {\n List<CandidateCellForSweeping> candidate = ImmutableList.of(\n ImmutableCandidateCellForSweeping.builder()\n .cell(SINGLE_CELL)\n .sortedTimestamps(ImmutableList.of())\n ...
{ "fields": [ { "declarator": "commitTsCache", "modifier": "private final", "original_string": "private final CommitTsCache commitTsCache;", "type": "CommitTsCache", "var_name": "commitTsCache" }, { "declarator": "sweeper", "modifier": "private final", "orig...
{ "body": "public BatchOfCellsToSweep getCellsToSweep(List<CandidateCellForSweeping> candidates) {\n Map<Long, Long> startToCommitTs = commitTsCache.loadBatch(getAllValidTimestamps(candidates));\n ImmutableBatchOfCellsToSweep.Builder builder = ImmutableBatchOfCellsToSweep.builder();\n long numCel...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_583
{ "fields": [ { "declarator": "ENCODING_STRATEGY = V1EncodingStrategy.INSTANCE", "modifier": "private static final", "original_string": "private static final V1EncodingStrategy ENCODING_STRATEGY = V1EncodingStrategy.INSTANCE;", "type": "V1EncodingStrategy", "var_name": "ENCODING_STRA...
{ "body": "@Test\n public void throwsOnUnspecifiedKeyAlreadyExistsExceptions() {\n KeyAlreadyExistsException keyAlreadyExistsException = new KeyAlreadyExistsException(\"boo\");\n doThrow(keyAlreadyExistsException)\n .doNothing()\n .when(mockTransactionService)\n ...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(WriteBatchingTransactionService.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(WriteBatchingTransactionService.class);", "type": "Logger", "var_nam...
{ "body": "@VisibleForTesting\n static void processBatch(\n EncodingTransactionService delegate, List<BatchElement<TimestampPair, Void>> batchElements) {\n Multimap<Long, BatchElement<TimestampPair, Void>> startTimestampKeyedBatchElements\n = MultimapBuilder.hashKeys().hashSetValue...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_995
{ "fields": [ { "declarator": "COORDINATION_ROW = PtBytes.toBytes(\"aaaaa\")", "modifier": "private static final", "original_string": "private static final byte[] COORDINATION_ROW = PtBytes.toBytes(\"aaaaa\");", "type": "byte[]", "var_name": "COORDINATION_ROW" }, { "dec...
{ "body": "@Test\n public void throwsIfAttemptingToPutAtNegativeSequenceNumber() {\n assertThatThrownBy(() -> coordinationStore.putUnlessValueExists(-1, VALUE_1))\n .isInstanceOf(IllegalStateException.class)\n .hasMessageContaining(\"Only positive sequence numbers are supported...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(KeyValueServiceCoordinationStore.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(KeyValueServiceCoordinationStore.class);", "type": "Logger", "var_n...
{ "body": "@VisibleForTesting\n void putUnlessValueExists(long sequenceNumber, T value) {\n Preconditions.checkState(\n sequenceNumber > 0,\n \"Only positive sequence numbers are supported, but found %s\",\n sequenceNumber);\n try {\n kvs.putUnl...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_215
{ "fields": [ { "declarator": "NAME_METADATA_DESCRIPTION = NameMetadataDescription.create(\n ImmutableList.of(\n NameComponentDescription.of(\"age\", ValueType.FIXED_LONG),\n NameComponentDescription.of(\"name\", ValueType.STRING)))", "modifier": "priva...
{ "body": "@Test\n public void testDeserializeRowFromJsonMap() throws Exception {\n JsonNode jsonNode = new ObjectMapper().readTree(\"{\\\"age\\\":68, \\\"name\\\":\\\"Smeagol\\\"}\");\n byte[] row = AtlasDeserializers.deserializeRow(NAME_METADATA_DESCRIPTION, jsonNode);\n byte[] expectedRow =...
{ "fields": [], "file": "atlasdb-service/src/main/java/com/palantir/atlasdb/jackson/AtlasDeserializers.java", "identifier": "AtlasDeserializers", "interfaces": "", "methods": [ { "class_method_signature": "AtlasDeserializers.AtlasDeserializers()", "constructor": true, "full_signature": "...
{ "body": "public static byte[] deserializeRow(NameMetadataDescription description,\n JsonNode node) {\n return deserializeRowish(description, node, true);\n }", "class_method_signature": "AtlasDeserializers.deserializeRow(NameMetadataDescription description,\n JsonNode node)", "co...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_645
{ "fields": [ { "declarator": "TIMESTAMP_1 = 10L", "modifier": "private static final", "original_string": "private static final long TIMESTAMP_1 = 10L;", "type": "long", "var_name": "TIMESTAMP_1" }, { "declarator": "TIMESTAMP_2 = 20L", "modifier": "private static ...
{ "body": "@Test\n public void returnsTimestampAssociatedWithGreatestPunchedTimeEvenIfItIsNotGreatest() {\n puncherStore = initializePuncherStore(PUNCHER_HISTORY_WITH_CLOCK_DRIFT);\n assertThat(puncherStore.get(WALL_CLOCK_2))\n .isEqualTo(TIMESTAMP_1)\n .isNotEqualTo(TIM...
{ "fields": [ { "declarator": "COLUMN = \"t\".getBytes(StandardCharsets.UTF_8)", "modifier": "private static final", "original_string": "private static final byte[] COLUMN = \"t\".getBytes(StandardCharsets.UTF_8);", "type": "byte[]", "var_name": "COLUMN" }, { "declarato...
{ "body": "@Override\n public Long get(Long timeMillis) {\n return get(keyValueService, timeMillis);\n }", "class_method_signature": "KeyValueServicePuncherStore.get(Long timeMillis)", "constructor": false, "full_signature": "@Override public Long get(Long timeMillis)", "identifier": "get", "in...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_350
{ "fields": [ { "declarator": "DATA_SIZE = 4", "modifier": "private static final", "original_string": "private static final int DATA_SIZE = 4;", "type": "int", "var_name": "DATA_SIZE" }, { "declarator": "DATA_SIZE_PLUS_ONE = 5", "modifier": "private static final",...
{ "body": "@Test\n public void readEmptyArrayReturnsZero() throws IOException {\n int read = dataStream.read(new byte[0]);\n assertEquals(0, read);\n }", "class_method_signature": "BlockConsumingInputStreamTest.readEmptyArrayReturnsZero()", "constructor": false, "full_signature": "@Test publ...
{ "fields": [ { "declarator": "blockGetter", "modifier": "private final", "original_string": "private final BlockGetter blockGetter;", "type": "BlockGetter", "var_name": "blockGetter" }, { "declarator": "numBlocks", "modifier": "private final", "original_str...
{ "body": "@Override\n public int read() throws IOException {\n if (positionInBuffer < buffer.length) {\n return buffer[positionInBuffer++] & 0xff;\n }\n\n if (nextBlockToRead < numBlocks) {\n boolean reloaded = refillBuffer();\n if (!reloaded) {\n ...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_700
{ "fields": [ { "declarator": "expectedException = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();", "type": "ExpectedException", "var_name": "expectedException" }, ...
{ "body": "@Test\n public void testNoStart() throws Exception {\n RunnableFuture<Integer> interruptible = getInterruptible();\n expectedException.expect(TimeoutException.class);\n interruptible.get(10, TimeUnit.MILLISECONDS);\n }", "class_method_signature": "InterruptibleFutureTest.testNo...
{ "fields": [ { "declarator": "lock = new ReentrantLock(false)", "modifier": "private final", "original_string": "private final Lock lock = new ReentrantLock(false);", "type": "Lock", "var_name": "lock" }, { "declarator": "condition = lock.newCondition()", "modifi...
{ "body": "@Override\n public final V get() throws InterruptedException, ExecutionException, CancellationException {\n lock.lock();\n try {\n while (state != State.COMPLETED) {\n condition.await();\n }\n return getReturnValue();\n } finally {\n ...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_844
{ "fields": [ { "declarator": "MAX_TIMESTAMPS = 10_000", "modifier": "private static final", "original_string": "private static final int MAX_TIMESTAMPS = 10_000;", "type": "int", "var_name": "MAX_TIMESTAMPS" }, { "declarator": "unbatchedDelegate = new MaxTimestampsToGi...
{ "body": "@Test\n public void coalescesRequestsTogether() {\n assertThat(requestBatches(1, 2, 3)).containsExactly(single(1), range(2, 4), range(4, 7));\n verify(unbatchedDelegate).getFreshTimestamps(6);\n verifyNoMoreInteractions(unbatchedDelegate);\n }", "class_method_signature": "Reque...
{ "fields": [ { "declarator": "timer = LoggingOperationTimer.create(RequestBatchingTimestampService.class)", "modifier": "private static final", "original_string": "private static final OperationTimer timer = LoggingOperationTimer.create(RequestBatchingTimestampService.class);", "type": "O...
{ "body": "@Override\n public TimestampRange getFreshTimestamps(int numTimestampsRequested) {\n Preconditions.checkArgument(numTimestampsRequested > 0, \"Must not request zero or negative timestamps\");\n ListenableFuture<TimestampRange> range = batcher.apply(numTimestampsRequested);\n try {\n...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_517
{ "fields": [ { "declarator": "SUCCESS_TOO_FAST = SweepIterationResults.success(1L)", "modifier": "private static final", "original_string": "private static final SweepIterationResult SUCCESS_TOO_FAST = SweepIterationResults.success(1L);", "type": "SweepIterationResult", "var_name": ...
{ "body": "@Test\n public void consistentSmallBatchesGravitatesTowardsMaximumPause() {\n sweepTwentyIterationsWithResult(SUCCESS_TOO_FAST);\n assertThat(delay.getNextPause(SUCCESS_TOO_FAST))\n .isGreaterThanOrEqualTo((long) (DEFAULT_MAX_PAUSE_MILLIS * 0.95));\n }", "class_method_s...
{ "fields": [ { "declarator": "BATCH_CELLS_LOW_THRESHOLD = 100", "modifier": "static final", "original_string": "static final int BATCH_CELLS_LOW_THRESHOLD = 100;", "type": "int", "var_name": "BATCH_CELLS_LOW_THRESHOLD" }, { "declarator": "MIN_PAUSE_MILLIS = 1", "...
{ "body": "long getNextPause(SweepIterationResult result) {\n return SweepIterationResults.caseOf(result)\n .success(this::updateCurrentPauseAndGet)\n .unableToAcquireShard_(maxPauseMillis)\n .insufficientConsistency_(BACKOFF)\n .otherError_(maxPauseM...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_72
{ "fields": [ { "declarator": "CLIENT = Client.of(\"client\")", "modifier": "private static final", "original_string": "private static final Client CLIENT = Client.of(\"client\");", "type": "Client", "var_name": "CLIENT" }, { "declarator": "CLIENT_2 = Client.of(\"client...
{ "body": "@Test\n public void failureMechanismInvokedForRepeatedTimestampsBetweenRounds() {\n when(checker1.getFreshTimestampFromNodeForClient(CLIENT.value()))\n .then(getNextTimestamp())\n .then(getNextTimestamp())\n .then(ignore -> OptionalLong.of(timestamps.g...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(NoSimultaneousServiceCheck.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(NoSimultaneousServiceCheck.class);", "type": "Logger", "var_name": "log" ...
{ "body": "public void processHealthCheckDigest(HealthCheckDigest digest) {\n Set<Client> clientsWithMultipleLeaders = digest.statusesToClient().get(TimeLockStatus.MULTIPLE_LEADERS);\n if (clientsWithMultipleLeaders.isEmpty()) {\n return;\n }\n\n log.info(\"Clients {} appear to ...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_147
{ "fields": [ { "declarator": "CLIENT_A = \"a-client\"", "modifier": "private static final", "original_string": "private static final String CLIENT_A = \"a-client\";", "type": "String", "var_name": "CLIENT_A" }, { "declarator": "CLIENT_B = \"b-client\"", "modifier...
{ "body": "@Test\n public void doesNotCreateNewClientsAfterMaximumNumberHasBeenReached() {\n createMaximumNumberOfClients();\n\n assertThatThrownBy(() -> namespaces.get(uniqueClient()))\n .isInstanceOf(IllegalStateException.class);\n\n verify(serviceFactory, times(DEFAULT_MAX_NU...
{ "fields": [ { "declarator": "ACTIVE_CLIENTS = \"activeClients\"", "modifier": "@VisibleForTesting static final", "original_string": "@VisibleForTesting static final String ACTIVE_CLIENTS = \"activeClients\";", "type": "String", "var_name": "ACTIVE_CLIENTS" }, { "decla...
{ "body": "public TimeLockServices get(String namespace) {\n return services.computeIfAbsent(namespace, this::createNewClient);\n }", "class_method_signature": "TimelockNamespaces.get(String namespace)", "constructor": false, "full_signature": "public TimeLockServices get(String namespace)", "identi...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_452
{ "fields": [ { "declarator": "SUCCESS_HUGE = SweepIterationResults\n .success(SweepQueueUtils.SWEEP_BATCH_SIZE)", "modifier": "private static final", "original_string": "private static final SweepIterationResult SUCCESS_HUGE = SweepIterationResults\n .success(SweepQueueUti...
{ "body": "@Test\n public void noTasksAreSpawnedBeforeCoolDownPasses() throws Exception {\n when(sweepIteration.call()).thenReturn(SUCCESS_LARGE);\n\n scheduler.start(1);\n runSweepIterations(10);\n verify(sweepIteration, times(10)).call();\n }", "class_method_signature": "ScalingS...
{ "fields": [ { "declarator": "COOL_DOWN = Duration.ofMinutes(5L)", "modifier": "private static final", "original_string": "private static final Duration COOL_DOWN = Duration.ofMinutes(5L);", "type": "Duration", "var_name": "COOL_DOWN" }, { "declarator": "BATCH_CELLS_LO...
{ "body": "void start(int initialThreads) {\n for (int i = 0; i < initialThreads; i++) {\n increaseNumberOfTasks(INITIAL_DELAY);\n }\n }", "class_method_signature": "ScalingSweepTaskScheduler.start(int initialThreads)", "constructor": false, "full_signature": " void start(int initial...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_901
{ "fields": [ { "declarator": "TOKEN_1 = LockToken.of(UUID.randomUUID())", "modifier": "private static final", "original_string": "private static final LockToken TOKEN_1 = LockToken.of(UUID.randomUUID());", "type": "LockToken", "var_name": "TOKEN_1" }, { "declarator": "...
{ "body": "@Test\n public void doesNotThrowDependencyExceptionWhenDelegateFailsForSomeOtherReason() {\n when(delegate.currentTimeMillis()).thenThrow(new RuntimeException(\"something else happened\"));\n\n assertThatThrownBy(timelock::currentTimeMillis).isInstanceOf(RuntimeException.class)\n ...
{ "fields": [ { "declarator": "refreshExecutor = createSingleThreadScheduledExecutor(\"refresh\")", "modifier": "private static final", "original_string": "private static final ScheduledExecutorService refreshExecutor = createSingleThreadScheduledExecutor(\"refresh\");", "type": "Scheduled...
{ "body": "@Override\n public long currentTimeMillis() {\n return executeOnTimeLock(delegate::currentTimeMillis);\n }", "class_method_signature": "TimeLockClient.currentTimeMillis()", "constructor": false, "full_signature": "@Override public long currentTimeMillis()", "identifier": "currentTimeMi...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_281
{ "fields": [ { "declarator": "NAMESPACE = Namespace.create(\"test\")", "modifier": "private static final", "original_string": "private static final Namespace NAMESPACE = Namespace.create(\"test\");", "type": "Namespace", "var_name": "NAMESPACE" }, { "declarator": "TABL...
{ "body": "@Test\n public void getNoLoggingHappensIfQueryFastAndInfoLevel() {\n Appender mockAppender = setLogLevelAndGetAppender(Level.INFO);\n\n kvs.get(TABLE_REF, timestampByCell);\n\n verifyNoMoreInteractions(mockAppender);\n }", "class_method_signature": "ProfilingKeyValueServiceTest...
{ "fields": [ { "declarator": "delegate", "modifier": "private final", "original_string": "private final KeyValueService delegate;", "type": "KeyValueService", "var_name": "delegate" } ], "file": "atlasdb-client/src/main/java/com/palantir/atlasdb/keyvalue/impl/ProfilingKeyVal...
{ "body": "@Override\n public Map<Cell, Value> get(TableReference tableRef, Map<Cell, Long> timestampByCell) {\n long startTime = System.currentTimeMillis();\n return KvsProfilingLogger.maybeLog(() -> delegate.get(tableRef, timestampByCell),\n (logger, stopwatch) ->\n ...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_794
{ "fields": [ { "declarator": "DEFAULT_PORT = 5000", "modifier": "private static final", "original_string": "private static final int DEFAULT_PORT = 5000;", "type": "int", "var_name": "DEFAULT_PORT" }, { "declarator": "OTHER_PORT = 6000", "modifier": "private stat...
{ "body": "@Test\n public void shouldNotReturnHostsNotMatchingPredicateEvenWithNodeFailure() {\n CassandraService cassandra = clientPoolWithServers(ImmutableSet.of(HOST_1, HOST_2));\n blacklist.add(HOST_1);\n Optional<CassandraClientPoolingContainer> container\n = cassandra.getR...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(CassandraClientPool.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(CassandraClientPool.class);", "type": "Logger", "var_name": "log" }, { ...
{ "body": "public Optional<CassandraClientPoolingContainer> getRandomGoodHostForPredicate(\n Predicate<InetSocketAddress> predicate) {\n Map<InetSocketAddress, CassandraClientPoolingContainer> pools = currentPools;\n\n Set<InetSocketAddress> filteredHosts = pools.keySet().stream()\n ...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_110
{ "fields": [ { "declarator": "LOCK_CLIENT = LockClient.of(\"foo\")", "modifier": "private static final", "original_string": "private static final LockClient LOCK_CLIENT = LockClient.of(\"foo\");", "type": "LockClient", "var_name": "LOCK_CLIENT" }, { "declarator": "FRES...
{ "body": "@Test\n public void currentTimeMillisDelegatesToLockService() {\n long time = 456L;\n when(lockService.currentTimeMillis()).thenReturn(time);\n\n assertThat(timelock.currentTimeMillis()).isEqualTo(time);\n }", "class_method_signature": "LegacyTimelockServiceTest.currentTimeMill...
{ "fields": [ { "declarator": "timestampService", "modifier": "private final", "original_string": "private final TimestampService timestampService;", "type": "TimestampService", "var_name": "timestampService" }, { "declarator": "lockService", "modifier": "private ...
{ "body": "@Override\n public long currentTimeMillis() {\n return lockService.currentTimeMillis();\n }", "class_method_signature": "LegacyTimelockService.currentTimeMillis()", "constructor": false, "full_signature": "@Override public long currentTimeMillis()", "identifier": "currentTimeMillis", ...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_540
{ "fields": [ { "declarator": "ONE = 1L", "modifier": "private static final", "original_string": "private static final long ONE = 1L;", "type": "long", "var_name": "ONE" }, { "declarator": "TEN = 10L", "modifier": "private static final", "original_string": "...
{ "body": "@Test\n public void callsSupplierAgainAfterTimeElapses() {\n when(mockClock.getTick()).thenReturn(0L, CACHE_INTERVAL_NANOS - 1, CACHE_INTERVAL_NANOS + 1);\n AtomicLong timestampValue = new AtomicLong(0L);\n TimestampTracker.registerTimestampForTracking(\n mockClock, m...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(TimestampTracker.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(TimestampTracker.class);", "type": "Logger", "var_name": "log" } ], "file":...
{ "body": "@VisibleForTesting\n static void registerTimestampForTracking(\n Clock clock, MetricsManager metricsManager, String shortName, Supplier<Long> supplier) {\n metricsManager.registerMetric(\n TimestampTracker.class,\n shortName,\n TrackerUtils....
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_25
{ "fields": [ { "declarator": "TABLE = TableReference.createFromFullyQualifiedName(\"test.table\")", "modifier": "private static final", "original_string": "private static final TableReference TABLE = TableReference.createFromFullyQualifiedName(\"test.table\");", "type": "TableReference", ...
{ "body": "@Test\n public void rowWithNullsParsesAllCombinationsForCells() {\n LockDescriptor descriptor = AtlasCellLockDescriptor.of(TABLE.getQualifiedName(), ROW_WITH_ZEROS, NO_ZERO_COL);\n\n List<CellReference> expected = ImmutableList.of(\n Cell.create(new byte[] {1}, new byte[] {2...
{ "fields": [], "file": "atlasdb-api/src/main/java/com/palantir/atlasdb/keyvalue/api/AtlasLockDescriptorUtils.java", "identifier": "AtlasLockDescriptorUtils", "interfaces": "", "methods": [ { "class_method_signature": "AtlasLockDescriptorUtils.AtlasLockDescriptorUtils()", "constructor": true, ...
{ "body": "public static List<CellReference> candidateCells(LockDescriptor lockDescriptor) {\n Optional<TableRefAndRemainder> tableRefAndRemainder = tryParseTableRef(lockDescriptor);\n if (!tableRefAndRemainder.isPresent()) {\n return ImmutableList.of();\n }\n\n TableReference t...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_813
{ "fields": [ { "declarator": "MESSAGE = \"a exception\"", "modifier": "private static final", "original_string": "private static final String MESSAGE = \"a exception\";", "type": "String", "var_name": "MESSAGE" }, { "declarator": "CAUSE = new Exception()", "modif...
{ "body": "@Test\n public void nonImplicatingExceptionsShouldNeverBlacklist() {\n NOT_IMPLICATING_NODES_EXCEPTIONS.forEach(ex -> {\n assertFalse(handlerConservative.shouldBlacklist(ex, MAX_RETRIES_PER_HOST + 1));\n assertFalse(handlerLegacy.shouldBlacklist(ex, MAX_RETRIES_PER_HOST + 1)...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(CassandraRequestExceptionHandler.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(CassandraRequestExceptionHandler.class);", "type": "Logger", "var_n...
{ "body": "@VisibleForTesting\n boolean shouldBlacklist(Exception ex, int numberOfAttempts) {\n return isConnectionException(ex)\n && numberOfAttempts >= maxTriesSameHost.get()\n && !isExceptionNotImplicatingThisParticularNode(ex);\n }", "class_method_signature": "Cassandr...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_956
{ "fields": [ { "declarator": "CLIENT = \"testClient\"", "modifier": "private static final", "original_string": "private static final String CLIENT = \"testClient\";", "type": "String", "var_name": "CLIENT" }, { "declarator": "USER_AGENT_NAME = \"user-agent\"", "m...
{ "body": "@Test\n public void interruptingLocalLeaderElectionTerminates() throws IOException {\n Leaders.LocalPaxosServices localPaxosServices = Leaders.createAndRegisterLocalServices(\n metricsManager,\n environment,\n ImmutableLeaderConfig.builder()\n ...
{ "fields": [ { "declarator": "LOGGING_INTERVAL = 60", "modifier": "private static final", "original_string": "private static final int LOGGING_INTERVAL = 60;", "type": "int", "var_name": "LOGGING_INTERVAL" }, { "declarator": "log = LoggerFactory.getLogger(TransactionMa...
{ "body": "public static ImmutableTransactionManagers.ConfigBuildStage builder() {\n return ImmutableTransactionManagers.builder();\n }", "class_method_signature": "TransactionManagers.builder()", "constructor": false, "full_signature": "public static ImmutableTransactionManagers.ConfigBuildStage buil...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_405
{ "fields": [ { "declarator": "RECOMPUTE_MILLIS = 10", "modifier": "private static final", "original_string": "private static final long RECOMPUTE_MILLIS = 10;", "type": "long", "var_name": "RECOMPUTE_MILLIS" }, { "declarator": "METRICS_CONFIGURATION\n = Targ...
{ "body": "@Test\n public void abortedWritesDeletedDoesNotClashAcrossStrategies() {\n metrics.updateAbortedWritesDeleted(CONS_ONE, 10);\n metrics.updateAbortedWritesDeleted(THOR_ZERO, 5);\n metrics.updateAbortedWritesDeleted(CONS_TWO, 20);\n\n assertThat(metricsManager).hasAbortedWrites...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(TargetedSweepMetrics.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(TargetedSweepMetrics.class);", "type": "Logger", "var_name": "log" }, {...
{ "body": "public void updateAbortedWritesDeleted(ShardAndStrategy shardStrategy, long deletes) {\n updateMetricsIfPresent(shardStrategy, metrics -> metrics.updateAbortedWritesDeleted(deletes));\n }", "class_method_signature": "TargetedSweepMetrics.updateAbortedWritesDeleted(ShardAndStrategy shardStrategy...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_686
{ "fields": [ { "declarator": "INIT_FAIL = new RuntimeException(\"Failed during initialization.\")", "modifier": "private static final", "original_string": "private static final RuntimeException INIT_FAIL = new RuntimeException(\"Failed during initialization.\");", "type": "RuntimeExceptio...
{ "body": "@Test\n public void retryingCallbackCallsInitializeOnceAndSkipsCleanupOnSuccess() {\n callback = LambdaCallback.retrying(this::markInit, this::markCleanup);\n\n callback.runWithRetry(initsAndCleanups);\n assertThat(initsAndCleanups.inits()).isEqualTo(1);\n assertThat(initsAnd...
{ "fields": [ { "declarator": "FAIL = (ignore, throwable) -> {\n throw Throwables.rewrapAndThrowUncheckedException(throwable);\n }", "modifier": "private static final", "original_string": "private static final BiConsumer<Object, Throwable> FAIL = (ignore, throwable) -> {\n throw...
{ "body": "public static <R> Callback<R> retrying(Consumer<R> initialize, BiConsumer<R, Throwable> onInitFailureCleanup) {\n return new LambdaCallback<>(initialize, onInitFailureCleanup);\n }", "class_method_signature": "LambdaCallback.retrying(Consumer<R> initialize, BiConsumer<R, Throwable> onInitFailur...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_393
{ "fields": [ { "declarator": "FQ_TABLE = TableReference.createFromFullyQualifiedName(\"test.test\")", "modifier": "private static final", "original_string": "private static final TableReference FQ_TABLE = TableReference.createFromFullyQualifiedName(\"test.test\");", "type": "TableReferenc...
{ "body": "@Test\n public void mapToShortTableNamesThrowsOnInvalidShortTableName() {\n insertInvalidShortTableNameIntoKvs();\n assertThatThrownBy(() -> tableMapping.mapToShortTableNames(ImmutableMap.of(FQ_TABLE2, 22L)))\n .as(\"Invalid short table name in KVS\")\n .isIns...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(KvTableMappingService.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(KvTableMappingService.class);", "type": "Logger", "var_name": "log" }, ...
{ "body": "@Override\n public <T> Map<TableReference, T> mapToShortTableNames(Map<TableReference, T> toMap)\n throws TableMappingNotFoundException {\n Map<TableReference, T> newMap = Maps.newHashMap();\n for (Map.Entry<TableReference, T> e : toMap.entrySet()) {\n newMap.put(getM...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_669
{ "fields": [ { "declarator": "unlock", "modifier": "volatile", "original_string": "volatile boolean unlock;", "type": "boolean", "var_name": "unlock" } ], "file": "atlasdb-commons/src/test/java/com/palantir/util/MutuallyExclusiveSetLockTest.java", "identifier": "MutuallyEx...
{ "body": "@Test\n public void testThreadDoesNotOwnUnlocked() {\n final MutuallyExclusiveSetLock<String> mutuallyExclusiveSetLock = new MutuallyExclusiveSetLock<String>();\n List<String> asList = Arrays.asList(\"whatup\", \"dog\");\n Assert.assertTrue(!mutuallyExclusiveSetLock.isLocked(asList)...
{ "fields": [ { "declarator": "fair", "modifier": "final private", "original_string": "final private boolean fair;", "type": "boolean", "var_name": "fair" }, { "declarator": "comparator", "modifier": "final private", "original_string": "final private Compara...
{ "body": "public boolean isLocked(Iterable<T> items) {\n for (T t : items) {\n ReentrantLock lock = syncMap.getUnchecked(t);\n if (!lock.isHeldByCurrentThread())\n return false;\n }\n return true;\n }", "class_method_signature": "MutuallyExclusiveSetLock...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_239
{ "fields": [ { "declarator": "TAG_KEY_1 = \"tag1\"", "modifier": "private static final", "original_string": "private static final String TAG_KEY_1 = \"tag1\";", "type": "String", "var_name": "TAG_KEY_1" }, { "declarator": "TAG_VALUE_1 = \"tagVal1\"", "modifier": ...
{ "body": "@Test\n public void shouldReturnANameIfTryingToRegisterMetricWithExactlyTenTags() throws Exception {\n Map<String, String> tags = IntStream.range(0, 10)\n .boxed()\n .collect(Collectors.toMap(i -> \"tag\" + i, i -> \"tagVal\" + i));\n assertThat(tags.size()).i...
{ "fields": [ { "declarator": "MAX_ALLOWED_TAGS = 10", "modifier": "private static final", "original_string": "private static final int MAX_ALLOWED_TAGS = 10;", "type": "int", "var_name": "MAX_ALLOWED_TAGS" }, { "declarator": "DELIMITER = \";\"", "modifier": "priv...
{ "body": "public static String getMetricName(String metricName, Map<String, String> tags) {\n Preconditions.checkArgument(tags.size() <= MAX_ALLOWED_TAGS, \"Too many tags set on the metric %s. \"\n + \"Maximum allowed number of tags is %s, found %s.\", metricName, MAX_ALLOWED_TAGS, tags.size())...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_805
{ "fields": [ { "declarator": "BYTES1 = ByteBuffer.allocate(3)", "modifier": "private static final", "original_string": "private static final ByteBuffer BYTES1 = ByteBuffer.allocate(3);", "type": "ByteBuffer", "var_name": "BYTES1" }, { "declarator": "BYTES2 = ByteBuffer...
{ "body": "@Test\n public void rangeSlicesWeigherReturnsCorrectNumRows() {\n assertThatRangeSlicesWeigherReturnsCorrectNumRows(ThriftQueryWeighers.getRangeSlices(new KeyRange(1)));\n }", "class_method_signature": "ThriftQueryWeighersTest.rangeSlicesWeigherReturnsCorrectNumRows()", "constructor": fals...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(CassandraClient.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(CassandraClient.class);", "type": "Logger", "var_name": "log" }, { "de...
{ "body": "public static QueryWeigher<List<KeySlice>> getRangeSlices(KeyRange keyRange) {\n return readWeigher(ThriftObjectSizeUtils::getApproximateSizeOfKeySlices, List::size, keyRange.count);\n }", "class_method_signature": "ThriftQueryWeighers.getRangeSlices(KeyRange keyRange)", "constructor": false,...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_33
{ "fields": [ { "declarator": "TEST_PREFIX = \"a_\"", "modifier": "private static final", "original_string": "private static final String TEST_PREFIX = \"a_\";", "type": "String", "var_name": "TEST_PREFIX" }, { "declarator": "TEST_NAMESPACE = Namespace.create(\"test_nam...
{ "body": "@Test\n public void shouldThrowIfTable9999Exists() {\n when(resultSet.size()).thenReturn(1);\n\n AgnosticResultRow row = mock(AgnosticResultRow.class);\n when(row.getString(eq(\"short_table_name\"))).thenReturn(getTableNameWithNumber(9999));\n when(resultSet.get(eq(0))).thenR...
{ "fields": [ { "declarator": "SUFFIX_NUMBER_LENGTH = 4", "modifier": "public static final", "original_string": "public static final int SUFFIX_NUMBER_LENGTH = 4;", "type": "int", "var_name": "SUFFIX_NUMBER_LENGTH" }, { "declarator": "MAX_NAMESPACE_LENGTH = 2", "m...
{ "body": "public String getShortPrefixedTableName(\n ConnectionSupplier connectionSupplier,\n String tablePrefix,\n TableReference tableRef) {\n Preconditions.checkState(tablePrefix.length() <= AtlasDbConstants.MAX_TABLE_PREFIX_LENGTH,\n \"The tablePrefix can be...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_556
{ "fields": [ { "declarator": "TABLE_STRING = \"ns.table\"", "modifier": "private static final", "original_string": "private static final String TABLE_STRING = \"ns.table\";", "type": "String", "var_name": "TABLE_STRING" }, { "declarator": "TABLE = TableReference.create...
{ "body": "@Test\n public void canCompactSuccessfully() throws InterruptedException {\n BackgroundCompactor.CompactionOutcome outcome = compactor.grabLockAndRunOnce(lockService);\n assertThat(outcome).isEqualTo(BackgroundCompactor.CompactionOutcome.SUCCESS);\n }", "class_method_signature": "Back...
{ "fields": [ { "declarator": "SLEEP_TIME_WHEN_NOTHING_TO_COMPACT_MIN_MILLIS = TimeUnit.SECONDS.toMillis(5)", "modifier": "public static final", "original_string": "public static final long SLEEP_TIME_WHEN_NOTHING_TO_COMPACT_MIN_MILLIS = TimeUnit.SECONDS.toMillis(5);", "type": "long", ...
{ "body": "@VisibleForTesting\n CompactionOutcome grabLockAndRunOnce(SingleLockService compactorLock)\n throws InterruptedException {\n CompactorConfig config = compactorConfigSupplier.get();\n if (!config.enableCompaction()) {\n log.debug(\"Skipping compaction because it is cur...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_106
{ "fields": [ { "declarator": "LOCK_CLIENT = LockClient.of(\"foo\")", "modifier": "private static final", "original_string": "private static final LockClient LOCK_CLIENT = LockClient.of(\"foo\");", "type": "LockClient", "var_name": "LOCK_CLIENT" }, { "declarator": "FRES...
{ "body": "@Test\n public void getImmutableTimestampReturnsFreshTimestampIfMinLockedInVersionIsNull() throws InterruptedException {\n mockMinLockedInVersionIdResponse(null);\n\n assertThat(timelock.getImmutableTimestamp()).isEqualTo(FRESH_TIMESTAMP);\n }", "class_method_signature": "LegacyTimelo...
{ "fields": [ { "declarator": "timestampService", "modifier": "private final", "original_string": "private final TimestampService timestampService;", "type": "TimestampService", "var_name": "timestampService" }, { "declarator": "lockService", "modifier": "private ...
{ "body": "@Override\n public long getImmutableTimestamp() {\n long ts = timestampService.getFreshTimestamp();\n return getImmutableTimestampInternal(ts);\n }", "class_method_signature": "LegacyTimelockService.getImmutableTimestamp()", "constructor": false, "full_signature": "@Override publi...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_413
{ "fields": [ { "declarator": "enqueuedWrites = new AtomicLong()", "modifier": "private final", "original_string": "private final AtomicLong enqueuedWrites = new AtomicLong();", "type": "AtomicLong", "var_name": "enqueuedWrites" }, { "declarator": "entriesRead = new Ato...
{ "body": "@Test\n public void shouldBePublishedIfFarBehind() {\n millisSinceLastSweptTs.set(TargetedSweepMetricPublicationFilter.MINIMUM_STALE_DURATION.toMillis());\n\n assertThat(filter.shouldPublish()).isTrue();\n }", "class_method_signature": "TargetedSweepMetricPublicationFilterTest.shouldB...
{ "fields": [ { "declarator": "MINIMUM_READS_WRITES_TO_BE_CONSIDERED_ACTIVE = 1_000", "modifier": "@VisibleForTesting\n static final", "original_string": "@VisibleForTesting\n static final long MINIMUM_READS_WRITES_TO_BE_CONSIDERED_ACTIVE = 1_000;", "type": "long", "var_name": ...
{ "body": "@Override\n public boolean shouldPublish() {\n if (publicationLatch.get()) {\n return true;\n }\n boolean conditionsAchieved = testConditions();\n if (conditionsAchieved) {\n publicationLatch.set(true);\n }\n return conditionsAchieved;\n ...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_940
{ "fields": [ { "declarator": "LOCALHOST = \"localhost\"", "modifier": "private static final", "original_string": "private static final String LOCALHOST = \"localhost\";", "type": "String", "var_name": "LOCALHOST" }, { "declarator": "GET_ENDPOINT = \"/number\"", "...
{ "body": "@Test\n public void userAgentIsPresentOnClientRequests() {\n TestResource client = AtlasDbHttpClients.createProxy(\n TRUST_CONTEXT,\n getUriForPort(availablePort1),\n TestResource.class,\n AUXILIARY_REMOTING_PARAMETERS);\n client....
{ "fields": [], "file": "atlasdb-config/src/main/java/com/palantir/atlasdb/http/AtlasDbHttpClients.java", "identifier": "AtlasDbHttpClients", "interfaces": "", "methods": [ { "class_method_signature": "AtlasDbHttpClients.AtlasDbHttpClients()", "constructor": true, "full_signature": "priv...
{ "body": "public static <T> T createProxy(\n Optional<TrustContext> trustContext,\n String uri,\n Class<T> type,\n AuxiliaryRemotingParameters parameters) {\n return wrapWithOkHttpBugHandling(type,\n () -> ConjureJavaRuntimeTargetFactory.DEFAULT.creat...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_690
{ "fields": [ { "declarator": "ASYNC_INIT_DELAY = 10", "modifier": "private static final", "original_string": "private static final int ASYNC_INIT_DELAY = 10;", "type": "int", "var_name": "ASYNC_INIT_DELAY" }, { "declarator": "FIVE = 5", "modifier": "private stati...
{ "body": "@Test\n public void initializationAlwaysFailsAfterTheFirstAsynchronousTry() {\n AlwaysFailingInitializer initializer = new AlwaysFailingInitializer();\n\n initializer.initialize(true);\n assertThatThrownBy(() -> initializer.initialize(false))\n .isInstanceOf(IllegalSt...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(AsyncInitializer.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(AsyncInitializer.class);", "type": "Logger", "var_name": "log" }, { "...
{ "body": "public final void initialize(boolean initializeAsync) {\n assertNeverCalledInitialize();\n\n initializationStartTime = System.currentTimeMillis();\n\n if (!initializeAsync) {\n tryInitializeInternal();\n return;\n }\n\n tryInitializationLoop();\n ...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_385
{ "fields": [ { "declarator": "TABLE = TableReference.create(\n Namespace.create(\"test_ctx\"), \"test__table_name\")", "modifier": "private static final", "original_string": "private static final TableReference TABLE = TableReference.create(\n Namespace.create(\"test_ctx\"...
{ "body": "@Test\n public void testCanUnpersistJsonValues() {\n String original = \"{\\\"t\\\":{\\\"namespace\\\":{\\\"name\\\":\\\"test_ctx\\\"},\\\"tablename\\\":\\\"test__table_name\\\"},\\\"c\\\":{\\\"\"\n + \"rowName\\\":\\\"P7du\\\",\\\"columnName\\\":\\\"dg==\\\"},\\\"d\\\":true}\";\n ...
{ "fields": [ { "declarator": "writePrefix = { 1 }", "modifier": "private static final", "original_string": "private static final byte[] writePrefix = { 1 };", "type": "byte[]", "var_name": "writePrefix" }, { "declarator": "OBJECT_MAPPER = new ObjectMapper()\n ...
{ "body": "public WriteReference unpersist(StoredWriteReference writeReference) {\n return writeReference.accept(new StoredWriteReference.Visitor<WriteReference>() {\n @Override\n public WriteReference visitJson(byte[] ref) {\n try {\n return OBJECT_MAPPE...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_151
{ "fields": [ { "declarator": "CLIENT_A = \"a-client\"", "modifier": "private static final", "original_string": "private static final String CLIENT_A = \"a-client\";", "type": "String", "var_name": "CLIENT_A" }, { "declarator": "CLIENT_B = \"b-client\"", "modifier...
{ "body": "@Test\n public void maxNumberOfClientsRespondsToChanges() {\n assertNumberOfActiveClientsIs(0);\n assertMaxClientsIs(DEFAULT_MAX_NUMBER_OF_CLIENTS);\n\n when(maxNumberOfClientsSupplier.get()).thenReturn(1);\n\n assertNumberOfActiveClientsIs(0);\n assertMaxClientsIs(1);...
{ "fields": [ { "declarator": "ACTIVE_CLIENTS = \"activeClients\"", "modifier": "@VisibleForTesting static final", "original_string": "@VisibleForTesting static final String ACTIVE_CLIENTS = \"activeClients\";", "type": "String", "var_name": "ACTIVE_CLIENTS" }, { "decla...
{ "body": "public TimeLockServices get(String namespace) {\n return services.computeIfAbsent(namespace, this::createNewClient);\n }", "class_method_signature": "TimelockNamespaces.get(String namespace)", "constructor": false, "full_signature": "public TimeLockServices get(String namespace)", "identi...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_64
{ "fields": [ { "declarator": "FAILURE = new IllegalStateException()", "modifier": "private static final", "original_string": "private static final RuntimeException FAILURE = new IllegalStateException();", "type": "RuntimeException", "var_name": "FAILURE" }, { "declarat...
{ "body": "@SuppressWarnings(\"Slf4jConstantLogMessage\")\n @Test public void\n shouldLogTheSecondOfATypeOfExceptionToInfo() {\n ignoringExceptions(() -> allocationFailures.responseTo(FAILURE));\n ignoringExceptions(() -> allocationFailures.responseTo(FAILURE));\n\n verify(log).info(anyStri...
{ "fields": [ { "declarator": "MULTIPLE_RUNNING_TIMESTAMP_SERVICES_MESSAGE =\n \"This server is no longer usable as there appears to be another timestamp server running.\"", "modifier": "private static final", "original_string": "private static final String MULTIPLE_RUNNING_TIMESTAMP_...
{ "body": "public RuntimeException responseTo(Throwable newFailure) {\n synchronized (this) {\n logNewFailure(newFailure);\n previousAllocationFailure = newFailure;\n }\n\n if (newFailure instanceof MultipleRunningTimestampServiceError) {\n encounteredMultipleRunn...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_501
{ "fields": [ { "declarator": "LOW_TS = 10L", "modifier": "private static final", "original_string": "private static final long LOW_TS = 10L;", "type": "long", "var_name": "LOW_TS" }, { "declarator": "LOW_TS2 = 2 * LOW_TS", "modifier": "private static final", ...
{ "body": "@Test\n public void stopReadingEarlyWhenEncounteringEntryKnownToBeCommittedAfterSweepTs() {\n immutableTs = 100L;\n\n enqueueWriteCommitted(TABLE_CONS, 10);\n enqueueWriteCommitedAt(TABLE_CONS, 30, 150);\n\n putTimestampIntoTransactionTable(50, 200);\n Map<Integer, Int...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(TargetedSweeper.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(TargetedSweeper.class);", "type": "Logger", "var_name": "log" }, { "de...
{ "body": "@SuppressWarnings(\"checkstyle:RegexpMultiline\") // Suppress VisibleForTesting warning\n @VisibleForTesting\n public long sweepNextBatch(ShardAndStrategy shardStrategy, long maxTsExclusive) {\n assertInitialized();\n return queue.sweepNextBatch(shardStrategy, maxTsExclusive);\n }", ...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_852
{ "fields": [ { "declarator": "START_SEQUENCE = 123", "modifier": "private static final", "original_string": "private static final int START_SEQUENCE = 123;", "type": "int", "var_name": "START_SEQUENCE" }, { "declarator": "BATCH_SIZE = 250", "modifier": "private s...
{ "body": "@Test\n public void readConsecutiveBatch() throws IOException {\n when(mockLog.readRound(anyLong()))\n .thenAnswer(invocation -> valueForRound((long) invocation.getArguments()[0]).persistToBytes());\n\n try (PaxosStateLogBatchReader<PaxosValue> reader = createReader()) {\n ...
{ "fields": [ { "declarator": "delegate", "modifier": "private final", "original_string": "private final PaxosStateLog<V> delegate;", "type": "PaxosStateLog<V>", "var_name": "delegate" }, { "declarator": "hydrator", "modifier": "private final", "original_str...
{ "body": "public List<PaxosRound<V>> readBatch(long startSequence, int numEntries) {\n return AtlasFutures.getUnchecked(\n Futures.allAsList(\n LongStream.range(startSequence, startSequence + numEntries)\n .mapToObj(sequence -> executor.subm...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_917
{ "fields": [ { "declarator": "SHORT_DURATION = ProfilingTimelockService.SLOW_THRESHOLD.dividedBy(5)", "modifier": "private static final", "original_string": "private static final Duration SHORT_DURATION = ProfilingTimelockService.SLOW_THRESHOLD.dividedBy(5);", "type": "Duration", "v...
{ "body": "@Test\n public void logsIfFailedOperationsAreSlow() {\n RuntimeException exception = new RuntimeException(\"kaboom\");\n when(profilingTimelockService.getFreshTimestamp()).thenThrow(exception);\n\n assertThatThrownBy(() -> flushLogsWithCall(LONG_DURATION, profilingTimelockService::g...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(ProfilingTimelockService.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(ProfilingTimelockService.class);", "type": "Logger", "var_name": "log" ...
{ "body": "@Override\n public long getFreshTimestamp() {\n return runTaskTimed(\"getFreshTimestamp\", delegate::getFreshTimestamp);\n }", "class_method_signature": "ProfilingTimelockService.getFreshTimestamp()", "constructor": false, "full_signature": "@Override public long getFreshTimestamp()", ...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_444
{ "fields": [ { "declarator": "NOTHING = getTableRef(\"nothing\")", "modifier": "private static final", "original_string": "private static final TableReference NOTHING = getTableRef(\"nothing\");", "type": "TableReference", "var_name": "NOTHING" }, { "declarator": "CONS...
{ "body": "@Test\n public void partitionWritesByShardStrategyTimestampGroupsOnShardClash() {\n List<WriteInfo> writes = new ArrayList<>();\n for (int i = 0; i <= numShards; i++) {\n writes.add(getWriteInfoWithFixedCellHash(CONSERVATIVE, i));\n }\n Map<PartitionInfo, List<Writ...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(WriteInfoPartitioner.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(WriteInfoPartitioner.class);", "type": "Logger", "var_name": "log" }, {...
{ "body": "@VisibleForTesting\n Map<PartitionInfo, List<WriteInfo>> partitionWritesByShardStrategyTimestamp(List<WriteInfo> writes) {\n int shards = numShards.get();\n return writes.stream()\n .collect(Collectors.groupingBy(write -> getPartitionInfo(write, shards), Collectors.toList())...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_297
{ "fields": [ { "declarator": "NAMESPACE = Namespace.create(\"test\")", "modifier": "private static final", "original_string": "private static final Namespace NAMESPACE = Namespace.create(\"test\");", "type": "Namespace", "var_name": "NAMESPACE" }, { "declarator": "ROW_...
{ "body": "@Test\n public void getFirstBatchForRanges() throws Exception {\n Map<RangeRequest, TokenBackedBasicResultsPage<RowResult<Value>, byte[]>> expectedResult = ImmutableMap.of();\n Map<RangeRequest, TokenBackedBasicResultsPage<RowResult<Value>, byte[]>> result = kvs.getFirstBatchForRanges(\n ...
{ "fields": [ { "declarator": "SERVICE_NAME = \"atlasdb-kvs\"", "modifier": "private static final", "original_string": "private static final String SERVICE_NAME = \"atlasdb-kvs\";", "type": "String", "var_name": "SERVICE_NAME" }, { "declarator": "delegate", "modif...
{ "body": "@Override\n public Map<RangeRequest, TokenBackedBasicResultsPage<RowResult<Value>, byte[]>> getFirstBatchForRanges(\n TableReference tableRef,\n Iterable<RangeRequest> rangeRequests,\n long timestamp) {\n //noinspection unused - try-with-resources closes trace\n ...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_628
{ "fields": [ { "declarator": "timelockService = mock(TimelockService.class)", "modifier": "private final", "original_string": "private final TimelockService timelockService = mock(TimelockService.class);", "type": "TimelockService", "var_name": "timelockService" }, { "...
{ "body": "@Test\n public void shouldRethrowInterruptedException() throws Exception {\n Exception exception = new InterruptedException();\n when(delegate.execute(transaction)).thenThrow(exception);\n assertThatThrownBy(() -> wrappingTask.execute(transaction)).isEqualTo(exception);\n }", "...
{ "fields": [ { "declarator": "delegate", "modifier": "private final", "original_string": "private final TransactionTask<T, E> delegate;", "type": "TransactionTask<T, E>", "var_name": "delegate" }, { "declarator": "timelockService", "modifier": "private final", ...
{ "body": "@Override public T execute(Transaction transaction) throws E {\n try {\n return delegate.execute(transaction);\n } catch (Exception ex) {\n if (shouldRethrowWithoutLockValidation(ex) || immutableTsLockIsValid()) {\n throw ex;\n }\n th...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_782
{ "fields": [ { "declarator": "KEY_1 = {120}", "modifier": "private static final", "original_string": "private static final byte[] KEY_1 = {120};", "type": "byte[]", "var_name": "KEY_1" }, { "declarator": "COLUMN_NAME_1 = \"foo\"", "modifier": "private static fina...
{ "body": "@Test\n public void unappliedResultIsIncompatibleIfTheStateOfTheWorldIsIncorrect() {\n CqlResult mockResult = createMockCqlResult(\n ImmutableList.of(\n createMockCqlRow(buildUnappliedColumnList(COLUMN_BYTES_1, VALUE_2)),\n createMockCq...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(CassandraTimestampUtils.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(CassandraTimestampUtils.class);", "type": "Logger", "var_name": "log" },...
{ "body": "public static void verifyCompatible(CqlResult casResult, Map<String, Pair<byte[], byte[]>> casMap) {\n if (!isSuccessfullyApplied(casResult)) {\n Set<Incongruency> incongruencies = getIncongruencies(casResult, casMap);\n if (!incongruencies.isEmpty()) {\n throw n...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_278
{ "fields": [ { "declarator": "NAMESPACE = Namespace.create(\"test\")", "modifier": "private static final", "original_string": "private static final Namespace NAMESPACE = Namespace.create(\"test\");", "type": "Namespace", "var_name": "NAMESPACE" }, { "declarator": "TABL...
{ "body": "@Test\n public void getSlowLogPresentOnInfoLevel() {\n Appender mockAppender = setLogLevelAndGetAppender(Level.INFO);\n\n doAnswer(waitASecondAndAHalfAndReturn).when(delegate).get(TABLE_REF, timestampByCell);\n kvs.get(TABLE_REF, timestampByCell);\n\n verify(mockAppender).doA...
{ "fields": [ { "declarator": "delegate", "modifier": "private final", "original_string": "private final KeyValueService delegate;", "type": "KeyValueService", "var_name": "delegate" } ], "file": "atlasdb-client/src/main/java/com/palantir/atlasdb/keyvalue/impl/ProfilingKeyVal...
{ "body": "@Override\n public Map<Cell, Value> get(TableReference tableRef, Map<Cell, Long> timestampByCell) {\n long startTime = System.currentTimeMillis();\n return KvsProfilingLogger.maybeLog(() -> delegate.get(tableRef, timestampByCell),\n (logger, stopwatch) ->\n ...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_433
{ "fields": [ { "declarator": "INITIAL_TIMESTAMP = SweepQueueUtils.INITIAL_TIMESTAMP", "modifier": "private static final", "original_string": "private static final long INITIAL_TIMESTAMP = SweepQueueUtils.INITIAL_TIMESTAMP;", "type": "long", "var_name": "INITIAL_TIMESTAMP" }, ...
{ "body": "@Test\n public void canReadInitialSweptTimestamp() {\n assertThat(progress.getLastSweptTimestamp(CONSERVATIVE_TEN)).isEqualTo(INITIAL_TIMESTAMP);\n }", "class_method_signature": "ShardProgressTest.canReadInitialSweptTimestamp()", "constructor": false, "full_signature": "@Test public void...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(ShardProgress.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(ShardProgress.class);", "type": "Logger", "var_name": "log" }, { "declar...
{ "body": "public long getLastSweptTimestamp(ShardAndStrategy shardAndStrategy) {\n return maybeGet(shardAndStrategy).orElse(SweepQueueUtils.INITIAL_TIMESTAMP);\n }", "class_method_signature": "ShardProgress.getLastSweptTimestamp(ShardAndStrategy shardAndStrategy)", "constructor": false, "full_signatu...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_599
{ "fields": [ { "declarator": "EXTRACT_LAST_DIGIT = num -> LongMath.mod(num, 10L)", "modifier": "private static final", "original_string": "private static final Function<Long, Long> EXTRACT_LAST_DIGIT = num -> LongMath.mod(num, 10L);", "type": "Function<Long, Long>", "var_name": "EXT...
{ "body": "@Test\n public void ignoreUnknownFailsIfSeeingATimestampServiceItDoesNotRecognizeForMultipleTimestamps() {\n when(delegate1.get(any())).thenReturn(ImmutableMap.of(1L, 8L, 41L, 48L));\n assertThatThrownBy(() -> lastDigitFiveImpliesUnknownTransactionService.get(ImmutableList.of(1L, 5L, 7L, 4...
{ "fields": [ { "declarator": "timestampToServiceKey", "modifier": "private final", "original_string": "private final Function<Long, T> timestampToServiceKey;", "type": "Function<Long, T>", "var_name": "timestampToServiceKey" }, { "declarator": "keyedServices", "m...
{ "body": "@CheckForNull\n @Override\n public Long get(long startTimestamp) {\n return AtlasFutures.getUnchecked(getInternal(keyedSyncServices, startTimestamp));\n }", "class_method_signature": "SplitKeyDelegatingTransactionService.get(long startTimestamp)", "constructor": false, "full_signature...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_960
{ "fields": [ { "declarator": "CLIENT = \"testClient\"", "modifier": "private static final", "original_string": "private static final String CLIENT = \"testClient\";", "type": "String", "var_name": "CLIENT" }, { "declarator": "USER_AGENT_NAME = \"user-agent\"", "m...
{ "body": "@Test\n public void timelockServiceStatusReturnsHealthyWithoutRequest() {\n TransactionManager tm = TransactionManagers.createInMemory(GenericTestSchema.getSchema());\n assertTrue(tm.getTimelockServiceStatus().isHealthy());\n }", "class_method_signature": "TransactionManagersTest.time...
{ "fields": [ { "declarator": "LOGGING_INTERVAL = 60", "modifier": "private static final", "original_string": "private static final int LOGGING_INTERVAL = 60;", "type": "int", "var_name": "LOGGING_INTERVAL" }, { "declarator": "log = LoggerFactory.getLogger(TransactionMa...
{ "body": "public static TransactionManager createInMemory(Schema schema) {\n return createInMemory(ImmutableSet.of(schema));\n }", "class_method_signature": "TransactionManagers.createInMemory(Schema schema)", "constructor": false, "full_signature": "public static TransactionManager createInMemory(Sc...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_825
{ "fields": [ { "declarator": "KEYSPACE = \"ks\"", "modifier": "private static final", "original_string": "private static final String KEYSPACE = \"ks\";", "type": "String", "var_name": "KEYSPACE" }, { "declarator": "KEYSPACE_2 = \"ks2\"", "modifier": "private sta...
{ "body": "@Test\n public void preservesValidRuntimeConfigIfFollowingLaterConfigIsNotValid() {\n AtomicBoolean first = new AtomicBoolean(true);\n Supplier<Optional<KeyValueServiceRuntimeConfig>> runtimeConfigSupplier = () -> {\n if (first.compareAndSet(true, false)) {\n retu...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(CassandraAtlasDbFactory.class)", "modifier": "private static", "original_string": "private static Logger log = LoggerFactory.getLogger(CassandraAtlasDbFactory.class);", "type": "Logger", "var_name": "log" }, { ...
{ "body": "@VisibleForTesting\n Supplier<CassandraKeyValueServiceRuntimeConfig> preprocessKvsRuntimeConfig(\n Supplier<Optional<KeyValueServiceRuntimeConfig>> runtimeConfig) {\n return () -> {\n Optional<KeyValueServiceRuntimeConfig> configOptional = runtimeConfig.get();\n\n ...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_13
{ "fields": [ { "declarator": "ALL_ZERO = new byte[] { 0, 0, 0, 0 }", "modifier": "private static final", "original_string": "private static final byte[] ALL_ZERO = new byte[] { 0, 0, 0, 0 };", "type": "byte[]", "var_name": "ALL_ZERO" }, { "declarator": "EIGHT_ONES = (b...
{ "body": "@Test\n public void persistAndHydrateMin() {\n assertThat(TargetedSweepMetadata.BYTES_HYDRATOR.hydrateFromBytes(ALL_ZERO_METADATA.persistToBytes()))\n .isEqualTo(ALL_ZERO_METADATA);\n }", "class_method_signature": "TargetedSweepMetadataTest.persistAndHydrateMin()", "construc...
{ "fields": [ { "declarator": "MAX_SHARDS = 256", "modifier": "public static final", "original_string": "public static final int MAX_SHARDS = 256;", "type": "int", "var_name": "MAX_SHARDS" }, { "declarator": "MAX_DEDICATED_ROWS = 64", "modifier": "public static fi...
{ "body": "@Override\n public byte[] persistToBytes() {\n byte[] result = new byte[] { 0, 0, 0, 0 };\n result[0] |= (shard() & BYTE_MASK) >> 2;\n if (dedicatedRow()) {\n result[0] |= USE_DEDICATED_ROWS_MASK;\n }\n if (conservative()) {\n result[0] |= SWEEP_S...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_576
{ "fields": [ { "declarator": "INTERNAL_SCHEMA_METADATA = InternalSchemaMetadata.builder()\n .timestampToTransactionsTableSchemaVersion(\n TimestampPartitioningMap.of(\n ImmutableRangeMap.<Long, Integer>builder()\n ....
{ "body": "@Test\n public void serializesToTheLatestVersion() {\n VersionedInternalSchemaMetadata encoded = InternalSchemaMetadataPayloadCodec.encode(INTERNAL_SCHEMA_METADATA);\n assertThat(encoded.version()).isEqualTo(InternalSchemaMetadataPayloadCodec.LATEST_VERSION);\n }", "class_method_signa...
{ "fields": [ { "declarator": "LATEST_VERSION = 1", "modifier": "public static final", "original_string": "public static final int LATEST_VERSION = 1;", "type": "int", "var_name": "LATEST_VERSION" }, { "declarator": "SUPPORTED_DECODERS =\n ImmutableMap.of(LAT...
{ "body": "static VersionedInternalSchemaMetadata encode(InternalSchemaMetadata internalSchemaMetadata) {\n try {\n return ImmutableVersionedInternalSchemaMetadata.builder()\n .version(LATEST_VERSION)\n .payload(OBJECT_MAPPER.writeValueAsBytes(internalSchemaMeta...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_126
{ "fields": [ { "declarator": "FUTURE_TIMESTAMP = 3141592653589L", "modifier": "private static final", "original_string": "private static final long FUTURE_TIMESTAMP = 3141592653589L;", "type": "long", "var_name": "FUTURE_TIMESTAMP" }, { "declarator": "TEST_TABLE = Tabl...
{ "body": "@Test\n public void setupMigratorCommitsOneTransaction() {\n KeyValueServiceMigrators.setupMigrator(migratorSpec);\n\n ArgumentCaptor<Long> startTimestampCaptor = ArgumentCaptor.forClass(Long.class);\n ArgumentCaptor<Long> commitTimestampCaptor = ArgumentCaptor.forClass(Long.class);...
{ "fields": [ { "declarator": "printer\n = new OutputPrinter(LoggerFactory.getLogger(KeyValueServiceMigrator.class))", "modifier": "private static final", "original_string": "private static final OutputPrinter printer\n = new OutputPrinter(LoggerFactory.getLogger(KeyValueSe...
{ "body": "public static KeyValueServiceMigrator setupMigrator(MigratorSpec migratorSpec) {\n AtlasDbServices fromServices = migratorSpec.fromServices();\n AtlasDbServices toServices = migratorSpec.toServices();\n TimestampManagementService toTimestampManagementService = toServices.getManagedTime...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_608
{ "fields": [ { "declarator": "delegate = mock(TransactionService.class)", "modifier": "private final", "original_string": "private final TransactionService delegate = mock(TransactionService.class);", "type": "TransactionService", "var_name": "delegate" }, { "declarato...
{ "body": "@Test\n public void throwsIfTryingToPutUnlessExistsInvalidTimestamp() {\n assertThatThrownBy(() -> preStartHandlingService.putUnlessExists(NEGATIVE_TIMESTAMP, COMMIT_TIMESTAMP))\n .isInstanceOf(SafeIllegalStateException.class)\n .hasMessageContaining(\"Attempted to p...
{ "fields": [ { "declarator": "delegate", "modifier": "private final", "original_string": "private final TransactionService delegate;", "type": "TransactionService", "var_name": "delegate" }, { "declarator": "synchronousAsyncTransactionService", "modifier": "priva...
{ "body": "@Override\n public void putUnlessExists(long startTimestamp, long commitTimestamp) throws KeyAlreadyExistsException {\n if (!isTimestampValid(startTimestamp)) {\n throw new SafeIllegalStateException(\"Attempted to putUnlessExists({}, {}) which is disallowed.\",\n Saf...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_258
{ "fields": [ { "declarator": "TABLE_NAME = \"testTable\"", "modifier": "private static final", "original_string": "private static final String TABLE_NAME = \"testTable\";", "type": "String", "var_name": "TABLE_NAME" }, { "declarator": "TABLE_REF = TableReference.create...
{ "body": "@Test\n public void testCreateTables() {\n TableReference tableName1 = TableReference.createWithEmptyNamespace(TABLE_NAME + \"1\");\n TableReference tableName2 = TableReference.createWithEmptyNamespace(TABLE_NAME + \"2\");\n mockery.checking(new Expectations(){{\n oneOf(k...
{ "fields": [ { "declarator": "INDEX_SUFFIX = \"idx\"", "modifier": "private static final", "original_string": "private static final String INDEX_SUFFIX = \"idx\";", "type": "String", "var_name": "INDEX_SUFFIX" } ], "file": "atlasdb-client/src/main/java/com/palantir/atlasdb/t...
{ "body": "public static void createTables(KeyValueService kvs, Map<TableReference, TableDefinition> tableRefToDefinition) {\n Map<TableReference, byte[]> tableRefToMetadata = Maps.newHashMapWithExpectedSize(tableRefToDefinition.size());\n for (Entry<TableReference, TableDefinition> tableEntry : tableR...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_937
{ "fields": [ { "declarator": "USER_AGENT_1 = createBaseUserAgent(\"Bond\", \"0.0.7\")", "modifier": "private static final", "original_string": "private static final UserAgent USER_AGENT_1 = createBaseUserAgent(\"Bond\", \"0.0.7\");", "type": "UserAgent", "var_name": "USER_AGENT_1" ...
{ "body": "@Test\n public void detectsAtlasDbHttpClientAgentInPresenceOfUnparseableHeaders() {\n assertThat(ProtocolAwareExceptionMapper.parseProtocolVersionFromUserAgentHeader(\n ImmutableList.of(\"Ich weiß nicht, was ein 'User-Agent' bedeutet\",\n FORMATTED_USER_AGENT...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(ProtocolAwareExceptionMapper.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(ProtocolAwareExceptionMapper.class);", "type": "Logger", "var_name": "l...
{ "body": "@VisibleForTesting\n static Optional<String> parseProtocolVersionFromUserAgentHeader(@Nonnull List<String> userAgentHeader) {\n return userAgentHeader\n .stream()\n .map(UserAgents::tryParse)\n .map(UserAgent::informational)\n .flatMap(L...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_464
{ "fields": [ { "declarator": "SUCCESS_HUGE = SweepIterationResults\n .success(SweepQueueUtils.SWEEP_BATCH_SIZE)", "modifier": "private static final", "original_string": "private static final SweepIterationResult SUCCESS_HUGE = SweepIterationResults\n .success(SweepQueueUti...
{ "body": "@Test\n public void whenInsufficientConsistencyRescheduleAfterBackoff() throws Exception {\n when(sweepIteration.call()).thenReturn(\n SweepIterationResults.insufficientConsistency(),\n SweepIterationResults.insufficientConsistency(),\n SUCCESS_MEDIUM)...
{ "fields": [ { "declarator": "COOL_DOWN = Duration.ofMinutes(5L)", "modifier": "private static final", "original_string": "private static final Duration COOL_DOWN = Duration.ofMinutes(5L);", "type": "Duration", "var_name": "COOL_DOWN" }, { "declarator": "BATCH_CELLS_LO...
{ "body": "void start(int initialThreads) {\n for (int i = 0; i < initialThreads; i++) {\n increaseNumberOfTasks(INITIAL_DELAY);\n }\n }", "class_method_signature": "ScalingSweepTaskScheduler.start(int initialThreads)", "constructor": false, "full_signature": " void start(int initial...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_171
{ "fields": [ { "declarator": "ADDRESS_1 = \"foo:1234\"", "modifier": "private static final", "original_string": "private static final String ADDRESS_1 = \"foo:1234\";", "type": "String", "var_name": "ADDRESS_1" }, { "declarator": "ADDRESS_2 = \"bar:5678\"", "modi...
{ "body": "@Test\n public void canGetLeaderUris() {\n Set<String> leaderUris = PaxosTimeLockUriUtils.getLeaderPaxosUris(ADDRESSES);\n\n assertThat(leaderUris).containsExactlyInAnyOrder(\n String.join(\"/\",\n ADDRESS_1,\n PaxosTimeLockConst...
{ "fields": [], "file": "timelock-impl/src/main/java/com/palantir/atlasdb/timelock/paxos/PaxosTimeLockUriUtils.java", "identifier": "PaxosTimeLockUriUtils", "interfaces": "", "methods": [ { "class_method_signature": "PaxosTimeLockUriUtils.PaxosTimeLockUriUtils()", "constructor": true, "f...
{ "body": "public static Set<String> getLeaderPaxosUris(Set<String> addresses) {\n return getNamespacedUris(\n addresses,\n PaxosTimeLockConstants.INTERNAL_NAMESPACE,\n PaxosTimeLockConstants.LEADER_PAXOS_NAMESPACE);\n }", "class_method_signature": "PaxosTimeLo...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_44
{ "fields": [ { "declarator": "SEVENTY_THREE = 73L", "modifier": "private static final", "original_string": "private static final long SEVENTY_THREE = 73L;", "type": "long", "var_name": "SEVENTY_THREE" }, { "declarator": "EIGHTY_TWO = 82L", "modifier": "private st...
{ "body": "@Test\n public void canGetTimestampFromRangeIfItIsTheLowerBound() {\n assertThat(getPartitionedTimestamps(SEVENTY_THREE_TO_EIGHTY_TWO, 3, 10))\n .containsExactly(SEVENTY_THREE);\n }", "class_method_signature": "TimestampRangesTest.canGetTimestampFromRangeIfItIsTheLowerBound()"...
{ "fields": [], "file": "timestamp-impl/src/main/java/com/palantir/timestamp/TimestampRanges.java", "identifier": "TimestampRanges", "interfaces": "", "methods": [ { "class_method_signature": "TimestampRanges.TimestampRanges()", "constructor": true, "full_signature": "private TimestampR...
{ "body": "public static PartitionedTimestamps getPartitionedTimestamps(TimestampRange range, int residue, int modulus) {\n checkModulusAndResidue(residue, modulus);\n\n long startTimestamp = getLowestTimestampMatchingModulus(range.getLowerBound(), residue, modulus);\n long endTimestamp = range.g...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_521
{ "fields": [ { "declarator": "SWEEP_TIMESTAMP = 3141592L", "modifier": "private static final", "original_string": "private static final long SWEEP_TIMESTAMP = 3141592L;", "type": "long", "var_name": "SWEEP_TIMESTAMP" }, { "declarator": "PROGRESS_TIMESTAMP = 16180L", ...
{ "body": "@Test\n public void throwsWhenAttemptingToMergeWriteInfoAtTheSweepTimestamp() {\n assertThatThrownBy(() -> accumulator.accumulateBatch(SweepBatch.of(\n ImmutableList.of(WriteInfo.write(TABLE_REFERENCE_1, CELL_1, PROGRESS_TIMESTAMP + 5)),\n NO_DEDICATED_ROWS,\n ...
{ "fields": [ { "declarator": "accumulatedWrites = Lists.newArrayList()", "modifier": "private final", "original_string": "private final List<WriteInfo> accumulatedWrites = Lists.newArrayList();", "type": "List<WriteInfo>", "var_name": "accumulatedWrites" }, { "declarat...
{ "body": "void accumulateBatch(SweepBatch sweepBatch) {\n Preconditions.checkState(sweepBatch.lastSweptTimestamp() < sweepTimestamp,\n \"Tried to accumulate a batch %s at timestamp %s that went beyond the sweep timestamp %s!\"\n + \" This is unexpected, and suggests a bug...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_872
{ "fields": [ { "declarator": "tempFolder = new TemporaryFolder()", "modifier": "@Rule\n public", "original_string": "@Rule\n public TemporaryFolder tempFolder = new TemporaryFolder();", "type": "TemporaryFolder", "var_name": "tempFolder" }, { "declarator": "CLIEN...
{ "body": "@Test\n public void canFetchAndCombineDiscontinuousLogs() {\n Set<PaxosValue> paxosValues1\n = PaxosSerializationTestUtils.writeToLogs(acceptorLog, learnerLog, 7, 54);\n Set<PaxosValue> paxosValues2\n = PaxosSerializationTestUtils.writeToLogs(acceptorLog, lear...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(PaxosLogHistoryProvider.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(PaxosLogHistoryProvider.class);", "type": "Logger", "var_name": "log" },...
{ "body": "public List<CompletePaxosHistoryForNamespaceAndUseCase> getHistory() {\n Map<NamespaceAndUseCase, Long> lastVerifiedSequences = getNamespaceAndUseCaseToLastVerifiedSeqMap();\n\n PaxosHistoryOnSingleNode localPaxosHistory = localHistoryLoader.getLocalPaxosHistory(lastVerifiedSequences);\n\n ...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_188
{ "fields": [ { "declarator": "CLIENT_WHO_IS_LED = Client.of(\"client-1\")", "modifier": "private static final", "original_string": "private static final Client CLIENT_WHO_IS_LED = Client.of(\"client-1\");", "type": "Client", "var_name": "CLIENT_WHO_IS_LED" }, { "declar...
{ "body": "@Test\n public void getBackCachedResultIfTryingToPingTwice() {\n CumulativeLeaderPinger cumulativeLeaderPinger = new CumulativeLeaderPinger(\n pingerWithContext,\n Duration.ofSeconds(1),\n Duration.ofSeconds(1),\n HOST_UUID);\n\n ...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(CumulativeLeaderPinger.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(CumulativeLeaderPinger.class);", "type": "Logger", "var_name": "log" }, ...
{ "body": "@Override\n public Future<LeaderPingResult> registerAndPing(UUID requestedUuid, Client client) {\n // Register the client to be checked eventually. In the event that the client has not been in a ping request,\n // we return a future that will succeed when the *next* ping succeeds. In the s...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_472
{ "fields": [ { "declarator": "LOW_TS = 10L", "modifier": "private static final", "original_string": "private static final long LOW_TS = 10L;", "type": "long", "var_name": "LOW_TS" }, { "declarator": "LOW_TS2 = 2 * LOW_TS", "modifier": "private static final", ...
{ "body": "@Test\n public void sweepsThoroughMigrationAsConservative() {\n enqueueWriteCommitted(TABLE_THOR_MIGRATION, LOW_TS);\n assertReadAtTimestampReturnsNothing(TABLE_THOR_MIGRATION, LOW_TS);\n\n sweepNextBatch(ShardAndStrategy.conservative(THOR_MIGRATION_SHARD));\n assertReadAtTim...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(TargetedSweeper.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(TargetedSweeper.class);", "type": "Logger", "var_name": "log" }, { "de...
{ "body": "@SuppressWarnings(\"checkstyle:RegexpMultiline\") // Suppress VisibleForTesting warning\n @VisibleForTesting\n public long sweepNextBatch(ShardAndStrategy shardStrategy, long maxTsExclusive) {\n assertInitialized();\n return queue.sweepNextBatch(shardStrategy, maxTsExclusive);\n }", ...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_921
{ "fields": [ { "declarator": "SHORT_DURATION = ProfilingTimelockService.SLOW_THRESHOLD.dividedBy(5)", "modifier": "private static final", "original_string": "private static final Duration SHORT_DURATION = ProfilingTimelockService.SLOW_THRESHOLD.dividedBy(5);", "type": "Duration", "v...
{ "body": "@Test\n public void logsSlowestOperationIfMultipleOperationsExceedTheSlowThresholdIfNotFirst() {\n accumulateLogsWithCall(LONG_DURATION, profilingTimelockService::getFreshTimestamp);\n flushLogsWithCall(TWO_CENTURIES, () -> profilingTimelockService.startIdentifiedAtlasDbTransactionBatch(1)...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(ProfilingTimelockService.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(ProfilingTimelockService.class);", "type": "Logger", "var_name": "log" ...
{ "body": "@Override\n public List<StartIdentifiedAtlasDbTransactionResponse> startIdentifiedAtlasDbTransactionBatch(int count) {\n return runTaskTimed(\"startIdentifiedAtlasDbTransactionBatch\",\n () -> delegate.startIdentifiedAtlasDbTransactionBatch(count));\n }", "class_method_signatu...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_864
{ "fields": [ { "declarator": "MAX_ATTEMPTS = 3", "modifier": "private static final", "original_string": "private static final int MAX_ATTEMPTS = 3;", "type": "int", "var_name": "MAX_ATTEMPTS" }, { "declarator": "RETRY_PERIOD = Duration.ofSeconds(1)", "modifier": ...
{ "body": "@Test\n public void doesNotRetryIndefinitely() throws ExecutionException {\n ListenableFuture<Integer> result = retrier.execute(function);\n future.set(-1);\n tick(RETRY_PERIOD.multipliedBy(MAX_ATTEMPTS));\n assertThat(Futures.getDone(result)).isEqualTo(-1);\n }", "class...
{ "fields": [ { "declarator": "maxAttempts", "modifier": "private final", "original_string": "private final int maxAttempts;", "type": "int", "var_name": "maxAttempts" }, { "declarator": "delayBetweenAttempts", "modifier": "private final", "original_string":...
{ "body": "public ListenableFuture<T> execute(Supplier<ListenableFuture<T>> supplier) {\n return execute(supplier, maxAttempts);\n }", "class_method_signature": "AsyncRetrier.execute(Supplier<ListenableFuture<T>> supplier)", "constructor": false, "full_signature": "public ListenableFuture<T> execute(S...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_537
{ "fields": [ { "declarator": "VALID_START_TIMESTAMP = 100L", "modifier": "private static final", "original_string": "private static final Long VALID_START_TIMESTAMP = 100L;", "type": "Long", "var_name": "VALID_START_TIMESTAMP" }, { "declarator": "VALID_COMMIT_TIMESTAMP...
{ "body": "@Test\n public void loadShouldThrowIfANullIsToBeReturned() throws Exception {\n doAnswer((invocation) -> NO_TIMESTAMP)\n .when(mockTransactionService).get(VALID_START_TIMESTAMP);\n\n assertThat(loader.load(VALID_START_TIMESTAMP)).isEqualTo(ROLLBACK_TIMESTAMP);\n }", "cl...
{ "fields": [ { "declarator": "ONE_MILLION = 1_000_000L", "modifier": "private static final", "original_string": "private static final Long ONE_MILLION = 1_000_000L;", "type": "Long", "var_name": "ONE_MILLION" }, { "declarator": "cache", "modifier": "private", ...
{ "body": "public long load(long startTs) {\n return cache.get(startTs);\n }", "class_method_signature": "CommitTsCache.load(long startTs)", "constructor": false, "full_signature": "public long load(long startTs)", "identifier": "load", "invocations": [ "get" ], "modifiers": "public", "p...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_52
{ "fields": [ { "declarator": "SEVENTY_THREE = 73L", "modifier": "private static final", "original_string": "private static final long SEVENTY_THREE = 73L;", "type": "long", "var_name": "SEVENTY_THREE" }, { "declarator": "EIGHTY_TWO = 82L", "modifier": "private st...
{ "body": "@Test\n public void returnsAbsentIfTimestampRangeDoesNotContainAnyValuesMatchingModulus() {\n TimestampRange oneTimestamp = TimestampRange.createInclusiveRange(77, 77);\n assertThat(getPartitionedTimestamps(oneTimestamp, 6, 10)).isEmpty();\n }", "class_method_signature": "TimestampRan...
{ "fields": [], "file": "timestamp-impl/src/main/java/com/palantir/timestamp/TimestampRanges.java", "identifier": "TimestampRanges", "interfaces": "", "methods": [ { "class_method_signature": "TimestampRanges.TimestampRanges()", "constructor": true, "full_signature": "private TimestampR...
{ "body": "public static PartitionedTimestamps getPartitionedTimestamps(TimestampRange range, int residue, int modulus) {\n checkModulusAndResidue(residue, modulus);\n\n long startTimestamp = getLowestTimestampMatchingModulus(range.getLowerBound(), residue, modulus);\n long endTimestamp = range.g...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_167
{ "fields": [ { "declarator": "AUTH_HEADER = AuthHeader.valueOf(\"Bearer test\")", "modifier": "private static final", "original_string": "private static final AuthHeader AUTH_HEADER = AuthHeader.valueOf(\"Bearer test\");", "type": "AuthHeader", "var_name": "AUTH_HEADER" }, {...
{ "body": "@Test\n public void jerseyPropagatesExceptions() {\n when(resource.leaderTime(AUTH_HEADER, NAMESPACE)).thenThrow(new BlockingTimeoutException(\"\"));\n assertQosExceptionThrownBy(\n Futures.submitAsync(\n () -> Futures.immediateFuture(service.leaderTim...
{ "fields": [ { "declarator": "exceptionHandler", "modifier": "private final", "original_string": "private final ConjureResourceExceptionHandler exceptionHandler;", "type": "ConjureResourceExceptionHandler", "var_name": "exceptionHandler" }, { "declarator": "timelockSer...
{ "body": "@Override\n public ListenableFuture<LeaderTime> leaderTime(AuthHeader authHeader, String namespace) {\n return handleExceptions(() -> forNamespace(namespace).leaderTime());\n }", "class_method_signature": "ConjureTimelockResource.leaderTime(AuthHeader authHeader, String namespace)", "const...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_649
{ "fields": [ { "declarator": "TIMESTAMP_1 = 10L", "modifier": "private static final", "original_string": "private static final long TIMESTAMP_1 = 10L;", "type": "long", "var_name": "TIMESTAMP_1" }, { "declarator": "TIMESTAMP_2 = 20L", "modifier": "private static ...
{ "body": "@Test\n public void getMillisForTimestampIfNotPunchedBeforeWhenPunchedLongAgo() {\n KeyValueService kvs = Mockito.spy(new InMemoryKeyValueService(false));\n puncherStore = initializePuncherStore(PUNCHER_HISTORY, kvs);\n // Punched: (10, 100), (20, 200), (30, 300)\n // Argumen...
{ "fields": [ { "declarator": "COLUMN = \"t\".getBytes(StandardCharsets.UTF_8)", "modifier": "private static final", "original_string": "private static final byte[] COLUMN = \"t\".getBytes(StandardCharsets.UTF_8);", "type": "byte[]", "var_name": "COLUMN" }, { "declarato...
{ "body": "public static long getMillisForTimestampIfNotPunchedBefore(KeyValueService kvs, long timestamp, long lowerBound) {\n if (get(kvs, Math.max(0L, lowerBound)) < timestamp) {\n return getMillisForTimestamp(kvs, timestamp);\n } else {\n return lowerBound;\n }\n }", ...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_219
{ "fields": [ { "declarator": "LOGIN = \"login\"", "modifier": "private static final", "original_string": "private static final String LOGIN = \"login\";", "type": "String", "var_name": "LOGIN" }, { "declarator": "HOST = \"host\"", "modifier": "private static fina...
{ "body": "@Test\n public void databaseUrlGeneratedCorrectlyFromSid() {\n OracleConnectionConfig connectionConfig = getBaseBuilder()\n .sid(SID)\n .build();\n assertThat(connectionConfig.getUrl()).contains(\"SID=\" + SID);\n }", "class_method_signature": "OracleConn...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(OracleConnectionConfig.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(OracleConnectionConfig.class);", "type": "Logger", "var_name": "log" }, ...
{ "body": "@Override\n @Value.Default\n public String getUrl() {\n if (getServerDn().isPresent()) {\n return String.format(\"jdbc:oracle:thin:@(DESCRIPTION=\"\n + \"(ADDRESS=(PROTOCOL=%s)(HOST=%s)(PORT=%s))\"\n + \"(CONNECT_DATA=(%s))\"\n ...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_976
{ "fields": [ { "declarator": "LOCK_IMMUTABLE_TIMESTAMP_RESPONSE =\n LockImmutableTimestampResponse.of(1L, LockToken.of(UUID.randomUUID()))", "modifier": "private static final", "original_string": "private static final LockImmutableTimestampResponse LOCK_IMMUTABLE_TIMESTAMP_RESPONSE =...
{ "body": "@Test\n public void startIdentifiedAtlasDbTransactionBatchShouldFail() {\n List<StartIdentifiedAtlasDbTransactionResponse> responses =\n ImmutableList.of(makeResponse(1L), makeResponse(2L), makeResponse(3L));\n\n when(rawTimelockService.startIdentifiedAtlasDbTransactionBatch...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(TimestampCorroboratingTimelockService.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(TimestampCorroboratingTimelockService.class);", "type": "Logger", ...
{ "body": "@Override\n public List<StartIdentifiedAtlasDbTransactionResponse> startIdentifiedAtlasDbTransactionBatch(int count) {\n return checkAndUpdateLowerBound(() -> delegate.startIdentifiedAtlasDbTransactionBatch(count),\n responses -> Collections.min(getTimestampsFromResponses(responses...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_425
{ "fields": [ { "declarator": "LOW_START_TS = 6L", "modifier": "private static final", "original_string": "private static final long LOW_START_TS = 6L;", "type": "long", "var_name": "LOW_START_TS" }, { "declarator": "LOW_COMMIT_TS = 7L", "modifier": "private stati...
{ "body": "@Test\n public void thoroughGetTimestampToSweepDoesNotAddSentinels() {\n long sweepTimestampHigherThanCommitTimestamp = HIGH_COMMIT_TS + 1;\n List<CandidateCellForSweeping> candidates = twoCommittedTimestampsForSingleCell();\n SweepableCellFilter filter = new SweepableCellFilter(\n ...
{ "fields": [ { "declarator": "commitTsCache", "modifier": "private final", "original_string": "private final CommitTsCache commitTsCache;", "type": "CommitTsCache", "var_name": "commitTsCache" }, { "declarator": "sweeper", "modifier": "private final", "orig...
{ "body": "public BatchOfCellsToSweep getCellsToSweep(List<CandidateCellForSweeping> candidates) {\n Map<Long, Long> startToCommitTs = commitTsCache.loadBatch(getAllValidTimestamps(candidates));\n ImmutableBatchOfCellsToSweep.Builder builder = ImmutableBatchOfCellsToSweep.builder();\n long numCel...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_130
{ "fields": [ { "declarator": "FUTURE_TIMESTAMP = 3141592653589L", "modifier": "private static final", "original_string": "private static final long FUTURE_TIMESTAMP = 3141592653589L;", "type": "long", "var_name": "FUTURE_TIMESTAMP" }, { "declarator": "TEST_TABLE = Tabl...
{ "body": "@Test\n public void setupCopiesTableMetadata() {\n toKvs.createTables(TEST_AND_CHECKPOINT_TABLES);\n\n KeyValueServiceMigrator migrator = KeyValueServiceMigrators.setupMigrator(migratorSpec);\n migrator.setup();\n\n assertThat(fromKvs.getMetadataForTable(TEST_TABLE)).isEqualT...
{ "fields": [ { "declarator": "printer\n = new OutputPrinter(LoggerFactory.getLogger(KeyValueServiceMigrator.class))", "modifier": "private static final", "original_string": "private static final OutputPrinter printer\n = new OutputPrinter(LoggerFactory.getLogger(KeyValueSe...
{ "body": "public static KeyValueServiceMigrator setupMigrator(MigratorSpec migratorSpec) {\n AtlasDbServices fromServices = migratorSpec.fromServices();\n AtlasDbServices toServices = migratorSpec.toServices();\n TimestampManagementService toTimestampManagementService = toServices.getManagedTime...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_560
{ "fields": [ { "declarator": "TABLE_STRING = \"ns.table\"", "modifier": "private static final", "original_string": "private static final String TABLE_STRING = \"ns.table\";", "type": "String", "var_name": "TABLE_STRING" }, { "declarator": "TABLE = TableReference.create...
{ "body": "@Test\n public void doesNotRunIfDisabled() throws InterruptedException {\n BackgroundCompactor backgroundCompactor = new BackgroundCompactor(metricsManager,\n txManager,\n kvs,\n mock(LockService.class),\n () -> ImmutableCompactorConfig....
{ "fields": [ { "declarator": "SLEEP_TIME_WHEN_NOTHING_TO_COMPACT_MIN_MILLIS = TimeUnit.SECONDS.toMillis(5)", "modifier": "public static final", "original_string": "public static final long SLEEP_TIME_WHEN_NOTHING_TO_COMPACT_MIN_MILLIS = TimeUnit.SECONDS.toMillis(5);", "type": "long", ...
{ "body": "@VisibleForTesting\n CompactionOutcome grabLockAndRunOnce(SingleLockService compactorLock)\n throws InterruptedException {\n CompactorConfig config = compactorConfigSupplier.get();\n if (!config.enableCompaction()) {\n log.debug(\"Skipping compaction because it is cur...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_833
{ "fields": [], "file": "atlasdb-cassandra/src/test/java/com/palantir/atlasdb/cassandra/CassandraCellLoadingConfigTest.java", "identifier": "CassandraCellLoadingConfigTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void cannotCreateConfigWithBothLimitsNonPositive() {\n assertThatThrownBy(() -> CassandraCellLoadingConfig.of(-512, -333))\n .isInstanceOf(IllegalStateException.class)\n .hasMessageContaining(\"should be positive\"); // could be either one\n ass...
{ "fields": [], "file": "atlasdb-cassandra/src/main/java/com/palantir/atlasdb/cassandra/CassandraCellLoadingConfig.java", "identifier": "CassandraCellLoadingConfig", "interfaces": "", "methods": [ { "class_method_signature": "CassandraCellLoadingConfig.crossColumnLoadBatchLimit()", "constructo...
{ "body": "static CassandraCellLoadingConfig of(int crossColumnLoadBatchLimit, int singleQueryLoadBatchLimit) {\n return ImmutableCassandraCellLoadingConfig.builder()\n .crossColumnLoadBatchLimit(crossColumnLoadBatchLimit)\n .singleQueryLoadBatchLimit(singleQueryLoadBatchLimit)\n ...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_999
{ "fields": [ { "declarator": "COORDINATION_ROW = PtBytes.toBytes(\"aaaaa\")", "modifier": "private static final", "original_string": "private static final byte[] COORDINATION_ROW = PtBytes.toBytes(\"aaaaa\");", "type": "byte[]", "var_name": "COORDINATION_ROW" }, { "dec...
{ "body": "@Test\n public void throwsWhenCheckAndSetFailsWithNoDetailsAndNoValueInKvs() {\n KeyValueService mockKvs = mock(KeyValueService.class);\n KeyValueServiceCoordinationStore<String> store = coordinationStoreForKvs(mockKvs);\n doThrow(new CheckAndSetException(\"No detail\")).when(mockKv...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(KeyValueServiceCoordinationStore.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(KeyValueServiceCoordinationStore.class);", "type": "Logger", "var_n...
{ "body": "@SuppressWarnings(\"OptionalUsedAsFieldOrParameterType\")\n @VisibleForTesting\n CheckAndSetResult<SequenceAndBound> checkAndSetCoordinationValue(\n Optional<SequenceAndBound> oldValue, SequenceAndBound newValue) {\n if (oldValue.map(presentOldValue -> Objects.equals(presentOldValue...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_777
{ "fields": [ { "declarator": "KEY_1 = {120}", "modifier": "private static final", "original_string": "private static final byte[] KEY_1 = {120};", "type": "byte[]", "var_name": "KEY_1" }, { "declarator": "COLUMN_NAME_1 = \"foo\"", "modifier": "private static fina...
{ "body": "@Test\n public void checkAndSetThrowsIfTryingToSetToNull() {\n assertThatThrownBy(() -> CassandraTimestampUtils.constructCheckAndSetMultipleQuery(\n ImmutableMap.of(COLUMN_NAME_1, Pair.create(VALUE_1, null))))\n .isInstanceOf(IllegalStateException.class);\n }", ...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(CassandraTimestampUtils.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(CassandraTimestampUtils.class);", "type": "Logger", "var_name": "log" },...
{ "body": "public static CqlQuery constructCheckAndSetMultipleQuery(Map<String, Pair<byte[], byte[]>> checkAndSetRequest) {\n ImmutableCqlSinglePartitionBatchQuery.Builder batchQueryBuilder = CqlSinglePartitionBatchQuery.builder();\n checkAndSetRequest.forEach((columnName, value) ->\n bat...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_327
{ "fields": [ { "declarator": "TABLE_REFERENCE_1 = TableReference.createFromFullyQualifiedName(\"atlas.db\")", "modifier": "private static final", "original_string": "private static final TableReference TABLE_REFERENCE_1 = TableReference.createFromFullyQualifiedName(\"atlas.db\");", "type"...
{ "body": "@Test\n public void canCoalesceDataFromMultipleTables() {\n ImmutableSafeLoggableData.Builder builder = ImmutableSafeLoggableData.builder();\n SafeLoggableDataUtils.addLoggableNamesToBuilder(builder, TABLE_REFERENCE_1, TABLE_METADATA_1);\n SafeLoggableDataUtils.addLoggableNamesToBui...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(SafeLoggableDataUtils.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(SafeLoggableDataUtils.class);", "type": "Logger", "var_name": "log" }, ...
{ "body": "@VisibleForTesting\n static void addLoggableNamesToBuilder(\n ImmutableSafeLoggableData.Builder builder,\n TableReference ref,\n TableMetadata tableMetadata) {\n if (IS_SAFE.test(tableMetadata.getNameLogSafety())) {\n builder.addPermittedTableReferences...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_632
{ "fields": [ { "declarator": "EXCEPTION = new IllegalStateException(\"bad\")", "modifier": "private static final", "original_string": "private static final RuntimeException EXCEPTION = new IllegalStateException(\"bad\");", "type": "RuntimeException", "var_name": "EXCEPTION" }, ...
{ "body": "@Test\n public void returnsConsistentIfBoundIsBelowFreshTimestamp() {\n TimestampCorroborationConsistencyCheck check = createForTimestamps(10, 20);\n assertThat(check.apply(mock(TransactionManager.class)))\n .isEqualTo(ImmutableTransactionManagerConsistencyResult.builder()\n...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(TimestampCorroborationConsistencyCheck.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(TimestampCorroborationConsistencyCheck.class);", "type": "Logger", ...
{ "body": "@Override\n public TransactionManagerConsistencyResult apply(TransactionManager transactionManager) {\n // The ordering is important, because if we get a timestamp first, we may have a false positive if we have\n // a long GC between grabbing the fresh timestamp and the lower bound (e.g. i...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_798
{ "fields": [ { "declarator": "ec2SnitchSupplier = () -> \"org.apache.cassandra.locator.Ec2Snitch\"", "modifier": "private static final", "original_string": "private static final Supplier<String> ec2SnitchSupplier = () -> \"org.apache.cassandra.locator.Ec2Snitch\";", "type": "Supplier<Stri...
{ "body": "@Test\n public void shouldReturnEmptyLocationFromSnitchException() {\n Supplier<String> badSnitchSupplier = () -> {\n throw new RuntimeException();\n };\n\n Supplier<Optional<HostLocation>> hostLocationSupplier = new HostLocationSupplier(badSnitchSupplier,\n ...
{ "fields": [ { "declarator": "snitchSupplier", "modifier": "private final", "original_string": "private final Supplier<String> snitchSupplier;", "type": "Supplier<String>", "var_name": "snitchSupplier" }, { "declarator": "ec2Supplier", "modifier": "private final"...
{ "body": "@Override\n public Optional<HostLocation> get() {\n try {\n if (overrideLocation.isPresent()) {\n return overrideLocation;\n }\n\n String snitch = snitchSupplier.get();\n log.debug(\"Snitch successfully detected\", SafeArg.of(\"snitch\", ...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_262
{ "fields": [ { "declarator": "SHORT_NAME = \"shortName\"", "modifier": "private static final", "original_string": "private static final String SHORT_NAME = \"shortName\";", "type": "String", "var_name": "SHORT_NAME" }, { "declarator": "LONG_NAME = \"longName\"", ...
{ "body": "@Test\n public void nameCanBeSpecifiedToBeNotLoggable() {\n assertThat(NAME_NOT_LOGGABLE_DESCRIPTION.getLogSafety()).isEqualTo(LogSafety.UNSAFE);\n }", "class_method_signature": "NamedColumnDescriptionTest.nameCanBeSpecifiedToBeNotLoggable()", "constructor": false, "full_signature": "@Te...
{ "fields": [ { "declarator": "shortName", "modifier": "final", "original_string": "final String shortName;", "type": "String", "var_name": "shortName" }, { "declarator": "longName", "modifier": "final", "original_string": "final String longName;", "ty...
{ "body": "public LogSafety getLogSafety() {\n return logSafety;\n }", "class_method_signature": "NamedColumnDescription.getLogSafety()", "constructor": false, "full_signature": "public LogSafety getLogSafety()", "identifier": "getLogSafety", "invocations": [], "modifiers": "public", "paramete...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_848
{ "fields": [ { "declarator": "tempFolder = new TemporaryFolder()", "modifier": "@Rule\n public", "original_string": "@Rule\n public TemporaryFolder tempFolder = new TemporaryFolder();", "type": "TemporaryFolder", "var_name": "tempFolder" }, { "declarator": "CLIEN...
{ "body": "@Test\n public void canWriteEmptyBatch() {\n assertThatCode(() -> stateLog.writeBatchOfRounds(ImmutableList.of())).doesNotThrowAnyException();\n }", "class_method_signature": "SqlitePaxosStateLogTest.canWriteEmptyBatch()", "constructor": false, "full_signature": "@Test public void canWri...
{ "fields": [ { "declarator": "namespace", "modifier": "private final", "original_string": "private final Client namespace;", "type": "Client", "var_name": "namespace" }, { "declarator": "useCase", "modifier": "private final", "original_string": "private fin...
{ "body": "@Override\n public void writeBatchOfRounds(Iterable<PaxosRound<V>> rounds) {\n execute(dao -> dao.writeBatchOfRounds(namespace, useCase, rounds));\n }", "class_method_signature": "SqlitePaxosStateLog.writeBatchOfRounds(Iterable<PaxosRound<V>> rounds)", "constructor": false, "full_signatu...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_91
{ "fields": [ { "declarator": "CLUSTER_URIS = ImmutableList.of(\"foo:1\", \"bar:2\", \"baz:3\")", "modifier": "private static final", "original_string": "private static final List<String> CLUSTER_URIS = ImmutableList.of(\"foo:1\", \"bar:2\", \"baz:3\");", "type": "List<String>", "var...
{ "body": "@Test\n public void convertAddressToUrlCreatesComponentsCorrectly_NoSsl() throws MalformedURLException {\n assertThat(PaxosRemotingUtils.convertAddressToUrl(NO_SSL_TIMELOCK, \"foo:42/timelock/api/timelock\"))\n .isEqualTo(new URL(\"http\", \"foo\", 42, \"/timelock/api/timelock\"));...
{ "fields": [], "file": "timelock-agent/src/main/java/com/palantir/timelock/paxos/PaxosRemotingUtils.java", "identifier": "PaxosRemotingUtils", "interfaces": "", "methods": [ { "class_method_signature": "PaxosRemotingUtils.PaxosRemotingUtils()", "constructor": true, "full_signature": "pr...
{ "body": "public static URL convertAddressToUrl(TimeLockInstallConfiguration install, String address) {\n try {\n return UriBuilder.fromPath(addProtocol(install, address)).build().toURL();\n } catch (MalformedURLException e) {\n throw new RuntimeException(e);\n }\n }", ...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_370
{ "fields": [], "file": "atlasdb-perf/src/test/java/com/palantir/atlasdb/performance/backend/KeyValueServiceInstrumentationTest.java", "identifier": "KeyValueServiceInstrumentationTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void forDatabaseThrowsForInvalidClassName() {\n assertThatThrownBy(() -> KeyValueServiceInstrumentation.forDatabase(\"FAKE_BACKEND\"))\n .isExactlyInstanceOf(IllegalArgumentException.class)\n .hasMessage(\"Exception trying to instantiate class FAKE_BAC...
{ "fields": [ { "declarator": "kvsPort", "modifier": "private final", "original_string": "private final int kvsPort;", "type": "int", "var_name": "kvsPort" }, { "declarator": "dockerComposeFileName", "modifier": "private final", "original_string": "private f...
{ "body": "public static KeyValueServiceInstrumentation forDatabase(String backend) throws IllegalArgumentException {\n if (classNames.containsKey(backend)) {\n return backendMap.get(classNames.get(backend));\n } else {\n return forClass(backend);\n }\n }", "class_metho...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_720
{ "fields": [], "file": "atlasdb-commons/src/test/java/com/palantir/common/base/BatchingVisitablesTest.java", "identifier": "BatchingVisitablesTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testFlatten() {\n List<String> firstChars = Lists.newArrayList();\n for (int i = 0; i < 10; i++) {\n firstChars.add(\"\" + (char) ('a' + i));\n }\n BatchingVisitable<String> outerVisitable = BatchingVisitableFromIterable.create(firstChars);\n ...
{ "fields": [ { "declarator": "DEFAULT_BATCH_SIZE = 1000", "modifier": "public static final", "original_string": "public static final int DEFAULT_BATCH_SIZE = 1000;", "type": "int", "var_name": "DEFAULT_BATCH_SIZE" }, { "declarator": "KEEP_ALL_BATCH_SIZE = 100000", ...
{ "body": "public static <T> BatchingVisitableView<T> flatten(final int outerBatchHint, final BatchingVisitable<? extends BatchingVisitable<? extends T>> inputs) {\n com.palantir.logsafe.Preconditions.checkNotNull(inputs);\n return BatchingVisitableView.of(new AbstractBatchingVisitable<T>() {\n ...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_235
{ "fields": [ { "declarator": "TAG_KEY_1 = \"tag1\"", "modifier": "private static final", "original_string": "private static final String TAG_KEY_1 = \"tag1\";", "type": "String", "var_name": "TAG_KEY_1" }, { "declarator": "TAG_VALUE_1 = \"tagVal1\"", "modifier": ...
{ "body": "@Test\n public void shouldThrowIfFirstMetricTagKeyContainsEquals() throws Exception {\n assertThatThrownBy(() -> MetricNameUtils.getMetricName(METRIC_NAME,\n ImmutableMap.of(\"tag=1\", TAG_VALUE_1, TAG_KEY_2, TAG_VALUE_2)))\n .isInstanceOf(IllegalArgumentException.cl...
{ "fields": [ { "declarator": "MAX_ALLOWED_TAGS = 10", "modifier": "private static final", "original_string": "private static final int MAX_ALLOWED_TAGS = 10;", "type": "int", "var_name": "MAX_ALLOWED_TAGS" }, { "declarator": "DELIMITER = \";\"", "modifier": "priv...
{ "body": "public static String getMetricName(String metricName, Map<String, String> tags) {\n Preconditions.checkArgument(tags.size() <= MAX_ALLOWED_TAGS, \"Too many tags set on the metric %s. \"\n + \"Maximum allowed number of tags is %s, found %s.\", metricName, MAX_ALLOWED_TAGS, tags.size())...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_665
{ "fields": [ { "declarator": "counter", "modifier": "private", "original_string": "private long counter;", "type": "long", "var_name": "counter" }, { "declarator": "supplierCounter", "modifier": "private", "original_string": "private long supplierCounter;",...
{ "body": "@Test\n public void appliesFunctionOnlyOnceWhenUnderlyingSupplierIsConstant() {\n when(mockVersionedSupplier.get()).thenReturn(VersionedType.of(3L, 0));\n assertThat(counter).isEqualTo(0);\n\n assertThat(testSupplier.get()).isEqualTo(6);\n assertThat(testSupplier.get()).isEqu...
{ "fields": [ { "declarator": "function", "modifier": "private final", "original_string": "private final Function<T, R> function;", "type": "Function<T, R>", "var_name": "function" }, { "declarator": "supplier", "modifier": "private final", "original_string"...
{ "body": "@Override\n public R get() {\n if (!Objects.equals(supplier.get().version(), lastSuppliedVersion)\n || lastComputedTime + maxTimeBetweenRecomputes < clock.getTimeMillis()) {\n recompute();\n }\n return cached;\n }", "class_method_signature": "CachedCom...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_29
{ "fields": [ { "declarator": "TABLE = TableReference.createFromFullyQualifiedName(\"test.table\")", "modifier": "private static final", "original_string": "private static final TableReference TABLE = TableReference.createFromFullyQualifiedName(\"test.table\");", "type": "TableReference", ...
{ "body": "@Test\n public void columnEndingWithZeroIsIgnoredForCells() {\n LockDescriptor descriptor = AtlasCellLockDescriptor.of(TABLE.getQualifiedName(), NO_ZERO_ROW, END_WITH_ZERO);\n assertThat(AtlasLockDescriptorUtils.candidateCells(descriptor))\n .containsExactly(CellReference.of...
{ "fields": [], "file": "atlasdb-api/src/main/java/com/palantir/atlasdb/keyvalue/api/AtlasLockDescriptorUtils.java", "identifier": "AtlasLockDescriptorUtils", "interfaces": "", "methods": [ { "class_method_signature": "AtlasLockDescriptorUtils.AtlasLockDescriptorUtils()", "constructor": true, ...
{ "body": "public static List<CellReference> candidateCells(LockDescriptor lockDescriptor) {\n Optional<TableRefAndRemainder> tableRefAndRemainder = tryParseTableRef(lockDescriptor);\n if (!tableRefAndRemainder.isPresent()) {\n return ImmutableList.of();\n }\n\n TableReference t...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_409
{ "fields": [ { "declarator": "enqueuedWrites = new AtomicLong()", "modifier": "private final", "original_string": "private final AtomicLong enqueuedWrites = new AtomicLong();", "type": "AtomicLong", "var_name": "enqueuedWrites" }, { "declarator": "entriesRead = new Ato...
{ "body": "@Test\n public void shouldNotInitiallyBePublished() {\n assertThat(filter.shouldPublish()).isFalse();\n }", "class_method_signature": "TargetedSweepMetricPublicationFilterTest.shouldNotInitiallyBePublished()", "constructor": false, "full_signature": "@Test public void shouldNotInitiallyB...
{ "fields": [ { "declarator": "MINIMUM_READS_WRITES_TO_BE_CONSIDERED_ACTIVE = 1_000", "modifier": "@VisibleForTesting\n static final", "original_string": "@VisibleForTesting\n static final long MINIMUM_READS_WRITES_TO_BE_CONSIDERED_ACTIVE = 1_000;", "type": "long", "var_name": ...
{ "body": "@Override\n public boolean shouldPublish() {\n if (publicationLatch.get()) {\n return true;\n }\n boolean conditionsAchieved = testConditions();\n if (conditionsAchieved) {\n publicationLatch.set(true);\n }\n return conditionsAchieved;\n ...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_736
{ "fields": [], "file": "atlasdb-cassandra/src/test/java/com/palantir/atlasdb/keyvalue/cassandra/CassandraApiVersionTest.java", "identifier": "CassandraApiVersionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test public void\n version_18_40_0_does_not_support_cas() {\n CassandraApiVersion version = new CassandraApiVersion(\"18.40.0\");\n assertThat(version.supportsCheckAndSet(), is(false));\n }", "class_method_signature": "CassandraApiVersionTest.version_18_40_0_does_not_support_cas()", ...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(CassandraApiVersion.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(CassandraApiVersion.class);", "type": "Logger", "var_name": "LOGGER" }...
{ "body": "public boolean supportsCheckAndSet() {\n boolean supportsCheckAndSet = majorVersion > 19 || (majorVersion == 19 && minorVersion >= 37);\n\n if (supportsCheckAndSet) {\n LOGGER.info(\"Your cassandra api version ({}) supports check and set.\",\n SafeArg.of(\"cassan...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_366
{ "fields": [ { "declarator": "SUITE_NAME = \"PerformanceResults\"", "modifier": "private static final", "original_string": "private static final String SUITE_NAME = \"PerformanceResults\";", "type": "String", "var_name": "SUITE_NAME" }, { "declarator": "BENCHMARK_NAME ...
{ "body": "@Test\n public void doesNotDownsampleSmallSample() {\n MultisetStatistics stats = new MultisetStatistics();\n stats.addValue(3.14, 1);\n Mockito.when(mockResult.getStatistics()).thenReturn(stats);\n assertThat(PerformanceResults.getData(mockRunResult)).containsExactlyElements...
{ "fields": [ { "declarator": "KVS_AGNOSTIC_SUFFIX = \"N/A\"", "modifier": "@VisibleForTesting\n static final", "original_string": "@VisibleForTesting\n static final String KVS_AGNOSTIC_SUFFIX = \"N/A\";", "type": "String", "var_name": "KVS_AGNOSTIC_SUFFIX" }, { "...
{ "body": "@VisibleForTesting\n static List<Double> getData(RunResult result) {\n return getRawResults(result.getPrimaryResult().getStatistics());\n }", "class_method_signature": "PerformanceResults.getData(RunResult result)", "constructor": false, "full_signature": "@VisibleForTesting static List<...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_389
{ "fields": [ { "declarator": "FQ_TABLE = TableReference.createFromFullyQualifiedName(\"test.test\")", "modifier": "private static final", "original_string": "private static final TableReference FQ_TABLE = TableReference.createFromFullyQualifiedName(\"test.test\");", "type": "TableReferenc...
{ "body": "@Test\n public void getMappedTableNameIsIdentityForTablesWithoutNamespace() throws TableMappingNotFoundException {\n assertThat(tableMapping.getMappedTableName(TABLE_EMPTY_NAMESPACE)).isEqualTo(TABLE_EMPTY_NAMESPACE);\n }", "class_method_signature": "KvTableMappingServiceTest.getMappedTableN...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(KvTableMappingService.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(KvTableMappingService.class);", "type": "Logger", "var_name": "log" }, ...
{ "body": "@Override\n public TableReference getMappedTableName(TableReference tableRef) throws TableMappingNotFoundException {\n if (tableRef.getNamespace().isEmptyNamespace()) {\n return tableRef;\n }\n\n TableReference shortTableName = getMappedTableRef(tableRef);\n valida...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_673
{ "fields": [ { "declarator": "STRING_SUPPLIER = mock(Supplier.class)", "modifier": "private final", "original_string": "private final Supplier<String> STRING_SUPPLIER = mock(Supplier.class);", "type": "Supplier<String>", "var_name": "STRING_SUPPLIER" }, { "declarator":...
{ "body": "@Test\n public void onlyCallsTransformOnceIfUnderlyingValueNotChanged() {\n when(STRING_SUPPLIER.get()).thenReturn(\"42\");\n IntStream.range(0, 10).forEach(\n $ -> assertThat(TRANSFORMING_SUPPLIER.get()).isEqualTo(42));\n verify(STRING_SUPPLIER, times(10)).get();\n ...
{ "fields": [ { "declarator": "inputSupplier", "modifier": "private final", "original_string": "private final Supplier<T> inputSupplier;", "type": "Supplier<T>", "var_name": "inputSupplier" }, { "declarator": "outputFunction", "modifier": "private final", "o...
{ "body": "@Override\n public synchronized U get() {\n T currentInput = inputSupplier.get();\n\n if (Objects.equals(cachedInput, currentInput)) {\n return cachedOutput;\n }\n\n cachedInput = currentInput;\n cachedOutput = outputFunction.apply(cachedInput);\n ret...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_223
{ "fields": [ { "declarator": "CUSTOM_METRIC_NAME = \"foo\"", "modifier": "private static final", "original_string": "private static final String CUSTOM_METRIC_NAME = \"foo\";", "type": "String", "var_name": "CUSTOM_METRIC_NAME" }, { "declarator": "PING_METHOD = \"ping\...
{ "body": "@Test\n public void instrumentWithDefaultNameTimed() {\n TestService service = AtlasDbMetrics.instrumentTimed(metrics, TestService.class, testService);\n\n assertMethodInstrumented(PING_REQUEST_METRIC, service::ping);\n assertMethodNotInstrumented(PING_NOT_TIMED_METRIC, service::pin...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(AtlasDbMetrics.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(AtlasDbMetrics.class);", "type": "Logger", "var_name": "log" } ], "file": "at...
{ "body": "public static <T, U extends T> T instrumentTimed(\n MetricRegistry metricRegistry, Class<T> serviceInterface, U service) {\n return instrument(metricRegistry, serviceInterface, service, serviceInterface.getName(), instrumentTimedOnly());\n }", "class_method_signature": "AtlasDbMetric...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_809
{ "fields": [ { "declarator": "MESSAGE = \"a exception\"", "modifier": "private static final", "original_string": "private static final String MESSAGE = \"a exception\";", "type": "String", "var_name": "MESSAGE" }, { "declarator": "CAUSE = new Exception()", "modif...
{ "body": "@Test\n public void retryableExceptionsAreRetryableDefault() {\n for (Exception ex : ALL_EXCEPTIONS) {\n assertTrue(String.format(\"Exception %s should be retryable\", ex), handlerLegacy.isRetryable(ex));\n }\n assertFalse(\"RuntimeException is not retryable\", handlerLeg...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(CassandraRequestExceptionHandler.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(CassandraRequestExceptionHandler.class);", "type": "Logger", "var_n...
{ "body": "@VisibleForTesting\n static boolean isRetryable(Exception ex) {\n return isConnectionException(ex)\n || isTransientException(ex)\n || isIndicativeOfCassandraLoad(ex)\n || isFastFailoverException(ex);\n }", "class_method_signature": "CassandraReque...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_331
{ "fields": [ { "declarator": "TABLE_REFERENCE_1 = TableReference.createFromFullyQualifiedName(\"atlas.db\")", "modifier": "private static final", "original_string": "private static final TableReference TABLE_REFERENCE_1 = TableReference.createFromFullyQualifiedName(\"atlas.db\");", "type"...
{ "body": "@Test\n public void rowComponentsNotExplicitlyMarkedSafeAreUnsafe() {\n SafeLoggableData safeLoggableData = ImmutableSafeLoggableData.builder()\n .putPermittedRowComponents(TABLE_REFERENCE_1, ImmutableSet.of(ROW_COMPONENT_1))\n .build();\n\n assertThat(safeLog...
{ "fields": [], "file": "atlasdb-client/src/main/java/com/palantir/atlasdb/logging/SafeLoggableData.java", "identifier": "SafeLoggableData", "interfaces": "implements KeyValueServiceLogArbitrator", "methods": [ { "class_method_signature": "SafeLoggableData.permittedTableReferences()", "constru...
{ "body": "@Override\n public boolean isRowComponentNameSafe(TableReference tableReference, String rowComponentName) {\n return permittedRowComponents().containsKey(tableReference)\n && permittedRowComponents().get(tableReference).contains(rowComponentName);\n }", "class_method_signature...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_761
{ "fields": [ { "declarator": "DENSELY_ACCESSED_WIDE_ROWS_METADATA\n = TableMetadata.internal().denselyAccessedWideRows(true).build()", "modifier": "private static final", "original_string": "private static final TableMetadata DENSELY_ACCESSED_WIDE_ROWS_METADATA\n = TableMe...
{ "body": "@Test\n public void tablesWithNegativeLookupsHaveDifferentBloomFilterFpChance() {\n assertThat(CassandraTableOptions.bloomFilterFpChance(NEGATIVE_LOOKUPS_METADATA))\n .isEqualTo(CassandraConstants.NEGATIVE_LOOKUPS_BLOOM_FILTER_FP_CHANCE);\n assertThat(CassandraTableOptions.b...
{ "fields": [], "file": "atlasdb-cassandra/src/main/java/com/palantir/atlasdb/keyvalue/cassandra/CassandraTableOptions.java", "identifier": "CassandraTableOptions", "interfaces": "", "methods": [ { "class_method_signature": "CassandraTableOptions.CassandraTableOptions()", "constructor": true, ...
{ "body": "static double bloomFilterFpChance(TableMetadata tableMetadata) {\n if (tableMetadata.hasDenselyAccessedWideRows()) {\n return CassandraConstants.DENSELY_ACCESSED_WIDE_ROWS_BLOOM_FILTER_FP_CHANCE;\n }\n if (tableMetadata.isAppendHeavyAndReadLight()) {\n return tabl...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_274
{ "fields": [ { "declarator": "TABLE_REF = TableReference.create(Namespace.DEFAULT_NAMESPACE,\n TableDefinitionTest.class.getSimpleName())", "modifier": "private static final", "original_string": "private static final TableReference TABLE_REF = TableReference.create(Namespace.DEFAULT_...
{ "body": "@Test\n public void tableNameNotLoggableByDefault() {\n assertThat(BASE_DEFINITION.toTableMetadata().getNameLogSafety()).isEqualTo(LogSafety.UNSAFE);\n }", "class_method_signature": "TableDefinitionTest.tableNameNotLoggableByDefault()", "constructor": false, "full_signature": "@Test publ...
{ "fields": [ { "declarator": "state = State.NONE", "modifier": "private", "original_string": "private State state = State.NONE;", "type": "State", "var_name": "state" }, { "declarator": "logSafetyDeclared = false", "modifier": "private", "original_string": ...
{ "body": "public TableMetadata toTableMetadata() {\n com.palantir.logsafe.Preconditions.checkState(!rowNameComponents.isEmpty(), \"No row name components defined.\");\n\n if (explicitCompressionRequested && explicitCompressionBlockSizeKb == 0) {\n if (rangeScanAllowed) {\n exp...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_624
{ "fields": [ { "declarator": "SETUP_TASK_METRIC_NAME =\n SnapshotTransactionManager.class.getCanonicalName() + \".setupTask\"", "modifier": "private static final", "original_string": "private static final String SETUP_TASK_METRIC_NAME =\n SnapshotTransactionManager.class.g...
{ "body": "@Test\n public void doesNotCallStartTransactionForReadOnlyTransactionsIfFlagIsNotSet() {\n TimelockService timelockService =\n spy(new LegacyTimelockService(timestampService, closeableLockService, LockClient.of(\"lock\")));\n SnapshotTransactionManager transactionManager = c...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(SnapshotTransactionManager.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(SnapshotTransactionManager.class);", "type": "Logger", "var_name": "log" ...
{ "body": "@Override\n public <T, C extends PreCommitCondition, E extends Exception> T runTaskWithConditionReadOnly(\n C condition, ConditionAwareTransactionTask<T, C, E> task) throws E {\n if (transactionConfig.get().lockImmutableTsOnReadOnlyTransactions()) {\n return runTaskWithCondi...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_68
{ "fields": [ { "declarator": "CLIENT = Client.of(\"client\")", "modifier": "private static final", "original_string": "private static final Client CLIENT = Client.of(\"client\");", "type": "Client", "var_name": "CLIENT" }, { "declarator": "CLIENT_2 = Client.of(\"client...
{ "body": "@Test\n public void failureMechanismNotInvokedIfOneNodeIsTheLeader() {\n when(checker1.getFreshTimestampFromNodeForClient(CLIENT.value())).then(getNextTimestamp());\n when(checker2.getFreshTimestampFromNodeForClient(CLIENT.value())).thenReturn(OptionalLong.empty());\n\n noSimultaneo...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(NoSimultaneousServiceCheck.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(NoSimultaneousServiceCheck.class);", "type": "Logger", "var_name": "log" ...
{ "body": "public void processHealthCheckDigest(HealthCheckDigest digest) {\n Set<Client> clientsWithMultipleLeaders = digest.statusesToClient().get(TimeLockStatus.MULTIPLE_LEADERS);\n if (clientsWithMultipleLeaders.isEmpty()) {\n return;\n }\n\n log.info(\"Clients {} appear to ...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_448
{ "fields": [ { "declarator": "kvs = new InMemoryKeyValueService(true)", "modifier": "private final", "original_string": "private final KeyValueService kvs = new InMemoryKeyValueService(true);", "type": "KeyValueService", "var_name": "kvs" }, { "declarator": "idsToNames...
{ "body": "@Test\n public void testConcurrentCreationOfDifferentTable() {\n idsToNames.storeNewMapping(table(2), 1);\n assertThat(tableIndices.getTableId(table(1))).isEqualTo(2);\n }", "class_method_signature": "SweepTableIndicesTest.testConcurrentCreationOfDifferentTable()", "constructor": fa...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(SweepTableIndices.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(SweepTableIndices.class);", "type": "Logger", "var_name": "log" }, { ...
{ "body": "public int getTableId(TableReference table) {\n return tableIndices.get(table);\n }", "class_method_signature": "SweepTableIndices.getTableId(TableReference table)", "constructor": false, "full_signature": "public int getTableId(TableReference table)", "identifier": "getTableId", "invoc...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_87
{ "fields": [ { "declarator": "CLUSTER_URIS = ImmutableList.of(\"foo:1\", \"bar:2\", \"baz:3\")", "modifier": "private static final", "original_string": "private static final List<String> CLUSTER_URIS = ImmutableList.of(\"foo:1\", \"bar:2\", \"baz:3\");", "type": "List<String>", "var...
{ "body": "@Test\n public void addProtocolAddsHttpIfSslNotPresent() {\n assertThat(PaxosRemotingUtils.addProtocol(NO_SSL_TIMELOCK, \"atlasdb:1234\")).isEqualTo(\"http://atlasdb:1234\");\n }", "class_method_signature": "PaxosRemotingUtilsTest.addProtocolAddsHttpIfSslNotPresent()", "constructor": false...
{ "fields": [], "file": "timelock-agent/src/main/java/com/palantir/timelock/paxos/PaxosRemotingUtils.java", "identifier": "PaxosRemotingUtils", "interfaces": "", "methods": [ { "class_method_signature": "PaxosRemotingUtils.PaxosRemotingUtils()", "constructor": true, "full_signature": "pr...
{ "body": "public static String addProtocol(TimeLockInstallConfiguration install, String address) {\n String protocolPrefix = getSslConfigurationOptional(install).isPresent() ? \"https://\" : \"http://\";\n return protocolPrefix + address;\n }", "class_method_signature": "PaxosRemotingUtils.addProt...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...