id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
36960637_243
{ "fields": [], "file": "atlasdb-client/src/test/java/com/palantir/atlasdb/util/TopNMetricPublicationControllerTest.java", "identifier": "TopNMetricPublicationControllerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void eligibleGaugesChangeOverTime() {\n AtomicLong value1 = new AtomicLong(42);\n AtomicLong value2 = new AtomicLong(157);\n\n Gauge<Long> gauge1 = value1::get;\n Gauge<Long> gauge2 = value2::get;\n\n TopNMetricPublicationController<Long> controller = ne...
{ "fields": [ { "declarator": "REFRESH_INTERVAL = Duration.ofSeconds(30)", "modifier": "private static final", "original_string": "private static final Duration REFRESH_INTERVAL = Duration.ofSeconds(30);", "type": "Duration", "var_name": "REFRESH_INTERVAL" }, { "declara...
{ "body": "public MetricPublicationFilter registerAndCreateFilter(Gauge<T> gauge) {\n gauges.add(gauge);\n return () -> shouldPublishIndividualGaugeMetric(gauge);\n }", "class_method_signature": "TopNMetricPublicationController.registerAndCreateFilter(Gauge<T> gauge)", "constructor": false, "fu...
{ "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_756
{ "fields": [ { "declarator": "DC_1 = \"dc1\"", "modifier": "private static final", "original_string": "private static final String DC_1 = \"dc1\";", "type": "String", "var_name": "DC_1" }, { "declarator": "DC_2 = \"dc2\"", "modifier": "private static final", ...
{ "body": "@Test\n public void networkStrategyMultipleDcsSucceeds() throws TException {\n setTopology(createDetails(DC_1, RACK_1, HOST_1),\n createDetails(DC_1, RACK_1, HOST_2),\n createDetails(DC_1, RACK_1, HOST_3),\n createDetails(DC_2, RACK_1, HOST_4));\n ...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(CassandraVerifier.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(CassandraVerifier.class);", "type": "Logger", "var_name": "log" }, { ...
{ "body": "static KsDef checkAndSetReplicationFactor(CassandraClient client, KsDef ksDef,\n CassandraKeyValueServiceConfig config) throws TException {\n KsDef result = ksDef;\n Set<String> datacenters;\n if (Objects.equals(result.getStrategy_class(), CassandraConstants.SIMPLE_STRATEGY)...
{ "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_1
{ "fields": [ { "declarator": "METRIC_NAME_1 = MetricName.builder()\n .safeName(\"com.palantir.atlasdb.metrics.metrics.p99\")\n .build()", "modifier": "private static final", "original_string": "private static final MetricName METRIC_NAME_1 = MetricName.builder()\n ...
{ "body": "@Test\n public void usesFiltersToDecideIfPerformingFiltering() {\n taggedMetricRegistry.timer(METRIC_NAME_1);\n Timer timer = taggedMetricRegistry.timer(METRIC_NAME_2);\n\n FilteredTaggedMetricSet filteredTaggedMetricSet = new FilteredTaggedMetricSet(\n taggedMetricRe...
{ "fields": [ { "declarator": "unfiltered", "modifier": "private final", "original_string": "private final TaggedMetricSet unfiltered;", "type": "TaggedMetricSet", "var_name": "unfiltered" }, { "declarator": "metricNameFilter", "modifier": "private final", "...
{ "body": "@Override\n public Map<MetricName, Metric> getMetrics() {\n if (performFiltering.get()) {\n return KeyedStream.stream(unfiltered.getMetrics())\n .filterKeys(metricNameFilter)\n .collectToMap();\n }\n return unfiltered.getMetrics();\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_306
{ "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 putUnlessExists() throws Exception {\n Map<Cell, byte[]> values = ImmutableMap.of(CELL, VALUE_BYTES);\n kvs.putUnlessExists(TABLE_REF, values);\n\n checkSpan(\"atlasdb-kvs.putUnlessExists({table}, 1 values)\");\n verify(delegate).putUnlessExists(TABLE_REF,...
{ "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 putUnlessExists(TableReference tableRef, Map<Cell, byte[]> values)\n throws KeyAlreadyExistsException {\n //noinspection unused - try-with-resources closes trace\n try (CloseableTrace trace = startLocalTrace(\"putUnlessExists({}, {} values)\",\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_886
{ "fields": [ { "declarator": "timelock", "modifier": "@Mock private", "original_string": "@Mock private NamespacedConjureTimelockService timelock;", "type": "NamespacedConjureTimelockService", "var_name": "timelock" }, { "declarator": "lockRequest", "modifier": "...
{ "body": "@Test\n public void unlockShouldCallRemoteServer_validLeases() {\n LeasedLockToken token = LeasedLockToken.of(LOCK_TOKEN, getLease());\n assertValid(token);\n lockLeaseService.unlock(ImmutableSet.of(token));\n\n verify(timelock).unlock(ConjureUnlockRequest.of(ImmutableSet.of(...
{ "fields": [ { "declarator": "delegate", "modifier": "private final", "original_string": "private final NamespacedConjureTimelockService delegate;", "type": "NamespacedConjureTimelockService", "var_name": "delegate" }, { "declarator": "clientId", "modifier": "pri...
{ "body": "Set<LockToken> unlock(Set<LockToken> tokens) {\n Set<LeasedLockToken> leasedLockTokens = leasedTokens(tokens);\n leasedLockTokens.forEach(LeasedLockToken::invalidate);\n\n Set<ConjureLockToken> unlocked =\n delegate.unlock(ConjureUnlockRequest.of(serverTokens(leasedLockT...
{ "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_185
{ "fields": [ { "declarator": "CLIENT = Client.of(\"alice\")", "modifier": "private static final", "original_string": "private static final Client CLIENT = Client.of(\"alice\");", "type": "Client", "var_name": "CLIENT" }, { "declarator": "PAXOS_ROUND_ONE = 1", "mo...
{ "body": "@Test\n public void returnsTimeLockVersionWithIsLeaderBoolean() {\n // return default when timeLock version not provided\n PingableLeader pingableLeader = paxosComponents.pingableLeader(CLIENT);\n assertThat(pingableLeader.pingV2().timeLockVersion())\n .isEqualTo(Opti...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(LocalPaxosComponents.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(LocalPaxosComponents.class);", "type": "Logger", "var_name": "log" }, {...
{ "body": "public PingableLeader pingableLeader(Client client) {\n return getOrCreateComponents(client).pingableLeader();\n }", "class_method_signature": "LocalPaxosComponents.pingableLeader(Client client)", "constructor": false, "full_signature": "public PingableLeader pingableLeader(Client client)",...
{ "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_490
{ "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 sweepProgressesAcrossCoarsePartitions() {\n setSweepTimestamp(Long.MAX_VALUE);\n List<Integer> permittedPartitions = Lists.newArrayList();\n permittedPartitions.add(0);\n enqueueWriteCommitted(TABLE_CONS, LOW_TS);\n\n for (int index = 0; index <= 3 ...
{ "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_869
{ "fields": [], "file": "timelock-corruption-detection/src/test/java/com/palantir/timelock/history/util/UseCaseUtilsTest.java", "identifier": "UseCaseUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void parsesSimpleUseCases() {\n assertThat(UseCaseUtils.getPaxosUseCasePrefix(\"tom!acceptor\")).isEqualTo(\"tom\");\n assertThat(UseCaseUtils.getPaxosUseCasePrefix(\"tom!learner\")).isEqualTo(\"tom\");\n }", "class_method_signature": "UseCaseUtilsTest.parsesSimpleUseCa...
{ "fields": [ { "declarator": "PATTERN = Pattern.compile(\"^(.*)!(.*)$\")", "modifier": "private static final", "original_string": "private static final Pattern PATTERN = Pattern.compile(\"^(.*)!(.*)$\");", "type": "Pattern", "var_name": "PATTERN" } ], "file": "timelock-corru...
{ "body": "public static String getPaxosUseCasePrefix(String useCase) {\n Matcher matcher = PATTERN.matcher(useCase);\n Preconditions.checkState(matcher.find(),\n \"Unexpected use case format\", SafeArg.of(\"useCase\", useCase));\n return matcher.group(1);\n }", "class_method_...
{ "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_255
{ "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 testGetFullTableReferenceStringLegacy() {\n MatcherAssert.assertThat(\n Schemas.getTableReferenceString(TABLE_NAME, Namespace.create(\"met\")),\n Matchers.equalTo(\"TableReference.createWithEmptyNamespace(\\\"\" + TABLE_NAME + \"\\\")\")\n ...
{ "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 String getTableReferenceString(String tableName, Namespace namespace) {\n Preconditions.checkArgument(isTableNameValid(tableName), \"%s is not a valid table name\", tableName);\n String namespaceName = namespace.getName();\n // Hacks for schemas that were created before 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_605
{ "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 doesNotInvokeDelegateIfNoValidTimestamps() {\n Map<Long, Long> result = preStartHandlingService.get(TWO_INVALID_TIMESTAMPS);\n assertThat(result).containsOnly(\n Maps.immutableEntry(ZERO_TIMESTAMP, BEFORE_TIME_TIMESTAMP),\n Maps.immutableEn...
{ "fields": [ { "declarator": "delegate", "modifier": "private final", "original_string": "private final TransactionService delegate;", "type": "TransactionService", "var_name": "delegate" }, { "declarator": "synchronousAsyncTransactionService", "modifier": "priva...
{ "body": "@CheckForNull\n @Override\n public Long get(long startTimestamp) {\n return AtlasFutures.getUnchecked(getInternal(startTimestamp, synchronousAsyncTransactionService));\n }", "class_method_signature": "PreStartHandlingTransactionService.get(long startTimestamp)", "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_310
{ "fields": [ { "declarator": "delegate1 = mock(KeyValueService.class)", "modifier": "private final", "original_string": "private final KeyValueService delegate1 = mock(KeyValueService.class);", "type": "KeyValueService", "var_name": "delegate1" }, { "declarator": "dele...
{ "body": "@Test\n public void checkAndSetCompatibilityIsBasedOnTheFirstDelegate() {\n when(delegate1.getCheckAndSetCompatibility()).thenReturn(CheckAndSetCompatibility.SUPPORTED_DETAIL_ON_FAILURE);\n when(delegate2.getCheckAndSetCompatibility()).thenReturn(CheckAndSetCompatibility.NOT_SUPPORTED);\n\...
{ "fields": [ { "declarator": "delegate1", "modifier": "private final", "original_string": "private final KeyValueService delegate1;", "type": "KeyValueService", "var_name": "delegate1" }, { "declarator": "delegate2", "modifier": "private final", "original_s...
{ "body": "@Override\n public CheckAndSetCompatibility getCheckAndSetCompatibility() {\n return delegate1.getCheckAndSetCompatibility();\n }", "class_method_signature": "DualWriteKeyValueService.getCheckAndSetCompatibility()", "constructor": false, "full_signature": "@Override public CheckAndSetCom...
{ "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_740
{ "fields": [ { "declarator": "BACKUP_TIMESTAMP = 42", "modifier": "private static final", "original_string": "private static final long BACKUP_TIMESTAMP = 42;", "type": "long", "var_name": "BACKUP_TIMESTAMP" }, { "declarator": "backupRunner = mock(CassandraTimestampBac...
{ "body": "@Test\n public void backupReturnsTimestampFromBackupRunner() {\n assertThat(invalidator.backupAndInvalidate()).isEqualTo(BACKUP_TIMESTAMP);\n verify(backupRunner, times(1)).backupExistingTimestamp();\n }", "class_method_signature": "CassandraTimestampStoreInvalidatorTest.backupReturns...
{ "fields": [ { "declarator": "backupRunner", "modifier": "private final", "original_string": "private final CassandraTimestampBackupRunner backupRunner;", "type": "CassandraTimestampBackupRunner", "var_name": "backupRunner" } ], "file": "atlasdb-cassandra/src/main/java/com/p...
{ "body": "@Override\n @Idempotent\n public long backupAndInvalidate() {\n backupRunner.ensureTimestampTableExists();\n return backupRunner.backupExistingTimestamp();\n }", "class_method_signature": "CassandraTimestampStoreInvalidator.backupAndInvalidate()", "constructor": false, "full_si...
{ "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_193
{ "fields": [ { "declarator": "REQUEST_1 = UUID.randomUUID()", "modifier": "private static final", "original_string": "private static final UUID REQUEST_1 = UUID.randomUUID();", "type": "UUID", "var_name": "REQUEST_1" }, { "declarator": "REQUEST_2 = UUID.randomUUID()", ...
{ "body": "@Test\n public void removesRequestWhenComplete() {\n AsyncResult<Void> result = new AsyncResult<>();\n awaitedLocks.getExistingOrAwait(REQUEST_1, () -> result);\n\n assertThat(awaitedLocks.requestsById).containsKey(REQUEST_1);\n\n result.complete(null);\n assertRequest...
{ "fields": [ { "declarator": "requestsById = Maps.newConcurrentMap()", "modifier": "@VisibleForTesting\n final", "original_string": "@VisibleForTesting\n final ConcurrentMap<UUID, AsyncResult<Void>> requestsById = Maps.newConcurrentMap();", "type": "ConcurrentMap<UUID, AsyncResult<V...
{ "body": "public AsyncResult<Void> getExistingOrAwait(\n UUID requestId,\n Supplier<AsyncResult<Void>> lockAwaiter) {\n AsyncResult<Void> result = requestsById.computeIfAbsent(\n requestId,\n ignored -> lockAwaiter.get());\n\n registerCompletionHandle...
{ "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_469
{ "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 whenVeryManyEntriesDecreasePause() throws Exception {\n SweepDelay sweepDelay = new SweepDelay(100L);\n ScalingSweepTaskScheduler schedulerWithRealDelay = createScheduler(sweepDelay);\n when(sweepIteration.call()).thenReturn(SUCCESS_HUGE);\n\n schedulerWit...
{ "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_890
{ "fields": [ { "declarator": "timelock", "modifier": "@Mock private", "original_string": "@Mock private NamespacedConjureTimelockService timelock;", "type": "NamespacedConjureTimelockService", "var_name": "timelock" }, { "declarator": "lockRequest", "modifier": "...
{ "body": "@Test\n public void shouldRefreshTheLease_invalidOnClient_validOnServer() {\n LeasedLockToken leasedLockToken = LeasedLockToken.of(LOCK_TOKEN, getLease(Duration.ZERO));\n assertInvalid(leasedLockToken);\n\n when(timelock.refreshLocks(ConjureRefreshLocksRequest.of(ImmutableSet.of(LOC...
{ "fields": [ { "declarator": "delegate", "modifier": "private final", "original_string": "private final NamespacedConjureTimelockService delegate;", "type": "NamespacedConjureTimelockService", "var_name": "delegate" }, { "declarator": "clientId", "modifier": "pri...
{ "body": "Set<LockToken> refreshLockLeases(Set<LockToken> uncastedTokens) {\n if (uncastedTokens.isEmpty()) {\n return uncastedTokens;\n }\n\n LeaderTime leaderTime = time.get();\n Set<LeasedLockToken> allTokens = leasedTokens(uncastedTokens);\n\n Set<LeasedLockToken> va...
{ "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_49
{ "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 throwsIfModulusIsNegative() {\n assertThatThrownBy(() -> getPartitionedTimestamps(SEVENTY_THREE_TO_EIGHTY_TWO, 3, -8))\n .isInstanceOf(IllegalArgumentException.class)\n .hasMessage(\"Modulus should be positive, but found -8.\");\n assertTha...
{ "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_486
{ "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 sweepDeletesTombstonesWhenWriteHasHigherTimestamp() {\n enqueueTombstone(TABLE_CONS, LOW_TS);\n enqueueWriteCommitted(TABLE_CONS, LOW_TS2);\n assertReadAtTimestampReturnsTombstoneAtTimestamp(TABLE_CONS, LOW_TS + 1, LOW_TS);\n assertTestValueEnqueuedAtGiven...
{ "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_652
{ "fields": [ { "declarator": "kvs", "modifier": "private", "original_string": "private KeyValueService kvs;", "type": "KeyValueService", "var_name": "kvs" }, { "declarator": "transactions", "modifier": "private", "original_string": "private TransactionServi...
{ "body": "@Test\n public void isNotInitializedWhenKvsIsNotInitialized() {\n KeyValueService mockKvs = mock(KeyValueService.class);\n ScrubberStore mockStore = mock(ScrubberStore.class);\n when(mockKvs.isInitialized()).thenReturn(false);\n when(mockStore.isInitialized()).thenReturn(true...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(Scrubber.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(Scrubber.class);", "type": "Logger", "var_name": "log" }, { "declarator": "MA...
{ "body": "public boolean isInitialized() {\n return keyValueService.isInitialized() && scrubberStore.isInitialized();\n }", "class_method_signature": "Scrubber.isInitialized()", "constructor": false, "full_signature": "public boolean isInitialized()", "identifier": "isInitialized", "invocations":...
{ "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_202
{ "fields": [ { "declarator": "WINDOW_SIZE = 10", "modifier": "private static final", "original_string": "private static final int WINDOW_SIZE = 10;", "type": "int", "var_name": "WINDOW_SIZE" }, { "declarator": "slidingWindow = new ArrayLockEventSlidingWindow(WINDOW_SIZ...
{ "body": "@Test\n public void whenLastKnownVersionIsAfterCurrentReturnEmpty() {\n whenLogContainsEvents0To4();\n assertThat(slidingWindow.getNextEvents(5)).isEmpty();\n }", "class_method_signature": "ArrayLockEventSlidingWindowTest.whenLastKnownVersionIsAfterCurrentReturnEmpty()", "constructo...
{ "fields": [ { "declarator": "buffer", "modifier": "private final", "original_string": "private final LockWatchEvent[] buffer;", "type": "LockWatchEvent[]", "var_name": "buffer" }, { "declarator": "maxSize", "modifier": "private final", "original_string": "...
{ "body": "public Optional<List<LockWatchEvent>> getNextEvents(long version) {\n if (versionInTheFuture(version) || versionTooOld(version)) {\n return Optional.empty();\n }\n int startIndex = LongMath.mod(version + 1, maxSize);\n int windowSize = Ints.saturatedCast(lastVersion()...
{ "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_717
{ "fields": [], "file": "atlasdb-commons/src/test/java/com/palantir/common/base/BatchingVisitablesTest.java", "identifier": "BatchingVisitablesTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testHintPageSize() {\n InfiniteVisitable infinite = new InfiniteVisitable();\n BatchingVisitableView<Long> bv = BatchingVisitableView.of(infinite);\n long first = bv.filter(new TakeEvery<>(100)).getFirst();\n assertEquals(\"first element returned was wrong...
{ "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> hintPageSize(final BatchingVisitable<T> bv, final int pageSize) {\n com.palantir.logsafe.Preconditions.checkArgument(pageSize > 0);\n return BatchingVisitableView.of(new AbstractBatchingVisitable<T>() {\n @Override\n protected <...
{ "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_347
{ "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(expected = IndexOutOfBoundsException.class)\n public void cantReadNegativeAmount() throws IOException {\n dataStream.read(data, 0, -1);\n }", "class_method_signature": "BlockConsumingInputStreamTest.cantReadNegativeAmount()", "constructor": false, "full_signature": "@Test(expected ...
{ "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_594
{ "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 getMultiplePartitionsRequestsAndMergesMaps() {\n when(delegate1.get(any())).thenReturn(ImmutableMap.of(1L, 8L, 41L, 48L));\n when(delegate2.get(any())).thenReturn(ImmutableMap.of(12L, 28L, 32L, 38L));\n assertThat(delegatingTransactionService.get(ImmutableList.of...
{ "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_828
{ "fields": [ { "declarator": "config", "modifier": "private", "original_string": "private CassandraKeyValueServiceConfig config;", "type": "CassandraKeyValueServiceConfig", "var_name": "config" }, { "declarator": "runtimeConfig", "modifier": "private", "ori...
{ "body": "@Test\n public void ifInstallAndRuntimeConfig_resolvesToRuntimeConfig() {\n CassandraReloadableKvsConfig reloadableConfig = getReloadableConfigWithRuntimeConfig();\n\n int installConfigParam = 1;\n when(config.sweepReadThreads()).thenReturn(installConfigParam);\n\n int runtim...
{ "fields": [ { "declarator": "config", "modifier": "private final", "original_string": "private final CassandraKeyValueServiceConfig config;", "type": "CassandraKeyValueServiceConfig", "var_name": "config" }, { "declarator": "runtimeConfigSupplier", "modifier": "...
{ "body": "@Override\n public Integer sweepReadThreads() {\n return chooseConfig(CassandraKeyValueServiceRuntimeConfig::sweepReadThreads,\n config.sweepReadThreads());\n }", "class_method_signature": "CassandraReloadableKvsConfig.sweepReadThreads()", "constructor": false, "full_signa...
{ "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_982
{ "fields": [ { "declarator": "CLIENT = \"testClient\"", "modifier": "private static final", "original_string": "private static final String CLIENT = \"testClient\";", "type": "String", "var_name": "CLIENT" }, { "declarator": "SERVER_1 = \"http://localhost:8080\"", ...
{ "body": "@Test\n public void canGetNamespacedConfigsFromTimelockBlock() {\n ServerListConfig namespacedConfig = MULTIPLE_SERVER_CONFIG.toNamespacedServerList();\n assertThat(namespacedConfig.servers(), hasItems(SERVER_1 + \"/\" + CLIENT, SERVER_2 + \"/\" + CLIENT));\n }", "class_method_signatu...
{ "fields": [], "file": "atlasdb-config/src/main/java/com/palantir/atlasdb/config/TimeLockClientConfig.java", "identifier": "TimeLockClientConfig", "interfaces": "", "methods": [ { "class_method_signature": "TimeLockClientConfig.client()", "constructor": false, "full_signature": "@Deprec...
{ "body": "public ServerListConfig toNamespacedServerList() {\n return ServerListConfigs.namespaceUris(serversList(), getClientOrThrow());\n }", "class_method_signature": "TimeLockClientConfig.toNamespacedServerList()", "constructor": false, "full_signature": "public ServerListConfig toNamespacedServe...
{ "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_780
{ "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 unappliedResultIsCompatibleIfWeHaveExtraRows() {\n CqlResult mockResult = createMockCqlResult(\n ImmutableList.of(\n createMockCqlRow(buildUnappliedColumnList(COLUMN_BYTES_1, VALUE_1)),\n createMockCqlRow(buildUnappl...
{ "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_295
{ "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 getAllTimestamps() throws Exception {\n Set<Cell> cells = ImmutableSet.of(CELL);\n kvs.getAllTimestamps(TABLE_REF, cells, 1L);\n\n checkSpan(\"atlasdb-kvs.getAllTimestamps({table}, 1 keys, ts 1)\");\n verify(delegate).getAllTimestamps(TABLE_REF, cells, 1L)...
{ "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 Multimap<Cell, Long> getAllTimestamps(TableReference tableRef, Set<Cell> keys, long timestamp) {\n //noinspection unused - try-with-resources closes trace\n try (CloseableTrace trace = startLocalTrace(\"getAllTimestamps({}, {} keys, ts {})\",\n LoggingArgs...
{ "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_89
{ "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 addProtocolsAddsHttpIfSslNotPresent() {\n assertThat(PaxosRemotingUtils.addProtocols(NO_SSL_TIMELOCK, ImmutableList.of(\"foo:1\", \"bar:2\")))\n .isEqualTo(ImmutableList.of(\"http://foo:1\", \"http://bar:2\"));\n }", "class_method_signature": "PaxosRemoting...
{ "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 List<String> addProtocols(TimeLockInstallConfiguration install, List<String> addresses) {\n return addresses.stream()\n .map(address -> addProtocol(install, address))\n .collect(Collectors.toList());\n }", "class_method_signature": "PaxosRemotingUtils...
{ "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_446
{ "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 testThrowsIfUnknownTableId() {\n assertThatExceptionOfType(NoSuchElementException.class)\n .isThrownBy(() -> tableIndices.getTableReference(3))\n .withMessage(\"Id 3 does not exist\");\n }", "class_method_signature": "SweepTableIndicesTest.te...
{ "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 TableReference getTableReference(int tableId) {\n return tableRefs.get(tableId);\n }", "class_method_signature": "SweepTableIndices.getTableReference(int tableId)", "constructor": false, "full_signature": "public TableReference getTableReference(int tableId)", "identifier": "getTab...
{ "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_915
{ "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 doesNotLogIfLoggingNotAllowedEvenIfOperationsAreSlow() {\n accumulateLogsWithCall(LONG_DURATION, profilingTimelockService::getFreshTimestamp);\n\n verify(delegate).getFreshTimestamp();\n verifyLoggerNeverInvoked();\n }", "class_method_signature": "ProfilingT...
{ "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_850
{ "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 canGetGreatestLogEntry() {\n writeValueForRound(15L);\n writeValueForRound(19L);\n writeValueForRound(17L);\n\n assertThat(stateLog.getGreatestLogEntry()).isEqualTo(19L);\n }", "class_method_signature": "SqlitePaxosStateLogTest.canGetGreatestLogEntry(...
{ "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 long getGreatestLogEntry() {\n return execute(dao -> dao.getGreatestLogEntry(namespace, useCase)).orElse(PaxosAcceptor.NO_LOG_ENTRY);\n }", "class_method_signature": "SqlitePaxosStateLog.getGreatestLogEntry()", "constructor": false, "full_signature": "@Override public ...
{ "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_153
{ "fields": [ { "declarator": "FEEDBACK = ConjureTimeLockClientFeedback.builder()\n .atlasVersion(\"1.2.3\")\n .serviceName(\"tom\")\n .nodeId(UUID.randomUUID())\n .build()", "modifier": "private static final", "original_string": "private static final ...
{ "body": "@Test\n public void doesNotPutFeedbackInSinkIfConfiguredNotTo() {\n FeedbackHandler handler = new FeedbackHandler(sink, () -> false);\n handler.handle(FEEDBACK);\n verify(sink, never()).registerFeedback(FEEDBACK);\n }", "class_method_signature": "FeedbackHandlerTest.doesNotPutF...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(FeedbackHandler.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(FeedbackHandler.class);", "type": "Logger", "var_name": "log" }, { "de...
{ "body": "public void handle(ConjureTimeLockClientFeedback feedback) {\n if (useAdjudication.getAsBoolean()) {\n timeLockClientFeedbackSink.registerFeedback(feedback);\n }\n }", "class_method_signature": "FeedbackHandler.handle(ConjureTimeLockClientFeedback feedback)", "constructor": ...
{ "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_503
{ "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 batchIncludesAllWritesWithTheSameTimestampAndDoesNotSkipOrRepeatAnyWritesInNextIteration() {\n TargetedSweeper sweeperConservative = getSingleShardSweeper();\n\n int relativePrime = MAX_CELLS_GENERIC - 1;\n // this assertion verifies that the test checks what we ...
{ "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_66
{ "fields": [ { "declarator": "CLIENT = \"client\"", "modifier": "private static final", "original_string": "private static final String CLIENT = \"client\";", "type": "String", "var_name": "CLIENT" }, { "declarator": "timelockRpcClient = mock(ConjureTimelockService.cla...
{ "body": "@Test\n public void ifGetFreshTimestampReturnsTheValueIsPropagated() {\n when(timelockRpcClient.getFreshTimestamps(any(), eq(CLIENT), eq(ConjureGetFreshTimestampsRequest.of(1))))\n .thenReturn(ConjureGetFreshTimestampsResponse.of(8L, 8L));\n assertThat(timeLockActivityChecke...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(TimeLockActivityChecker.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(TimeLockActivityChecker.class);", "type": "Logger", "var_name": "log" },...
{ "body": "public OptionalLong getFreshTimestampFromNodeForClient(String client) {\n try {\n return OptionalLong.of(conjureTimelockService.getFreshTimestamps(\n AUTH_HEADER, client, ConjureGetFreshTimestampsRequest.of(1)).getInclusiveLower());\n } catch (Exception e) {\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_387
{ "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 getMappedTableNameReturnsShortTableName() throws TableMappingNotFoundException {\n assertThat(tableMapping.getMappedTableName(FQ_TABLE)).isEqualTo(shortTableRefForNumber(1));\n }", "class_method_signature": "KvTableMappingServiceTest.getMappedTableNameReturnsShortTableNam...
{ "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_692
{ "fields": [], "file": "atlasdb-commons/src/test/java/com/palantir/async/initializer/CallbackTest.java", "identifier": "CallbackTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void cleanupExceptionGetsPropagatedAndStopsRetrying() {\n CountingCallback countingCallback = new CountingCallback(true);\n AtomicLong counter = new AtomicLong(0);\n\n assertThatThrownBy(() -> countingCallback.runWithRetry(counter))\n .isInstanceOf(Runt...
{ "fields": [ { "declarator": "shutdownSignal = false", "modifier": "private volatile", "original_string": "private volatile boolean shutdownSignal = false;", "type": "boolean", "var_name": "shutdownSignal" } ], "file": "atlasdb-commons/src/main/java/com/palantir/async/initia...
{ "body": "public synchronized void runWithRetry(R resource) {\n while (!shutdownSignal) {\n try {\n if (!shutdownSignal) {\n init(resource);\n }\n return;\n } catch (Throwable e) {\n cleanup(resource, e);\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_368
{ "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 downSamplesCorrectlyWhenUniform() {\n MultisetStatistics stats = new MultisetStatistics();\n for (int i = 0; i < 10; ++i) {\n for (double number : SMALL_SAMPLE) {\n stats.addValue(number, 2);\n }\n }\n Mockito.when(mock...
{ "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_738
{ "fields": [ { "declarator": "BACKUP_TIMESTAMP = 42", "modifier": "private static final", "original_string": "private static final long BACKUP_TIMESTAMP = 42;", "type": "long", "var_name": "BACKUP_TIMESTAMP" }, { "declarator": "backupRunner = mock(CassandraTimestampBac...
{ "body": "@Test\n public void throwsIfCreatingWithNonCassandraKvs() {\n assertThatThrownBy(() -> CassandraTimestampStoreInvalidator.create(new InMemoryKeyValueService(false)))\n .isInstanceOf(IllegalArgumentException.class);\n }", "class_method_signature": "CassandraTimestampStoreInvali...
{ "fields": [ { "declarator": "backupRunner", "modifier": "private final", "original_string": "private final CassandraTimestampBackupRunner backupRunner;", "type": "CassandraTimestampBackupRunner", "var_name": "backupRunner" } ], "file": "atlasdb-cassandra/src/main/java/com/p...
{ "body": "public static CassandraTimestampStoreInvalidator create(KeyValueService keyValueService) {\n Preconditions.checkArgument(keyValueService instanceof CassandraKeyValueService,\n \"CassandraTimestampStoreInvalidator should be instantiated with a CassandraKeyValueService!\");\n Cas...
{ "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_942
{ "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 canLiveReloadServersList() {\n unavailableServer.stubFor(GET_MAPPING.willReturn(aResponse().withStatus(503)));\n\n List<String> servers = Lists.newArrayList(getUriForPort(unavailablePort));\n\n TestResource client = AtlasDbHttpClients.createLiveReloadingProxyWith...
{ "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 createLiveReloadingProxyWithFailover(\n MetricsManager metricsManager,\n Supplier<ServerListConfig> serverListConfigSupplier,\n Class<T> type,\n AuxiliaryRemotingParameters clientParameters) {\n Supplier<T> clientFactory = () -> instrum...
{ "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_411
{ "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 shouldBePublishedAfterReadingManyValues() {\n entriesRead.addAndGet(TargetedSweepMetricPublicationFilter.MINIMUM_READS_WRITES_TO_BE_CONSIDERED_ACTIVE);\n\n assertThat(filter.shouldPublish()).isTrue();\n }", "class_method_signature": "TargetedSweepMetricPublicationF...
{ "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_554
{ "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 returnsLockFailureWhenCannotGetLocks() throws InterruptedException {\n SingleLockService rejectingLockService = mock(SingleLockService.class);\n when(rejectingLockService.haveLocks()).thenReturn(false);\n\n BackgroundCompactor.CompactionOutcome outcome = compacto...
{ "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_31
{ "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 lockDescriptorWithMultipleZerosReturnsCorrectTableAndRemainder() {\n LockDescriptor descriptor = AtlasRowLockDescriptor.of(TABLE.getQualifiedName(), ROW_WITH_ZEROS);\n assertThat(AtlasLockDescriptorUtils.tryParseTableRef(descriptor))\n .hasValue(Immutable...
{ "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 Optional<TableRefAndRemainder> tryParseTableRef(LockDescriptor lockDescriptor) {\n byte[] rawBytes = lockDescriptor.getBytes();\n\n int endOfTableName = Bytes.indexOf(rawBytes, (byte) 0);\n if (endOfTableName == -1) {\n return Optional.empty();\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_104
{ "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 freshTimestampsDelegatesToTimestampService() {\n int numTimestamps = 10;\n TimestampRange range = TimestampRange.createInclusiveRange(21L, 30L);\n when(timestampService.getFreshTimestamps(numTimestamps)).thenReturn(range);\n\n assertThat(timelock.getFreshT...
{ "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 TimestampRange getFreshTimestamps(int numTimestampsRequested) {\n return timestampService.getFreshTimestamps(numTimestampsRequested);\n }", "class_method_signature": "LegacyTimelockService.getFreshTimestamps(int numTimestampsRequested)", "constructor": false, "full_sig...
{ "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_807
{ "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 batchMutateWeigherReturnsCorrectNumRows() {\n Map<ByteBuffer, Map<String, List<Mutation>>> mutations = ImmutableMap.of(\n BYTES1, ImmutableMap.of(\n \"table1\", ImmutableList.of(MUTATION, MUTATION),\n \"table2\", Imm...
{ "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<Void> batchMutate(Map<ByteBuffer, Map<String, List<Mutation>>> mutationMap) {\n long numRows = mutationMap.size();\n return writeWeigher(numRows, () -> ThriftObjectSizeUtils.getApproximateSizeOfMutationMap(mutationMap));\n }", "class_method_signature": "ThriftQ...
{ "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_391
{ "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 addingTableWithoutNamespaceIsNoop() throws TableMappingNotFoundException {\n assertThat(tableMapping.addTable(TABLE_EMPTY_NAMESPACE)).isEqualTo(TABLE_EMPTY_NAMESPACE);\n\n verify(kvs, times(1)).putUnlessExists(eq(AtlasDbConstants.NAMESPACE_TABLE), anyMap());\n }", ...
{ "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 addTable(TableReference tableRef) {\n if (tableRef.getNamespace().isEmptyNamespace()) {\n return tableRef;\n }\n\n TableReference existingShortName = tableMap.get().get(tableRef);\n if (existingShortName != null) {\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_684
{ "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 singleAttemptCallbackCallsInitializeAndCleanupOnceThenRethrowsOnInitFailure() {\n callback = LambdaCallback.singleAttempt(this::markInitAndFail, this::markCleanup);\n\n assertThatThrownBy(() -> callback.runWithRetry(initsAndCleanups)).isEqualToComparingFieldByField(INIT...
{ "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> singleAttempt(Consumer<R> initialize, BiConsumer<R, Throwable> onInitFailureCleanup) {\n return new LambdaCallback<>(initialize, onInitFailureCleanup.andThen(FAIL));\n }", "class_method_signature": "LambdaCallback.singleAttempt(Consumer<R> initialize, BiConsumer<R,...
{ "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_407
{ "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 entriesReadInBatchAccumulatesAcrossShards() {\n metrics.registerEntriesReadInBatch(CONS_ZERO, 5);\n metrics.registerEntriesReadInBatch(CONS_ZERO, 10);\n metrics.registerEntriesReadInBatch(CONS_ONE, 15);\n\n assertThat(metricsManager).containsEntriesReadInB...
{ "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 registerEntriesReadInBatch(ShardAndStrategy shardStrategy, long batchSize) {\n updateMetricsIfPresent(shardStrategy, metrics -> metrics.registerEntriesReadInBatch(batchSize));\n }", "class_method_signature": "TargetedSweepMetrics.registerEntriesReadInBatch(ShardAndStrategy shardStra...
{ "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_954
{ "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 canCreateInMemory() {\n TransactionManagers.createInMemory(GenericTestSchema.getSchema());\n }", "class_method_signature": "TransactionManagersTest.canCreateInMemory()", "constructor": false, "full_signature": "@Test public void canCreateInMemory()", "identifier": "...
{ "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_811
{ "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 retryableExceptionsAreRetryableConservative() {\n for (Exception ex : ALL_EXCEPTIONS) {\n assertTrue(String.format(\"Exception %s should be retryable\", ex), handlerConservative.isRetryable(ex));\n }\n assertFalse(\"RuntimeException is not retryable\",...
{ "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_112
{ "fields": [ { "declarator": "SLOW_LOG_TRIGGER_MILLIS = LockServiceImpl.DEBUG_SLOW_LOG_TRIGGER_MILLIS + 10", "modifier": "public static final", "original_string": "public static final long SLOW_LOG_TRIGGER_MILLIS = LockServiceImpl.DEBUG_SLOW_LOG_TRIGGER_MILLIS + 10;", "type": "long", ...
{ "body": "@Test\n public void slowLogShouldNotBeEnabledIfSlowLogTriggerMillisIsSetToZero() {\n assertThat(lockServiceWithSlowLogDisabled.isSlowLogEnabled(), is(false));\n }", "class_method_signature": "LockServiceImplTest.slowLogShouldNotBeEnabledIfSlowLogTriggerMillisIsSetToZero()", "constructor": ...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(LockServiceImpl.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(LockServiceImpl.class);", "type": "Logger", "var_name": "log" }, { "de...
{ "body": "@VisibleForTesting\n protected boolean isSlowLogEnabled() {\n return slowLogTriggerMillis > 0;\n }", "class_method_signature": "LockServiceImpl.isSlowLogEnabled()", "constructor": false, "full_signature": "@VisibleForTesting protected boolean isSlowLogEnabled()", "identifier": "isSlowL...
{ "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_27
{ "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 rowEndingWithZeroIsCorrectlyParsedForCombinationsForCells() {\n LockDescriptor descriptor = AtlasCellLockDescriptor.of(TABLE.getQualifiedName(), END_WITH_ZERO, NO_ZERO_COL);\n\n List<CellReference> expected = ImmutableList.of(\n Cell.create(new byte[] {4,...
{ "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_542
{ "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 timestampTrackersDoNotThrowEvenIfUnderlyingSupplierThrows() {\n when(mockClock.getTick()).thenReturn(0L, CACHE_INTERVAL_NANOS);\n TimestampTracker.registerTimestampForTracking(mockClock, metricsManager, FAKE_METRIC, () -> {\n throw new IllegalArgumentExceptio...
{ "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_796
{ "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 shouldReturnEc2Location() {\n Supplier<Optional<HostLocation>> hostLocationSupplier = new HostLocationSupplier(ec2SnitchSupplier,\n ec2LocationSupplier, Optional.empty());\n\n assertThat(hostLocationSupplier.get()).isPresent();\n assertThat(hostLoc...
{ "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_329
{ "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 tableReferencesNotExplicitlyMarkedSafeAreUnsafe() {\n SafeLoggableData safeLoggableData = ImmutableSafeLoggableData.builder()\n .addPermittedTableReferences(TABLE_REFERENCE_1)\n .build();\n\n assertThat(safeLoggableData.isTableReferenceSafe...
{ "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 isTableReferenceSafe(TableReference tableReference) {\n return permittedTableReferences().contains(tableReference);\n }", "class_method_signature": "SafeLoggableData.isTableReferenceSafe(TableReference tableReference)", "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_283
{ "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 delegatesInitializationCheck() {\n when(delegate.isInitialized())\n .thenReturn(false)\n .thenReturn(true);\n\n assertFalse(kvs.isInitialized());\n assertTrue(kvs.isInitialized());\n }", "class_method_signature": "TracingKeyValu...
{ "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 boolean isInitialized() {\n return delegate().isInitialized();\n }", "class_method_signature": "TracingKeyValueService.isInitialized()", "constructor": false, "full_signature": "@Override public boolean isInitialized()", "identifier": "isInitialized", "invocations"...
{ "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_779
{ "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 unappliedResultIsCompatibleIfTheStateOfTheWorldMatchesTargets() {\n CqlResult mockResult = createMockCqlResult(\n ImmutableList.of(\n createMockCqlRow(buildUnappliedColumnList(COLUMN_BYTES_1, VALUE_1)),\n createMockC...
{ "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_903
{ "fields": [ { "declarator": "lockLeaseService", "modifier": "@Mock\n private", "original_string": "@Mock\n private LockLeaseService lockLeaseService;", "type": "LockLeaseService", "var_name": "lockLeaseService" }, { "declarator": "lockWatchEventCache = spy(NoOpL...
{ "body": "@Test\n public void shouldDeriveStartTransactionResponseFromBatchedResponse_singleTransaction() {\n ConjureStartTransactionsResponse startTransactionResponse = getStartTransactionResponse(12, 1);\n\n when(lockLeaseService.startTransactionsWithWatches(version, 1)).thenReturn(startTransactio...
{ "fields": [ { "declarator": "autobatcher", "modifier": "private final", "original_string": "private final DisruptorAutobatcher<Integer, List<StartIdentifiedAtlasDbTransactionResponse>> autobatcher;", "type": "DisruptorAutobatcher<Integer, List<StartIdentifiedAtlasDbTransactionResponse>>"...
{ "body": "List<StartIdentifiedAtlasDbTransactionResponse> startIdentifiedAtlasDbTransactionBatch(int count) {\n Preconditions.checkArgument(count > 0, \"Cannot start 0 or fewer transactions\");\n return AtlasFutures.getUnchecked(autobatcher.apply(count));\n }", "class_method_signature": "Transacti...
{ "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_450
{ "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 withExpectedEntriesKeepReschedulingAfterDelay() throws Exception {\n when(sweepIteration.call()).thenReturn(SUCCESS_MEDIUM);\n scheduler.start(2);\n\n runSweepIterations(5);\n tickClock();\n runSweepIterations(5);\n verify(sweepIteration, tim...
{ "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_70
{ "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 failureMechanismNotInvokedIfMultipleNodesConsistentlyClaimToBeTheLeaderButTimestampsIncrease() {\n when(checker1.getFreshTimestampFromNodeForClient(CLIENT.value())).then(getNextTimestamp());\n when(checker2.getFreshTimestampFromNodeForClient(CLIENT.value())).then(getNex...
{ "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_515
{ "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 iterationWithSmallBatchIncreasesPause() {\n assertThat(delay.getNextPause(SUCCESS_TOO_FAST)).isGreaterThan(INITIAL_DELAY);\n }", "class_method_signature": "SweepDelayTest.iterationWithSmallBatchIncreasesPause()", "constructor": false, "full_signature": "@Test public v...
{ "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_145
{ "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 returnsProperServiceForEachClient() {\n assertThat(namespaces.get(CLIENT_A)).isEqualTo(servicesA);\n assertThat(namespaces.get(CLIENT_B)).isEqualTo(servicesB);\n }", "class_method_signature": "TimelockNamespacesTest.returnsProperServiceForEachClient()", "construc...
{ "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_846
{ "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 readingNonExistentRoundReturnsNull() throws IOException {\n assertThat(stateLog.readRound(10L)).isNull();\n }", "class_method_signature": "SqlitePaxosStateLogTest.readingNonExistentRoundReturnsNull()", "constructor": false, "full_signature": "@Test public void reading...
{ "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 byte[] readRound(long seq) {\n return execute(dao -> dao.readRound(namespace, useCase, seq));\n }", "class_method_signature": "SqlitePaxosStateLog.readRound(long seq)", "constructor": false, "full_signature": "@Override public byte[] readRound(long seq)", "identifier...
{ "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_352
{ "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 canReadAcrossBlocks() throws IOException {\n BlockConsumingInputStream stream = BlockConsumingInputStream.create(threeByteConsumer, 2, 1);\n expectNextBytesFromStream(stream, \"di\");\n expectNextBytesFromStream(stream, \"vi\");\n expectNextBytesFromStream...
{ "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": "public static BlockConsumingInputStream create(\n BlockGetter blockGetter,\n long numBlocks,\n int blocksInMemory) throws IOException {\n ensureExpectedArraySizeDoesNotOverflow(blockGetter, blocksInMemory);\n return new BlockConsumingInputStream(blockGetter, 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_702
{ "fields": [ { "declarator": "DO_NOTHING = () -> {}", "modifier": "private static final", "original_string": "private static final Runnable DO_NOTHING = () -> {};", "type": "Runnable", "var_name": "DO_NOTHING" }, { "declarator": "RETURN_ONE = () -> 1", "modifier"...
{ "body": "@Test\n public void passesCallThroughSubmit() throws CheckedRejectedExecutionException {\n when(delegate.submit(RETURN_ONE)).thenReturn(Futures.immediateFuture(1));\n assertThat(Futures.getUnchecked(checkedRejectionExecutor.submit(RETURN_ONE))).isEqualTo(1);\n verify(delegate, times...
{ "fields": [ { "declarator": "underlying", "modifier": "private final", "original_string": "private final ExecutorService underlying;", "type": "ExecutorService", "var_name": "underlying" } ], "file": "atlasdb-commons/src/main/java/com/palantir/common/concurrent/CheckedRejec...
{ "body": "public <T> Future<T> submit(Callable<T> callable) throws CheckedRejectedExecutionException {\n try {\n return underlying.submit(callable);\n } catch (RejectedExecutionException ex) {\n throw new CheckedRejectedExecutionException(ex);\n }\n }", "class_method_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_217
{ "fields": [ { "declarator": "kvs", "modifier": "private", "original_string": "private KeyValueService kvs;", "type": "KeyValueService", "var_name": "kvs" }, { "declarator": "atlasDbService", "modifier": "private", "original_string": "private AtlasDbService...
{ "body": "@Test\n public void shouldTruncateNamespacedTables() throws Exception {\n atlasDbService.truncateTable(\"ns.table\");\n\n TableReference tableToTruncate = TableReference.createFromFullyQualifiedName(\"ns.table\");\n verify(kvs, atLeastOnce()).truncateTable(tableToTruncate);\n }",...
{ "fields": [ { "declarator": "RAW_METADATA = TableMetadata.builder()\n .singleRowComponent(\"row\", ValueType.STRING)\n .singleDynamicColumn(\"col\", ValueType.STRING, ValueType.STRING)\n .conflictHandler(ConflictHandler.SERIALIZABLE)\n .nameLogSafety(TableMetada...
{ "body": "@Override\n public void truncateTable(final String fullyQualifiedTableName) {\n kvs.truncateTable(getTableRef(fullyQualifiedTableName));\n }", "class_method_signature": "AtlasDbServiceImpl.truncateTable(final String fullyQualifiedTableName)", "constructor": false, "full_signature": "@Ove...
{ "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_647
{ "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 getMillisForTimestampIfNotPunchedBeforeWhenPunchedRecently() {\n KeyValueService kvs = new InMemoryKeyValueService(false);\n puncherStore = initializePuncherStore(PUNCHER_HISTORY, kvs);\n // Punched: (10, 100), (20, 200), (30, 300)\n // Arguments: (15, 99)...
{ "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_997
{ "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 canCheckAndSetBetweenValues() {\n coordinationStore.checkAndSetCoordinationValue(Optional.empty(), SEQUENCE_AND_BOUND_1);\n assertThat(coordinationStore.checkAndSetCoordinationValue(\n Optional.of(SEQUENCE_AND_BOUND_1), SEQUENCE_AND_BOUND_2))\n ...
{ "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_978
{ "fields": [ { "declarator": "CLIENT_1 = \"bar\"", "modifier": "private static final", "original_string": "private static final String CLIENT_1 = \"bar\";", "type": "String", "var_name": "CLIENT_1" }, { "declarator": "CLIENT_2 = \"baz\"", "modifier": "private sta...
{ "body": "@Test\n public void canCopyAddingClient() {\n TimeLockClientConfig newConfig =\n TimeLockClientConfigs.copyWithClient(CONFIG_WITHOUT_CLIENT, CLIENT_1);\n assertThat(newConfig.getClientOrThrow()).isEqualTo(CLIENT_1);\n }", "class_method_signature": "TimeLockClientConfigs...
{ "fields": [], "file": "atlasdb-config/src/main/java/com/palantir/atlasdb/config/TimeLockClientConfigs.java", "identifier": "TimeLockClientConfigs", "interfaces": "", "methods": [ { "class_method_signature": "TimeLockClientConfigs.TimeLockClientConfigs()", "constructor": true, "full_sig...
{ "body": "public static TimeLockClientConfig copyWithClient(TimeLockClientConfig config, String namespace) {\n return ImmutableTimeLockClientConfig.builder()\n .from(config)\n .client(namespace)\n .build();\n }", "class_method_signature": "TimeLockClientConfig...
{ "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_581
{ "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 putsUnlessExistsToUnderlyingViaBatch() {\n writeBatchingTransactionService.putUnlessExists(7, 66);\n\n verify(mockTransactionService).putUnlessExistsMultiple(ImmutableMap.of(7L, 66L));\n }", "class_method_signature": "WriteBatchingTransactionServiceTest.putsUnlessE...
{ "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": "@Override\n public void putUnlessExists(long startTimestamp, long commitTimestamp) throws KeyAlreadyExistsException {\n AtlasFutures.getUnchecked(autobatcher.apply(TimestampPair.of(startTimestamp, commitTimestamp)));\n }", "class_method_signature": "WriteBatchingTransactionService.putUnlessE...
{ "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_755
{ "fields": [ { "declarator": "DC_1 = \"dc1\"", "modifier": "private static final", "original_string": "private static final String DC_1 = \"dc1\";", "type": "String", "var_name": "DC_1" }, { "declarator": "DC_2 = \"dc2\"", "modifier": "private static final", ...
{ "body": "@Test\n public void returnSameKsDefIfNodeTopologyChecksIgnored() throws TException {\n setTopology(createDetails(DC_1, RACK_1, HOST_1));\n when(config.replicationFactor()).thenReturn(7);\n when(config.ignoreNodeTopologyChecks()).thenReturn(true);\n KsDef ksDef = new KsDef(\"t...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(CassandraVerifier.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(CassandraVerifier.class);", "type": "Logger", "var_name": "log" }, { ...
{ "body": "static KsDef checkAndSetReplicationFactor(CassandraClient client, KsDef ksDef,\n CassandraKeyValueServiceConfig config) throws TException {\n KsDef result = ksDef;\n Set<String> datacenters;\n if (Objects.equals(result.getStrategy_class(), CassandraConstants.SIMPLE_STRATEGY)...
{ "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_2
{ "fields": [ { "declarator": "METRIC_NAME_1 = MetricName.builder()\n .safeName(\"com.palantir.atlasdb.metrics.lockAndGetHeldMetrics.p99\")\n .build()", "modifier": "private static final", "original_string": "private static final MetricName METRIC_NAME_1 = MetricName.builde...
{ "body": "@Test\n public void unionOfEmptyMetricSetsIsEmpty() {\n assertThat(disjointUnionTaggedMetricSet.getMetrics()).isEmpty();\n }", "class_method_signature": "DisjointUnionTaggedMetricSetTest.unionOfEmptyMetricSetsIsEmpty()", "constructor": false, "full_signature": "@Test public void unionOfE...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(DisjointUnionTaggedMetricSet.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(DisjointUnionTaggedMetricSet.class);", "type": "Logger", "var_name": "l...
{ "body": "@Override\n public Map<MetricName, Metric> getMetrics() {\n Map<MetricName, Metric> firstMetrics = first.getMetrics();\n Map<MetricName, Metric> secondMetrics = second.getMetrics();\n\n Map<MetricName, Metric> metrics = new HashMap<>(firstMetrics.size() + secondMetrics.size());\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_305
{ "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 putMetadataForTables() throws Exception {\n kvs.putMetadataForTables(ImmutableMap.of(TABLE_REF, METADATA_BYTES));\n\n checkSpan(\"atlasdb-kvs.putMetadataForTables([{table}])\");\n verify(delegate).putMetadataForTables(ImmutableMap.of(TABLE_REF, METADATA_BYTES));\...
{ "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 putMetadataForTables(Map<TableReference, byte[]> tableRefToMetadata) {\n //noinspection unused - try-with-resources closes trace\n try (CloseableTrace trace = startLocalTrace(\"putMetadataForTables({})\",\n LoggingArgs.safeTablesOrPlaceholder(tableRef...
{ "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_610
{ "fields": [ { "declarator": "METRIC_NAME = \"name\"", "modifier": "private static final", "original_string": "private static final String METRIC_NAME = \"name\";", "type": "String", "var_name": "METRIC_NAME" }, { "declarator": "STRING_CLASS = String.class", "mod...
{ "body": "@Test\n public void registersDifferentMetricsSeparately() {\n Counter c1 = memoizing.createAndRegisterCounter(STRING_CLASS, METRIC_NAME, TABLE_REFERENCE);\n Counter c2 = memoizing.createAndRegisterCounter(STRING_CLASS, METRIC_NAME, TABLE_REFERENCE_2);\n\n assertThat(c1).isNotSameAs(...
{ "fields": [ { "declarator": "metricSpecCounterCache", "modifier": "private final", "original_string": "private final LoadingCache<MetricSpec, Counter> metricSpecCounterCache;", "type": "LoadingCache<MetricSpec, Counter>", "var_name": "metricSpecCounterCache" } ], "file": "a...
{ "body": "@Override\n public <T> Counter createAndRegisterCounter(Class<T> clazz, String metricName, TableReference tableReference) {\n return metricSpecCounterCache.get(MetricSpec.of(clazz, metricName, tableReference));\n }", "class_method_signature": "MemoizingTableLevelMetricsController.createAndRe...
{ "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_240
{ "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 shouldThrowIfTryingToRegisterMetricWithMoreThanTenTags() throws Exception {\n Map<String, String> tags = IntStream.range(0, 11)\n .boxed()\n .collect(Collectors.toMap(i -> \"tag\" + i, i -> \"tagVal\" + i));\n assertThat(tags.size()).isEqua...
{ "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_493
{ "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 sweepCellOnlyOnceWhenInLastPartitionBeforeSweepTs() {\n immutableTs = 2 * TS_COARSE_GRANULARITY - TS_FINE_GRANULARITY;\n verify(spiedKvs, never()).deleteAllTimestamps(any(TableReference.class), anyMap());\n\n enqueueWriteCommitted(TABLE_CONS, immutableTs - 1);\n ...
{ "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_169
{ "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 handlesTooManyRequestsException() {\n when(resource.leaderTime(AUTH_HEADER, NAMESPACE)).thenThrow(new TooManyRequestsException(\"\"));\n assertQosExceptionThrownBy(resource.leaderTime(AUTH_HEADER, NAMESPACE), new AssertVisitor() {\n @Override\n pub...
{ "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_539
{ "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 doesNotCallSupplierOnRequestsWithinRetriggerInterval() {\n when(mockClock.getTick()).thenReturn(0L, 1L, 2L);\n AtomicLong timestampValue = new AtomicLong(0L);\n TimestampTracker.registerTimestampForTracking(\n mockClock, metricsManager, FAKE_METRIC...
{ "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_186
{ "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 singleIterationUpdatesInMemoryReference() {\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_885
{ "fields": [ { "declarator": "timelock", "modifier": "@Mock private", "original_string": "@Mock private NamespacedConjureTimelockService timelock;", "type": "NamespacedConjureTimelockService", "var_name": "timelock" }, { "declarator": "lockRequest", "modifier": "...
{ "body": "@Test\n public void lockAcquireTimeoutIsBoundedAndRequestRetried() {\n when(lockRequest.getAcquireTimeoutMs()).thenReturn(TIMEOUT_GREATER_THAN_MAX_PERMISSIBLE_TIMEOUT.toMillis());\n when(timelock.lock(any()))\n .thenThrow(TIMEOUT_EXCEPTION)\n .thenReturn(Conju...
{ "fields": [ { "declarator": "delegate", "modifier": "private final", "original_string": "private final NamespacedConjureTimelockService delegate;", "type": "NamespacedConjureTimelockService", "var_name": "delegate" }, { "declarator": "clientId", "modifier": "pri...
{ "body": "LockResponse lock(LockRequest request) {\n return lockService.lock(request);\n }", "class_method_signature": "LockLeaseService.lock(LockRequest request)", "constructor": false, "full_signature": " LockResponse lock(LockRequest request)", "identifier": "lock", "invocations": [ "lock"...
{ "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_313
{ "fields": [ { "declarator": "ARG_NAME = \"argName\"", "modifier": "private static final", "original_string": "private static final String ARG_NAME = \"argName\";", "type": "String", "var_name": "ARG_NAME" }, { "declarator": "SAFE_TABLE_REFERENCE = TableReference.creat...
{ "body": "@Test\n public void propagatesNameAndTableReferenceIfSafe() {\n Arg<String> tableReferenceArg = LoggingArgs.tableRef(ARG_NAME, SAFE_TABLE_REFERENCE);\n assertThat(tableReferenceArg.getName()).isEqualTo(ARG_NAME);\n assertThat(tableReferenceArg.getValue()).isEqualTo(SAFE_TABLE_REFERE...
{ "fields": [ { "declarator": "PLACEHOLDER_TABLE_NAME = \"{table}\"", "modifier": "private static final", "original_string": "private static final String PLACEHOLDER_TABLE_NAME = \"{table}\";", "type": "String", "var_name": "PLACEHOLDER_TABLE_NAME" }, { "declarator": "P...
{ "body": "public static Arg<String> tableRef(TableReference tableReference) {\n return tableRef(\"tableRef\", tableReference);\n }", "class_method_signature": "LoggingArgs.tableRef(TableReference tableReference)", "constructor": false, "full_signature": "public static Arg<String> tableRef(TableRefere...
{ "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_743
{ "fields": [ { "declarator": "DC_1 = \"dc1\"", "modifier": "private static final", "original_string": "private static final String DC_1 = \"dc1\";", "type": "String", "var_name": "DC_1" }, { "declarator": "DC_2 = \"dc2\"", "modifier": "private static final", ...
{ "body": "@Test\n public void unsetTopologyAndHighRfThrows() throws TException {\n setTopology(defaultTopology(HOST_1), defaultTopology(HOST_2));\n when(config.replicationFactor()).thenReturn(3);\n\n assertThatThrownBy(() -> CassandraVerifier.sanityCheckDatacenters(client, config))\n ...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(CassandraVerifier.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(CassandraVerifier.class);", "type": "Logger", "var_name": "log" }, { ...
{ "body": "static Set<String> sanityCheckDatacenters(CassandraClient client, CassandraKeyValueServiceConfig config)\n throws TException {\n createSimpleRfTestKeyspaceIfNotExists(client);\n\n Multimap<String, String> datacenterToRack = HashMultimap.create();\n Set<String> hosts = Sets.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_256
{ "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 testGetFullTableReferenceStringEmptyNamespace() {\n MatcherAssert.assertThat(\n Schemas.getTableReferenceString(TABLE_NAME, Namespace.EMPTY_NAMESPACE),\n Matchers.equalTo(\"TableReference.createWithEmptyNamespace(\\\"\" + TABLE_NAME + \"\\\")\")\n...
{ "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 String getTableReferenceString(String tableName, Namespace namespace) {\n Preconditions.checkArgument(isTableNameValid(tableName), \"%s is not a valid table name\", tableName);\n String namespaceName = namespace.getName();\n // Hacks for schemas that were created before 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_606
{ "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 putUnlessExistsValidTimestampCallsDelegate() {\n preStartHandlingService.putUnlessExists(START_TIMESTAMP, COMMIT_TIMESTAMP);\n verify(delegate).putUnlessExists(START_TIMESTAMP, COMMIT_TIMESTAMP);\n }", "class_method_signature": "PreStartHandlingTransactionServiceTe...
{ "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_485
{ "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 thoroughSweepDeletesTombstoneIfLatestWrite() {\n enqueueTombstone(TABLE_THOR, LOW_TS);\n enqueueTombstone(TABLE_THOR, LOW_TS2);\n assertReadAtTimestampReturnsTombstoneAtTimestamp(TABLE_THOR, LOW_TS + 1, LOW_TS);\n assertReadAtTimestampReturnsTombstoneAtTim...
{ "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_893
{ "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 registersLocks() {\n LockRequest request = LockRequest.of(LOCKS, TIMEOUT);\n when(delegate.lock(request)).thenReturn(LockResponse.successful(TOKEN_1));\n\n timelock.lock(request);\n\n verify(refresher).registerLocks(ImmutableSet.of(TOKEN_1));\n }", "c...
{ "fields": [ { "declarator": "refreshExecutor = createSingleThreadScheduledExecutor(\"refresh\")", "modifier": "private static final", "original_string": "private static final ScheduledExecutorService refreshExecutor = createSingleThreadScheduledExecutor(\"refresh\");", "type": "Scheduled...
{ "body": "@Override\n public LockResponse lock(LockRequest request) {\n LockResponse response = executeOnTimeLock(() -> delegate.lock(request));\n if (response.wasSuccessful()) {\n lockRefresher.registerLocks(ImmutableSet.of(response.getToken()));\n }\n return response;\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_939
{ "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 ifOneServerResponds503WithNoRetryHeaderTheRequestIsRerouted() {\n RETRY_OTHER_FIRST_RESPONSE_TRANSFORMER.registerUrl(getUriForPort(availablePort1));\n RETRY_OTHER_FIRST_RESPONSE_TRANSFORMER.registerUrl(getUriForPort(availablePort2));\n\n TestResource client = Atl...
{ "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 createProxyWithFailover(\n MetricsManager metricsManager,\n ServerListConfig serverListConfig,\n Class<T> type,\n AuxiliaryRemotingParameters parameters) {\n Supplier<T> clientFactory = () -> instrument(\n metricsManager....
{ "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_190
{ "fields": [ { "declarator": "AUTHENTICATED_CLIENT = ClientId.of(\"user\")", "modifier": "private static final", "original_string": "private static final ClientId AUTHENTICATED_CLIENT = ClientId.of(\"user\");", "type": "ClientId", "var_name": "AUTHENTICATED_CLIENT" }, { ...
{ "body": "@Test\n public void shouldRequireAuthIfPrivilegeIsSpecified() {\n Map<ClientId, Privileges> privilege = ImmutableMap.of(AUTHENTICATED_CLIENT, createPrivilegesFor(NAMESPACE_1));\n NamespaceLocker namespaceLocker = NamespaceLocker.deriveFromPrivileges(privilege);\n\n assertThat(namesp...
{ "fields": [ { "declarator": "nonAdminPrivileges", "modifier": "private", "original_string": "private List<Privileges> nonAdminPrivileges;", "type": "List<Privileges>", "var_name": "nonAdminPrivileges" } ], "file": "timelock-impl/src/main/java/com/palantir/atlasdb/timelock/a...
{ "body": "@Override\n public boolean isLocked(TimelockNamespace namespace) {\n return nonAdminPrivileges.stream().anyMatch(privilege -> privilege.hasPrivilege(namespace));\n }", "class_method_signature": "PrivilegeBasedNamespaceLocker.isLocked(TimelockNamespace namespace)", "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_714
{ "fields": [], "file": "atlasdb-commons/src/test/java/com/palantir/common/base/BatchingVisitablesTest.java", "identifier": "BatchingVisitablesTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testLimit() {\n BatchingVisitable<Long> visitor = ListVisitor.create(Lists.newArrayList(0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L));\n BatchingVisitableView<Long> limited = BatchingVisitableView.of(visitor).limit(3);\n ImmutableList<Long> copy = limited.immutableCopy();\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> limit(final BatchingVisitable<T> visitable, final long limit) {\n com.palantir.logsafe.Preconditions.checkNotNull(visitable);\n com.palantir.logsafe.Preconditions.checkArgument(limit >= 0);\n if (limit == 0) {\n return emptyBatching...
{ "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_344
{ "fields": [ { "declarator": "blockStrategy = new TestBlockStrategy()", "modifier": "private final", "original_string": "private final TestBlockStrategy blockStrategy = new TestBlockStrategy();", "type": "TestBlockStrategy", "var_name": "blockStrategy" }, { "declarator...
{ "body": "@Test\n public void backsOffExponentially() throws Exception {\n mockRetries(11);\n when(task.run()).thenThrow(new TransactionFailedRetriableException(\"\"));\n List<Integer> rawBlockTimes = ImmutableList.of(\n 200, 400, 800, 1600, 3200, 6400, 12800, 25600, 51200, 600...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(TransactionRetryStrategy.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(TransactionRetryStrategy.class);", "type": "Logger", "var_name": "log" ...
{ "body": "@JsonCreator\n private static TransactionRetryStrategy of(Strategies strategy) {\n return strategy.strategy;\n }", "class_method_signature": "TransactionRetryStrategy.of(Strategies strategy)", "constructor": false, "full_signature": "@JsonCreator private static TransactionRetryStrategy o...
{ "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_651
{ "fields": [ { "declarator": "kvs", "modifier": "private", "original_string": "private KeyValueService kvs;", "type": "KeyValueService", "var_name": "kvs" }, { "declarator": "transactions", "modifier": "private", "original_string": "private TransactionServi...
{ "body": "@Test\n public void isInitializedWhenPrerequisitesAreInitialized() {\n KeyValueService mockKvs = mock(KeyValueService.class);\n ScrubberStore mockStore = mock(ScrubberStore.class);\n when(mockKvs.isInitialized()).thenReturn(true);\n when(mockStore.isInitialized()).thenReturn(...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(Scrubber.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(Scrubber.class);", "type": "Logger", "var_name": "log" }, { "declarator": "MA...
{ "body": "public boolean isInitialized() {\n return keyValueService.isInitialized() && scrubberStore.isInitialized();\n }", "class_method_signature": "Scrubber.isInitialized()", "constructor": false, "full_signature": "public boolean isInitialized()", "identifier": "isInitialized", "invocations":...
{ "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_201
{ "fields": [ { "declarator": "LOG_ID = UUID.randomUUID()", "modifier": "private static final", "original_string": "private static final UUID LOG_ID = UUID.randomUUID();", "type": "UUID", "var_name": "LOG_ID" }, { "declarator": "TABLE = TableReference.createFromFullyQua...
{ "body": "@Test\n public void onlyAlreadyWatchedRangesAreIgnoredOnRegistration() {\n LockWatchRequest request = tableRequest();\n lockWatcher.startWatching(request);\n\n LockWatchReference newWatch = LockWatchReferenceUtils.entireTable(TABLE_2);\n LockWatchRequest prefixAndOtherTableRe...
{ "fields": [ { "declarator": "lockEventLog", "modifier": "private final", "original_string": "private final LockEventLog lockEventLog;", "type": "LockEventLog", "var_name": "lockEventLog" }, { "declarator": "watches = new AtomicReference<>(LockWatches.create())", ...
{ "body": "@Override\n public void startWatching(LockWatchRequest locksToWatch) {\n Optional<LockWatches> changes = addToWatches(locksToWatch);\n changes.ifPresent(this::logLockWatchEvent);\n }", "class_method_signature": "LockWatchingServiceImpl.startWatching(LockWatchRequest locksToWatch)", ...
{ "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_981
{ "fields": [ { "declarator": "previousKeyPathProperty", "modifier": "private static", "original_string": "private static String previousKeyPathProperty;", "type": "String", "var_name": "previousKeyPathProperty" } ], "file": "atlasdb-config/src/test/java/com/palantir/atlasdb/...
{ "body": "@Test\n public void canDecryptValues() throws IOException {\n AtlasDbConfig config = AtlasDbConfigs.load(\n new File(AtlasDbConfigsTest.class.getResource(\"/encrypted-config.yml\").getPath()),\n AtlasDbConfig.class);\n KeyValueServiceConfig kvsConfig = config....
{ "fields": [ { "declarator": "ATLASDB_CONFIG_OBJECT_PATH = \"/atlasdb\"", "modifier": "public static final", "original_string": "public static final String ATLASDB_CONFIG_OBJECT_PATH = \"/atlasdb\";", "type": "String", "var_name": "ATLASDB_CONFIG_OBJECT_PATH" }, { "dec...
{ "body": "public static <T> T load(File configFile, Class<T> clazz) throws IOException {\n return load(configFile, ATLASDB_CONFIG_OBJECT_PATH, clazz);\n }", "class_method_signature": "AtlasDbConfigs.load(File configFile, Class<T> clazz)", "constructor": false, "full_signature": "public static T load(...
{ "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_128
{ "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 setupCreatesAndResetsExistingTables() {\n fromKvs.createTables(TEST_AND_CHECKPOINT_TABLES);\n toKvs.createTable(TEST_TABLE, AtlasDbConstants.GENERIC_TABLE_METADATA);\n toKvs.put(TEST_TABLE, ImmutableMap.of(TEST_CELL, TEST_VALUE1), 1);\n assertThat(toKvs.ge...
{ "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_578
{ "fields": [], "file": "atlasdb-impl-shared/src/test/java/com/palantir/atlasdb/internalschema/InternalSchemaConfigTest.java", "identifier": "InternalSchemaConfigTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void canCreateConfigWithRecognisedSchemaVersions() {\n for (int version : TransactionConstants.SUPPORTED_TRANSACTIONS_SCHEMA_VERSIONS) {\n assertThatCode(() -> ImmutableInternalSchemaConfig.builder()\n .targetTransactionsSchemaVersion(version)\n ...
{ "fields": [], "file": "atlasdb-impl-shared/src/main/java/com/palantir/atlasdb/internalschema/InternalSchemaConfig.java", "identifier": "InternalSchemaConfig", "interfaces": "", "methods": [ { "class_method_signature": "InternalSchemaConfig.targetTransactionsSchemaVersion()", "constructor": f...
{ "body": "public abstract Optional<Integer> targetTransactionsSchemaVersion();", "class_method_signature": "InternalSchemaConfig.targetTransactionsSchemaVersion()", "constructor": false, "full_signature": "public abstract Optional<Integer> targetTransactionsSchemaVersion()", "identifier": "targetTransactions...
{ "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_597
{ "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 ignoreUnknownIgnoresUnknownTimestampServicesForMultipleTimestamps() {\n when(delegate1.get(any())).thenReturn(ImmutableMap.of(1L, 8L, 41L, 48L));\n\n assertThat(lastDigitFiveImpliesUnknownTransactionService.get(ImmutableList.of(1L, 5L, 35L, 41L)))\n .isEq...
{ "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_919
{ "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 doesNotLogIfWaitForLocksIsSlow() {\n flushLogsWithCall(LONG_DURATION, () -> profilingTimelockService.waitForLocks(WaitForLocksRequest.of(\n ImmutableSet.of(StringLockDescriptor.of(\"combination\")), 123)));\n\n verifyLoggerNeverInvoked();\n }", "clas...
{ "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 WaitForLocksResponse waitForLocks(WaitForLocksRequest request) {\n // Don't profile this, as it may be skewed by user contention on locks.\n tryFlushLogs();\n return delegate.waitForLocks(request);\n }", "class_method_signature": "ProfilingTimelockService.wai...
{ "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_85
{ "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 canGetClusterConfiguration() {\n assertThat(PaxosRemotingUtils.getClusterConfiguration(SSL_TIMELOCK)).isEqualTo(SSL_CLUSTER);\n assertThat(PaxosRemotingUtils.getClusterConfiguration(NO_SSL_TIMELOCK)).isEqualTo(NO_SSL_CLUSTER);\n }", "class_method_signature": "Paxos...
{ "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 ClusterConfiguration getClusterConfiguration(TimeLockInstallConfiguration install) {\n return install.cluster();\n }", "class_method_signature": "PaxosRemotingUtils.getClusterConfiguration(TimeLockInstallConfiguration install)", "constructor": false, "full_signature": "public ...
{ "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_276
{ "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 dropTableNoLoggingHappensIfQueryFastAndInfoLevel() {\n Appender mockAppender = setLogLevelAndGetAppender(Level.INFO);\n\n kvs.dropTable(TABLE_REF);\n\n verifyNoMoreInteractions(mockAppender);\n }", "class_method_signature": "ProfilingKeyValueServiceTest.drop...
{ "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 void dropTable(TableReference tableRef) {\n maybeLog(() -> delegate.dropTable(tableRef),\n logTimeAndTable(\"dropTable\", tableRef));\n }", "class_method_signature": "ProfilingKeyValueService.dropTable(TableReference tableRef)", "constructor": false, "fu...
{ "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_626
{ "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 shouldCallDelegateOnce() throws Exception {\n wrappingTask.execute(transaction);\n verify(delegate, times(1)).execute(transaction);\n }", "class_method_signature": "LockCheckingTransactionTaskTest.shouldCallDelegateOnce()", "constructor": false, "full_signature...
{ "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_333
{ "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 rowComponentsInUnknownTablesAreNotSafe() {\n SafeLoggableData safeLoggableData = ImmutableSafeLoggableData.builder().build();\n assertThat(safeLoggableData.isRowComponentNameSafe(TABLE_REFERENCE_3, ROW_COMPONENT_1)).isFalse();\n }", "class_method_signature": "SafeL...
{ "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_299
{ "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 getMetadataForTable() throws Exception {\n when(delegate.getMetadataForTable(TABLE_REF)).thenReturn(METADATA_BYTES);\n\n byte[] result = kvs.getMetadataForTable(TABLE_REF);\n\n assertThat(result, equalTo(METADATA_BYTES));\n checkSpan(\"atlasdb-kvs.getMetad...
{ "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 byte[] getMetadataForTable(TableReference tableRef) {\n //noinspection unused - try-with-resources closes trace\n try (CloseableTrace trace = startLocalTrace(\"getMetadataForTable({})\",\n LoggingArgs.safeTableOrPlaceholder(tableRef))) {\n retur...
{ "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...