id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
36960637_298
{ "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 getLatestTimestamps() throws Exception {\n Map<Cell, Long> cells = ImmutableMap.of(CELL, TIMESTAMP);\n when(delegate.getLatestTimestamps(TABLE_REF, cells)).thenReturn(cells);\n\n Map<Cell, Long> result = kvs.getLatestTimestamps(TABLE_REF, cells);\n\n asser...
{ "fields": [ { "declarator": "SERVICE_NAME = \"atlasdb-kvs\"", "modifier": "private static final", "original_string": "private static final String SERVICE_NAME = \"atlasdb-kvs\";", "type": "String", "var_name": "SERVICE_NAME" }, { "declarator": "delegate", "modif...
{ "body": "@Override\n public Map<Cell, Long> getLatestTimestamps(TableReference tableRef,\n Map<Cell, Long> timestampByCell) {\n //noinspection unused - try-with-resources closes trace\n try (CloseableTrace trace = startLocalTrace(\"getLatestTimestamps({}, {} cells)\",\n Lo...
{ "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_762
{ "fields": [ { "declarator": "DATA = PtBytes.toBytes(\"data\")", "modifier": "private static final", "original_string": "private static final byte[] DATA = PtBytes.toBytes(\"data\");", "type": "byte[]", "var_name": "DATA" }, { "declarator": "CELL = Cell.create(DATA, DA...
{ "body": "@Test\n public void createColumnWithGivenValueCreatesItWithAssociatedCassandraTimestamp() {\n assertThat(CassandraKeyValueServices.createColumn(CELL, Value.create(DATA, 1000)).getTimestamp())\n .isEqualTo(1000);\n assertThat(CassandraKeyValueServices.createColumn(CELL, Value...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(CassandraKeyValueService.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(CassandraKeyValueService.class);", "type": "Logger", "var_name": "log" ...
{ "body": "static Column createColumn(Cell cell, Value value) {\n return createColumnAtSpecificCassandraTimestamp(cell, value, value.getTimestamp());\n }", "class_method_signature": "CassandraKeyValueServices.createColumn(Cell cell, Value value)", "constructor": false, "full_signature": "static Column...
{ "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_918
{ "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 doesNotLogIfLockIsSlow() {\n flushLogsWithCall(LONG_DURATION, () -> profilingTimelockService.lock(\n LockRequest.of(ImmutableSet.of(StringLockDescriptor.of(\"exclusive\")), 1234)));\n\n verifyLoggerNeverInvoked();\n }", "class_method_signature": "Pro...
{ "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 LockResponse lock(LockRequest request) {\n // Don't profile this, as it may be skewed by user contention on locks.\n tryFlushLogs();\n return delegate.lock(request);\n }", "class_method_signature": "ProfilingTimelockService.lock(LockRequest request)", "cons...
{ "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_84
{ "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 canGetRemoteServerAddresses() {\n assertThat(PaxosRemotingUtils.getRemoteServerAddresses(SSL_TIMELOCK))\n .isEqualTo(ImmutableList.of(\"bar:2\", \"baz:3\"));\n }", "class_method_signature": "PaxosRemotingUtilsTest.canGetRemoteServerAddresses()", "construc...
{ "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> getRemoteServerAddresses(TimeLockInstallConfiguration install) {\n List<String> result = Lists.newArrayList(getClusterAddresses(install));\n result.remove(install.cluster().localServer());\n return ImmutableList.copyOf(result);\n }", "class_method_signat...
{ "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_980
{ "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 canCopyReplacingClient() {\n TimeLockClientConfig newConfig =\n TimeLockClientConfigs.copyWithClient(CONFIG_WITH_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_129
{ "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 checkpointTableOnSourceKvsIsIgnored() {\n fromKvs.createTables(TEST_AND_CHECKPOINT_TABLES);\n\n KeyValueServiceMigrator migrator = KeyValueServiceMigrators.setupMigrator(migratorSpec);\n migrator.setup();\n migrator.migrate();\n\n verify(fromKvs, ne...
{ "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_579
{ "fields": [], "file": "atlasdb-impl-shared/src/test/java/com/palantir/atlasdb/internalschema/InternalSchemaConfigTest.java", "identifier": "InternalSchemaConfigTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void throwsIfCreatingConfigWithUnrecognizedSchemaVersions() {\n assertThatThrownBy(() -> ImmutableInternalSchemaConfig.builder()\n .targetTransactionsSchemaVersion(Integer.MIN_VALUE)\n .build())\n .isInstanceOf(IllegalStateException.clas...
{ "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_596
{ "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 ignoreUnknownIgnoresUnknownTimestampServicesForSingleTimestamps() {\n assertThat(lastDigitFiveImpliesUnknownTransactionService.get(5L)).isNull();\n }", "class_method_signature": "SplitKeyDelegatingTransactionServiceTest.ignoreUnknownIgnoresUnknownTimestampServicesForSingl...
{ "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_715
{ "fields": [], "file": "atlasdb-commons/src/test/java/com/palantir/common/base/BatchingVisitablesTest.java", "identifier": "BatchingVisitablesTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testConcat() {\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 BatchingVisitableView<Long> concat = BatchingVisitable...
{ "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> concat(BatchingVisitable<? extends T>... inputs) {\n return concat(ImmutableList.copyOf(inputs));\n }", "class_method_signature": "BatchingVisitables.concat(BatchingVisitable<? extends T>... inputs)", "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_345
{ "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 = NullPointerException.class)\n public void cantReadToNullArray() throws IOException {\n dataStream.read(null, 1, 1);\n }", "class_method_signature": "BlockConsumingInputStreamTest.cantReadToNullArray()", "constructor": false, "full_signature": "@Test(expected = NullPointe...
{ "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_650
{ "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 getMillisForTimestampIfNotPunchedBeforeWhenPunchedExactlyAtLowerBound() {\n KeyValueService kvs = Mockito.spy(new InMemoryKeyValueService(false));\n puncherStore = initializePuncherStore(PUNCHER_HISTORY, kvs);\n // Punched: (10, 100), (20, 200), (30, 300)\n ...
{ "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_200
{ "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 registeringWatchWithNarrowerScopeIsNoop() {\n LockWatchRequest request = tableRequest();\n lockWatcher.startWatching(request);\n\n LockWatchRequest prefixRequest = prefixRequest(ROW);\n lockWatcher.startWatching(prefixRequest);\n\n List<LockWatchEve...
{ "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_484
{ "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 sweepDeletesWritesWhenTombstoneHasHigherTimestamp() {\n enqueueWriteCommitted(TABLE_CONS, LOW_TS);\n enqueueTombstone(TABLE_CONS, LOW_TS2);\n assertTestValueEnqueuedAtGivenTimestampStillPresent(TABLE_CONS, LOW_TS);\n assertReadAtTimestampReturnsTombstoneAt...
{ "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_892
{ "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 registersImmutableTimestampLock() {\n when(delegate.lockImmutableTimestamp()).thenReturn(LockImmutableTimestampResponse.of(123L, TOKEN_1));\n timelock.lockImmutableTimestamp();\n\n verify(refresher).registerLocks(ImmutableSet.of(TOKEN_1));\n }", "class_metho...
{ "fields": [ { "declarator": "refreshExecutor = createSingleThreadScheduledExecutor(\"refresh\")", "modifier": "private static final", "original_string": "private static final ScheduledExecutorService refreshExecutor = createSingleThreadScheduledExecutor(\"refresh\");", "type": "Scheduled...
{ "body": "@Override\n public LockImmutableTimestampResponse lockImmutableTimestamp() {\n LockImmutableTimestampResponse response = executeOnTimeLock(delegate::lockImmutableTimestamp);\n lockRefresher.registerLocks(ImmutableSet.of(response.getLock()));\n return response;\n }", "class_meth...
{ "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_938
{ "fields": [ { "declarator": "USER_AGENT_1 = createBaseUserAgent(\"Bond\", \"0.0.7\")", "modifier": "private static final", "original_string": "private static final UserAgent USER_AGENT_1 = createBaseUserAgent(\"Bond\", \"0.0.7\");", "type": "UserAgent", "var_name": "USER_AGENT_1" ...
{ "body": "@Test\n public void detectsAtlasDbHttpClientAgentOnAnyPresentUserAgentHeader() {\n assertThat(ProtocolAwareExceptionMapper.parseProtocolVersionFromUserAgentHeader(\n ImmutableList.of(UserAgents.format(USER_AGENT_2.addAgent(AGENT_1)),\n FORMATTED_USER_AGENT_WI...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(ProtocolAwareExceptionMapper.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(ProtocolAwareExceptionMapper.class);", "type": "Logger", "var_name": "l...
{ "body": "@VisibleForTesting\n static Optional<String> parseProtocolVersionFromUserAgentHeader(@Nonnull List<String> userAgentHeader) {\n return userAgentHeader\n .stream()\n .map(UserAgents::tryParse)\n .map(UserAgent::informational)\n .flatMap(L...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_191
{ "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 callsSupplierForNewRequests() {\n Supplier<AsyncResult<Void>> supplier = mock(Supplier.class);\n when(supplier.get()).thenReturn(new AsyncResult<>());\n awaitedLocks.getExistingOrAwait(REQUEST_1, supplier);\n awaitedLocks.getExistingOrAwait(REQUEST_2, supp...
{ "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_312
{ "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 returnsUnsafeInternalTableNameCorrectly() {\n Arg<String> internalTableNameArg = LoggingArgs.internalTableName(UNSAFE_TABLE_REFERENCE);\n assertThat(internalTableNameArg.getName()).isEqualTo(\"unsafeTableRef\");\n assertThat(internalTableNameArg.getValue()).isEqu...
{ "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> internalTableName(TableReference tableReference) {\n return safeInternalTableName(AbstractKeyValueService.internalTableName(tableReference));\n }", "class_method_signature": "LoggingArgs.internalTableName(TableReference tableReference)", "constructor": false, "full...
{ "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_742
{ "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 revalidateCallsRestoreOnBackupRunner() {\n invalidator.revalidateFromBackup();\n verify(backupRunner, times(1)).restoreFromBackup();\n }", "class_method_signature": "CassandraTimestampStoreInvalidatorTest.revalidateCallsRestoreOnBackupRunner()", "constructor": fa...
{ "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 void revalidateFromBackup() {\n backupRunner.ensureTimestampTableExists();\n backupRunner.restoreFromBackup();\n }", "class_method_signature": "CassandraTimestampStoreInvalidator.revalidateFromBackup()", "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_257
{ "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 testCreateTable() {\n mockery.checking(new Expectations(){{\n oneOf(kvs).createTables(with(tableMapContainsEntry(TABLE_REF, getSimpleTableDefinitionAsBytes(TABLE_REF))));\n }});\n Schemas.createTable(kvs, TABLE_REF, getSimpleTableDefinition(TABLE_REF))...
{ "fields": [ { "declarator": "INDEX_SUFFIX = \"idx\"", "modifier": "private static final", "original_string": "private static final String INDEX_SUFFIX = \"idx\";", "type": "String", "var_name": "INDEX_SUFFIX" } ], "file": "atlasdb-client/src/main/java/com/palantir/atlasdb/t...
{ "body": "public static void createTable(KeyValueService kvs, TableReference tableRef, TableDefinition definition) {\n createTables(kvs, ImmutableMap.of(tableRef, definition));\n }", "class_method_signature": "Schemas.createTable(KeyValueService kvs, TableReference tableRef, TableDefinition definition)",...
{ "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_607
{ "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 propagatesPutUnlessExistsExceptions() {\n KeyAlreadyExistsException exception = new KeyAlreadyExistsException(\"no\");\n doThrow(exception).when(delegate).putUnlessExists(anyLong(), anyLong());\n assertThatThrownBy(() -> preStartHandlingService.putUnlessExists(ST...
{ "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_492
{ "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 sweepProgressesToEndOfPartitionWhenFewValuesAndSweepTsLarge() {\n long writeTs = getSweepTsCons() - 3 * TS_FINE_GRANULARITY;\n enqueueWriteCommitted(TABLE_CONS, writeTs);\n enqueueWriteCommitted(TABLE_CONS, writeTs + 5);\n\n sweepNextBatch(ShardAndStrategy...
{ "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_168
{ "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 handlesBlockingTimeout() {\n when(resource.leaderTime(AUTH_HEADER, NAMESPACE)).thenThrow(new BlockingTimeoutException(\"\"));\n assertQosExceptionThrownBy(resource.leaderTime(AUTH_HEADER, NAMESPACE), new AssertVisitor() {\n @Override\n public Void ...
{ "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_538
{ "fields": [ { "declarator": "VALID_START_TIMESTAMP = 100L", "modifier": "private static final", "original_string": "private static final Long VALID_START_TIMESTAMP = 100L;", "type": "Long", "var_name": "VALID_START_TIMESTAMP" }, { "declarator": "VALID_COMMIT_TIMESTAMP...
{ "body": "@Test\n public void loadIfCachedReturnsEmptyWhenNotCached() {\n when(mockTransactionService.get(VALID_START_TIMESTAMP)).thenReturn(VALID_COMMIT_TIMESTAMP);\n assertThat(loader.loadIfCached(VALID_START_TIMESTAMP)).isEmpty();\n verifyNoMoreInteractions(mockTransactionService);\n }"...
{ "fields": [ { "declarator": "ONE_MILLION = 1_000_000L", "modifier": "private static final", "original_string": "private static final Long ONE_MILLION = 1_000_000L;", "type": "Long", "var_name": "ONE_MILLION" }, { "declarator": "cache", "modifier": "private", ...
{ "body": "public Optional<Long> loadIfCached(long startTs) {\n return Optional.ofNullable(cache.getIfPresent(startTs));\n }", "class_method_signature": "CommitTsCache.loadIfCached(long startTs)", "constructor": false, "full_signature": "public Optional<Long> loadIfCached(long startTs)", "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_187
{ "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 getUnresolvedFutureUntilSingleIterationHasRun() {\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_884
{ "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 lockAcquireTimeoutIsBounded() {\n when(lockRequest.getAcquireTimeoutMs()).thenReturn(TIMEOUT_GREATER_THAN_MAX_PERMISSIBLE_TIMEOUT.toMillis());\n when(timelock.lock(any()))\n .thenReturn(ConjureLockResponse.successful(SuccessfulLockResponse.of(LOCK_TOKEN, ...
{ "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_754
{ "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 simpleStrategyMultipleDcsThrows() 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_3
{ "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 metricsInEachSetAreReflectedInUnion() {\n Timer timer = registry1.timer(METRIC_NAME_1);\n Histogram histogram = registry2.histogram(METRIC_NAME_2);\n Meter meter = registry1.meter(METRIC_NAME_3);\n\n assertThat(disjointUnionTaggedMetricSet.getMetrics()).co...
{ "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_304
{ "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 putMetadataForTable() throws Exception {\n kvs.putMetadataForTable(TABLE_REF, METADATA_BYTES);\n\n checkSpan(\"atlasdb-kvs.putMetadataForTable({table}, 8 bytes)\");\n verify(delegate).putMetadataForTable(TABLE_REF, METADATA_BYTES);\n verifyNoMoreInteractio...
{ "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 putMetadataForTable(TableReference tableRef, byte[] metadata) {\n //noinspection unused - try-with-resources closes trace\n try (CloseableTrace trace = startLocalTrace(\"putMetadataForTable({}, {} bytes)\",\n LoggingArgs.safeTableOrPlaceholder(tableRe...
{ "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_611
{ "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 stressTest() {\n int numTableReferences = 1000;\n List<TableReference> tableReferences = IntStream.range(0, numTableReferences)\n .mapToObj(this::getTableReference)\n .collect(Collectors.toList());\n for (int iteration = 0; iteration...
{ "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_241
{ "fields": [ { "declarator": "THREAD_NAME = AnnotatedRunnableTest.class.getSimpleName()", "modifier": "private static final", "original_string": "private static final String THREAD_NAME = AnnotatedRunnableTest.class.getSimpleName();", "type": "String", "var_name": "THREAD_NAME" ...
{ "body": "@Test\n public void replaceThreadNameWith() throws Exception {\n AtomicBoolean hasRun = new AtomicBoolean(false);\n Runnable runnable = AnnotatedRunnable.replaceThreadNameWith(\"test thread name\", () -> {\n assertThat(Thread.currentThread().getName(), is(\"test thread name\"));...
{ "fields": [ { "declarator": "delegate", "modifier": "private final", "original_string": "private final Runnable delegate;", "type": "Runnable", "var_name": "delegate" }, { "declarator": "name", "modifier": "private final", "original_string": "private final...
{ "body": "public static Runnable replaceThreadNameWith(String threadName, Runnable delegate) {\n return wrapWithThreadName(AnnotationType.REPLACE, threadName, delegate);\n }", "class_method_signature": "AnnotatedRunnable.replaceThreadNameWith(String threadName, Runnable delegate)", "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_996
{ "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 throwsIfAttemptingToPutTwice() {\n coordinationStore.putUnlessValueExists(SEQUENCE_NUMBER_1, VALUE_1);\n assertThatThrownBy(() -> coordinationStore.putUnlessValueExists(SEQUENCE_NUMBER_1, VALUE_2))\n .isInstanceOf(IllegalStateException.class)\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": "@VisibleForTesting\n void putUnlessValueExists(long sequenceNumber, T value) {\n Preconditions.checkState(\n sequenceNumber > 0,\n \"Only positive sequence numbers are supported, but found %s\",\n sequenceNumber);\n try {\n kvs.putUnl...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_979
{ "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 otherPropertiesConservedWhenAddingClient() {\n TimeLockClientConfig newConfig =\n TimeLockClientConfigs.copyWithClient(CONFIG_WITHOUT_CLIENT, CLIENT_1);\n assertThat(newConfig.serversList()).isEqualTo(SERVERS_LIST);\n }", "class_method_signature": "T...
{ "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_580
{ "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 getsValuesFromUnderlying() {\n when(mockTransactionService.get(anyLong())).thenReturn(5L);\n\n assertThat(writeBatchingTransactionService.get(3L)).isEqualTo(5L);\n\n verify(mockTransactionService).get(3L);\n }", "class_method_signature": "WriteBatchingTransa...
{ "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": "@CheckForNull\n @Override\n public Long get(long startTimestamp) {\n return delegate.get(startTimestamp);\n }", "class_method_signature": "WriteBatchingTransactionService.get(long startTimestamp)", "constructor": false, "full_signature": "@CheckForNull @Override public Long get(long 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_353
{ "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 readSingleByteWhenStreamExhaustedReturnsMinusOne() throws IOException {\n dataStream.read(new byte[DATA_SIZE]);\n\n int read = dataStream.read();\n assertEquals(-1, read);\n }", "class_method_signature": "BlockConsumingInputStreamTest.readSingleByteWhenStrea...
{ "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_703
{ "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 propagatesRejectionThroughExecute() {\n doThrow(REJECTED_EXECUTION_EXCEPTION).when(delegate).execute(any());\n assertThatThrownBy(() -> checkedRejectionExecutor.execute(DO_NOTHING))\n .isInstanceOf(CheckedRejectedExecutionException.class)\n ...
{ "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 void execute(Runnable runnable) throws CheckedRejectedExecutionException {\n try {\n underlying.execute(runnable);\n } catch (RejectedExecutionException ex) {\n throw new CheckedRejectedExecutionException(ex);\n }\n }", "class_method_signature": "Check...
{ "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_216
{ "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 shouldTruncateSystemTables() throws Exception {\n atlasDbService.truncateTable(\"_locks\");\n\n TableReference tableToTruncate = TableReference.createWithEmptyNamespace(\"_locks\");\n verify(kvs, atLeastOnce()).truncateTable(tableToTruncate);\n }", "class_me...
{ "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_646
{ "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 getMillisForTimestampIfNotPunchedBeforeEdgeCase() {\n KeyValueService kvs = new InMemoryKeyValueService(false);\n puncherStore = initializePuncherStore(PUNCHER_HISTORY, kvs);\n // Punched: (10, 100), (20, 200), (30, 300)\n // Arguments: (15, 150)\n ...
{ "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_902
{ "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 unlocksWhenFailedToRegisterLockAfterStartingTransaction() {\n when(response.immutableTimestamp()).thenReturn(immutableTimestampResponse);\n when(delegate.startIdentifiedAtlasDbTransactionBatch(1)).thenReturn(ImmutableList.of(response));\n\n ImmutableSet<LockToken...
{ "fields": [ { "declarator": "refreshExecutor = createSingleThreadScheduledExecutor(\"refresh\")", "modifier": "private static final", "original_string": "private static final ScheduledExecutorService refreshExecutor = createSingleThreadScheduledExecutor(\"refresh\");", "type": "Scheduled...
{ "body": "@Override\n public List<StartIdentifiedAtlasDbTransactionResponse> startIdentifiedAtlasDbTransactionBatch(int count) {\n List<StartIdentifiedAtlasDbTransactionResponse> responses = executeOnTimeLock(\n () -> delegate.startIdentifiedAtlasDbTransactionBatch(count));\n Set<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_451
{ "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 whenScalingDisabledUseInitialPause() throws Exception {\n when(sweepIteration.call()).thenReturn(SUCCESS_MEDIUM);\n scheduler.start(2);\n\n runSweepIterations(5);\n\n schedulerEnabled.set(false);\n runSweepIterations(5, INITIAL_PAUSE);\n veri...
{ "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_514
{ "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 disabledReturnsBackoff() {\n assertThat(delay.getNextPause(SweepIterationResults.disabled())).isEqualTo(BACKOFF);\n }", "class_method_signature": "SweepDelayTest.disabledReturnsBackoff()", "constructor": false, "full_signature": "@Test public void disabledReturnsBacko...
{ "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_71
{ "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 failureMechanismNotInvokedForPossibleLeadershipChanges() {\n when(checker1.getFreshTimestampFromNodeForClient(CLIENT.value()))\n .then(getNextTimestamp())\n .then(getNextTimestamp())\n .thenReturn(OptionalLong.empty());\n whe...
{ "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_144
{ "fields": [ { "declarator": "NAMESPACE_1 = Client.of(\"eins\")", "modifier": "private static final", "original_string": "private static final Client NAMESPACE_1 = Client.of(\"eins\");", "type": "Client", "var_name": "NAMESPACE_1" }, { "declarator": "NAMESPACE_2 = Clie...
{ "body": "@Test\n public void returnsMultipleNamespacesIfNeeded() {\n initializeLog(NAMESPACE_1, SEQUENCE_ID_1);\n initializeLog(NAMESPACE_1, SEQUENCE_ID_2);\n initializeLog(NAMESPACE_2, SEQUENCE_ID_1);\n initializeLog(NAMESPACE_2, SEQUENCE_ID_2);\n assertThat(namespaceLoader.ge...
{ "fields": [ { "declarator": "jdbi", "modifier": "private final", "original_string": "private final Jdbi jdbi;", "type": "Jdbi", "var_name": "jdbi" } ], "file": "timelock-impl/src/main/java/com/palantir/atlasdb/timelock/management/SqliteNamespaceLoader.java", "identifier":...
{ "body": "@Override\n public Set<Client> getAllPersistedNamespaces() {\n return jdbi.withExtension(SqlitePaxosStateLog.Queries.class, SqlitePaxosStateLog.Queries::getAllNamespaces)\n .stream()\n .map(Client::of)\n .collect(Collectors.toSet());\n }", "class_...
{ "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_847
{ "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 canWriteAndRetrieveAValue() throws IOException {\n long round = 12L;\n PaxosValue paxosValue = writeValueForRound(round);\n assertThat(PaxosValue.BYTES_HYDRATOR.hydrateFromBytes(stateLog.readRound(round))).isEqualTo(paxosValue);\n }", "class_method_signature...
{ "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_797
{ "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 shouldReturnEmptyLocationFromUnexpectedSnitch() {\n Supplier<String> unexpectedSnitchSupplier = () -> \"unexpected snitch\";\n\n Supplier<Optional<HostLocation>> hostLocationSupplier = new HostLocationSupplier(unexpectedSnitchSupplier,\n ec2LocationSuppli...
{ "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_328
{ "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 tableReferencesExplicitlyMarkedSafeAreSafe() {\n SafeLoggableData safeLoggableData = ImmutableSafeLoggableData.builder()\n .addPermittedTableReferences(TABLE_REFERENCE_1)\n .build();\n\n assertThat(safeLoggableData.isTableReferenceSafe(TABL...
{ "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_282
{ "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(expected = NullPointerException.class)\n public void createNullThrows() throws Exception {\n TracingKeyValueService.create(null);\n }", "class_method_signature": "TracingKeyValueServiceTest.createNullThrows()", "constructor": false, "full_signature": "@Test(expected = NullPointerEx...
{ "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": "public static KeyValueService create(KeyValueService keyValueService) {\n return new TracingKeyValueService(keyValueService);\n }", "class_method_signature": "TracingKeyValueService.create(KeyValueService keyValueService)", "constructor": false, "full_signature": "public static KeyValueServ...
{ "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_778
{ "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 appliedResultIsCompatible() {\n CqlResult mockResult = createMockCqlResult(\n ImmutableList.of(createMockCqlRow(buildAppliedColumnList())));\n CassandraTimestampUtils.verifyCompatible(mockResult, CAS_MAP_TWO_COLUMNS);\n }", "class_method_signature": ...
{ "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_406
{ "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 sweepTimestampDoesNotClashAcrossStrategies() {\n metrics.updateSweepTimestamp(CONS_ZERO, 1);\n assertThat(metricsManager).hasSweepTimestampConservativeEqualTo(1L);\n\n metrics.updateSweepTimestamp(THOR_ZERO, 5);\n assertThat(metricsManager).hasSweepTimesta...
{ "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 updateSweepTimestamp(ShardAndStrategy shardStrategy, long value) {\n updateMetricsIfPresent(shardStrategy, metrics -> metrics.updateSweepTimestamp(value));\n }", "class_method_signature": "TargetedSweepMetrics.updateSweepTimestamp(ShardAndStrategy shardStrategy, long value)", "con...
{ "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_955
{ "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 canCreateInMemoryWithSetOfSchemas() {\n TransactionManagers.createInMemory(ImmutableSet.of(\n GenericTestSchema.getSchema()));\n }", "class_method_signature": "TransactionManagersTest.canCreateInMemoryWithSetOfSchemas()", "constructor": false, "full_sig...
{ "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_810
{ "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 connectionExceptionsWithSufficientAttemptsShouldBlacklistDefault() {\n for (Exception ex : CONNECTION_EXCEPTIONS) {\n assertFalse(\"MAX_RETRIES_PER_HOST - 1 attempts should not blacklist\",\n handlerLegacy.shouldBlacklist(ex, MAX_RETRIES_PER_HOST ...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(CassandraRequestExceptionHandler.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(CassandraRequestExceptionHandler.class);", "type": "Logger", "var_n...
{ "body": "@VisibleForTesting\n boolean shouldBlacklist(Exception ex, int numberOfAttempts) {\n return isConnectionException(ex)\n && numberOfAttempts >= maxTriesSameHost.get()\n && !isExceptionNotImplicatingThisParticularNode(ex);\n }", "class_method_signature": "Cassandr...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_113
{ "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 slowLogShouldBeLoggedWhenLockResponseIsSlowButShouldNotBeLoggedAtDebug() {\n long lockDurationMillis = SLOW_LOG_TRIGGER_MILLIS + 5;\n lockServiceWithSlowLogEnabled.logSlowLockAcquisition(TEST_LOCKID, LockClient.ANONYMOUS, lockDurationMillis);\n\n assertThat(testL...
{ "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 void logSlowLockAcquisition(String lockId, LockClient currentHolder, long durationMillis) {\n final String slowLockLogMessage = \"Blocked for {} ms to acquire lock {} {}.\";\n\n // Note: The construction of params is pushed into the branches, as it may be exp...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_543
{ "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 timestampTrackersReturnTheLastKnownValueIfUnderlyingSupplierThrows() {\n when(mockClock.getTick()).thenReturn(0L, CACHE_INTERVAL_NANOS + 1);\n TimestampTracker.registerTimestampForTracking(mockClock, metricsManager, FAKE_METRIC, new Supplier<Long>() {\n priva...
{ "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_26
{ "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 colWithNullsParsesAllCombinationsForCells() {\n LockDescriptor descriptor = AtlasCellLockDescriptor.of(TABLE.getQualifiedName(), NO_ZERO_ROW, COL_WITH_ZEROS);\n\n List<CellReference> expected = ImmutableList.of(\n Cell.create(new byte[] {1, 2, 3}, new byt...
{ "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_390
{ "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 getMappedTableNamesThrowsForInvalidShortTableName() {\n insertInvalidShortTableNameIntoKvs();\n assertThatThrownBy(() -> tableMapping.getMappedTableName(FQ_TABLE2))\n .as(\"Invalid short table name in KVS\")\n .isInstanceOf(IllegalArgumentE...
{ "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_685
{ "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 singleAttemptCallbackThrowsCleanupExceptionOnCleanupFailure() {\n callback = LambdaCallback.singleAttempt(this::markInitAndFail, this::markCleanupAndFail);\n\n assertThatThrownBy(() -> callback.runWithRetry(initsAndCleanups)).isEqualToComparingFieldByField(CLEANUP_FAIL)...
{ "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_943
{ "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 httpProxyCanBeCommissionedAndDecommissionedIfNodeAvailabilityChanges() {\n AtomicReference<ServerListConfig> config = new AtomicReference<>(ImmutableServerListConfig.builder()\n .addServers(getUriForPort(availablePort1))\n .sslConfiguration(SSL_CO...
{ "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_410
{ "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 shouldNotBePublishedAfterSmallSweep() {\n entriesRead.addAndGet(10);\n enqueuedWrites.incrementAndGet();\n millisSinceLastSweptTs.set(Duration.ofMinutes(1).toMillis());\n\n assertThat(filter.shouldPublish()).isFalse();\n }", "class_method_signature": ...
{ "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_30
{ "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 lockDescriptorWithOneZeroReturnsCorrectTableAndRemainder() {\n LockDescriptor descriptor = AtlasRowLockDescriptor.of(TABLE.getQualifiedName(), NO_ZERO_ROW);\n assertThat(AtlasLockDescriptorUtils.tryParseTableRef(descriptor))\n .hasValue(ImmutableTableRefA...
{ "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_555
{ "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 canReturnNothingToCompact() throws InterruptedException {\n when(priorityCalculator.selectTableToCompact()).thenReturn(Optional.empty());\n\n BackgroundCompactor.CompactionOutcome outcome = compactor.grabLockAndRunOnce(lockService);\n assertThat(outcome).isEqualT...
{ "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_105
{ "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 lockImmutableTimestampLocksFreshTimestamp() throws InterruptedException {\n long immutableTs = 3L;\n\n LockRefreshToken expectedToken = mockImmutableTsLockResponse();\n mockMinLockedInVersionIdResponse(immutableTs);\n\n LockImmutableTimestampResponse expec...
{ "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 LockImmutableTimestampResponse lockImmutableTimestamp() {\n long immutableLockTs = timestampService.getFreshTimestamp();\n LockDescriptor lockDesc = AtlasTimestampLockDescriptor.of(immutableLockTs);\n com.palantir.lock.LockRequest lockRequest = com.palantir.lock.L...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_806
{ "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 getRangeSlicesWeigherReturnsDefaultEstimateForFailure() {\n assertThatWeighFailureReturnsDefaultWeight(ThriftQueryWeighers.getRangeSlices(new KeyRange(1)));\n }", "class_method_signature": "ThriftQueryWeighersTest.getRangeSlicesWeigherReturnsDefaultEstimateForFailure()", ...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(CassandraClient.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(CassandraClient.class);", "type": "Logger", "var_name": "log" }, { "de...
{ "body": "public static QueryWeigher<List<KeySlice>> getRangeSlices(KeyRange keyRange) {\n return readWeigher(ThriftObjectSizeUtils::getApproximateSizeOfKeySlices, List::size, keyRange.count);\n }", "class_method_signature": "ThriftQueryWeighers.getRangeSlices(KeyRange keyRange)", "constructor": false,...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_386
{ "fields": [ { "declarator": "TABLE = TableReference.create(\n Namespace.create(\"test_ctx\"), \"test__table_name\")", "modifier": "private static final", "original_string": "private static final TableReference TABLE = TableReference.create(\n Namespace.create(\"test_ctx\"...
{ "body": "@Test\n public void testCanUnpersistBinary_tableNameAsString() {\n byte[] data = EncodingUtils.add(\n new byte[1],\n EncodingUtils.encodeVarString(TABLE.getQualifiedName()),\n EncodingUtils.encodeSizedBytes(row),\n EncodingUtils.encodeSi...
{ "fields": [ { "declarator": "writePrefix = { 1 }", "modifier": "private static final", "original_string": "private static final byte[] writePrefix = { 1 };", "type": "byte[]", "var_name": "writePrefix" }, { "declarator": "OBJECT_MAPPER = new ObjectMapper()\n ...
{ "body": "public WriteReference unpersist(StoredWriteReference writeReference) {\n return writeReference.accept(new StoredWriteReference.Visitor<WriteReference>() {\n @Override\n public WriteReference visitJson(byte[] ref) {\n try {\n return OBJECT_MAPPE...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_693
{ "fields": [], "file": "atlasdb-commons/src/test/java/com/palantir/async/initializer/CallbackTest.java", "identifier": "CallbackTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shutdownDoesNotBlockWhenTaskIsNotRunning() {\n CountingCallback countingCallback = new CountingCallback(true);\n\n long start = System.currentTimeMillis();\n countingCallback.blockUntilSafeToShutdown();\n assertThat(System.currentTimeMillis()).isLessThanOr...
{ "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 void blockUntilSafeToShutdown() {\n shutdownSignal = true;\n synchronized (this) {\n // blocking until no thread is in the synchronized blocks anymore\n }\n }", "class_method_signature": "Callback.blockUntilSafeToShutdown()", "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_369
{ "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 downSampledDistributionIsRepresentativeForReasonableData() {\n MultisetStatistics stats = new MultisetStatistics();\n for (double number : LARGE_SAMPLE) {\n int elements = (int) (10 * PerformanceResults.DOWNSAMPLE_MAXIMUM_SIZE\n / (Math.abs...
{ "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_739
{ "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 ensuresTablesExistOnInvalidate() {\n invalidator.backupAndInvalidate();\n verify(backupRunner, times(1)).ensureTimestampTableExists();\n }", "class_method_signature": "CassandraTimestampStoreInvalidatorTest.ensuresTablesExistOnInvalidate()", "constructor": false,...
{ "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_88
{ "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 addProtocolAddsHttpsIfSslPresent() {\n assertThat(PaxosRemotingUtils.addProtocol(SSL_TIMELOCK, \"atlasdb:1234\")).isEqualTo(\"https://atlasdb:1234\");\n }", "class_method_signature": "PaxosRemotingUtilsTest.addProtocolAddsHttpsIfSslPresent()", "constructor": false, "f...
{ "fields": [], "file": "timelock-agent/src/main/java/com/palantir/timelock/paxos/PaxosRemotingUtils.java", "identifier": "PaxosRemotingUtils", "interfaces": "", "methods": [ { "class_method_signature": "PaxosRemotingUtils.PaxosRemotingUtils()", "constructor": true, "full_signature": "pr...
{ "body": "public static String addProtocol(TimeLockInstallConfiguration install, String address) {\n String protocolPrefix = getSslConfigurationOptional(install).isPresent() ? \"https://\" : \"http://\";\n return protocolPrefix + address;\n }", "class_method_signature": "PaxosRemotingUtils.addProt...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_447
{ "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 testConcurrentCreationOfSameTable() {\n namesToIds.storeAsPending(table(1), 2);\n assertThat(tableIndices.getTableId(table(1))).isEqualTo(2);\n }", "class_method_signature": "SweepTableIndicesTest.testConcurrentCreationOfSameTable()", "constructor": false, "ful...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(SweepTableIndices.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(SweepTableIndices.class);", "type": "Logger", "var_name": "log" }, { ...
{ "body": "public int getTableId(TableReference table) {\n return tableIndices.get(table);\n }", "class_method_signature": "SweepTableIndices.getTableId(TableReference table)", "constructor": false, "full_signature": "public int getTableId(TableReference table)", "identifier": "getTableId", "invoc...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_914
{ "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 logsIfOperationsAreSlowAndLoggingAllowed() {\n flushLogsWithCall(LONG_DURATION, profilingTimelockService::getFreshTimestamp);\n\n verify(delegate).getFreshTimestamp();\n verifyLoggerInvokedOnceWithSpecificProfile(\"getFreshTimestamp\", LONG_DURATION);\n }", ...
{ "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_851
{ "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 canGetLeastLogEntry() {\n writeValueForRound(7L);\n writeValueForRound(5L);\n writeValueForRound(9L);\n\n assertThat(stateLog.getLeastLogEntry()).isEqualTo(5L);\n }", "class_method_signature": "SqlitePaxosStateLogTest.canGetLeastLogEntry()", "constr...
{ "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 getLeastLogEntry() {\n return execute(dao -> dao.getLeastLogEntry(namespace, useCase)).orElse(PaxosAcceptor.NO_LOG_ENTRY);\n }", "class_method_signature": "SqlitePaxosStateLog.getLeastLogEntry()", "constructor": false, "full_signature": "@Override public long getL...
{ "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_152
{ "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 putsFeedbackInSinkByDefault() {\n FeedbackHandler handler = new FeedbackHandler(sink, () -> true);\n handler.handle(FEEDBACK);\n verify(sink, times(1)).registerFeedback(FEEDBACK);\n }", "class_method_signature": "FeedbackHandlerTest.putsFeedbackInSinkByDefau...
{ "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_67
{ "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 ifGetFreshTimestampThrowsReturnsEmpty() {\n when(timelockRpcClient.getFreshTimestamps(any(), eq(CLIENT), any())).thenThrow(new RuntimeException());\n assertThat(timeLockActivityChecker.getFreshTimestampFromNodeForClient(CLIENT)).isEmpty();\n }", "class_method_signa...
{ "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_502
{ "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 stopReadingEarlyInOtherShardWhenEncounteringEntryKnownToBeCommittedAfterSweepTs() {\n immutableTs = 100L;\n\n putTimestampIntoTransactionTable(50, 200);\n Map<Integer, Integer> largeWriteDistribution = enqueueAtLeastThresholdWritesInDefaultShardWithStartTs(100, 5...
{ "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_781
{ "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 unappliedResultIsIncompatibleIfTheStateOfTheWorldMatchesExpecteds() {\n CqlResult mockResult = createMockCqlResult(\n ImmutableList.of(\n createMockCqlRow(buildUnappliedColumnList(COLUMN_BYTES_1, EMPTY_BYTE_ARRAY)),\n ...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(CassandraTimestampUtils.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(CassandraTimestampUtils.class);", "type": "Logger", "var_name": "log" },...
{ "body": "public static 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_294
{ "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 getAllTableNames() throws Exception {\n kvs.getAllTableNames();\n\n checkSpan(\"atlasdb-kvs.getAllTableNames()\");\n verify(delegate).getAllTableNames();\n verifyNoMoreInteractions(delegate);\n }", "class_method_signature": "TracingKeyValueServiceTest...
{ "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 Set<TableReference> getAllTableNames() {\n //noinspection unused - try-with-resources closes trace\n try (CloseableTrace trace = startLocalTrace(\"getAllTableNames()\")) {\n return delegate().getAllTableNames();\n }\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_83
{ "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 canGetClusterAddresses() {\n assertThat(PaxosRemotingUtils.getClusterAddresses(SSL_TIMELOCK))\n .isEqualTo(ImmutableList.of(\"foo:1\", \"bar:2\", \"baz:3\"));\n }", "class_method_signature": "PaxosRemotingUtilsTest.canGetClusterAddresses()", "constructor"...
{ "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 ImmutableList<String> getClusterAddresses(TimeLockInstallConfiguration install) {\n return ImmutableList.copyOf(getClusterConfiguration(install).clusterMembers());\n }", "class_method_signature": "PaxosRemotingUtils.getClusterAddresses(TimeLockInstallConfiguration install)", "co...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_509
{ "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 configurationBelowMinimumIsSetToMinimum() {\n SweepDelay negativeDelay = new SweepDelay(-5L);\n\n assertThat(negativeDelay.getNextPause(SUCCESS)).isEqualTo(MIN_PAUSE_MILLIS);\n }", "class_method_signature": "SweepDelayTest.configurationBelowMinimumIsSetToMinimum()"...
{ "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_159
{ "fields": [ { "declarator": "generator", "modifier": "private", "original_string": "private DistributingModulusGenerator generator;", "type": "DistributingModulusGenerator", "var_name": "generator" } ], "file": "timelock-impl/src/test/java/com/palantir/atlasdb/timelock/tran...
{ "body": "@Test\n public void cannotDoubleUnmarkMarkedResidues() {\n setupGeneratorWithModulus(3);\n\n requestResidues(3);\n\n unmarkResidue(0);\n assertThatThrownBy(() -> unmarkResidue(0))\n .satisfies(DistributingModulusGeneratorTest::failureArisesFromUnmarkingResidues...
{ "fields": [ { "declarator": "referenceCounts", "modifier": "private final", "original_string": "private final SortedSet<ReferenceCountedResidue> referenceCounts;", "type": "SortedSet<ReferenceCountedResidue>", "var_name": "referenceCounts" } ], "file": "timelock-impl/src/ma...
{ "body": "public synchronized void unmarkResidue(int residue) {\n // There are usually only 16 elements, so this O(n) algo probably will do, but we can pair this with a HashMap\n // and/or make ReferenceCountedResidue modifiable if we decide to use higher moduli in the future.\n for (ReferenceCo...
{ "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_270
{ "fields": [ { "declarator": "COMPONENT_NAME = \"rowComponent\"", "modifier": "private static final", "original_string": "private static final String COMPONENT_NAME = \"rowComponent\";", "type": "String", "var_name": "COMPONENT_NAME" }, { "declarator": "VALUE_TYPE = Va...
{ "body": "@Test\n public void nameCanBeSpecifiedToBeNotLoggable() {\n assertThat(NAME_NOT_LOGGABLE_DESCRIPTION.getLogSafety()).isEqualTo(LogSafety.UNSAFE);\n }", "class_method_signature": "NameComponentDescriptionTest.nameCanBeSpecifiedToBeNotLoggable()", "constructor": false, "full_signature": "@...
{ "fields": [ { "declarator": "componentName", "modifier": "final", "original_string": "final String componentName;", "type": "String", "var_name": "componentName" }, { "declarator": "type", "modifier": "final", "original_string": "final ValueType type;", ...
{ "body": "public LogSafety getLogSafety() {\n return logSafety;\n }", "class_method_signature": "NameComponentDescription.getLogSafety()", "constructor": false, "full_signature": "public LogSafety getLogSafety()", "identifier": "getLogSafety", "invocations": [], "modifiers": "public", "parame...
{ "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_620
{ "fields": [ { "declarator": "SETUP_TASK_METRIC_NAME =\n SnapshotTransactionManager.class.getCanonicalName() + \".setupTask\"", "modifier": "private static final", "original_string": "private static final String SETUP_TASK_METRIC_NAME =\n SnapshotTransactionManager.class.g...
{ "body": "@Test\n public void canCloseTransactionManagerWithNonCloseableLockService() {\n InMemoryTimestampService ts = new InMemoryTimestampService();\n SnapshotTransactionManager newTransactionManager = new SnapshotTransactionManager(\n metricsManager,\n keyValueServi...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(SnapshotTransactionManager.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(SnapshotTransactionManager.class);", "type": "Logger", "var_name": "log" ...
{ "body": "@Override\n public void close() {\n log.info(\"Calling close on snapshot transaction manager\");\n if (!isClosed.compareAndSet(false, true)) {\n log.info(\"Snapshot transaction manager has already been closed, performing no action\");\n return;\n }\n\n 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_335
{ "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 columnNamesNotExplicitlyMarkedSafeAreUnsafe() {\n SafeLoggableData safeLoggableData = ImmutableSafeLoggableData.builder()\n .putPermittedColumnNames(TABLE_REFERENCE_1, ImmutableSet.of(COLUMN_NAME_1))\n .build();\n\n assertThat(safeLoggableD...
{ "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_765
{ "fields": [ { "declarator": "CROSS_COLUMN_LIMIT = 3", "modifier": "private static final", "original_string": "private static final int CROSS_COLUMN_LIMIT = 3;", "type": "int", "var_name": "CROSS_COLUMN_LIMIT" }, { "declarator": "SINGLE_QUERY_LIMIT = 10", "modifi...
{ "body": "@Test\n public void respondsToChangesInCrossColumnLimitBatchParameter() {\n AtomicReference<CassandraCellLoadingConfig> config = new AtomicReference<>(LOADING_CONFIG);\n CellLoadingBatcher reloadingBatcher = new CellLoadingBatcher(config::get, rebatchingCallback);\n updateConfig(con...
{ "fields": [ { "declarator": "loadingConfigSupplier", "modifier": "private final", "original_string": "private final Supplier<CassandraCellLoadingConfig> loadingConfigSupplier;", "type": "Supplier<CassandraCellLoadingConfig>", "var_name": "loadingConfigSupplier" }, { "...
{ "body": "List<List<Cell>> partitionIntoBatches(\n Collection<Cell> cellsToPartition,\n InetSocketAddress host,\n TableReference tableReference) {\n CassandraCellLoadingConfig config = loadingConfigSupplier.get();\n\n ListMultimap<byte[], Cell> cellsByColumn = indexCell...
{ "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_948
{ "fields": [ { "declarator": "SSL_CONFIGURATION\n = SslConfiguration.of(Paths.get(\"var/security/trustStore.jks\"))", "modifier": "private static final", "original_string": "private static final SslConfiguration SSL_CONFIGURATION\n = SslConfiguration.of(Paths.get(\"var/sec...
{ "body": "@Test\n public void canCreateProxyAndLocalListOfPaxosLearners() {\n PaxosLearner localLearner = mock(PaxosLearner.class);\n Optional<PaxosValue> presentPaxosValue = Optional.of(mock(PaxosValue.class));\n when(localLearner.getGreatestLearnedValue()).thenReturn(presentPaxosValue);\n\n...
{ "fields": [], "file": "atlasdb-config/src/main/java/com/palantir/atlasdb/factory/Leaders.java", "identifier": "Leaders", "interfaces": "", "methods": [ { "class_method_signature": "Leaders.Leaders()", "constructor": true, "full_signature": "private Leaders()", "identifier": "Lea...
{ "body": "public static <T> List<T> createProxyAndLocalList(\n T localObject,\n Set<String> remoteUris,\n Supplier<RemotingClientConfig> remotingClientConfig,\n Optional<TrustContext> trustContext,\n Class<T> clazz,\n UserAgent userAgent) {\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_677
{ "fields": [ { "declarator": "STRING_1 = \"a\"", "modifier": "private static final", "original_string": "private static final String STRING_1 = \"a\";", "type": "String", "var_name": "STRING_1" }, { "declarator": "STRING_2 = \"b\"", "modifier": "private static fi...
{ "body": "@Test\n public void throwsOnTwoNullOptionals() {\n assertThatThrownBy(() -> OptionalResolver.resolve(null, null))\n .isInstanceOf(IllegalArgumentException.class);\n }", "class_method_signature": "OptionalResolverTest.throwsOnTwoNullOptionals()", "constructor": false, "full...
{ "fields": [], "file": "atlasdb-commons/src/main/java/com/palantir/util/OptionalResolver.java", "identifier": "OptionalResolver", "interfaces": "", "methods": [ { "class_method_signature": "OptionalResolver.OptionalResolver()", "constructor": true, "full_signature": "private OptionalRe...
{ "body": "@SuppressWarnings(\"OptionalUsedAsFieldOrParameterType\") // Used to process existing configuration files.\n public static <T> T resolve(Optional<T> optional1, Optional<T> optional2) {\n Set<T> values = Stream.of(optional1, optional2)\n .filter(Objects::nonNull)\n .f...
{ "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_227
{ "fields": [ { "declarator": "CUSTOM_METRIC_NAME = \"foo\"", "modifier": "private static final", "original_string": "private static final String CUSTOM_METRIC_NAME = \"foo\";", "type": "String", "var_name": "CUSTOM_METRIC_NAME" }, { "declarator": "PING_METHOD = \"ping\...
{ "body": "@Test\n public void instrumentTaggedAsyncFunction() {\n AsyncTestService asyncTestService = AtlasDbMetrics.instrumentWithTaggedMetrics(\n taggedMetrics,\n AsyncTestService.class,\n this.asyncTestService);\n\n List<ListenableFuture<String>> futur...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(AtlasDbMetrics.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(AtlasDbMetrics.class);", "type": "Logger", "var_name": "log" } ], "file": "at...
{ "body": "public static <T, U extends T> T instrumentWithTaggedMetrics(\n TaggedMetricRegistry taggedMetrics,\n Class<T> serviceInterface,\n U service) {\n return Instrumentation.builder(serviceInterface, service)\n .withHandler(new TaggedMetricsInvocationEventH...
{ "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_732
{ "fields": [], "file": "atlasdb-cassandra/src/test/java/com/palantir/atlasdb/keyvalue/cassandra/CassandraApiVersionTest.java", "identifier": "CassandraApiVersionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test public void\n version_19_36_0_does_not_support_cas() {\n CassandraApiVersion version = new CassandraApiVersion(\"19.36.0\");\n assertThat(version.supportsCheckAndSet(), is(false));\n }", "class_method_signature": "CassandraApiVersionTest.version_19_36_0_does_not_support_cas()", ...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(CassandraApiVersion.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(CassandraApiVersion.class);", "type": "Logger", "var_name": "LOGGER" }...
{ "body": "public boolean supportsCheckAndSet() {\n boolean supportsCheckAndSet = majorVersion > 19 || (majorVersion == 19 && minorVersion >= 37);\n\n if (supportsCheckAndSet) {\n LOGGER.info(\"Your cassandra api version ({}) supports check and set.\",\n SafeArg.of(\"cassan...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_698
{ "fields": [], "file": "atlasdb-commons/src/test/java/com/palantir/common/collect/IterableViewTest.java", "identifier": "IterableViewTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void stream() {\n assertThat(IterableView.of(ImmutableList.of(\"a\", \"b\")).stream()).containsExactly(\"a\", \"b\");\n assertThat(IterableView.of(\n Iterables.limit(Iterables.cycle(ImmutableSet.of(\"a\", \"b\", \"c\")), 4)).stream())\n .contain...
{ "fields": [], "file": "atlasdb-commons/src/main/java/com/palantir/common/collect/IterableView.java", "identifier": "IterableView", "interfaces": "implements Iterable<T>", "methods": [ { "class_method_signature": "IterableView.delegate()", "constructor": false, "full_signature": "@Overr...
{ "body": "@SuppressWarnings(\"unchecked\")\n public Stream<T> stream() {\n if (delegate() instanceof Collection) {\n return ((Collection<T>) delegate()).stream();\n }\n return StreamSupport.stream(spliterator(), false);\n }", "class_method_signature": "IterableView.stream()", ...
{ "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_362
{ "fields": [ { "declarator": "backoffMechanism\n = mock(StandardPeriodicBackoffStrategy.BackoffMechanism.class)", "modifier": "private final", "original_string": "private final StandardPeriodicBackoffStrategy.BackoffMechanism backoffMechanism\n = mock(StandardPeriodicBacko...
{ "body": "@Test\n public void invokesBackoffOnlyAfterWritingMultipleOfBlocksToWriteBeforePause() throws InterruptedException {\n StreamStoreBackoffStrategy backoffStrategy = createStaticBackoffStrategy(3, 100);\n backoffStrategy.accept(1);\n backoffStrategy.accept(2);\n verify(backoffM...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(StandardPeriodicBackoffStrategy.class)", "modifier": "private final", "original_string": "private final Logger log = LoggerFactory.getLogger(StandardPeriodicBackoffStrategy.class);", "type": "Logger", "var_name": "log" ...
{ "body": "@Override\n public void accept(long blockNumber) {\n if (persistenceConfiguration.get().writePauseDurationMillis() == 0) {\n return;\n }\n\n if (shouldBackoffBeforeWritingBlockNumber(blockNumber)) {\n try {\n long writePauseDurationMillis = persi...
{ "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_548
{ "fields": [ { "declarator": "TEST_REASON = \"for-test\"", "modifier": "private static final", "original_string": "private static final String TEST_REASON = \"for-test\";", "type": "String", "var_name": "TEST_REASON" }, { "declarator": "service", "modifier": "pri...
{ "body": "@Test\n public void canAcquireLock() throws CheckAndSetException {\n service.acquireBackupLock(TEST_REASON);\n verify(lockStore, times(1)).acquireBackupLock(TEST_REASON);\n }", "class_method_signature": "KvsBackedPersistentLockServiceTest.canAcquireLock()", "constructor": false, "...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(KvsBackedPersistentLockService.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(KvsBackedPersistentLockService.class);", "type": "Logger", "var_name"...
{ "body": "@Override\n public PersistentLockId acquireBackupLock(String reason) {\n WebPreconditions.checkNotNull(reason, \"Please provide a reason for acquiring the lock.\");\n return PersistentLockId.of(lockStore.acquireBackupLock(reason).instanceId());\n }", "class_method_signature": "KvsBack...
{ "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_118
{ "fields": [], "file": "commons-db/src/test/java/com/palantir/nexus/db/sql/SQLStringTest.java", "identifier": "SQLStringTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCanonicalizeString() {\n List<String> testQuery = ImmutableList.of(\n \"insert foo into bar ; \",\n \"insert\\nfoo into bar\",\n \"insert\\n \\tfoo into bar\",\n \"insert foo into bar;\",\n \"insert...
{ "fields": [ { "declarator": "ALL_WORD_CHARS_REGEX = Pattern.compile(\"^[a-zA-Z_0-9\\\\.\\\\-]*$\")", "modifier": "private static final", "original_string": "private static final Pattern ALL_WORD_CHARS_REGEX = Pattern.compile(\"^[a-zA-Z_0-9\\\\.\\\\-]*$\");", "type": "Pattern", "var...
{ "body": "public static String canonicalizeString(String sql) {\n return canonicalizeString(sql, false);\n }", "class_method_signature": "SQLString.canonicalizeString(String sql)", "constructor": false, "full_signature": "public static String canonicalizeString(String sql)", "identifier": "canonica...
{ "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_231
{ "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 shouldThrowIfMetricNameContainsSemiColon() throws Exception {\n assertThatThrownBy(() -> MetricNameUtils.getMetricName(\"metric;Name\",\n ImmutableMap.of(TAG_KEY_1, TAG_VALUE_1, TAG_KEY_2, TAG_VALUE_2)))\n .isInstanceOf(IllegalArgumentException.cl...
{ "fields": [ { "declarator": "MAX_ALLOWED_TAGS = 10", "modifier": "private static final", "original_string": "private static final int MAX_ALLOWED_TAGS = 10;", "type": "int", "var_name": "MAX_ALLOWED_TAGS" }, { "declarator": "DELIMITER = \";\"", "modifier": "priv...
{ "body": "public static String getMetricName(String metricName, Map<String, String> tags) {\n Preconditions.checkArgument(tags.size() <= MAX_ALLOWED_TAGS, \"Too many tags set on the metric %s. \"\n + \"Maximum allowed number of tags is %s, found %s.\", metricName, MAX_ALLOWED_TAGS, tags.size())...
{ "created": "6/5/2015 11:42:44 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 36960637, "size": null, "stargazer_count": null, "stars": 711, "updates": "2020-01-27T16:43:57+00:00", "url": "https://github.com/palantir/atlasdb...
36960637_661
{ "fields": [ { "declarator": "EXCEPTION = new RuntimeException(\"test\")", "modifier": "private static final", "original_string": "private static final RuntimeException EXCEPTION = new RuntimeException(\"test\");", "type": "RuntimeException", "var_name": "EXCEPTION" }, { ...
{ "body": "@Test\n public void exceptionsAreSuppressedAndReportedWhenClosing() {\n SafeShutdownRunner runner = new SafeShutdownRunner(Duration.ofSeconds(1));\n\n assertThatCode(() -> runner.shutdownSafely(throwingRunnable)).doesNotThrowAnyException();\n assertThatThrownBy(runner::close)\n ...
{ "fields": [ { "declarator": "executor = PTExecutors.newCachedThreadPool(\"safe-shutdown-runner\")", "modifier": "private final", "original_string": "private final ExecutorService executor = PTExecutors.newCachedThreadPool(\"safe-shutdown-runner\");", "type": "ExecutorService", "var...
{ "body": "public void shutdownSafely(Runnable shutdownCallback) {\n Future<?> future = executor.submit(shutdownCallback);\n try {\n future.get(timeoutDuration.toMillis(), TimeUnit.MILLISECONDS);\n } catch (InterruptedException e) {\n Thread.currentThread().interrupt();\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_374
{ "fields": [ { "declarator": "IMAGE = new byte[] {0, 1, 2, 3}", "modifier": "private static final", "original_string": "private static final byte[] IMAGE = new byte[] {0, 1, 2, 3};", "type": "byte[]", "var_name": "IMAGE" }, { "declarator": "USER = UserProfile.newBuilde...
{ "body": "@Test\n public void testGetImageBehaviourWhenNoImage() {\n final UUID userId = UUID.randomUUID();\n runWithRetry(store -> {\n InputStream image = store.getImageForUser(userId);\n assertThat(image, nullValue());\n return null;\n });\n }", "class_...
{ "fields": [ { "declarator": "txnMgr", "modifier": "final", "original_string": "final TransactionManager txnMgr;", "type": "TransactionManager", "var_name": "txnMgr" }, { "declarator": "tx", "modifier": "final", "original_string": "final Transaction tx;", ...
{ "body": "public InputStream getImageForUser(UUID userId) {\n Long photoId = getPhotoStreamId(userId);\n if (photoId == null) {\n return null;\n }\n UserPhotosStreamStore streamStore = UserPhotosStreamStore.of(txnMgr, tables);\n return streamStore.loadStream(tx, photoId)...
{ "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_724
{ "fields": [ { "declarator": "CQL_QUERY = CqlQuery.builder()\n .safeQueryFormat(\"SELECT * FROM atlasdb.foo LIMIT 1;\")\n .build()", "modifier": "private static final", "original_string": "private static final CqlQuery CQL_QUERY = CqlQuery.builder()\n .safeQuery...
{ "body": "@Test\n public void handlesNullMultigetSliceResponseFromDelegate() throws TException {\n ByteBuffer byteBuffer = ByteBuffer.wrap(PtBytes.toBytes(\"foo\"));\n List<ColumnOrSuperColumn> columns = ImmutableList.of(\n new ColumnOrSuperColumn().setColumn(new Column(byteBuffer)));...
{ "fields": [ { "declarator": "client", "modifier": "private final", "original_string": "private final CassandraClient client;", "type": "CassandraClient", "var_name": "client" } ], "file": "atlasdb-cassandra/src/main/java/com/palantir/atlasdb/keyvalue/cassandra/ProfilingCass...
{ "body": "@Override\n public Map<ByteBuffer, List<ColumnOrSuperColumn>> multiget_slice(String kvsMethodName,\n TableReference tableRef,\n List<ByteBuffer> keys,\n SlicePredicate predicate,\n ConsistencyLevel consistency_level)\n throws InvalidRequestException...
{ "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_909
{ "fields": [ { "declarator": "ONE_THOUSAND = 1000", "modifier": "private static final", "original_string": "private static final int ONE_THOUSAND = 1000;", "type": "int", "var_name": "ONE_THOUSAND" }, { "declarator": "tokenList", "modifier": "private", "ori...
{ "body": "@SuppressWarnings(\"unchecked\") // Mock invocation known to be correct\n @Test\n public void noParallelCallsMadeFromTimelockPointOfView() {\n AtomicBoolean timelockInUse = new AtomicBoolean(false);\n AtomicBoolean concurrentlyInvoked = new AtomicBoolean(false);\n\n doAnswer(invo...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(AsyncTimeLockUnlocker.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(AsyncTimeLockUnlocker.class);", "type": "Logger", "var_name": "log" }, ...
{ "body": "@Override\n @SuppressWarnings(\"FutureReturnValueIgnored\")\n public void enqueue(Set<LockToken> tokens) {\n autobatcher.apply(tokens);\n }", "class_method_signature": "AsyncTimeLockUnlocker.enqueue(Set<LockToken> tokens)", "constructor": false, "full_signature": "@Override @SuppressW...
{ "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_95
{ "fields": [ { "declarator": "CLIENT1 = Client.of(\"client-1\")", "modifier": "private static final", "original_string": "private static final Client CLIENT1 = Client.of(\"client-1\");", "type": "Client", "var_name": "CLIENT1" }, { "declarator": "CLIENT2 = Client.of(\"...
{ "body": "@Test\n public void shouldBeHealthyIfExactlyOneNodePingedSuccessfully() {\n List<HealthCheckPinger> leaders = getHealthCheckPingers(ALL_CLIENTS, ImmutableSet.of(), ImmutableSet.of());\n\n SetMultimap<TimeLockStatus, Client> expected = ImmutableSetMultimap.<TimeLockStatus, Client>builder()\...
{ "fields": [ { "declarator": "HEALTH_CHECK_TIME_LIMIT = Duration.ofSeconds(7)", "modifier": "private static final", "original_string": "private static final Duration HEALTH_CHECK_TIME_LIMIT = Duration.ofSeconds(7);", "type": "Duration", "var_name": "HEALTH_CHECK_TIME_LIMIT" }, ...
{ "body": "public HealthCheckDigest getStatus() {\n Set<Client> namespacesToCheck = namespaceTracker.trackedNamespaces();\n\n PaxosResponses<PaxosContainer<Map<Client, HealthCheckResponse>>> responses =\n PaxosQuorumChecker.collectAsManyResponsesAsPossible(\n Immuta...
{ "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_636
{ "fields": [ { "declarator": "mockScrubber = mock(Scrubber.class)", "modifier": "private", "original_string": "private Scrubber mockScrubber = mock(Scrubber.class);", "type": "Scrubber", "var_name": "mockScrubber" }, { "declarator": "mockPuncher = mock(Puncher.class)",...
{ "body": "@Test\n public void isNotInitializedWhenScrubberIsNotInitialized() {\n when(mockScrubber.isInitialized()).thenReturn(false);\n assertFalse(simpleCleaner.isInitialized());\n }", "class_method_signature": "SimpleCleanerTest.isNotInitializedWhenScrubberIsNotInitialized()", "constructor...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(SimpleCleaner.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(SimpleCleaner.class);", "type": "Logger", "var_name": "log" }, { "declar...
{ "body": "@Override\n public boolean isInitialized() {\n return scrubber.isInitialized() && puncher.isInitialized();\n }", "class_method_signature": "SimpleCleaner.isInitialized()", "constructor": false, "full_signature": "@Override public boolean isInitialized()", "identifier": "isInitialized",...
{ "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_266
{ "fields": [ { "declarator": "TABLE_REF = TableReference.createWithEmptyNamespace(\"TestTable\")", "modifier": "private static", "original_string": "private static TableReference TABLE_REF = TableReference.createWithEmptyNamespace(\"TestTable\");", "type": "TableReference", "var_nam...
{ "body": "@Test\n public void testReusablePersisters() {\n TableRenderer renderer = new TableRenderer(\"package\", Namespace.DEFAULT_NAMESPACE, OptionalType.JAVA8);\n String renderedTableDefinition = renderer.render(\"table\", getTableWithUserSpecifiedPersister(TABLE_REF), NO_INDICES);\n asse...
{ "fields": [ { "declarator": "packageName", "modifier": "private final", "original_string": "private final String packageName;", "type": "String", "var_name": "packageName" }, { "declarator": "namespace", "modifier": "private final", "original_string": "pri...
{ "body": "public String render(String rawTableName, TableDefinition table, SortedSet<IndexMetadata> indices) {\n return new ClassRenderer(rawTableName, table, indices).render();\n }", "class_method_signature": "TableRenderer.render(String rawTableName, TableDefinition table, SortedSet<IndexMetadata> indi...
{ "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_289
{ "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 createTables() throws Exception {\n byte[] metadata = new byte[0];\n kvs.createTables(ImmutableMap.of(TABLE_REF, metadata));\n\n checkSpan(\"atlasdb-kvs.createTables([{table}])\");\n verify(delegate).createTables(ImmutableMap.of(TABLE_REF, metadata));\n ...
{ "fields": [ { "declarator": "SERVICE_NAME = \"atlasdb-kvs\"", "modifier": "private static final", "original_string": "private static final String SERVICE_NAME = \"atlasdb-kvs\";", "type": "String", "var_name": "SERVICE_NAME" }, { "declarator": "delegate", "modif...
{ "body": "@Override\n public void createTables(Map<TableReference, byte[]> tableNamesToTableMetadata) {\n //noinspection unused - try-with-resources closes trace\n try (CloseableTrace trace = startLocalTrace(\"createTables({})\",\n LoggingArgs.safeTablesOrPlaceholder(tableNamesToTable...
{ "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_773
{ "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 largeByteArrayIsNotValidTimestampData() {\n assertThat(CassandraTimestampUtils.isValidTimestampData(new byte[100 * Long.BYTES])).isFalse();\n }", "class_method_signature": "CassandraTimestampUtilsTest.largeByteArrayIsNotValidTimestampData()", "constructor": false, "fu...
{ "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 boolean isValidTimestampData(byte[] data) {\n return data != null && data.length == Long.BYTES;\n }", "class_method_signature": "CassandraTimestampUtils.isValidTimestampData(byte[] data)", "constructor": false, "full_signature": "public static boolean isValidTimestampData(byte...
{ "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_323
{ "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 returnsTablesAndPlaceholderWhenTablesAreSafeAndUnsafe() {\n List<TableReference> tables = ImmutableList.of(SAFE_TABLE_REFERENCE, UNSAFE_TABLE_REFERENCE);\n List<TableReference> returnedList = Lists.newArrayList(LoggingArgs.safeTablesOrPlaceholder(tables));\n List...
{ "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 Iterable<TableReference> safeTablesOrPlaceholder(Collection<TableReference> tables) {\n //noinspection StaticPseudoFunctionalStyleMethod - Use lazy iterator.\n return Collections2.transform(tables, LoggingArgs::safeTableOrPlaceholder);\n }", "class_method_signature": "Loggi...
{ "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...