id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
13870893_385
{ "fields": [ { "declarator": "CHECKOUT_TIMEOUT_MS = 1000", "modifier": "private static final", "original_string": "private static final int CHECKOUT_TIMEOUT_MS = 1000;", "type": "int", "var_name": "CHECKOUT_TIMEOUT_MS" }, { "declarator": "MAX_PORTS_PLAIN_TEXT = 3", ...
{ "body": "@Test\n public void testRequestDropping() {\n AtomicInteger nextCorrelationId = new AtomicInteger(1);\n Function<Integer, List<RequestInfo>> requestGen = numRequests -> IntStream.range(0, numRequests)\n .mapToObj(\n i -> new RequestInfo(sslHost, sslPort, new MockSend(nextCorrelatio...
{ "fields": [ { "declarator": "selector", "modifier": "private final", "original_string": "private final Selector selector;", "type": "Selector", "var_name": "selector" }, { "declarator": "connectionTracker", "modifier": "private final", "original_string": "...
{ "body": "@Override\n public List<ResponseInfo> sendAndPoll(List<RequestInfo> requestsToSend, Set<Integer> requestsToDrop,\n int pollTimeoutMs) {\n if (closed || !selector.isOpen()) {\n throw new IllegalStateException(\"The SocketNetworkClient is closed.\");\n }\n long startTime = time.millisecon...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_110
{ "fields": [ { "declarator": "clusterName = \"main\"", "modifier": "private final", "original_string": "private final String clusterName = \"main\";", "type": "String", "var_name": "clusterName" }, { "declarator": "configProps = new Properties()", "modifier": "pr...
{ "body": "@Test\n public void testDownloadNotExists() throws Exception {\n doThrow(BlobStorageException.class).when(mockBlockBlobClient)\n .downloadWithResponse(any(), any(), any(), any(), anyBoolean(), any(), any());\n expectBlobStorageException(() -> downloadBlob(blobId));\n }", "class_method_sign...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(AzureBlobDataAccessor.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(AzureBlobDataAccessor.class);", "type": "Logger", "var_name": "logger" ...
{ "body": "public void downloadBlob(BlobId blobId, OutputStream outputStream) throws BlobStorageException {\n azureMetrics.blobDownloadRequestCount.inc();\n Timer.Context storageTimer = azureMetrics.blobDownloadTime.time();\n try {\n BlobLayout blobLayout = blobLayoutStrategy.getDataBlobLayout(blobId);\...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_405
{ "fields": [ { "declarator": "BUFFER_SIZE = 4 * 1024", "modifier": "private static final", "original_string": "private static final int BUFFER_SIZE = 4 * 1024;", "type": "int", "var_name": "BUFFER_SIZE" }, { "declarator": "server", "modifier": "private", "o...
{ "body": "@Test(expected = IOException.class)\n public void testNoRouteToHost() throws Exception {\n selector.connect(new InetSocketAddress(\"asdf.asdf.dsc\", server.port), BUFFER_SIZE, BUFFER_SIZE, PortType.PLAINTEXT);\n }", "class_method_signature": "SelectorTest.testNoRouteToHost()", "constructor": false...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(Selector.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(Selector.class);", "type": "Logger", "var_name": "logger" }, { "declara...
{ "body": "@Override\n public String connect(InetSocketAddress address, int sendBufferSize, int receiveBufferSize, PortType portType)\n throws IOException {\n SocketChannel channel = SocketChannel.open();\n channel.configureBlocking(false);\n Socket socket = channel.socket();\n socket.setKeepAlive(t...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_73
{ "fields": [], "file": "ambry-store/src/test/java/com/github/ambry/store/OffsetTest.java", "identifier": "OffsetTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void compareToTest() {\n List<Offset> offsets = new ArrayList<>();\n offsets.add(new Offset(\"0_0\", 0));\n offsets.add(new Offset(\"0_0\", 1));\n offsets.add(new Offset(\"0_1\", 0));\n offsets.add(new Offset(\"0_1\", 1));\n offsets.add(new Offset(\"1_0\", 0));\n offset...
{ "fields": [ { "declarator": "name", "modifier": "private final", "original_string": "private final String name;", "type": "String", "var_name": "name" }, { "declarator": "offset", "modifier": "private final", "original_string": "private final long offset;"...
{ "body": "@Override\n public int compareTo(Offset o) {\n int compare = LogSegmentNameHelper.COMPARATOR.compare(name, o.name);\n return compare == 0 ? Long.compare(offset, o.offset) : compare;\n }", "class_method_signature": "Offset.compareTo(Offset o)", "constructor": false, "full_signature": "@Overrid...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_239
{ "fields": [], "file": "ambry-messageformat/src/test/java/com/github/ambry/messageformat/MessageFormatWriteSetTest.java", "identifier": "MessageFormatWriteSetTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void writeSetTest() throws IOException, StoreException {\n byte[] buf = new byte[2000];\n MessageInfo info1 = new MessageInfo(new MockId(\"id1\"), 1000, 123, Utils.getRandomShort(TestUtils.RANDOM),\n Utils.getRandomShort(TestUtils.RANDOM), System.currentTimeMillis() + TestUtils...
{ "fields": [ { "declarator": "streamToWrite", "modifier": "private final", "original_string": "private final InputStream streamToWrite;", "type": "InputStream", "var_name": "streamToWrite" }, { "declarator": "streamInfo", "modifier": "private", "original_st...
{ "body": "@Override\n public long writeTo(Write writeChannel) throws StoreException {\n ReadableByteChannel readableByteChannel = Channels.newChannel(streamToWrite);\n long sizeWritten = 0;\n for (MessageInfo info : streamInfo) {\n writeChannel.appendFrom(readableByteChannel, info.getSize());\n s...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_393
{ "fields": [ { "declarator": "diskMocks = new Mocks()", "modifier": "private final", "original_string": "private final Mocks diskMocks = new Mocks();", "type": "Mocks", "var_name": "diskMocks" }, { "declarator": "cloudMocks = new Mocks()", "modifier": "private fi...
{ "body": "@Test\n public void testWarmUp() throws IOException {\n NetworkClient compositeClient = factory.getNetworkClient();\n int numDiskNodesWarmedUp = 25;\n int numCloudNodesWarmedUp = 17;\n when(diskMocks.client.warmUpConnections(any(), anyInt(), anyLong(), any())).thenReturn(numDiskNodesWarmedUp);...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(CompositeNetworkClient.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(CompositeNetworkClient.class);", "type": "Logger", "var_name": "logger"...
{ "body": "@Override\n public int warmUpConnections(List<DataNodeId> dataNodeIds, int connectionWarmUpPercentagePerDataNode,\n long timeForWarmUp, List<ResponseInfo> responseInfoList) {\n return childNetworkClients.values()\n .stream()\n .mapToInt(client -> client.warmUpConnections(dataNodeIds,...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_147
{ "fields": [ { "declarator": "mapperObj = new ObjectMapper()", "modifier": "private static final", "original_string": "private static final ObjectMapper mapperObj = new ObjectMapper();", "type": "ObjectMapper", "var_name": "mapperObj" }, { "declarator": "dataCenterId =...
{ "body": "@Test\n public void testExpiration() throws Exception {\n CloudBlobMetadata blobMetadata = new CloudBlobMetadata(blobId, now, futureTime, 1024, EncryptionOrigin.NONE);\n blobMetadata.setExpirationTime(futureTime);\n verifySerde(blobMetadata, ArrayUtils.addAll(FIELDS_ALWAYS_SET, FIELD_EXPIRATION_T...
{ "fields": [ { "declarator": "FIELD_ID = \"id\"", "modifier": "public static final", "original_string": "public static final String FIELD_ID = \"id\";", "type": "String", "var_name": "FIELD_ID" }, { "declarator": "FIELD_PARTITION_ID = \"partitionId\"", "modifier"...
{ "body": "public CloudBlobMetadata setExpirationTime(long expirationTime) {\n this.expirationTime = expirationTime;\n return this;\n }", "class_method_signature": "CloudBlobMetadata.setExpirationTime(long expirationTime)", "constructor": false, "full_signature": "public CloudBlobMetadata setExpirationTi...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_24
{ "fields": [ { "declarator": "accountConfig", "modifier": "private final", "original_string": "private final JsonAccountConfig accountConfig;", "type": "JsonAccountConfig", "var_name": "accountConfig" }, { "declarator": "accountService", "modifier": "private", ...
{ "body": "@Test\n public void testAccountRetrieving() throws Exception {\n Collection<Account> generatedAccounts = generateAccountJsonFile((short) 100, (short) 0, DEFAULT_SEED_1);\n accountService.processAccountJsonFile();\n\n for (Account generatedAccount : generatedAccounts) {\n Account accountByNam...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(JsonAccountService.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(JsonAccountService.class);", "type": "Logger", "var_name": "logger" }, ...
{ "body": "public void processAccountJsonFile() {\n processAccountJsonLock.lock();\n\n try {\n accountJsonProcessingStartTimeMs = System.currentTimeMillis();\n\n logger.trace(\"Checking if JSON account file has changed.\");\n\n if (!Files.exists(accountFile)) {\n logger.warn(\"Unable to op...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_281
{ "fields": [ { "declarator": "time = new MockTime()", "modifier": "private final", "original_string": "private final MockTime time = new MockTime();", "type": "MockTime", "var_name": "time" } ], "file": "ambry-utils/src/test/java/com/github/ambry/utils/ThrottlerTest.java", ...
{ "body": "@Test\n public void checkIntervalTest() throws InterruptedException {\n time.setCurrentMilliseconds(0);\n // positive check interval\n Throttler throttler = new Throttler(100, 10, true, time);\n throttler.maybeThrottle(150);\n // no throttling because checkInterval has not elapsed\n Asse...
{ "fields": [ { "declarator": "desiredRatePerSec", "modifier": "private", "original_string": "private double desiredRatePerSec;", "type": "double", "var_name": "desiredRatePerSec" }, { "declarator": "checkIntervalMs", "modifier": "private", "original_string"...
{ "body": "public void maybeThrottle(double observed) throws InterruptedException {\n synchronized (lock) {\n observedSoFar += observed;\n long now = time.nanoseconds();\n long elapsedNs = now - periodStartNs;\n\n // if we have completed an interval AND we have observed something, maybe\n ...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_3
{ "fields": [ { "declarator": "mySqlAccountService", "modifier": "", "original_string": "AccountService mySqlAccountService;", "type": "AccountService", "var_name": "mySqlAccountService" }, { "declarator": "mySqlConfigProps = new Properties()", "modifier": "", ...
{ "body": "@Test\n public void testUpdateDisabled() throws IOException {\n\n mySqlConfigProps.setProperty(UPDATE_DISABLED, \"true\");\n MySqlAccountStore mockMySqlAccountStore = mock(MySqlAccountStore.class);\n mySqlAccountService = new MySqlAccountService(new AccountServiceMetrics(new MetricRegistry()),\n ...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(MySqlAccountService.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(MySqlAccountService.class);", "type": "Logger", "var_name": "logger" }...
{ "body": "@Override\n public boolean updateAccounts(Collection<Account> accounts) {\n Objects.requireNonNull(accounts, \"accounts cannot be null\");\n if (accounts.isEmpty()) {\n logger.debug(\"Empty account collection to update.\");\n return false;\n }\n\n if (mySqlAccountStore == null) {\n ...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_215
{ "fields": [], "file": "ambry-commons/src/test/java/com/github/ambry/store/StoreKeyConverterFactoryImplTest.java", "identifier": "StoreKeyConverterFactoryImplTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void basicTest() throws InstantiationException {\n StoreKeyConverterFactory storeKeyConverterFactory =\n new StoreKeyConverterFactoryImpl(mock(VerifiableProperties.class), mock(MetricRegistry.class));\n StoreKeyConverter storeKeyConverter = storeKeyConverterFactory.getStoreKeyC...
{ "fields": [], "file": "ambry-commons/src/main/java/com/github/ambry/store/StoreKeyConverterFactoryImpl.java", "identifier": "StoreKeyConverterFactoryImpl", "interfaces": "implements StoreKeyConverterFactory", "methods": [ { "class_method_signature": "StoreKeyConverterFactoryImpl.StoreKeyConverterF...
{ "body": "@Override\n public StoreKeyConverter getStoreKeyConverter() throws InstantiationException {\n return new StoreKeyConverterImplNoOp();\n }", "class_method_signature": "StoreKeyConverterFactoryImpl.getStoreKeyConverter()", "constructor": false, "full_signature": "@Override public StoreKeyConverter...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_350
{ "fields": [ { "declarator": "diskCount = 10", "modifier": "private static final", "original_string": "private static final int diskCount = 10;", "type": "int", "var_name": "diskCount" }, { "declarator": "diskCapacityInBytes = 1000 * 1024 * 1024 * 1024L", "modifi...
{ "body": "@Test\n public void validation() throws JSONException {\n JSONObject jsonObject;\n\n // Bad cluster name\n jsonObject = TestUtils.getJsonHardwareLayout(\"\", getDatacenters());\n failValidation(jsonObject);\n\n // Duplicate disks\n jsonObject = TestUtils.getJsonHardwareLayout(\"Beta\", g...
{ "fields": [ { "declarator": "clusterName", "modifier": "private final", "original_string": "private final String clusterName;", "type": "String", "var_name": "clusterName" }, { "declarator": "version", "modifier": "private final", "original_string": "priva...
{ "body": "public List<Datacenter> getDatacenters() {\n return datacenters;\n }", "class_method_signature": "HardwareLayout.getDatacenters()", "constructor": false, "full_signature": "public List<Datacenter> getDatacenters()", "identifier": "getDatacenters", "invocations": [], "modifiers": "public", ...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_184
{ "fields": [ { "declarator": "CHUNK_SIZE = new Random().nextInt(1024 * 1024) + 8191", "modifier": "private static final", "original_string": "private static final int CHUNK_SIZE = new Random().nextInt(1024 * 1024) + 8191;", "type": "int", "var_name": "CHUNK_SIZE" }, { ...
{ "body": "@Test\n public void testCompositeBlobGetSuccessStitchDifferentSizedBlobsSegments() throws Exception {\n if (metadataContentVersion > MessageFormatRecord.Metadata_Content_Version_V2) {\n //Test grabbing every segment\n for (int i = 0; i < NUM_STITCHED_CHUNKS; i++) {\n testGetSuccessStit...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(GetManager.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(GetManager.class);", "type": "Logger", "var_name": "logger" }, { "dec...
{ "body": "void close() {\n for (GetOperation op : getOperations) {\n removeAndAbort(op,\n new RouterException(\"Aborted operation because Router is closed\", RouterErrorCode.RouterClosed));\n }\n }", "class_method_signature": "GetManager.close()", "constructor": false, "full_signature": " ...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_242
{ "fields": [ { "declarator": "messageFormatHeaderVersionSaved", "modifier": "private static", "original_string": "private static short messageFormatHeaderVersionSaved;", "type": "short", "var_name": "messageFormatHeaderVersionSaved" }, { "declarator": "nettyByteBufLeak...
{ "body": "@Test\n public void messageFormatPutNoArgReadTest() throws Exception, MessageFormatException {\n StoreKey key = new MockId(\"id1\");\n StoreKeyFactory keyFactory = new MockIdFactory();\n short accountId = Utils.getRandomShort(TestUtils.RANDOM);\n short containerId = Utils.getRandomShort(TestUt...
{ "fields": [ { "declarator": "buffer = null", "modifier": "protected", "original_string": "protected ByteBuffer buffer = null;", "type": "ByteBuffer", "var_name": "buffer" }, { "declarator": "stream = null", "modifier": "protected", "original_string": "prot...
{ "body": "public long getSize() {\n return messageLength;\n }", "class_method_signature": "MessageFormatInputStream.getSize()", "constructor": false, "full_signature": "public long getSize()", "identifier": "getSize", "invocations": [], "modifiers": "public", "parameters": "()", "return": "long",...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_307
{ "fields": [ { "declarator": "clusterMap = new MockReadingClusterMap()", "modifier": "private final", "original_string": "private final ClusterMap clusterMap = new MockReadingClusterMap();", "type": "ClusterMap", "var_name": "clusterMap" }, { "declarator": "blobIdFacto...
{ "body": "@Test\n public void testBrokenSizeMetaDataBlobOperation() throws IOException, MessageFormatException {\n InputAndExpected inputAndExpected =\n new InputAndExpected(BLOB_ID_VERSION_1_METADATA_CONVERTED, VALID_MESSAGE_FORMAT_INPUT_STREAM_IMPLS[0], false,\n true, new String[]{BLOB_ID_VER...
{ "fields": [ { "declarator": "storeKeyConverter", "modifier": "private final", "original_string": "private final StoreKeyConverter storeKeyConverter;", "type": "StoreKeyConverter", "var_name": "storeKeyConverter" }, { "declarator": "storeKeyFactory", "modifier": ...
{ "body": "@Override\n public TransformationOutput transform(Message message) {\n Message transformedMsg = null;\n try {\n Objects.requireNonNull(message, \"message must not be null\");\n Objects.requireNonNull(message.getMessageInfo(), \"message's messageInfo must not be null\");\n Objects.requ...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_192
{ "fields": [ { "declarator": "GSE = new GeneralSecurityException(\"Exception to throw for tests\")", "modifier": "static final", "original_string": "static final GeneralSecurityException GSE = new GeneralSecurityException(\"Exception to throw for tests\");", "type": "GeneralSecurityExcept...
{ "body": "@Test\n public void testFailureOnAllPollThatSends() throws Exception {\n requestAndResultsList.clear();\n requestAndResultsList.add(new RequestAndResult(chunkSize * 5));\n mockSelectorState.set(MockSelectorState.ThrowExceptionOnSend);\n // In the case of an error in poll, the router gets close...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(PutManager.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(PutManager.class);", "type": "Logger", "var_name": "logger" }, { "dec...
{ "body": "boolean isOpen() {\n return isOpen.get();\n }", "class_method_signature": "PutManager.isOpen()", "constructor": false, "full_signature": " boolean isOpen()", "identifier": "isOpen", "invocations": [ "get" ], "modifiers": "", "parameters": "()", "return": "boolean", "signature": ...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_254
{ "fields": [ { "declarator": "RANDOM = new Random()", "modifier": "private static final", "original_string": "private static final Random RANDOM = new Random();", "type": "Random", "var_name": "RANDOM" }, { "declarator": "ALPHABET = \"abcdefghijklmnopqrstuvwxyz\"", ...
{ "body": "@Test\n public void getUserMetadataWithUserMetadataArgTest() throws Exception {\n byte[] original = new byte[100];\n RANDOM.nextBytes(original);\n JSONObject headers = new JSONObject();\n headers.put(RestUtils.MultipartPost.USER_METADATA_PART, ByteBuffer.wrap(original));\n RestRequest restR...
{ "fields": [ { "declarator": "HTTP_DATE_FORMAT = \"EEE, dd MMM yyyy HH:mm:ss zzz\"", "modifier": "public static final", "original_string": "public static final String HTTP_DATE_FORMAT = \"EEE, dd MMM yyyy HH:mm:ss zzz\";", "type": "String", "var_name": "HTTP_DATE_FORMAT" }, ...
{ "body": "public static byte[] buildUserMetadata(Map<String, Object> args) throws RestServiceException {\n ByteBuffer userMetadata;\n if (args.containsKey(MultipartPost.USER_METADATA_PART)) {\n userMetadata = (ByteBuffer) args.get(MultipartPost.USER_METADATA_PART);\n } else {\n Map<String, String>...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_311
{ "fields": [ { "declarator": "clusterMap = new MockReadingClusterMap()", "modifier": "private final", "original_string": "private final ClusterMap clusterMap = new MockReadingClusterMap();", "type": "ClusterMap", "var_name": "clusterMap" }, { "declarator": "blobIdFacto...
{ "body": "@Test\n public void testBrokenDifferentAccountIdContainerIdMetaDataBlobOperation()\n throws IOException, MessageFormatException {\n InputAndExpected inputAndExpected =\n new InputAndExpected(pairList.get(0), VALID_MESSAGE_FORMAT_INPUT_STREAM_IMPLS[0], false,\n new String[]{BLOB_I...
{ "fields": [ { "declarator": "storeKeyConverter", "modifier": "private final", "original_string": "private final StoreKeyConverter storeKeyConverter;", "type": "StoreKeyConverter", "var_name": "storeKeyConverter" }, { "declarator": "storeKeyFactory", "modifier": ...
{ "body": "@Override\n public TransformationOutput transform(Message message) {\n Message transformedMsg = null;\n try {\n Objects.requireNonNull(message, \"message must not be null\");\n Objects.requireNonNull(message.getMessageInfo(), \"message's messageInfo must not be null\");\n Objects.requ...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_203
{ "fields": [ { "declarator": "ZK_CLIENT_CONNECT_TIMEOUT_MS = 20 * 1000", "modifier": "private static final", "original_string": "private static final int ZK_CLIENT_CONNECT_TIMEOUT_MS = 20 * 1000;", "type": "int", "var_name": "ZK_CLIENT_CONNECT_TIMEOUT_MS" }, { "declara...
{ "body": "@Test\n public void testHelixNotifier() throws Exception {\n // Subscribe a topic and publish a message for the topic\n helixNotifier.subscribe(refTopics.get(0), listeners.get(0));\n latch0.set(new CountDownLatch(1));\n helixNotifier.publish(refTopics.get(0), refMessages.get(0));\n awaitLat...
{ "fields": [ { "declarator": "TOPIC_PATH = \"/topics\"", "modifier": "private static final", "original_string": "private static final String TOPIC_PATH = \"/topics\";", "type": "String", "var_name": "TOPIC_PATH" }, { "declarator": "MESSAGE_KEY = \"message\"", "mo...
{ "body": "HelixNotifier(HelixPropertyStore<ZNRecord> helixStore) {\n if (helixStore == null) {\n throw new IllegalArgumentException(\"helixStore cannot be null.\");\n }\n this.helixStore = helixStore;\n }", "class_method_signature": "HelixNotifier.HelixNotifier(HelixPropertyStore<ZNRecord> helixStor...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_346
{ "fields": [ { "declarator": "CURRENT_XID = 64", "modifier": "static final", "original_string": "static final long CURRENT_XID = 64;", "type": "long", "var_name": "CURRENT_XID" }, { "declarator": "clusterNamePrefixInHelix = \"Ambry-\"", "modifier": "static final"...
{ "body": "@Test\n public void helixInitiatedIdealStateChangeTest() throws Exception {\n assumeTrue(!useComposite && !overrideEnabled);\n HelixClusterManager helixClusterManager = (HelixClusterManager) clusterManager;\n verifyInitialClusterChanges(helixClusterManager, helixCluster, helixDcs);\n String re...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(HelixClusterManager.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(HelixClusterManager.class);", "type": "Logger", "var_name": "logger" }...
{ "body": "Map<String, Map<String, String>> getPartitionToResourceMap() {\n Map<String, Map<String, String>> partitionToResourceNameByDc = new HashMap<>();\n for (DcInfo dcInfo : dcToDcInfo.values()) {\n partitionToResourceNameByDc.put(dcInfo.dcName, dcInfo.clusterChangeHandler.getPartitionToResourceMap())...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_49
{ "fields": [ { "declarator": "STORE_KEY_FACTORY", "modifier": "private static final", "original_string": "private static final StoreKeyFactory STORE_KEY_FACTORY;", "type": "StoreKeyFactory", "var_name": "STORE_KEY_FACTORY" }, { "declarator": "isLogSegmented", "mo...
{ "body": "@Test\n public void equalityTest() {\n UUID sessionId = UUID.randomUUID();\n UUID incarnationId = UUID.randomUUID();\n String logSegmentName = LogSegmentNameHelper.generateFirstSegmentName(isLogSegmented);\n Offset offset = new Offset(logSegmentName, 0);\n Offset otherOffset = new Offset(lo...
{ "fields": [ { "declarator": "VERSION_0 = 0", "modifier": "static final", "original_string": "static final short VERSION_0 = 0;", "type": "short", "var_name": "VERSION_0" }, { "declarator": "VERSION_1 = 1", "modifier": "static final", "original_string": "st...
{ "body": "@Override\n public boolean equals(Object o) {\n if (this == o) {\n return true;\n }\n if (o == null || getClass() != o.getClass()) {\n return false;\n }\n\n StoreFindToken that = (StoreFindToken) o;\n\n if (type != that.type) {\n return false;\n }\n if (offset != nul...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_152
{ "fields": [ { "declarator": "vcrRequests", "modifier": "private final", "original_string": "private final VcrRequests vcrRequests;", "type": "VcrRequests", "var_name": "vcrRequests" }, { "declarator": "request", "modifier": "private final", "original_strin...
{ "body": "@Test\n public void handleTtlUpdateRequest() throws IOException, InterruptedException {\n try {\n vcrRequests.handleTtlUpdateRequest(request);\n Assert.fail(\"handleTtlUpdateRequest should throw UnsupportedOperationException\");\n } catch (UnsupportedOperationException ex) {\n }\n }", ...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(VcrRequests.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(VcrRequests.class);", "type": "Logger", "var_name": "logger" } ], "file": ...
{ "body": "@Override\n public void handleTtlUpdateRequest(NetworkRequest request) throws IOException, InterruptedException {\n throw new UnsupportedOperationException(\"Request type not supported\");\n }", "class_method_signature": "VcrRequests.handleTtlUpdateRequest(NetworkRequest request)", "constructor": ...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_294
{ "fields": [ { "declarator": "STATIC_FIELD_TEST_STRING = \"field1\"", "modifier": "static final", "original_string": "static final String STATIC_FIELD_TEST_STRING = \"field1\";", "type": "String", "var_name": "STATIC_FIELD_TEST_STRING" } ], "file": "ambry-utils/src/test/java...
{ "body": "@Test\n public void testGetObj() {\n try {\n MockClassForTesting mockObj = Utils.getObj(\"com.github.ambry.utils.MockClassForTesting\");\n Assert.assertNotNull(mockObj);\n Assert.assertTrue(mockObj.noArgConstructorInvoked);\n mockObj = Utils.getObj(\"com.github.ambry.utils.MockClass...
{ "fields": [ { "declarator": "Infinite_Time = -1", "modifier": "public static final", "original_string": "public static final long Infinite_Time = -1;", "type": "long", "var_name": "Infinite_Time" }, { "declarator": "MIN_PORT_NUM = 1", "modifier": "public static ...
{ "body": "public static <T> T getObj(String className)\n throws ClassNotFoundException, InstantiationException, IllegalAccessException {\n return (T) Class.forName(className).newInstance();\n }", "class_method_signature": "Utils.getObj(String className)", "constructor": false, "full_signature": "publi...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_31
{ "fields": [ { "declarator": "accountId = 101", "modifier": "private final", "original_string": "private final short accountId = 101;", "type": "short", "var_name": "accountId" }, { "declarator": "containerId = 1", "modifier": "private final", "original_str...
{ "body": "@Test\n public void testAddContainer() throws Exception {\n containerDao.addContainer(accountId, testContainer);\n }", "class_method_signature": "ContainerDaoTest.testAddContainer()", "constructor": false, "full_signature": "@Test public void testAddContainer()", "identifier": "testAddContaine...
{ "fields": [ { "declarator": "CONTAINER_TABLE = \"Containers\"", "modifier": "public static final", "original_string": "public static final String CONTAINER_TABLE = \"Containers\";", "type": "String", "var_name": "CONTAINER_TABLE" }, { "declarator": "ACCOUNT_ID = \"acc...
{ "body": "public void addContainer(int accountId, Container container) throws SQLException {\n try {\n // Note: assuming autocommit for now\n PreparedStatement insertStatement = dataAccessor.getPreparedStatement(insertSql);\n insertStatement.setInt(1, accountId);\n insertStatement.setString(2,...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_105
{ "fields": [ { "declarator": "mockDest = mock(CloudDestination.class)", "modifier": "private final", "original_string": "private final CloudDestination mockDest = mock(CloudDestination.class);", "type": "CloudDestination", "var_name": "mockDest" }, { "declarator": "com...
{ "body": "@Test\n public void testCompactPartitions() throws Exception {\n // start with empty map\n assertEquals(0, compactor.compactPartitions());\n\n int numPartitions = 40;\n // add partitions to map\n String defaultClass = MockClusterMap.DEFAULT_PARTITION_CLASS;\n for (int i = 0; i < numParti...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(CloudStorageCompactor.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(CloudStorageCompactor.class);", "type": "Logger", "var_name": "logger" ...
{ "body": "public int compactPartitions() {\n if (partitions.isEmpty()) {\n logger.info(\"Skipping compaction as no partitions are assigned.\");\n return 0;\n }\n List<PartitionId> partitionSnapshot = new ArrayList<>(partitions);\n long compactionStartTime = System.currentTimeMillis();\n long...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_386
{ "fields": [ { "declarator": "CHECKOUT_TIMEOUT_MS = 1000", "modifier": "private static final", "original_string": "private static final int CHECKOUT_TIMEOUT_MS = 1000;", "type": "int", "var_name": "CHECKOUT_TIMEOUT_MS" }, { "declarator": "MAX_PORTS_PLAIN_TEXT = 3", ...
{ "body": "@Test\n public void testOutOfOrderConnectionEstablishment() {\n selector.setState(MockSelectorState.DelayFailAlternateConnect);\n List<RequestInfo> requestInfoList = new ArrayList<>();\n requestInfoList.add(new RequestInfo(sslHost, sslPort, new MockSend(2), replicaOnSslNode));\n requestInfoLis...
{ "fields": [ { "declarator": "selector", "modifier": "private final", "original_string": "private final Selector selector;", "type": "Selector", "var_name": "selector" }, { "declarator": "connectionTracker", "modifier": "private final", "original_string": "...
{ "body": "@Override\n public List<ResponseInfo> sendAndPoll(List<RequestInfo> requestsToSend, Set<Integer> requestsToDrop,\n int pollTimeoutMs) {\n if (closed || !selector.isOpen()) {\n throw new IllegalStateException(\"The SocketNetworkClient is closed.\");\n }\n long startTime = time.millisecon...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_89
{ "fields": [ { "declarator": "PUT_RECORD_SIZE = 53", "modifier": "static final", "original_string": "static final int PUT_RECORD_SIZE = 53;", "type": "int", "var_name": "PUT_RECORD_SIZE" }, { "declarator": "MOCK_ID_STRING_LENGTH = 10", "modifier": "static final",...
{ "body": "@Test\n public void concurrentDeleteTest() throws Exception {\n int extraBlobCount = 2000 / PUT_RECORD_SIZE + 1;\n put(extraBlobCount, PUT_RECORD_SIZE, Utils.Infinite_Time);\n List<Deleter> deleters = new ArrayList<>(liveKeys.size());\n for (MockId id : liveKeys) {\n deleters.add(new Dele...
{ "fields": [ { "declarator": "SEPARATOR = \"_\"", "modifier": "static final", "original_string": "static final String SEPARATOR = \"_\";", "type": "String", "var_name": "SEPARATOR" }, { "declarator": "BOOTSTRAP_FILE_NAME = \"bootstrap_in_progress\"", "modifier": ...
{ "body": "@Override\n public void put(MessageWriteSet messageSetToWrite) throws StoreException {\n checkStarted();\n if (messageSetToWrite.getMessageSetInfo().isEmpty()) {\n throw new IllegalArgumentException(\"Message write set cannot be empty\");\n }\n checkDuplicates(messageSetToWrite.getMessage...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_66
{ "fields": [ { "declarator": "METRICS = new StorageManagerMetrics(new MetricRegistry())", "modifier": "private static final", "original_string": "private static final StorageManagerMetrics METRICS = new StorageManagerMetrics(new MetricRegistry());", "type": "StorageManagerMetrics", ...
{ "body": "@Test\n public void sizeNotInPoolTest() throws Exception {\n alloc = constructAllocator();\n alloc.initializePool(\n Arrays.asList(new DiskSpaceRequirements(storeId0, 50, 2, 0), new DiskSpaceRequirements(storeId1, 21, 1, 0)));\n verifyPoolState(new ExpectedState().addStoreSeg(storeId0, 50,...
{ "fields": [ { "declarator": "STORE_DIR_PREFIX = \"reserve_store_\"", "modifier": "static final", "original_string": "static final String STORE_DIR_PREFIX = \"reserve_store_\";", "type": "String", "var_name": "STORE_DIR_PREFIX" }, { "declarator": "SWAP_DIR_NAME = \"res...
{ "body": "void initializePool(Collection<DiskSpaceRequirements> requirementsList) throws StoreException {\n long startTime = System.currentTimeMillis();\n try {\n if (enablePooling) {\n if (poolState == PoolState.NOT_INVENTORIED) {\n throw inventoryException;\n }\n // The req...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_369
{ "fields": [ { "declarator": "NETTY_METRICS = new NettyMetrics(new MetricRegistry())", "modifier": "private static final", "original_string": "private static final NettyMetrics NETTY_METRICS = new NettyMetrics(new MetricRegistry());", "type": "NettyMetrics", "var_name": "NETTY_METRI...
{ "body": "@Test\n public void shutdownWithoutStartTest() throws InstantiationException, IOException {\n NioServer nioServer = getNettyServer(null);\n nioServer.shutdown();\n }", "class_method_signature": "NettyServerTest.shutdownWithoutStartTest()", "constructor": false, "full_signature": "@Test public...
{ "fields": [ { "declarator": "nettyConfig", "modifier": "private final", "original_string": "private final NettyConfig nettyConfig;", "type": "NettyConfig", "var_name": "nettyConfig" }, { "declarator": "nettyMetrics", "modifier": "private final", "original_...
{ "body": "@Override\n public void shutdown() {\n logger.info(\"Shutting down NettyServer\");\n if (bossGroup != null && workerGroup != null && (!bossGroup.isTerminated() || !workerGroup.isTerminated())) {\n long shutdownBeginTime = System.currentTimeMillis();\n workerGroup.shutdownGracefully();\n ...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_406
{ "fields": [ { "declarator": "STORE_ID = \"copier_test\"", "modifier": "private static final", "original_string": "private static final String STORE_ID = \"copier_test\";", "type": "String", "var_name": "STORE_ID" }, { "declarator": "DISK_IO_SCHEDULER = new DiskIOSched...
{ "body": "@Test\n public void copyTest() throws Exception {\n storeCopier.copy(new StoreFindTokenFactory(STORE_KEY_FACTORY).getNewFindToken());\n storeCopier.close();\n // copy the store descriptor file over\n StoreMetrics storeMetrics = new StoreMetrics(new MetricRegistry());\n Files.copy(new File(s...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(StoreCopier.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(StoreCopier.class);", "type": "Logger", "var_name": "logger" }, { "d...
{ "body": "public Pair<FindToken, Boolean> copy(FindToken startToken) throws Exception {\n boolean sourceHasProblems = false;\n FindToken lastToken;\n FindToken token = startToken;\n do {\n lastToken = token;\n FindInfo findInfo = src.findEntriesSince(lastToken, fetchSizeInBytes);\n List<Me...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_113
{ "fields": [ { "declarator": "base64key = Base64.encodeBase64String(\"ambrykey\".getBytes())", "modifier": "private final", "original_string": "private final String base64key = Base64.encodeBase64String(\"ambrykey\".getBytes());", "type": "String", "var_name": "base64key" }, ...
{ "body": "@Test\n public void testCompaction() throws Exception {\n int expectedNumQUeries = numQueryBuckets * 2;\n int expectedPurged = numBlobsPerQuery * expectedNumQUeries;\n assertEquals(expectedPurged, azureStorageCompactor.compactPartition(partitionPath));\n verify(mockumentClient, times(expectedN...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(AzureStorageCompactor.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(AzureStorageCompactor.class);", "type": "Logger", "var_name": "logger" ...
{ "body": "public int compactPartition(String partitionPath) throws CloudStorageException {\n if (isShuttingDown()) {\n logger.info(\"Skipping compaction of {} due to shut down.\", partitionPath);\n return 0;\n }\n\n Map<String, Long> checkpoints = getCompactionProgress(partitionPath);\n\n long ...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_390
{ "fields": [ { "declarator": "CHECKOUT_TIMEOUT_MS = 1000", "modifier": "private static final", "original_string": "private static final int CHECKOUT_TIMEOUT_MS = 1000;", "type": "int", "var_name": "CHECKOUT_TIMEOUT_MS" }, { "declarator": "MAX_PORTS_PLAIN_TEXT = 3", ...
{ "body": "@Test\n public void testClose() {\n List<RequestInfo> requestInfoList = new ArrayList<RequestInfo>();\n networkClient.close();\n try {\n networkClient.sendAndPoll(requestInfoList, Collections.emptySet(), POLL_TIMEOUT_MS);\n Assert.fail(\"Polling after close should throw\");\n } catch...
{ "fields": [ { "declarator": "selector", "modifier": "private final", "original_string": "private final Selector selector;", "type": "Selector", "var_name": "selector" }, { "declarator": "connectionTracker", "modifier": "private final", "original_string": "...
{ "body": "@Override\n public void close() {\n Set<RequestMetadata> requestMetadataToRelease = new HashSet<>();\n if (pendingRequests != null) {\n requestMetadataToRelease.addAll(pendingRequests);\n }\n if (connectionIdToRequestInFlight != null) {\n requestMetadataToRelease.addAll(connectionIdT...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_70
{ "fields": [ { "declarator": "METRICS = new StorageManagerMetrics(new MetricRegistry())", "modifier": "private static final", "original_string": "private static final StorageManagerMetrics METRICS = new StorageManagerMetrics(new MetricRegistry());", "type": "StorageManagerMetrics", ...
{ "body": "@Test\n public void unpooledAllocatorTest() throws Exception {\n alloc = constructUnpooledAllocator();\n verifyPoolState(null);\n File f1 = allocateAndVerify(storeId0, \"file1\", 20, false);\n verifyPoolState(null);\n freeAndVerify(storeId0, f1, 20, false);\n verifyPoolState(null);\n\n ...
{ "fields": [ { "declarator": "STORE_DIR_PREFIX = \"reserve_store_\"", "modifier": "static final", "original_string": "static final String STORE_DIR_PREFIX = \"reserve_store_\";", "type": "String", "var_name": "STORE_DIR_PREFIX" }, { "declarator": "SWAP_DIR_NAME = \"res...
{ "body": "void initializePool(Collection<DiskSpaceRequirements> requirementsList) throws StoreException {\n long startTime = System.currentTimeMillis();\n try {\n if (enablePooling) {\n if (poolState == PoolState.NOT_INVENTORIED) {\n throw inventoryException;\n }\n // The req...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_144
{ "fields": [ { "declarator": "clusterMap", "modifier": "private final", "original_string": "private final ClusterMap clusterMap;", "type": "ClusterMap", "var_name": "clusterMap" } ], "file": "ambry-cloud/src/test/java/com/github/ambry/cloud/CloudStorageManagerTest.java", "...
{ "body": "@Test\n public void scheduleNextForCompactionTest() throws IOException {\n CloudStorageManager cloudStorageManager = createNewCloudStorageManager();\n try {\n cloudStorageManager.scheduleNextForCompaction(new MockPartitionId());\n Assert.fail(\"CloudStorageManager scheduleNextForCompaction...
{ "fields": [ { "declarator": "lock", "modifier": "private final", "original_string": "private final ReadWriteLock lock;", "type": "ReadWriteLock", "var_name": "lock" }, { "declarator": "partitionToStore", "modifier": "private final", "original_string": "pri...
{ "body": "@Override\n public boolean scheduleNextForCompaction(PartitionId id) {\n throw new UnsupportedOperationException(\"Method not supported\");\n }", "class_method_signature": "CloudStorageManager.scheduleNextForCompaction(PartitionId id)", "constructor": false, "full_signature": "@Override public b...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_27
{ "fields": [ { "declarator": "accountConfig", "modifier": "private final", "original_string": "private final JsonAccountConfig accountConfig;", "type": "JsonAccountConfig", "var_name": "accountConfig" }, { "declarator": "accountService", "modifier": "private", ...
{ "body": "@Test\n public void testAccountAddNotification() throws Exception {\n Collection<Account> addedAccounts = generateAccountJsonFile((short) 100, (short) 0, DEFAULT_SEED_1);\n\n Set<Account> notificationsReceived = new HashSet<>();\n accountService.addAccountUpdateConsumer(accounts -> notificationsR...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(JsonAccountService.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(JsonAccountService.class);", "type": "Logger", "var_name": "logger" }, ...
{ "body": "public void processAccountJsonFile() {\n processAccountJsonLock.lock();\n\n try {\n accountJsonProcessingStartTimeMs = System.currentTimeMillis();\n\n logger.trace(\"Checking if JSON account file has changed.\");\n\n if (!Files.exists(accountFile)) {\n logger.warn(\"Unable to op...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_282
{ "fields": [], "file": "ambry-utils/src/test/java/com/github/ambry/utils/FileLockTest.java", "identifier": "FileLockTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testFileLock() throws IOException {\n File file = File.createTempFile(\"temp\", \"1\");\n file.deleteOnExit();\n FileLock lock = new FileLock(file);\n lock.lock();\n Assert.assertFalse(lock.tryLock());\n lock.unlock();\n Assert.assertTrue(lock.tryLock());\n lock...
{ "fields": [ { "declarator": "file", "modifier": "private final", "original_string": "private final File file;", "type": "File", "var_name": "file" }, { "declarator": "channel", "modifier": "private final", "original_string": "private final FileChannel chan...
{ "body": "public FileLock(File file) throws FileNotFoundException, IOException {\n this.file = file;\n file.createNewFile();\n channel = new RandomAccessFile(file, \"rw\").getChannel();\n }", "class_method_signature": "FileLock.FileLock(File file)", "constructor": true, "full_signature": "public Fil...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_328
{ "fields": [ { "declarator": "MAX_ACCOUNT_COUNT = 10", "modifier": "private static final", "original_string": "private static final int MAX_ACCOUNT_COUNT = 10;", "type": "int", "var_name": "MAX_ACCOUNT_COUNT" }, { "declarator": "MIN_ACCOUNT_COUNT = 5", "modifier"...
{ "body": "@Test\n public void testGetNodeStatsInJSON() throws Exception {\n // initialize StatsManager and create all types of snapshots for testing\n List<ReplicaId> replicaIds = new ArrayList<>();\n PartitionId partitionId;\n DataNodeId dataNodeId = new MockDataNodeId(Collections.singletonList(new Por...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(StatsManager.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(StatsManager.class);", "type": "Logger", "var_name": "logger" }, { ...
{ "body": "String getNodeStatsInJSON(StatsReportType statsReportType) {\n String statsWrapperJSON = \"\";\n logger.info(\"Aggregating node-level stats for Helix report\");\n try {\n long totalFetchAndAggregateStartTimeMs = time.milliseconds();\n StatsSnapshot combinedSnapshot = new StatsSnapshot(0L...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_0
{ "fields": [ { "declarator": "mySqlAccountService", "modifier": "", "original_string": "AccountService mySqlAccountService;", "type": "AccountService", "var_name": "mySqlAccountService" }, { "declarator": "mySqlConfigProps = new Properties()", "modifier": "", ...
{ "body": "@Test\n public void testInitCacheFromDisk() throws IOException, SQLException {\n Path accountBackupDir = Paths.get(TestUtils.getTempDir(\"account-backup\")).toAbsolutePath();\n mySqlConfigProps.setProperty(MySqlAccountServiceConfig.BACKUP_DIRECTORY_KEY, accountBackupDir.toString());\n\n // write ...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(MySqlAccountService.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(MySqlAccountService.class);", "type": "Logger", "var_name": "logger" }...
{ "body": "@Override\n public Collection<Account> getAllAccounts() {\n infoMapLock.readLock().lock();\n try {\n return accountInfoMapRef.get().getAccounts();\n } finally {\n infoMapLock.readLock().unlock();\n }\n }", "class_method_signature": "MySqlAccountService.getAllAccounts()", "constr...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_353
{ "fields": [ { "declarator": "helixManagerFactory", "modifier": "private final", "original_string": "private final MockHelixManagerFactory helixManagerFactory;", "type": "MockHelixManagerFactory", "var_name": "helixManagerFactory" }, { "declarator": "props", "mod...
{ "body": "@Test\n public void testHelixParticipant() throws Exception {\n ClusterMapConfig clusterMapConfig = new ClusterMapConfig(new VerifiableProperties(props));\n HelixParticipant participant = new HelixParticipant(clusterMapConfig, helixManagerFactory, new MetricRegistry(),\n getDefaultZkConnectSt...
{ "fields": [ { "declarator": "participantMetrics", "modifier": "protected final", "original_string": "protected final HelixParticipantMetrics participantMetrics;", "type": "HelixParticipantMetrics", "var_name": "participantMetrics" }, { "declarator": "clusterName", ...
{ "body": "public HelixParticipant(ClusterMapConfig clusterMapConfig, HelixFactory helixFactory, MetricRegistry metricRegistry,\n String zkConnectStr, boolean isSoleParticipant) {\n this.clusterMapConfig = clusterMapConfig;\n this.zkConnectStr = zkConnectStr;\n participantMetrics =\n new HelixPar...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_216
{ "fields": [ { "declarator": "refAccount", "modifier": "private final", "original_string": "private final Account refAccount;", "type": "Account", "var_name": "refAccount" }, { "declarator": "configProps = new Properties()", "modifier": "private final", "or...
{ "body": "@Test\n public void shutdownWithoutStartTest() {\n FrontendRestRequestService frontendRestRequestService = getFrontendRestRequestService();\n frontendRestRequestService.shutdown();\n }", "class_method_signature": "FrontendRestRequestServiceTest.shutdownWithoutStartTest()", "constructor": false,...
{ "fields": [ { "declarator": "TTL_UPDATE_REJECTED_ALLOW_HEADER_VALUE = \"GET,HEAD,DELETE\"", "modifier": "static final", "original_string": "static final String TTL_UPDATE_REJECTED_ALLOW_HEADER_VALUE = \"GET,HEAD,DELETE\";", "type": "String", "var_name": "TTL_UPDATE_REJECTED_ALLOW_H...
{ "body": "@Override\n public void shutdown() {\n long shutdownBeginTime = System.currentTimeMillis();\n isUp = false;\n try {\n if (securityService != null) {\n securityService.close();\n securityService = null;\n }\n if (idConverter != null) {\n idConverter.close();\n ...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_168
{ "fields": [ { "declarator": "random = new Random()", "modifier": "", "original_string": "Random random = new Random();", "type": "Random", "var_name": "random" }, { "declarator": "clusterMap", "modifier": "", "original_string": "ClusterMap clusterMap;", ...
{ "body": "@Test\n public void testGetAccountContainer() {\n AccountService accountService = new InMemAccountService(false, false);\n // Both accountId and containerId are not tracked by AccountService.\n Pair<Account, Container> accountContainer =\n RouterUtils.getAccountContainer(accountService, Ac...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(RouterUtils.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(RouterUtils.class);", "type": "Logger", "var_name": "logger" } ], "file": ...
{ "body": "static Pair<Account, Container> getAccountContainer(AccountService accountService, short accountId,\n short containerId) {\n Account account = accountService.getAccountById(accountId);\n Container container = account == null ? null : account.getContainerById(containerId);\n return new Pair<>(...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_187
{ "fields": [ { "declarator": "CHUNK_SIZE = new Random().nextInt(1024 * 1024) + 8191", "modifier": "private static final", "original_string": "private static final int CHUNK_SIZE = new Random().nextInt(1024 * 1024) + 8191;", "type": "int", "var_name": "CHUNK_SIZE" }, { ...
{ "body": "@Test\n public void testFailureOnAllPollThatSends() throws Exception {\n router = getNonBlockingRouter();\n setOperationParams(CHUNK_SIZE, new GetBlobOptionsBuilder().build());\n String blobId =\n router.putBlob(putBlobProperties, putUserMetadata, putChannel, new PutBlobOptionsBuilder().bu...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(GetManager.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(GetManager.class);", "type": "Logger", "var_name": "logger" }, { "dec...
{ "body": "void close() {\n for (GetOperation op : getOperations) {\n removeAndAbort(op,\n new RouterException(\"Aborted operation because Router is closed\", RouterErrorCode.RouterClosed));\n }\n }", "class_method_signature": "GetManager.close()", "constructor": false, "full_signature": " ...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_304
{ "fields": [ { "declarator": "STATIC_FIELD_TEST_STRING = \"field1\"", "modifier": "static final", "original_string": "static final String STATIC_FIELD_TEST_STRING = \"field1\";", "type": "String", "var_name": "STATIC_FIELD_TEST_STRING" } ], "file": "ambry-utils/src/test/java...
{ "body": "@Test\n public void splitStringForCollectionTest() {\n assertEquals(\"Unexpected result\", new ArrayList<>(Arrays.asList(\"a\", \"b\", \"c\")),\n Utils.splitString(\"a,b,c\", \",\", ArrayList::new));\n assertEquals(\"Unexpected result\", new HashSet<>(Arrays.asList(\"a\", \"b\", \"c\")),\n ...
{ "fields": [ { "declarator": "Infinite_Time = -1", "modifier": "public static final", "original_string": "public static final long Infinite_Time = -1;", "type": "long", "var_name": "Infinite_Time" }, { "declarator": "MIN_PORT_NUM = 1", "modifier": "public static ...
{ "body": "public static ArrayList<String> splitString(String data, String delimiter) {\n return splitString(data, delimiter, ArrayList::new);\n }", "class_method_signature": "Utils.splitString(String data, String delimiter)", "constructor": false, "full_signature": "public static ArrayList<String> splitStr...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_241
{ "fields": [], "file": "ambry-messageformat/src/test/java/com/github/ambry/messageformat/CompositeBlobInfoTest.java", "identifier": "CompositeBlobInfoTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testInvalidGetStoreKeysInByteRange() {\n List<Pair<StoreKey, Long>> keysAndContentSizes = createKeysAndContentSizes(60, 1, 1000000, 100);\n CompositeBlobInfo compositeBlobInfo = new CompositeBlobInfo(keysAndContentSizes);\n long totalSize = compositeBlobInfo.getTotalSize();\n ...
{ "fields": [ { "declarator": "chunkSize", "modifier": "private final", "original_string": "private final int chunkSize;", "type": "int", "var_name": "chunkSize" }, { "declarator": "totalSize", "modifier": "private final", "original_string": "private final l...
{ "body": "public long getTotalSize() {\n return totalSize;\n }", "class_method_signature": "CompositeBlobInfo.getTotalSize()", "constructor": false, "full_signature": "public long getTotalSize()", "identifier": "getTotalSize", "invocations": [], "modifiers": "public", "parameters": "()", "return"...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_191
{ "fields": [ { "declarator": "GSE = new GeneralSecurityException(\"Exception to throw for tests\")", "modifier": "static final", "original_string": "static final GeneralSecurityException GSE = new GeneralSecurityException(\"Exception to throw for tests\");", "type": "GeneralSecurityExcept...
{ "body": "@Test\n public void testFailureOnAllSends() throws Exception {\n requestAndResultsList.clear();\n requestAndResultsList.add(new RequestAndResult(chunkSize * 5));\n mockSelectorState.set(MockSelectorState.DisconnectOnSend);\n Exception expectedException = new RouterException(\"\", RouterErrorCo...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(PutManager.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(PutManager.class);", "type": "Logger", "var_name": "logger" }, { "dec...
{ "body": "boolean isOpen() {\n return isOpen.get();\n }", "class_method_signature": "PutManager.isOpen()", "constructor": false, "full_signature": " boolean isOpen()", "identifier": "isOpen", "invocations": [ "get" ], "modifiers": "", "parameters": "()", "return": "boolean", "signature": ...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_312
{ "fields": [ { "declarator": "clusterMap = new MockReadingClusterMap()", "modifier": "private final", "original_string": "private final ClusterMap clusterMap = new MockReadingClusterMap();", "type": "ClusterMap", "var_name": "clusterMap" }, { "declarator": "blobIdFacto...
{ "body": "@Test\n public void testNonPutTransform() throws Exception {\n InputAndExpected inputAndExpected =\n new InputAndExpected(pairList.get(0), DeleteMessageFormatInputStream.class, false);\n assertException(transformer.transform(inputAndExpected.getInput()), IllegalArgumentException.class);\n }"...
{ "fields": [ { "declarator": "storeKeyConverter", "modifier": "private final", "original_string": "private final StoreKeyConverter storeKeyConverter;", "type": "StoreKeyConverter", "var_name": "storeKeyConverter" }, { "declarator": "storeKeyFactory", "modifier": ...
{ "body": "@Override\n public TransformationOutput transform(Message message) {\n Message transformedMsg = null;\n try {\n Objects.requireNonNull(message, \"message must not be null\");\n Objects.requireNonNull(message.getMessageInfo(), \"message's messageInfo must not be null\");\n Objects.requ...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_257
{ "fields": [ { "declarator": "RANDOM = new Random()", "modifier": "private static final", "original_string": "private static final Random RANDOM = new Random();", "type": "Random", "var_name": "RANDOM" }, { "declarator": "ALPHABET = \"abcdefghijklmnopqrstuvwxyz\"", ...
{ "body": "@Test\n public void getTimeFromDateStringTest() {\n SimpleDateFormat dateFormatter = new SimpleDateFormat(RestUtils.HTTP_DATE_FORMAT, Locale.ENGLISH);\n dateFormatter.setTimeZone(TimeZone.getTimeZone(\"GMT\"));\n long curTime = System.currentTimeMillis();\n Date curDate = new Date(curTime);\n ...
{ "fields": [ { "declarator": "HTTP_DATE_FORMAT = \"EEE, dd MMM yyyy HH:mm:ss zzz\"", "modifier": "public static final", "original_string": "public static final String HTTP_DATE_FORMAT = \"EEE, dd MMM yyyy HH:mm:ss zzz\";", "type": "String", "var_name": "HTTP_DATE_FORMAT" }, ...
{ "body": "public static Long getTimeFromDateString(String dateString) {\n try {\n SimpleDateFormat dateFormatter = new SimpleDateFormat(HTTP_DATE_FORMAT, Locale.US);\n return dateFormatter.parse(dateString).getTime();\n } catch (ParseException e) {\n logger.warn(\"Could not parse milliseconds fr...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_129
{ "fields": [ { "declarator": "base64key = Base64.encodeBase64String(\"ambrykey\".getBytes())", "modifier": "private final", "original_string": "private final String base64key = Base64.encodeBase64String(\"ambrykey\".getBytes());", "type": "String", "var_name": "base64key" }, ...
{ "body": "@Test\n public void testUpdateBlobNotFound() {\n BlobStorageException ex = mockStorageException(BlobErrorCode.BLOB_NOT_FOUND);\n when(mockBlockBlobClient.getPropertiesWithResponse(any(), any(), any())).thenThrow(ex);\n expectCloudStorageException(() -> azureDest.updateBlobExpiration(blobId, expir...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(AzureCloudDestination.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(AzureCloudDestination.class);", "type": "Logger", "var_name": "logger" ...
{ "body": "@Override\n public short updateBlobExpiration(BlobId blobId, long expirationTime, CloudUpdateValidator cloudUpdateValidator)\n throws CloudStorageException {\n UpdateResponse updateResponse =\n updateBlobMetadata(blobId, Collections.singletonMap(CloudBlobMetadata.FIELD_EXPIRATION_TIME, expi...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_345
{ "fields": [ { "declarator": "CURRENT_XID = 64", "modifier": "static final", "original_string": "static final long CURRENT_XID = 64;", "type": "long", "var_name": "CURRENT_XID" }, { "declarator": "clusterNamePrefixInHelix = \"Ambry-\"", "modifier": "static final"...
{ "body": "@Test\n public void basicInterfaceTest() throws Exception {\n assumeTrue(!overrideEnabled);\n\n assertEquals(\"Incorrect local datacenter ID\", 0, clusterManager.getLocalDatacenterId());\n testPartitionReplicaConsistency();\n testInvalidPartitionId();\n testDatacenterDatanodeReplicas();\n ...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(HelixClusterManager.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(HelixClusterManager.class);", "type": "Logger", "var_name": "logger" }...
{ "body": "@Override\n public byte getLocalDatacenterId() {\n return localDatacenterId;\n }", "class_method_signature": "HelixClusterManager.getLocalDatacenterId()", "constructor": false, "full_signature": "@Override public byte getLocalDatacenterId()", "identifier": "getLocalDatacenterId", "invocation...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_200
{ "fields": [ { "declarator": "CONTENT_SPLIT_PART_COUNT = 5", "modifier": "private static final", "original_string": "private static final int CONTENT_SPLIT_PART_COUNT = 5;", "type": "int", "var_name": "CONTENT_SPLIT_PART_COUNT" }, { "declarator": "READ_PART_COUNT = 4",...
{ "body": "@Test\n public void readErrorCasesTest() throws IOException {\n byte[] in = new byte[1024];\n new Random().nextBytes(in);\n ReadableStreamChannel channel = new ByteBufferReadableStreamChannel(ByteBuffer.wrap(in));\n InputStream dstInputStream = new ReadableStreamChannelInputStream(channel);\n ...
{ "fields": [ { "declarator": "asyncWritableChannel = new ByteBufferAsyncWritableChannel()", "modifier": "private final", "original_string": "private final ByteBufferAsyncWritableChannel asyncWritableChannel = new ByteBufferAsyncWritableChannel();", "type": "ByteBufferAsyncWritableChannel"...
{ "body": "@Override\n public int read() throws IOException {\n int data = -1;\n if (loadData()) {\n data = currentChunk.get() & 0xFF;\n reportBytesRead(1);\n }\n return data;\n }", "class_method_signature": "ReadableStreamChannelInputStream.read()", "constructor": false, "full_signature...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_277
{ "fields": [], "file": "ambry-utils/src/test/java/com/github/ambry/utils/PairTest.java", "identifier": "PairTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testPair() {\n String first = \"abcdef\";\n Long second = 23L;\n\n Pair<String, Long> pairOne = new Pair<>(first, second);\n Pair<String, Long> pairTwo = new Pair<>(first, second);\n Pair<String, Long> pairThree = new Pair<>(first, second + 1);\n Pair<String, Long> pa...
{ "fields": [ { "declarator": "first", "modifier": "private final", "original_string": "private final A first;", "type": "A", "var_name": "first" }, { "declarator": "second", "modifier": "private final", "original_string": "private final B second;", "t...
{ "body": "public Pair(A first, B second) {\n this.first = first;\n this.second = second;\n }", "class_method_signature": "Pair.Pair(A first, B second)", "constructor": true, "full_signature": "public Pair(A first, B second)", "identifier": "Pair", "invocations": [], "modifiers": "public", "para...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_298
{ "fields": [ { "declarator": "STATIC_FIELD_TEST_STRING = \"field1\"", "modifier": "static final", "original_string": "static final String STATIC_FIELD_TEST_STRING = \"field1\";", "type": "String", "var_name": "STATIC_FIELD_TEST_STRING" } ], "file": "ambry-utils/src/test/java...
{ "body": "@Test\n public void getTimeInMsToTheNearestSecTest() {\n long msValue = Utils.getRandomLong(TestUtils.RANDOM, 1000000);\n long expectedMsValue = (msValue / Time.MsPerSec) * Time.MsPerSec;\n assertEquals(\"Time in Ms to the nearest Sec mismatch \", expectedMsValue, Utils.getTimeInMsToTheNearestSec...
{ "fields": [ { "declarator": "Infinite_Time = -1", "modifier": "public static final", "original_string": "public static final long Infinite_Time = -1;", "type": "long", "var_name": "Infinite_Time" }, { "declarator": "MIN_PORT_NUM = 1", "modifier": "public static ...
{ "body": "public static long getTimeInMsToTheNearestSec(long timeInMs) {\n long timeInSecs = timeInMs / Time.MsPerSec;\n return timeInMs != Utils.Infinite_Time ? (timeInSecs * Time.MsPerSec) : Utils.Infinite_Time;\n }", "class_method_signature": "Utils.getTimeInMsToTheNearestSec(long timeInMs)", "construc...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_332
{ "fields": [ { "declarator": "ZK_CLIENT_CONNECT_ADDRESS = \"localhost:localport\"", "modifier": "private static final", "original_string": "private static final String ZK_CLIENT_CONNECT_ADDRESS = \"localhost:localport\";", "type": "String", "var_name": "ZK_CLIENT_CONNECT_ADDRESS" ...
{ "body": "@Test\n public void testStartRefresherWithBadZNRecord() throws Exception {\n writeToHelix(\"BAD ZNRECORD\");\n storageUsageRefresher = new HelixStorageUsageRefresher(mockHelixStore, null, storageQuotaConfig);\n Map<String, Map<String, Long>> emptyMap = storageUsageRefresher.getContainerStorageUsa...
{ "fields": [ { "declarator": "AGGREGATED_CONTAINER_STORAGE_USAGE_PATH = \"Aggregated_AccountReport\"", "modifier": "public static final", "original_string": "public static final String AGGREGATED_CONTAINER_STORAGE_USAGE_PATH = \"Aggregated_AccountReport\";", "type": "String", "var_n...
{ "body": "@Override\n public Map<String, Map<String, Long>> getContainerStorageUsage() {\n return Collections.unmodifiableMap(containerStorageUsageRef.get());\n }", "class_method_signature": "HelixStorageUsageRefresher.getContainerStorageUsage()", "constructor": false, "full_signature": "@Override public ...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_220
{ "fields": [ { "declarator": "UPLOAD_ENDPOINT = \"http://uploadUrl:15158\"", "modifier": "private static final", "original_string": "private static final String UPLOAD_ENDPOINT = \"http://uploadUrl:15158\";", "type": "String", "var_name": "UPLOAD_ENDPOINT" }, { "declar...
{ "body": "@Test\n public void notSignedRequestFailuresTest() throws Exception {\n // positive test done in signAndVerifyTest()\n AmbryUrlSigningService signer = getUrlSignerWithDefaults(new MockTime());\n RestRequest request = getRequestFromUrl(RestMethod.GET, \"/\");\n assertFalse(\"Request should not ...
{ "fields": [ { "declarator": "AMBRY_PARAMETERS_PREFIX = \"x-ambry-\"", "modifier": "static final", "original_string": "static final String AMBRY_PARAMETERS_PREFIX = \"x-ambry-\";", "type": "String", "var_name": "AMBRY_PARAMETERS_PREFIX" }, { "declarator": "LINK_EXPIRY_...
{ "body": "@Override\n public boolean isRequestSigned(RestRequest restRequest) {\n Map<String, Object> args = restRequest.getArgs();\n return args.containsKey(RestUtils.Headers.URL_TYPE) && args.containsKey(LINK_EXPIRY_TIME);\n }", "class_method_signature": "AmbryUrlSigningService.isRequestSigned(RestReques...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_85
{ "fields": [ { "declarator": "index = null", "modifier": "private", "original_string": "private MockIndex index = null;", "type": "MockIndex", "var_name": "index" }, { "declarator": "helper = null", "modifier": "private", "original_string": "private HardDel...
{ "body": "@Test\n public void testHardDelete() {\n // Create a mock index with regular log.\n // perform puts to the index.\n // perform deletes to the index.\n // call hardDelete() explicitly (set the thread frequency time to a large number if required) -\n // that will do findDeleted, prune and per...
{ "fields": [ { "declarator": "Cleanup_Token_Version_V0 = 0", "modifier": "public static final", "original_string": "public static final short Cleanup_Token_Version_V0 = 0;", "type": "short", "var_name": "Cleanup_Token_Version_V0" }, { "declarator": "Cleanup_Token_Versi...
{ "body": "boolean hardDelete() throws StoreException {\n if (index.getCurrentEndOffset().compareTo(index.getStartOffset()) > 0) {\n final Timer.Context context = metrics.hardDeleteTime.time();\n try {\n FindInfo info =\n index.findDeletedEntriesSince(startToken, scanSizeInBytes, time.s...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_365
{ "fields": [ { "declarator": "nettyByteBufLeakHelper = new NettyByteBufLeakHelper()", "modifier": "private", "original_string": "private NettyByteBufLeakHelper nettyByteBufLeakHelper = new NettyByteBufLeakHelper();", "type": "NettyByteBufLeakHelper", "var_name": "nettyByteBufLeakHel...
{ "body": "@Test\n public void keepAliveTest() {\n HttpMethod[] HTTP_METHODS = {HttpMethod.POST, HttpMethod.PUT, HttpMethod.GET, HttpMethod.HEAD, HttpMethod.DELETE};\n EmbeddedChannel channel = createEmbeddedChannel();\n for (HttpMethod httpMethod : HTTP_METHODS) {\n for (RestServiceErrorCode errorCode...
{ "fields": [ { "declarator": "FAILURE_REASON_HEADER = \"x-ambry-failure-reason\"", "modifier": "static final", "original_string": "static final String FAILURE_REASON_HEADER = \"x-ambry-failure-reason\";", "type": "String", "var_name": "FAILURE_REASON_HEADER" }, { "decl...
{ "body": "@Override\n public void close() {\n close(new ClosedChannelException());\n }", "class_method_signature": "NettyResponseChannel.close()", "constructor": false, "full_signature": "@Override public void close()", "identifier": "close", "invocations": [ "close" ], "modifiers": "@Override...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_109
{ "fields": [ { "declarator": "clusterName = \"main\"", "modifier": "private final", "original_string": "private final String clusterName = \"main\";", "type": "String", "var_name": "clusterName" }, { "declarator": "configProps = new Properties()", "modifier": "pr...
{ "body": "@Test\n public void testPurge() throws Exception {\n // purge 3 blobs, response status (202, 404, 503)\n String blobNameOkStatus = \"andromeda\";\n String blobNameNotFoundStatus = \"sirius\";\n String blobNameErrorStatus = \"mutant\";\n BlobBatch mockBatch = mock(BlobBatch.class);\n when...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(AzureBlobDataAccessor.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(AzureBlobDataAccessor.class);", "type": "Logger", "var_name": "logger" ...
{ "body": "public List<CloudBlobMetadata> purgeBlobs(List<CloudBlobMetadata> blobMetadataList) throws BlobStorageException {\n\n List<CloudBlobMetadata> deletedBlobs = new ArrayList<>();\n List<List<CloudBlobMetadata>> partitionedLists = Utils.partitionList(blobMetadataList, purgeBatchSize);\n for (List<Clou...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_93
{ "fields": [ { "declarator": "PUT_RECORD_SIZE = 53", "modifier": "static final", "original_string": "static final int PUT_RECORD_SIZE = 53;", "type": "int", "var_name": "PUT_RECORD_SIZE" }, { "declarator": "MOCK_ID_STRING_LENGTH = 10", "modifier": "static final",...
{ "body": "@Test\n public void deleteErrorCasesTest() throws StoreException {\n // ID that is already deleted\n verifyDeleteFailure(deletedKeys.iterator().next(), StoreErrorCodes.ID_Deleted);\n // ID that does not exist\n verifyDeleteFailure(getUniqueId(), StoreErrorCodes.ID_Not_Found);\n MockId id = ...
{ "fields": [ { "declarator": "SEPARATOR = \"_\"", "modifier": "static final", "original_string": "static final String SEPARATOR = \"_\";", "type": "String", "var_name": "SEPARATOR" }, { "declarator": "BOOTSTRAP_FILE_NAME = \"bootstrap_in_progress\"", "modifier": ...
{ "body": "@Override\n public void delete(List<MessageInfo> infosToDelete) throws StoreException {\n checkStarted();\n checkDuplicates(infosToDelete);\n final Timer.Context context = metrics.deleteResponse.time();\n try {\n List<IndexValue> indexValuesPriorToDelete = new ArrayList<>();\n List<I...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_236
{ "fields": [ { "declarator": "nettyByteBufLeakHelper = new NettyByteBufLeakHelper()", "modifier": "private final", "original_string": "private final NettyByteBufLeakHelper nettyByteBufLeakHelper = new NettyByteBufLeakHelper();", "type": "NettyByteBufLeakHelper", "var_name": "nettyBy...
{ "body": "@Test\n public void testUpdateRecordV2() throws IOException, MessageFormatException {\n // Test update V2 record\n ByteBuffer updateRecord = ByteBuffer.allocate(Update_Format_V2.getRecordSize());\n short accountId = Utils.getRandomShort(TestUtils.RANDOM);\n short containerId = Utils.getRandomS...
{ "fields": [ { "declarator": "Version_Field_Size_In_Bytes = 2", "modifier": "public static final", "original_string": "public static final int Version_Field_Size_In_Bytes = 2;", "type": "int", "var_name": "Version_Field_Size_In_Bytes" }, { "declarator": "Crc_Size = 8",...
{ "body": "public static UpdateRecord deserializeUpdateRecord(InputStream stream) throws IOException, MessageFormatException {\n CrcInputStream crcStream = new CrcInputStream(stream);\n DataInputStream inputStream = new DataInputStream(crcStream);\n short version = inputStream.readShort();\n switch (versi...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_373
{ "fields": [ { "declarator": "GENERATED_CONTENT_SIZE = 10240", "modifier": "private static final", "original_string": "private static final int GENERATED_CONTENT_SIZE = 10240;", "type": "int", "var_name": "GENERATED_CONTENT_SIZE" }, { "declarator": "GENERATED_CONTENT_P...
{ "body": "@Test\n public void sizeTest() throws RestServiceException {\n // no length headers provided.\n NettyRequest nettyRequest = createNettyRequest(HttpMethod.GET, \"/\", null, new MockChannel());\n assertEquals(\"Size not as expected\", -1, nettyRequest.getSize());\n\n // deliberate mismatch to ch...
{ "fields": [ { "declarator": "bufferWatermark = -1", "modifier": "static", "original_string": "static int bufferWatermark = -1;", "type": "int", "var_name": "bufferWatermark" }, { "declarator": "CLOSED_CHANNEL_EXCEPTION = new ClosedChannelException()", "modifier"...
{ "body": "@Override\n public long getSize() {\n return size;\n }", "class_method_signature": "NettyRequest.getSize()", "constructor": false, "full_signature": "@Override public long getSize()", "identifier": "getSize", "invocations": [], "modifiers": "@Override public", "parameters": "()", "retu...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_261
{ "fields": [ { "declarator": "RANDOM = new Random()", "modifier": "private static final", "original_string": "private static final Random RANDOM = new Random();", "type": "Random", "var_name": "RANDOM" }, { "declarator": "ALPHABET = \"abcdefghijklmnopqrstuvwxyz\"", ...
{ "body": "@Test\n public void getHeaderTest() throws RestServiceException {\n Map<String, Object> args = new HashMap<>();\n args.put(\"HeaderA\", \"ValueA\");\n args.put(\"HeaderB\", null);\n\n // get HeaderA\n assertEquals(\"Header value does not match\", args.get(\"HeaderA\"), RestUtils.getHeader(a...
{ "fields": [ { "declarator": "HTTP_DATE_FORMAT = \"EEE, dd MMM yyyy HH:mm:ss zzz\"", "modifier": "public static final", "original_string": "public static final String HTTP_DATE_FORMAT = \"EEE, dd MMM yyyy HH:mm:ss zzz\";", "type": "String", "var_name": "HTTP_DATE_FORMAT" }, ...
{ "body": "public static String getHeader(Map<String, ?> args, String header, boolean required) throws RestServiceException {\n String value = null;\n if (args.containsKey(header)) {\n Object valueObj = args.get(header);\n value = valueObj != null ? valueObj.toString() : null;\n if (value == null...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_324
{ "fields": [ { "declarator": "AGGREGATE_INTERVAL_MINS = 60", "modifier": "private static final", "original_string": "private static final long AGGREGATE_INTERVAL_MINS = 60;", "type": "long", "var_name": "AGGREGATE_INTERVAL_MINS" } ], "file": "ambry-server/src/test/java/com/g...
{ "body": "@Test\n public void testAmbryStatsReport() throws Exception {\n StatsManagerConfig config = new StatsManagerConfig(new VerifiableProperties(new Properties()));\n StatsManager testStatsManager = new StatsManager(new MockStorageManager(Collections.emptyMap(),\n new MockDataNodeId(Collections.si...
{ "fields": [ { "declarator": "REPORT_NAME_SUFFIX = \"Report\"", "modifier": "public static final", "original_string": "public static final String REPORT_NAME_SUFFIX = \"Report\";", "type": "String", "var_name": "REPORT_NAME_SUFFIX" }, { "declarator": "STATS_FIELD_SUFFI...
{ "body": "AmbryStatsReport(StatsManager statsManager, long aggregatePeriodInMinutes, StatsReportType type) {\n this.statsManager = statsManager;\n this.aggregatePeriodInMinutes = aggregatePeriodInMinutes;\n String reportTypeStr = convertStatsReportTypeToProperString(type);\n reportName = reportTypeStr + ...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_148
{ "fields": [ { "declarator": "mapperObj = new ObjectMapper()", "modifier": "private static final", "original_string": "private static final ObjectMapper mapperObj = new ObjectMapper();", "type": "ObjectMapper", "var_name": "mapperObj" }, { "declarator": "dataCenterId =...
{ "body": "@Test\n public void testDeleted() throws Exception {\n CloudBlobMetadata blobMetadata = new CloudBlobMetadata(blobId, now, -1, 1024, EncryptionOrigin.NONE);\n blobMetadata.setDeletionTime(futureTime);\n verifySerde(blobMetadata, ArrayUtils.addAll(FIELDS_ALWAYS_SET, FIELD_DELETION_TIME),\n ...
{ "fields": [ { "declarator": "FIELD_ID = \"id\"", "modifier": "public static final", "original_string": "public static final String FIELD_ID = \"id\";", "type": "String", "var_name": "FIELD_ID" }, { "declarator": "FIELD_PARTITION_ID = \"partitionId\"", "modifier"...
{ "body": "public CloudBlobMetadata setDeletionTime(long deletionTime) {\n this.deletionTime = deletionTime;\n return this;\n }", "class_method_signature": "CloudBlobMetadata.setDeletionTime(long deletionTime)", "constructor": false, "full_signature": "public CloudBlobMetadata setDeletionTime(long deleti...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_50
{ "fields": [], "file": "ambry-store/src/test/java/com/github/ambry/store/StoreDescriptorTest.java", "identifier": "StoreDescriptorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testStoreDescriptor() throws IOException {\n StoreConfig config = new StoreConfig(new VerifiableProperties(new Properties()));\n File tempDir = StoreTestUtils.createTempDirectory(\"storeDir\");\n File storeDescriptorFile = new File(tempDir.getAbsolutePath(), StoreDescriptor.ST...
{ "fields": [ { "declarator": "incarnationId", "modifier": "private final", "original_string": "private final UUID incarnationId;", "type": "UUID", "var_name": "incarnationId" }, { "declarator": "VERSION_0 = 0", "modifier": "static final", "original_string":...
{ "body": "StoreDescriptor(String dataDir, StoreConfig config) throws IOException {\n File storeDescriptorFile = new File(dataDir, STORE_DESCRIPTOR_FILENAME);\n if (storeDescriptorFile.exists()) {\n CrcInputStream crcStream = new CrcInputStream(new FileInputStream(storeDescriptorFile));\n DataInputStr...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_133
{ "fields": [], "file": "ambry-cloud/src/test/java/com/github/ambry/cloud/azure/CosmosUpdateTimeFindTokenFactoryTest.java", "identifier": "CosmosUpdateTimeFindTokenFactoryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void getFindTokenTest() throws IOException {\n short version = 0;\n Random random = new Random();\n long latestBlobUpdateTime = random.nextLong();\n long bytesRead = random.nextLong();\n Set<String> lastReadBlobIds = new HashSet<>();\n lastReadBlobIds.add(\"blobid1\");\n ...
{ "fields": [], "file": "ambry-cloud/src/main/java/com/github/ambry/cloud/azure/CosmosUpdateTimeFindTokenFactory.java", "identifier": "CosmosUpdateTimeFindTokenFactory", "interfaces": "implements FindTokenFactory", "methods": [ { "class_method_signature": "CosmosUpdateTimeFindTokenFactory.getFindTok...
{ "body": "@Override\n public FindToken getFindToken(DataInputStream stream) throws IOException {\n return CosmosUpdateTimeFindToken.fromBytes(stream);\n }", "class_method_signature": "CosmosUpdateTimeFindTokenFactory.getFindToken(DataInputStream stream)", "constructor": false, "full_signature": "@Override...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_308
{ "fields": [ { "declarator": "clusterMap = new MockReadingClusterMap()", "modifier": "private final", "original_string": "private final ClusterMap clusterMap = new MockReadingClusterMap();", "type": "ClusterMap", "var_name": "clusterMap" }, { "declarator": "blobIdFacto...
{ "body": "@Test\n public void testBrokenDeprecatedMetaDataBlobOperation() throws IOException, MessageFormatException {\n InputAndExpected inputAndExpected =\n new InputAndExpected(pairList.get(0), VALID_MESSAGE_FORMAT_INPUT_STREAM_IMPLS[0], false,\n new String[]{BLOB_ID_PAIR_VERSION_3_NULL.getF...
{ "fields": [ { "declarator": "storeKeyConverter", "modifier": "private final", "original_string": "private final StoreKeyConverter storeKeyConverter;", "type": "StoreKeyConverter", "var_name": "storeKeyConverter" }, { "declarator": "storeKeyFactory", "modifier": ...
{ "body": "@Override\n public TransformationOutput transform(Message message) {\n Message transformedMsg = null;\n try {\n Objects.requireNonNull(message, \"message must not be null\");\n Objects.requireNonNull(message.getMessageInfo(), \"message's messageInfo must not be null\");\n Objects.requ...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_164
{ "fields": [ { "declarator": "MAX_PORTS_PLAIN_TEXT = 3", "modifier": "private static final", "original_string": "private static final int MAX_PORTS_PLAIN_TEXT = 3;", "type": "int", "var_name": "MAX_PORTS_PLAIN_TEXT" }, { "declarator": "MAX_PORTS_SSL = 3", "modifi...
{ "body": "@Test\n public void testSetOperationException() throws Exception {\n doPut();\n GetBlobOperation op = createOperation(routerConfig, null);\n RouterErrorCode[] routerErrorCodes = new RouterErrorCode[8];\n routerErrorCodes[0] = RouterErrorCode.BlobDoesNotExist;\n routerErrorCodes[1] = RouterE...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(GetBlobOperation.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(GetBlobOperation.class);", "type": "Logger", "var_name": "logger" }, ...
{ "body": "@Override\n void poll(RequestRegistrationCallback<GetOperation> requestRegistrationCallback) {\n if (isOperationComplete()) {\n return;\n }\n if (operationException.get() == null) {\n if (firstChunk.isReady() || firstChunk.isInProgress()) {\n firstChunk.poll(requestRegistrationCa...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_11
{ "fields": [ { "declarator": "ZK_CLIENT_CONNECTION_TIMEOUT_MS = 20000", "modifier": "private static final", "original_string": "private static final int ZK_CLIENT_CONNECTION_TIMEOUT_MS = 20000;", "type": "int", "var_name": "ZK_CLIENT_CONNECTION_TIMEOUT_MS" }, { "declar...
{ "body": "@Test\n public void testAddContainer() throws Exception {\n assumeTrue(!useNewZNodePath);\n accountService = mockHelixAccountServiceFactory.getAccountService();\n assertEquals(\"The number of account in HelixAccountService is incorrect\", 0,\n accountService.getAllAccounts().size());\n ...
{ "fields": [ { "declarator": "ACCOUNT_METADATA_CHANGE_TOPIC = \"account_metadata_change_topic\"", "modifier": "static final", "original_string": "static final String ACCOUNT_METADATA_CHANGE_TOPIC = \"account_metadata_change_topic\";", "type": "String", "var_name": "ACCOUNT_METADATA_...
{ "body": "@Override\n public boolean updateAccounts(Collection<Account> accounts) {\n return updateAccountsWithAccountMetadataStore(accounts, accountMetadataStore);\n }", "class_method_signature": "HelixAccountService.updateAccounts(Collection<Account> accounts)", "constructor": false, "full_signature": "...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_172
{ "fields": [ { "declarator": "REPLICA_COUNT = 6", "modifier": "private static final", "original_string": "private static final int REPLICA_COUNT = 6;", "type": "int", "var_name": "REPLICA_COUNT" }, { "declarator": "PORT = 6666", "modifier": "private static final"...
{ "body": "@Test\n public void adaptationTest() throws InterruptedException {\n primeTracker(localColoTracker, MIN_DATA_POINTS_REQUIRED, LOCAL_COLO_LATENCY_RANGE);\n primeTracker(crossColoTracker, MIN_DATA_POINTS_REQUIRED, CROSS_COLO_LATENCY_RANGE);\n double localColoCutoff = localColoTracker.getSnapshot()....
{ "fields": [ { "declarator": "routerConfig", "modifier": "private final", "original_string": "private final RouterConfig routerConfig;", "type": "RouterConfig", "var_name": "routerConfig" }, { "declarator": "routerMetrics", "modifier": "private final", "ori...
{ "body": "@Override\n public void onResponse(ReplicaId replicaId, TrackedRequestFinalState trackedRequestFinalState) {\n super.onResponse(replicaId, trackedRequestFinalState);\n long elapsedTime;\n if (unexpiredRequestSendTimes.containsKey(replicaId)) {\n elapsedTime = time.milliseconds() - unexpiredR...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_46
{ "fields": [ { "declarator": "TEST_TIME_INTERVAL_IN_MS = DELAY_BETWEEN_LAST_MODIFIED_TIMES_MS / 2", "modifier": "private static final", "original_string": "private static final long TEST_TIME_INTERVAL_IN_MS = DELAY_BETWEEN_LAST_MODIFIED_TIMES_MS / 2;", "type": "long", "var_name": "T...
{ "body": "@Test(timeout = 5000)\n public void testBucketingWaitTimeout() throws InterruptedException, StoreException {\n assumeTrue(bucketingEnabled);\n CountDownLatch scanStartedLatch = new CountDownLatch(1);\n CountDownLatch scanHoldLatch = new CountDownLatch(1);\n MockThrottler mockThrottler = new Mo...
{ "fields": [ { "declarator": "IO_SCHEDULER_JOB_TYPE = \"BlobStoreStats\"", "modifier": "static final", "original_string": "static final String IO_SCHEDULER_JOB_TYPE = \"BlobStoreStats\";", "type": "String", "var_name": "IO_SCHEDULER_JOB_TYPE" }, { "declarator": "IO_SCH...
{ "body": "@Override\n public void close() {\n if (enabled.compareAndSet(true, false)) {\n if (indexScanner != null) {\n indexScanner.cancel();\n }\n if (queueProcessor != null) {\n queueProcessor.cancel();\n }\n }\n }", "class_method_signature": "BlobStoreStats.close()", ...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_349
{ "fields": [], "file": "ambry-clustermap/src/test/java/com/github/ambry/clustermap/ClusterMapUtilsTest.java", "identifier": "ClusterMapUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void areAllReplicasForPartitionUpTest() {\n MockDataNodeId dn1 = getDataNodeId(\"dn1\", \"DC1\");\n MockDataNodeId dn2 = getDataNodeId(\"dn2\", \"DC2\");\n MockPartitionId partitionId = new MockPartitionId(1, \"default\", Arrays.asList(dn1, dn2), 0);\n MockReplicaId replicaId1 =...
{ "fields": [ { "declarator": "PARTITION_OVERRIDE_STR = \"PartitionOverride\"", "modifier": "public static final", "original_string": "public static final String PARTITION_OVERRIDE_STR = \"PartitionOverride\";", "type": "String", "var_name": "PARTITION_OVERRIDE_STR" }, { ...
{ "body": "static boolean areAllReplicasForPartitionUp(PartitionId partition) {\n for (ReplicaId replica : partition.getReplicaIds()) {\n if (replica.isDown()) {\n logger.debug(\"Replica [{}] on {} {} is down\", replica.getPartitionId().toPathString(),\n replica.getDataNodeId().getHostname()...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_125
{ "fields": [ { "declarator": "base64key = Base64.encodeBase64String(\"ambrykey\".getBytes())", "modifier": "private final", "original_string": "private final String base64key = Base64.encodeBase64String(\"ambrykey\".getBytes());", "type": "String", "var_name": "base64key" }, ...
{ "body": "@Test\n public void testDownloadNotFound() throws Exception {\n BlobStorageException ex = mockStorageException(BlobErrorCode.BLOB_NOT_FOUND);\n doThrow(ex).when(mockBlockBlobClient).downloadWithResponse(any(), any(), any(), any(), anyBoolean(), any(), any());\n expectCloudStorageException(() -> d...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(AzureCloudDestination.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(AzureCloudDestination.class);", "type": "Logger", "var_name": "logger" ...
{ "body": "@Override\n public void downloadBlob(BlobId blobId, OutputStream outputStream) throws CloudStorageException {\n try {\n azureBlobDataAccessor.downloadBlob(blobId, outputStream);\n } catch (Exception e) {\n throw toCloudStorageException(\"Error downloading blob \" + blobId, e);\n }\n }"...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_124
{ "fields": [ { "declarator": "base64key = Base64.encodeBase64String(\"ambrykey\".getBytes())", "modifier": "private final", "original_string": "private final String base64key = Base64.encodeBase64String(\"ambrykey\".getBytes());", "type": "String", "var_name": "base64key" }, ...
{ "body": "@Test\n public void testExpire() throws Exception {\n mockBlobExistence(true);\n try {\n azureDest.updateBlobExpiration(blobId, expirationTime, dummyCloudUpdateValidator);\n } catch (Exception ex) {\n fail(\"Expected success, instead for exception \" + ex.toString());\n }\n assert...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(AzureCloudDestination.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(AzureCloudDestination.class);", "type": "Logger", "var_name": "logger" ...
{ "body": "@Override\n public short updateBlobExpiration(BlobId blobId, long expirationTime, CloudUpdateValidator cloudUpdateValidator)\n throws CloudStorageException {\n UpdateResponse updateResponse =\n updateBlobMetadata(blobId, Collections.singletonMap(CloudBlobMetadata.FIELD_EXPIRATION_TIME, expi...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_47
{ "fields": [ { "declarator": "TEST_TIME_INTERVAL_IN_MS = DELAY_BETWEEN_LAST_MODIFIED_TIMES_MS / 2", "modifier": "private static final", "original_string": "private static final long TEST_TIME_INTERVAL_IN_MS = DELAY_BETWEEN_LAST_MODIFIED_TIMES_MS / 2;", "type": "long", "var_name": "T...
{ "body": "@Test(timeout = 1000)\n public void testRequestOnClosing() {\n int bucketCount = bucketingEnabled ? 1 : 0;\n BlobStoreStats blobStoreStats = setupBlobStoreStats(bucketCount, 0);\n blobStoreStats.close();\n try {\n verifyAndGetContainerValidSize(blobStoreStats, state.time.milliseconds());\...
{ "fields": [ { "declarator": "IO_SCHEDULER_JOB_TYPE = \"BlobStoreStats\"", "modifier": "static final", "original_string": "static final String IO_SCHEDULER_JOB_TYPE = \"BlobStoreStats\";", "type": "String", "var_name": "IO_SCHEDULER_JOB_TYPE" }, { "declarator": "IO_SCH...
{ "body": "@Override\n public void close() {\n if (enabled.compareAndSet(true, false)) {\n if (indexScanner != null) {\n indexScanner.cancel();\n }\n if (queueProcessor != null) {\n queueProcessor.cancel();\n }\n }\n }", "class_method_signature": "BlobStoreStats.close()", ...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_348
{ "fields": [], "file": "ambry-clustermap/src/test/java/com/github/ambry/clustermap/ReplicaTest.java", "identifier": "ReplicaTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void basics() throws JSONException {\n // Much of Replica depends on Partition. With a null Partition, only nominal testing can be done.\n TestHardwareLayout thl = new TestHardwareLayout(\"Alpha\");\n Disk disk = thl.getRandomDisk();\n\n TestReplica replicaA = new TestReplica(th...
{ "fields": [ { "declarator": "partition", "modifier": "private final", "original_string": "private final Partition partition;", "type": "Partition", "var_name": "partition" }, { "declarator": "disk", "modifier": "private", "original_string": "private Disk d...
{ "body": "@Override\n public DiskId getDiskId() {\n return disk;\n }", "class_method_signature": "Replica.getDiskId()", "constructor": false, "full_signature": "@Override public DiskId getDiskId()", "identifier": "getDiskId", "invocations": [], "modifiers": "@Override public", "parameters": "()", ...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_173
{ "fields": [ { "declarator": "REPLICA_COUNT = 6", "modifier": "private static final", "original_string": "private static final int REPLICA_COUNT = 6;", "type": "int", "var_name": "REPLICA_COUNT" }, { "declarator": "PORT = 6666", "modifier": "private static final"...
{ "body": "@Test\n public void clampMaxInflightRequestsTest() throws InterruptedException {\n primeTracker(localColoTracker, MIN_DATA_POINTS_REQUIRED, LOCAL_COLO_LATENCY_RANGE);\n primeTracker(crossColoTracker, MIN_DATA_POINTS_REQUIRED, CROSS_COLO_LATENCY_RANGE);\n double localColoCutoff = localColoTracker....
{ "fields": [ { "declarator": "routerConfig", "modifier": "private final", "original_string": "private final RouterConfig routerConfig;", "type": "RouterConfig", "var_name": "routerConfig" }, { "declarator": "routerMetrics", "modifier": "private final", "ori...
{ "body": "@Override\n public void onResponse(ReplicaId replicaId, TrackedRequestFinalState trackedRequestFinalState) {\n super.onResponse(replicaId, trackedRequestFinalState);\n long elapsedTime;\n if (unexpiredRequestSendTimes.containsKey(replicaId)) {\n elapsedTime = time.milliseconds() - unexpiredR...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_10
{ "fields": [ { "declarator": "ZK_CLIENT_CONNECTION_TIMEOUT_MS = 20000", "modifier": "private static final", "original_string": "private static final int ZK_CLIENT_CONNECTION_TIMEOUT_MS = 20000;", "type": "int", "var_name": "ZK_CLIENT_CONNECTION_TIMEOUT_MS" }, { "declar...
{ "body": "@Test\n public void testGetContainerByStatus() throws Exception {\n // a set that records the account ids that have already been taken.\n Set<Short> accountIdSet = new HashSet<>();\n // generate a single reference account and container that can be referenced by refAccount and refContainer respect...
{ "fields": [ { "declarator": "ACCOUNT_METADATA_CHANGE_TOPIC = \"account_metadata_change_topic\"", "modifier": "static final", "original_string": "static final String ACCOUNT_METADATA_CHANGE_TOPIC = \"account_metadata_change_topic\";", "type": "String", "var_name": "ACCOUNT_METADATA_...
{ "body": "@Override\n public boolean updateAccounts(Collection<Account> accounts) {\n return updateAccountsWithAccountMetadataStore(accounts, accountMetadataStore);\n }", "class_method_signature": "HelixAccountService.updateAccounts(Collection<Account> accounts)", "constructor": false, "full_signature": "...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_165
{ "fields": [ { "declarator": "random = new Random()", "modifier": "", "original_string": "Random random = new Random();", "type": "Random", "var_name": "random" }, { "declarator": "clusterMap", "modifier": "", "original_string": "ClusterMap clusterMap;", ...
{ "body": "@Test\n public void testInvalidInputString() {\n initialize();\n try {\n RouterUtils.getBlobIdFromString(null, clusterMap);\n fail(\"The input blob string is invalid. Should fail here\");\n } catch (RouterException e) {\n assertEquals(\"The input blob string is invalid.\", e.getErr...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(RouterUtils.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(RouterUtils.class);", "type": "Logger", "var_name": "logger" } ], "file": ...
{ "body": "static BlobId getBlobIdFromString(String blobIdString, ClusterMap clusterMap) throws RouterException {\n BlobId blobId;\n try {\n blobId = new BlobId(blobIdString, clusterMap);\n logger.trace(\"BlobId {} created with partitionId {}\", blobId, blobId.getPartition());\n } catch (Exception ...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_309
{ "fields": [ { "declarator": "clusterMap = new MockReadingClusterMap()", "modifier": "private final", "original_string": "private final ClusterMap clusterMap = new MockReadingClusterMap();", "type": "ClusterMap", "var_name": "clusterMap" }, { "declarator": "blobIdFacto...
{ "body": "@Test\n public void testBrokenUnchangedMetaDataBlobOperation() throws IOException, MessageFormatException {\n InputAndExpected inputAndExpected =\n new InputAndExpected(BLOB_ID_VERSION_1_METADATA_CONVERTED, VALID_MESSAGE_FORMAT_INPUT_STREAM_IMPLS[0], false,\n new String[]{BLOB_ID_VERS...
{ "fields": [ { "declarator": "storeKeyConverter", "modifier": "private final", "original_string": "private final StoreKeyConverter storeKeyConverter;", "type": "StoreKeyConverter", "var_name": "storeKeyConverter" }, { "declarator": "storeKeyFactory", "modifier": ...
{ "body": "@Override\n public TransformationOutput transform(Message message) {\n Message transformedMsg = null;\n try {\n Objects.requireNonNull(message, \"message must not be null\");\n Objects.requireNonNull(message.getMessageInfo(), \"message's messageInfo must not be null\");\n Objects.requ...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_132
{ "fields": [ { "declarator": "base64key = Base64.encodeBase64String(\"ambrykey\".getBytes())", "modifier": "private final", "original_string": "private final String base64key = Base64.encodeBase64String(\"ambrykey\".getBytes());", "type": "String", "var_name": "base64key" }, ...
{ "body": "@Test\n public void testInitClientException() throws IOException {\n CloudDestinationFactory factory =\n new AzureCloudDestinationFactory(new VerifiableProperties(configProps), new MetricRegistry());\n CloudDestination cloudDestination = null;\n try {\n cloudDestination = factory.getC...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(AzureCloudDestination.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(AzureCloudDestination.class);", "type": "Logger", "var_name": "logger" ...
{ "body": "@Override\n public void close() throws IOException {\n azureReplicationFeed.close();\n }", "class_method_signature": "AzureCloudDestination.close()", "constructor": false, "full_signature": "@Override public void close()", "identifier": "close", "invocations": [ "close" ], "modifiers...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_51
{ "fields": [ { "declarator": "DEFAULT_MAX_BLOB_SIZE = CAPACITY_IN_BYTES / 100", "modifier": "private static", "original_string": "private static long DEFAULT_MAX_BLOB_SIZE = CAPACITY_IN_BYTES / 100;", "type": "long", "var_name": "DEFAULT_MAX_BLOB_SIZE" }, { "declarator...
{ "body": "@Test\n public void testGetCompactionDetailsTest() throws StoreException, InterruptedException {\n // null logSegmentsNotInJournal to mimic all log segments overlapping with journal\n blobStore.logSegmentsNotInJournal = null;\n CompactionPolicyTest.verifyCompactionDetails(null, blobStore, compact...
{ "fields": [ { "declarator": "ERROR_MARGIN_MS = 1000 * 60 * 60", "modifier": "final static", "original_string": "final static long ERROR_MARGIN_MS = 1000 * 60 * 60;", "type": "long", "var_name": "ERROR_MARGIN_MS" }, { "declarator": "time", "modifier": "private fi...
{ "body": "@Override\n public CompactionDetails getCompactionDetails(long totalCapacity, long usedCapacity, long segmentCapacity,\n long segmentHeaderSize, List<String> logSegmentsNotInJournal, BlobStoreStats blobStoreStats, String dataDir)\n throws StoreException {\n CompactionDetails details = null;\n...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_149
{ "fields": [ { "declarator": "cryptoAgent", "modifier": "private", "original_string": "private CloudBlobCryptoAgentImpl cryptoAgent;", "type": "CloudBlobCryptoAgentImpl", "var_name": "cryptoAgent" }, { "declarator": "TWO_FIFTY_SIX_BITS_IN_BYTES = 32", "modifier":...
{ "body": "@Test\n public void testBadDecryptInput() throws GeneralSecurityException {\n byte[] garbage = TestUtils.getRandomBytes(10000);\n //zero out version, encrypted key size, encrypted data size fields\n for (int i = 0; i < CloudBlobCryptoAgentImpl.EncryptedDataPayload.INITIAL_MESSAGE_LENGTH; i++) {\n...
{ "fields": [ { "declarator": "cryptoService", "modifier": "private final", "original_string": "private final CryptoService cryptoService;", "type": "CryptoService", "var_name": "cryptoService" }, { "declarator": "kms", "modifier": "private final", "original...
{ "body": "@Override\n public ByteBuffer decrypt(ByteBuffer buffer) throws GeneralSecurityException {\n EncryptedDataPayload encryptedDataPayload = EncryptedDataPayload.deserialize(buffer);\n Object key = cryptoService.decryptKey(encryptedDataPayload.encryptedKey, contextKey);\n return cryptoService.decrypt...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_260
{ "fields": [ { "declarator": "RANDOM = new Random()", "modifier": "private static final", "original_string": "private static final Random RANDOM = new Random();", "type": "Random", "var_name": "RANDOM" }, { "declarator": "ALPHABET = \"abcdefghijklmnopqrstuvwxyz\"", ...
{ "body": "@Test\n public void getGetOptionTest() throws Exception {\n for (GetOption option : GetOption.values()) {\n JSONObject headers = new JSONObject();\n headers.put(RestUtils.Headers.GET_OPTION, option.toString().toLowerCase());\n RestRequest restRequest = createRestRequest(RestMethod.GET, \...
{ "fields": [ { "declarator": "HTTP_DATE_FORMAT = \"EEE, dd MMM yyyy HH:mm:ss zzz\"", "modifier": "public static final", "original_string": "public static final String HTTP_DATE_FORMAT = \"EEE, dd MMM yyyy HH:mm:ss zzz\";", "type": "String", "var_name": "HTTP_DATE_FORMAT" }, ...
{ "body": "public static GetOption getGetOption(RestRequest restRequest, GetOption defaultGetOption)\n throws RestServiceException {\n GetOption option = defaultGetOption == null ? GetOption.None : defaultGetOption;\n Object value = restRequest.getArgs().get(RestUtils.Headers.GET_OPTION);\n if (value !=...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_325
{ "fields": [ { "declarator": "findTokenHelper", "modifier": "private final", "original_string": "private final FindTokenHelper findTokenHelper;", "type": "FindTokenHelper", "var_name": "findTokenHelper" }, { "declarator": "clusterMap", "modifier": "private final"...
{ "body": "@Test\n public void validateRequestsTest() {\n // choose several replicas and make them in different states (there are 10 replicas on current node)\n List<ReplicaId> localReplicas = clusterMap.getReplicaIds(dataNodeId);\n Map<ReplicaState, ReplicaId> stateToReplica = new HashMap<>();\n int cnt...
{ "fields": [ { "declarator": "serverConfig", "modifier": "private final", "original_string": "private final ServerConfig serverConfig;", "type": "ServerConfig", "var_name": "serverConfig" }, { "declarator": "statsManager", "modifier": "private final", "orig...
{ "body": "@Override\n protected ServerErrorCode validateRequest(PartitionId partition, RequestOrResponseType requestType,\n boolean skipPartitionAndDiskAvailableCheck) {\n ServerErrorCode errorCode = super.validateRequest(partition, requestType, skipPartitionAndDiskAvailableCheck);\n if (errorCode != Ser...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_92
{ "fields": [ { "declarator": "PUT_RECORD_SIZE = 53", "modifier": "static final", "original_string": "static final int PUT_RECORD_SIZE = 53;", "type": "int", "var_name": "PUT_RECORD_SIZE" }, { "declarator": "MOCK_ID_STRING_LENGTH = 10", "modifier": "static final",...
{ "body": "@Test\n public void putErrorCasesTest() throws StoreException {\n // ID that exists\n // live\n verifyPutFailure(liveKeys.iterator().next(), StoreErrorCodes.Already_Exist);\n // expired\n verifyPutFailure(expiredKeys.iterator().next(), StoreErrorCodes.Already_Exist);\n // deleted\n ve...
{ "fields": [ { "declarator": "SEPARATOR = \"_\"", "modifier": "static final", "original_string": "static final String SEPARATOR = \"_\";", "type": "String", "var_name": "SEPARATOR" }, { "declarator": "BOOTSTRAP_FILE_NAME = \"bootstrap_in_progress\"", "modifier": ...
{ "body": "@Override\n public void put(MessageWriteSet messageSetToWrite) throws StoreException {\n checkStarted();\n if (messageSetToWrite.getMessageSetInfo().isEmpty()) {\n throw new IllegalArgumentException(\"Message write set cannot be empty\");\n }\n checkDuplicates(messageSetToWrite.getMessage...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_237
{ "fields": [ { "declarator": "nettyByteBufLeakHelper = new NettyByteBufLeakHelper()", "modifier": "private final", "original_string": "private final NettyByteBufLeakHelper nettyByteBufLeakHelper = new NettyByteBufLeakHelper();", "type": "NettyByteBufLeakHelper", "var_name": "nettyBy...
{ "body": "@Test\n public void testUpdateRecordV3() throws IOException, MessageFormatException {\n // Test update V3 record\n short accountId = Utils.getRandomShort(TestUtils.RANDOM);\n short containerId = Utils.getRandomShort(TestUtils.RANDOM);\n long updateTimeMs = SystemTime.getInstance().milliseconds...
{ "fields": [ { "declarator": "Version_Field_Size_In_Bytes = 2", "modifier": "public static final", "original_string": "public static final int Version_Field_Size_In_Bytes = 2;", "type": "int", "var_name": "Version_Field_Size_In_Bytes" }, { "declarator": "Crc_Size = 8",...
{ "body": "public static UpdateRecord deserializeUpdateRecord(InputStream stream) throws IOException, MessageFormatException {\n CrcInputStream crcStream = new CrcInputStream(stream);\n DataInputStream inputStream = new DataInputStream(crcStream);\n short version = inputStream.readShort();\n switch (versi...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_372
{ "fields": [ { "declarator": "GENERATED_CONTENT_SIZE = 10240", "modifier": "private static final", "original_string": "private static final int GENERATED_CONTENT_SIZE = 10240;", "type": "int", "var_name": "GENERATED_CONTENT_SIZE" }, { "declarator": "GENERATED_CONTENT_P...
{ "body": "@Test\n public void keepAliveTest() throws RestServiceException {\n NettyRequest request = createNettyRequest(HttpMethod.GET, \"/\", null, new MockChannel());\n // by default, keep-alive is true for HTTP 1.1\n assertTrue(\"Keep-alive not as expected\", request.isKeepAlive());\n\n HttpHeaders h...
{ "fields": [ { "declarator": "bufferWatermark = -1", "modifier": "static", "original_string": "static int bufferWatermark = -1;", "type": "int", "var_name": "bufferWatermark" }, { "declarator": "CLOSED_CHANNEL_EXCEPTION = new ClosedChannelException()", "modifier"...
{ "body": "protected boolean isKeepAlive() {\n return HttpUtil.isKeepAlive(request);\n }", "class_method_signature": "NettyRequest.isKeepAlive()", "constructor": false, "full_signature": "protected boolean isKeepAlive()", "identifier": "isKeepAlive", "invocations": [ "isKeepAlive" ], "modifiers"...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_108
{ "fields": [ { "declarator": "clusterName = \"main\"", "modifier": "private final", "original_string": "private final String clusterName = \"main\";", "type": "String", "var_name": "clusterName" }, { "declarator": "configProps = new Properties()", "modifier": "pr...
{ "body": "@Test\n public void testExpire() throws Exception {\n mockBlobExistence(true);\n AzureCloudDestination.UpdateResponse response =\n dataAccessor.updateBlobMetadata(blobId, Collections.singletonMap(\"expirationTime\", expirationTime),\n dummyCloudUpdateValidator);\n assertTrue(\"E...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(AzureBlobDataAccessor.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(AzureBlobDataAccessor.class);", "type": "Logger", "var_name": "logger" ...
{ "body": "public AzureCloudDestination.UpdateResponse updateBlobMetadata(BlobId blobId, Map<String, Object> updateFields,\n CloudUpdateValidator cloudUpdateValidator) throws Exception {\n Objects.requireNonNull(blobId, \"BlobId cannot be null\");\n updateFields.keySet()\n .forEach(field -> Objects....
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_221
{ "fields": [ { "declarator": "FRONTEND_CONFIG = new FrontendConfig(new VerifiableProperties(new Properties()))", "modifier": "private static final", "original_string": "private static final FrontendConfig FRONTEND_CONFIG = new FrontendConfig(new VerifiableProperties(new Properties()));", ...
{ "body": "@Test\n public void preProcessRequestTest() throws Exception {\n RestMethod[] methods =\n new RestMethod[]{RestMethod.POST, RestMethod.GET, RestMethod.DELETE, RestMethod.HEAD, RestMethod.OPTIONS,\n RestMethod.PUT};\n for (RestMethod restMethod : methods) {\n // add a header th...
{ "fields": [ { "declarator": "OPERATIONS = Collections.unmodifiableSet(\n Utils.getStaticFieldValuesAsStrings(Operations.class)\n .collect(Collectors.toCollection(() -> new TreeSet<>(String.CASE_INSENSITIVE_ORDER))))", "modifier": "static final", "original_string": "static final S...
{ "body": "@Override\n public void preProcessRequest(RestRequest restRequest, Callback<Void> callback) {\n Exception exception = null;\n frontendMetrics.securityServicePreProcessRequestRate.mark();\n long startTimeMs = System.currentTimeMillis();\n if (!isOpen) {\n exception = new RestServiceExcepti...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_84
{ "fields": [ { "declarator": "index = null", "modifier": "private", "original_string": "private MockIndex index = null;", "type": "MockIndex", "var_name": "index" }, { "declarator": "helper = null", "modifier": "private", "original_string": "private HardDel...
{ "body": "@Test\n public void performHardDeleteAndRecoveryFailureTest() throws Exception {\n MockId blobId01 = new MockId(\"id01\");\n MockId blobId02 = new MockId(\"id02\");\n MockId blobId03 = new MockId(\"id03\");\n MockId blobId04 = new MockId(\"id04\");\n\n helper.add(blobId01);\n helper.add(...
{ "fields": [ { "declarator": "Cleanup_Token_Version_V0 = 0", "modifier": "public static final", "original_string": "public static final short Cleanup_Token_Version_V0 = 0;", "type": "short", "var_name": "Cleanup_Token_Version_V0" }, { "declarator": "Cleanup_Token_Versi...
{ "body": "boolean hardDelete() throws StoreException {\n if (index.getCurrentEndOffset().compareTo(index.getStartOffset()) > 0) {\n final Timer.Context context = metrics.hardDeleteTime.time();\n try {\n FindInfo info =\n index.findDeletedEntriesSince(startToken, scanSizeInBytes, time.s...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_364
{ "fields": [ { "declarator": "nettyByteBufLeakHelper = new NettyByteBufLeakHelper()", "modifier": "private", "original_string": "private NettyByteBufLeakHelper nettyByteBufLeakHelper = new NettyByteBufLeakHelper();", "type": "NettyByteBufLeakHelper", "var_name": "nettyByteBufLeakHel...
{ "body": "@Test\n public void errorResponseTest() {\n EmbeddedChannel channel = createEmbeddedChannel();\n for (RestServiceErrorCode errorCode : RestServiceErrorCode.values()) {\n for (boolean includeExceptionMessageInResponse : new boolean[]{true, false}) {\n HttpHeaders httpHeaders = new Default...
{ "fields": [ { "declarator": "FAILURE_REASON_HEADER = \"x-ambry-failure-reason\"", "modifier": "static final", "original_string": "static final String FAILURE_REASON_HEADER = \"x-ambry-failure-reason\";", "type": "String", "var_name": "FAILURE_REASON_HEADER" }, { "decl...
{ "body": "@Override\n public void close() {\n close(new ClosedChannelException());\n }", "class_method_signature": "NettyResponseChannel.close()", "constructor": false, "full_signature": "@Override public void close()", "identifier": "close", "invocations": [ "close" ], "modifiers": "@Override...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_276
{ "fields": [], "file": "ambry-utils/src/test/java/com/github/ambry/utils/SimpleByteBufferPoolTest.java", "identifier": "SimpleByteBufferPoolTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testOneExpiredAnotherServed() throws Exception {\n final int size = 1024;\n final long capacity = 1024;\n final int numOfRequests = 3;\n final long[] blockTimeInMs = {10, 10, 1000};\n SimpleByteBufferPool pool = new SimpleByteBufferPool(capacity);\n CountDownLatch[] a...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(SimpleByteBufferPool.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(SimpleByteBufferPool.class);", "type": "Logger", "var_name": "logger" ...
{ "body": "public long availableMemory() {\n return availableMemory;\n }", "class_method_signature": "SimpleByteBufferPool.availableMemory()", "constructor": false, "full_signature": "public long availableMemory()", "identifier": "availableMemory", "invocations": [], "modifiers": "public", "paramete...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_299
{ "fields": [ { "declarator": "STATIC_FIELD_TEST_STRING = \"field1\"", "modifier": "static final", "original_string": "static final String STATIC_FIELD_TEST_STRING = \"field1\";", "type": "String", "var_name": "STATIC_FIELD_TEST_STRING" } ], "file": "ambry-utils/src/test/java...
{ "body": "@Test\n public void addSecondsToEpochTimeTest() {\n for (int i = 0; i < 5; i++) {\n long epochTimeInMs = SystemTime.getInstance().milliseconds() + TestUtils.RANDOM.nextInt(10000);\n long deltaInSecs = TestUtils.RANDOM.nextInt(10000);\n assertEquals(\"epoch epochTimeInMs mismatch \", epoc...
{ "fields": [ { "declarator": "Infinite_Time = -1", "modifier": "public static final", "original_string": "public static final long Infinite_Time = -1;", "type": "long", "var_name": "Infinite_Time" }, { "declarator": "MIN_PORT_NUM = 1", "modifier": "public static ...
{ "body": "public static long addSecondsToEpochTime(long epochTimeInMs, long deltaTimeInSeconds) {\n if (deltaTimeInSeconds == Infinite_Time || epochTimeInMs == Infinite_Time) {\n return Infinite_Time;\n }\n return epochTimeInMs + (TimeUnit.SECONDS.toMillis(deltaTimeInSeconds));\n }", "class_method_s...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_333
{ "fields": [ { "declarator": "ZK_CLIENT_CONNECT_ADDRESS = \"localhost:localport\"", "modifier": "private static final", "original_string": "private static final String ZK_CLIENT_CONNECT_ADDRESS = \"localhost:localport\";", "type": "String", "var_name": "ZK_CLIENT_CONNECT_ADDRESS" ...
{ "body": "@Test\n public void testRefresherUpdateWithBadRecord() throws Exception {\n Map<String, Map<String, Long>> expectedUsage = makeStorageUsageAndWriteToHelix(10, 10);\n storageUsageRefresher = new HelixStorageUsageRefresher(mockHelixStore, null, storageQuotaConfig);\n Map<String, Map<String, Long>> ...
{ "fields": [ { "declarator": "AGGREGATED_CONTAINER_STORAGE_USAGE_PATH = \"Aggregated_AccountReport\"", "modifier": "public static final", "original_string": "public static final String AGGREGATED_CONTAINER_STORAGE_USAGE_PATH = \"Aggregated_AccountReport\";", "type": "String", "var_n...
{ "body": "@Override\n public Map<String, Map<String, Long>> getContainerStorageUsage() {\n return Collections.unmodifiableMap(containerStorageUsageRef.get());\n }", "class_method_signature": "HelixStorageUsageRefresher.getContainerStorageUsage()", "constructor": false, "full_signature": "@Override public ...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_344
{ "fields": [ { "declarator": "CURRENT_XID = 64", "modifier": "static final", "original_string": "static final long CURRENT_XID = 64;", "type": "long", "var_name": "CURRENT_XID" }, { "declarator": "clusterNamePrefixInHelix = \"Ambry-\"", "modifier": "static final"...
{ "body": "@Test\n public void inconsistentReplicaCapacityTest() throws Exception {\n assumeTrue(listenCrossColo);\n clusterManager.close();\n metricRegistry = new MetricRegistry();\n String staticClusterName = \"TestOnly\";\n File tempDir = Files.createTempDirectory(\"helixClusterManagerTest\").toFil...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(HelixClusterManager.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(HelixClusterManager.class);", "type": "Logger", "var_name": "logger" }...
{ "body": "@Override\n public void close() {\n for (DcInfo dcInfo : dcToDcInfo.values()) {\n dcInfo.close();\n }\n dcToDcInfo.clear();\n }", "class_method_signature": "HelixClusterManager.close()", "constructor": false, "full_signature": "@Override public void close()", "identifier": "close", ...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_201
{ "fields": [ { "declarator": "CONTENT_SPLIT_PART_COUNT = 5", "modifier": "private static final", "original_string": "private static final int CONTENT_SPLIT_PART_COUNT = 5;", "type": "int", "var_name": "CONTENT_SPLIT_PART_COUNT" }, { "declarator": "READ_PART_COUNT = 4",...
{ "body": "@Test\n public void availableTest() throws Exception {\n int[] sizes = {0, 1024 * CONTENT_SPLIT_PART_COUNT};\n for (int size : sizes) {\n byte[] in = new byte[size];\n new Random().nextBytes(in);\n\n // channel with size and one piece of content.\n ReadableStreamChannel channel =...
{ "fields": [ { "declarator": "asyncWritableChannel = new ByteBufferAsyncWritableChannel()", "modifier": "private final", "original_string": "private final ByteBufferAsyncWritableChannel asyncWritableChannel = new ByteBufferAsyncWritableChannel();", "type": "ByteBufferAsyncWritableChannel"...
{ "body": "@Override\n public int available() {\n return currentChunk == null ? 0 : currentChunk.remaining();\n }", "class_method_signature": "ReadableStreamChannelInputStream.available()", "constructor": false, "full_signature": "@Override public int available()", "identifier": "available", "invocatio...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_128
{ "fields": [ { "declarator": "base64key = Base64.encodeBase64String(\"ambrykey\".getBytes())", "modifier": "private final", "original_string": "private final String base64key = Base64.encodeBase64String(\"ambrykey\".getBytes());", "type": "String", "var_name": "base64key" }, ...
{ "body": "@Test\n public void testUndeleteBlobNotFound() {\n BlobStorageException ex = mockStorageException(BlobErrorCode.BLOB_NOT_FOUND);\n when(mockBlockBlobClient.getPropertiesWithResponse(any(), any(), any())).thenThrow(ex);\n expectCloudStorageException(() -> azureDest.undeleteBlob(blobId, (short) 0, ...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(AzureCloudDestination.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(AzureCloudDestination.class);", "type": "Logger", "var_name": "logger" ...
{ "body": "@Override\n public short undeleteBlob(BlobId blobId, short lifeVersion, CloudUpdateValidator cloudUpdateValidator)\n throws CloudStorageException {\n Map<String, Object> updateFields = new HashMap<>();\n updateFields.put(CloudBlobMetadata.FIELD_LIFE_VERSION, lifeVersion);\n updateFields.put(...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_313
{ "fields": [ { "declarator": "clusterMap = new MockReadingClusterMap()", "modifier": "private final", "original_string": "private final ClusterMap clusterMap = new MockReadingClusterMap();", "type": "ClusterMap", "var_name": "clusterMap" }, { "declarator": "blobIdFacto...
{ "body": "@Test\n public void testGarbageInputStream() throws Exception {\n InputAndExpected inputAndExpected = new InputAndExpected(pairList.get(0), null, false);\n assertException(transformer.transform(inputAndExpected.getInput()), MessageFormatException.class);\n }", "class_method_signature": "BlobIdTra...
{ "fields": [ { "declarator": "storeKeyConverter", "modifier": "private final", "original_string": "private final StoreKeyConverter storeKeyConverter;", "type": "StoreKeyConverter", "var_name": "storeKeyConverter" }, { "declarator": "storeKeyFactory", "modifier": ...
{ "body": "@Override\n public TransformationOutput transform(Message message) {\n Message transformedMsg = null;\n try {\n Objects.requireNonNull(message, \"message must not be null\");\n Objects.requireNonNull(message.getMessageInfo(), \"message's messageInfo must not be null\");\n Objects.requ...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_256
{ "fields": [ { "declarator": "RANDOM = new Random()", "modifier": "private static final", "original_string": "private static final Random RANDOM = new Random();", "type": "Random", "var_name": "RANDOM" }, { "declarator": "ALPHABET = \"abcdefghijklmnopqrstuvwxyz\"", ...
{ "body": "@Test\n public void toSecondsPrecisionInMsTest() {\n assertEquals(0, RestUtils.toSecondsPrecisionInMs(999));\n assertEquals(1000, RestUtils.toSecondsPrecisionInMs(1000));\n assertEquals(1000, RestUtils.toSecondsPrecisionInMs(1001));\n }", "class_method_signature": "RestUtilsTest.toSecondsPreci...
{ "fields": [ { "declarator": "HTTP_DATE_FORMAT = \"EEE, dd MMM yyyy HH:mm:ss zzz\"", "modifier": "public static final", "original_string": "public static final String HTTP_DATE_FORMAT = \"EEE, dd MMM yyyy HH:mm:ss zzz\";", "type": "String", "var_name": "HTTP_DATE_FORMAT" }, ...
{ "body": "public static long toSecondsPrecisionInMs(long ms) {\n return ms - (ms % 1000);\n }", "class_method_signature": "RestUtils.toSecondsPrecisionInMs(long ms)", "constructor": false, "full_signature": "public static long toSecondsPrecisionInMs(long ms)", "identifier": "toSecondsPrecisionInMs", "i...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...
13870893_190
{ "fields": [ { "declarator": "GSE = new GeneralSecurityException(\"Exception to throw for tests\")", "modifier": "static final", "original_string": "static final GeneralSecurityException GSE = new GeneralSecurityException(\"Exception to throw for tests\");", "type": "GeneralSecurityExcept...
{ "body": "@Test\n public void testFailureOnAllConnects() throws Exception {\n requestAndResultsList.clear();\n requestAndResultsList.add(new RequestAndResult(chunkSize * 5));\n mockSelectorState.set(MockSelectorState.ThrowExceptionOnConnect);\n Exception expectedException = new RouterException(\"\", Rou...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(PutManager.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(PutManager.class);", "type": "Logger", "var_name": "logger" }, { "dec...
{ "body": "boolean isOpen() {\n return isOpen.get();\n }", "class_method_signature": "PutManager.isOpen()", "constructor": false, "full_signature": " boolean isOpen()", "identifier": "isOpen", "invocations": [ "get" ], "modifiers": "", "parameters": "()", "return": "boolean", "signature": ...
{ "created": "10/25/2013 8:04:54 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 13870893, "size": null, "stargazer_count": null, "stars": 1345, "updates": "2020-01-27T22:17:59+00:00", "url": "https://github.com/linkedin/ambry...