id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
97518356_218
{ "fields": [ { "declarator": "versionOption = new ImmutableVersionOption.Builder().setTag(\"1\").build()", "modifier": "private static final", "original_string": "private static final VersionOption versionOption = new ImmutableVersionOption.Builder().setTag(\"1\").build();", "type": "Vers...
{ "body": "@Test\n public void testIndexPutOptionNotSupportedEmpty() {\n KVStoreOptionUtility.checkIndexPutOptionIsNotUsed(new KVStore.PutOption[]{});\n }", "class_method_signature": "KVStoreOptionUtilityTest.testIndexPutOptionNotSupportedEmpty()", "constructor": false, "full_signature": "@Test public void...
{ "fields": [], "file": "services/datastore/src/main/java/com/dremio/datastore/api/options/KVStoreOptionUtility.java", "identifier": "KVStoreOptionUtility", "interfaces": "", "methods": [ { "class_method_signature": "KVStoreOptionUtility.validateOptions(KVStore.KVStoreOption... options)", "con...
{ "body": "public static void checkIndexPutOptionIsNotUsed(KVStore.KVStoreOption... options) {\n if (null == options || options.length == 0) {\n return;\n }\n\n for (KVStore.KVStoreOption option : options) {\n if (option instanceof IndexPutOption) {\n throw new IllegalArgumentException(\"Ind...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_648
{ "fields": [ { "declarator": "TEST_RPC_TIMEOUT_MS = 100", "modifier": "private static final", "original_string": "private static final int TEST_RPC_TIMEOUT_MS = 100;", "type": "int", "var_name": "TEST_RPC_TIMEOUT_MS" }, { "declarator": "logger = org.slf4j.LoggerFactory...
{ "body": "@Test\n public void testMkdirsWithValidPathButNotCreated() throws Exception {\n setupRPC(\n DFS.RpcType.MKDIRS_REQUEST, DFS.MkdirsRequest.newBuilder().setPath(\"/foo/bar\").setPermission(0755).build(),\n DFS.RpcType.MKDIRS_RESPONSE, DFS.MkdirsResponse.newBuilder().setValue(false).build())...
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(RemoteNodeFileSystem.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(RemoteNodeFileSystem.class);", "type": "org.slf4j...
{ "body": "@Override\n public boolean mkdirs(Path f, FsPermission permission) throws IOException {\n Path absolutePath = toAbsolutePath(f);\n checkPath(absolutePath);\n\n final MkdirsCommand command = new MkdirsCommand(\n absolutePath.toUri().getPath(),\n permission != null ? (int) permission....
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_97
{ "fields": [ { "declarator": "inputHost", "modifier": "private final", "original_string": "private final String inputHost;", "type": "String", "var_name": "inputHost" }, { "declarator": "expectedHost", "modifier": "private final", "original_string": "privat...
{ "body": "@Test\n public void verifyHeaders() {\n final Response response = resource.buildResponseWithHost(Response.ok(), inputHost).build();\n if (expectedHost == null) {\n assertFalse(response.getHeaders().containsKey(WebServer.X_DREMIO_HOSTNAME));\n return;\n }\n assertEquals(expectedHost, ...
{ "fields": [ { "declarator": "namespace", "modifier": "private final", "original_string": "private final NamespaceService namespace;", "type": "NamespaceService", "var_name": "namespace" }, { "declarator": "optionManager", "modifier": "private final", "orig...
{ "body": "@VisibleForTesting\n Response.ResponseBuilder buildResponseWithHost(Response.ResponseBuilder builder, String host) {\n if (host == null) {\n return builder;\n }\n\n final String hostOnly;\n final int portIndex = host.indexOf(\":\");\n if (portIndex == -1) {\n hostOnly = host;\n ...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_78
{ "fields": [ { "declarator": "recommender = new ExtractRecommender()", "modifier": "private", "original_string": "private ExtractRecommender recommender = new ExtractRecommender();", "type": "ExtractRecommender", "var_name": "recommender" } ], "file": "dac/backend/src/test/j...
{ "body": "@Test\n public void testRecommendCharacterGroup() {\n List<ExtractRule> cards = recommender.recommendCharacterGroup(new Selection(\"col\", \"abc def,ghi\", 4, 3));\n assertEquals(1, cards.size());\n assertEquals(pattern, cards.get(0).getType());\n ExtractRulePattern pattern = cards.get(0).getP...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(ExtractRecommender.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(ExtractRecommender.class);", "type": "Logger", "var_name": "logger" } ...
{ "body": "List<ExtractRule> recommendCharacterGroup(Selection selection) {\n List<ExtractRule> rules = new ArrayList<>();\n String cellText = selection.getCellText();\n int start = selection.getOffset();\n int end = start + selection.getLength();\n String selected = cellText.substring(start, end);\n ...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_326
{ "fields": [ { "declarator": "dummyEndpoint = NodeEndpoint\n .newBuilder()\n .setAddress(\"test\")\n .build()", "modifier": "", "original_string": "NodeEndpoint dummyEndpoint = NodeEndpoint\n .newBuilder()\n .setAddress(\"test\")\n .build();", "type": "NodeEndpoint", ...
{ "body": "@Test\n public void multiAttrsInSamePOP() throws Exception {\n PlanFragmentsIndex.Builder indexBuilder = new PlanFragmentsIndex.Builder();\n MinorDataSerDe serDe = new MinorDataSerDe(null, null);\n MinorDataWriter writer = new MinorDataWriter(null, dummyEndpoint, serDe, indexBuilder);\n\n Mock...
{ "fields": [ { "declarator": "handle", "modifier": "private final", "original_string": "private final FragmentHandle handle;", "type": "FragmentHandle", "var_name": "handle" }, { "declarator": "index", "modifier": "private final", "original_string": "privat...
{ "body": "public ByteString readProtoEntry(OpProps props, String key) throws Exception {\n return attrsMap.getAttrValue(props, key);\n }", "class_method_signature": "MinorDataReader.readProtoEntry(OpProps props, String key)", "constructor": false, "full_signature": "public ByteString readProtoEntry(OpProps...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_263
{ "fields": [], "file": "services/namespace/src/test/java/com/dremio/service/namespace/file/TestFileFormat.java", "identifier": "TestFileFormat", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testFieldDelimiterTextFile() throws Exception {\n TextFileConfig fileFormat = new TextFileConfig();\n fileFormat.setFieldDelimiter(\"@\");\n String tableOptions = fileFormat.toTableOptions();\n assertContains(\"fieldDelimiter => '@'\", tableOptions);\n }", "class_method_...
{ "fields": [ { "declarator": "buffer = LinkedBuffer.allocate(512)", "modifier": "@JsonIgnore\n private final", "original_string": "@JsonIgnore\n private final LinkedBuffer buffer = LinkedBuffer.allocate(512);", "type": "LinkedBuffer", "var_name": "buffer" }, { "decla...
{ "body": "public String toTableOptions() throws IllegalArgumentException {\n final StringBuilder stringBuilder = new StringBuilder();\n switch (getFileType()) {\n case TEXT:\n case CSV:\n case TSV:\n case PSV:\n final TextFileConfig textFileConfig = (TextFileConfig)this;\n str...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_633
{ "fields": [ { "declarator": "authTokenProvider =\n new AzureSharedKeyAuthTokenProvider(\"mock-account\", Base64.encode(\"mock-key\".getBytes()))", "modifier": "private final", "original_string": "private final AzureSharedKeyAuthTokenProvider authTokenProvider =\n new AzureSharedKeyAuthTo...
{ "body": "@Test\n public void testIsCloseToExpiry() {\n assertFalse(\"Shared key token never expires\", authTokenProvider.isCloseToExpiry());\n }", "class_method_signature": "TestAzureSharedKeyAuthTokenProvider.testIsCloseToExpiry()", "constructor": false, "full_signature": "@Test public void testIsCloseT...
{ "fields": [ { "declarator": "storageSharedKeyCredential", "modifier": "private final", "original_string": "private final StorageSharedKeyCredential storageSharedKeyCredential;", "type": "StorageSharedKeyCredential", "var_name": "storageSharedKeyCredential" } ], "file": "plu...
{ "body": "@Override\n public boolean isCloseToExpiry() {\n return false;\n }", "class_method_signature": "AzureSharedKeyAuthTokenProvider.isCloseToExpiry()", "constructor": false, "full_signature": "@Override public boolean isCloseToExpiry()", "identifier": "isCloseToExpiry", "invocations": [], "mod...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_408
{ "fields": [ { "declarator": "lpp", "modifier": "private static", "original_string": "private static LogicalPlanPersistence lpp;", "type": "LogicalPlanPersistence", "var_name": "lpp" }, { "declarator": "optionValidatorListing", "modifier": "private static", ...
{ "body": "@Test\n public void testGetDefaultOptions() throws Exception {\n OptionManager optionManager = OptionManagerWrapper.Builder.newBuilder()\n .withOptionValidatorProvider(optionValidatorListing)\n .withOptionManager(defaultOptionManager)\n .withOptionManager(systemOptionManager)\n .wit...
{ "fields": [ { "declarator": "optionManagers", "modifier": "private final", "original_string": "private final List<OptionManager> optionManagers;", "type": "List<OptionManager>", "var_name": "optionManagers" }, { "declarator": "optionValidatorListing", "modifier"...
{ "body": "@Override\n public OptionList getDefaultOptions() {\n final OptionList optionList = new OptionList();\n for (OptionManager optionManager : optionManagers) {\n OptionList defaultOptions = optionManager.getDefaultOptions();\n optionList.merge(defaultOptions);\n }\n return optionList;\n...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_721
{ "fields": [ { "declarator": "properties = new TemporarySystemProperties()", "modifier": "@Rule\n public final", "original_string": "@Rule\n public final TemporarySystemProperties properties = new TemporarySystemProperties();", "type": "TemporarySystemProperties", "var_name": "pro...
{ "body": "@Test\n public void testMemorySplit() throws Exception {\n assumeNonMaprProfile();\n try (\n final LegacyKVStoreProvider kvstore =\n LegacyKVStoreProviderAdapter.inMemory(DremioTest.CLASSPATH_SCAN_RESULT)) {\n SingletonRegistry registry = new SingletonRegistry();\n registry.bin...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(YarnService.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(YarnService.class);", "type": "Logger", "var_name": "logger" }, { "d...
{ "body": "@Override\n public ClusterEnriched startCluster(Cluster cluster) throws YarnProvisioningHandlingException {\n Preconditions.checkArgument(cluster.getState() != ClusterState.RUNNING);\n return startClusterAsync(cluster);\n }", "class_method_signature": "YarnService.startCluster(Cluster cluster)", ...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_371
{ "fields": [ { "declarator": "schema", "modifier": "private", "original_string": "private Schema schema;", "type": "Schema", "var_name": "schema" }, { "declarator": "folder = new TemporaryFolder()", "modifier": "@Rule\n public", "original_string": "@Rule\n...
{ "body": "@Test\n public void testLongSpec() throws Exception{\n String columnName = \"id\";\n Long expectedValue = 123L;\n PartitionSpec partitionSpec = PartitionSpec\n .builderFor(schema)\n .identity(columnName)\n .build();\n\n IcebergPartitionData icebergPartitionData = new IcebergPart...
{ "fields": [ { "declarator": "partitionType", "modifier": "private final", "original_string": "private final Types.StructType partitionType;", "type": "Types.StructType", "var_name": "partitionType" }, { "declarator": "size", "modifier": "private final", "o...
{ "body": "public void setLong(int position, Long value) {\n set(position, value);\n }", "class_method_signature": "IcebergPartitionData.setLong(int position, Long value)", "constructor": false, "full_signature": "public void setLong(int position, Long value)", "identifier": "setLong", "invocations": [ ...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_664
{ "fields": [ { "declarator": "REMOTE_ENDPOINT_1 = newNodeEndpoint(\"10.0.0.2\", 1234)", "modifier": "private static final", "original_string": "private static final NodeEndpoint REMOTE_ENDPOINT_1 = newNodeEndpoint(\"10.0.0.2\", 1234);", "type": "NodeEndpoint", "var_name": "REMOTE_EN...
{ "body": "@Test\n public void testListStatusWithUnknownRemotePath() throws IOException {\n Path path = new Path(\"/foo/10.0.0.3@bar\");\n try {\n fs.listStatus(path);\n fail(\"Expected getFileStatus to throw FileNotFoundException\");\n } catch (FileNotFoundException e) {\n // ok\n }\n }"...
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(PseudoDistributedFileSystem.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(PseudoDistributedFileSystem.class);", "typ...
{ "body": "@Override\n public FileStatus[] listStatus(Path f) throws FileNotFoundException, IOException {\n final RemoteIterator<FileStatus> remoteIterator = listStatusIterator(f);\n\n // Note: RemoteIterator has no relation to java.util.Iterator so frequently used\n // helper functions can't be called on t...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_234
{ "fields": [], "file": "services/accelerator/src/test/java/com/dremio/service/reflection/TestReflectionManager.java", "identifier": "TestReflectionManager", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void handleGoalWithEntryButNothingHasChanged(){\n ReflectionId reflectionId = new ReflectionId(\"r_id\");\n ReflectionGoalHash reflectionGoalHash = new ReflectionGoalHash(\"MY_HASH\");\n String reflectionGoalName = \"name\";\n String dataSetId = \"dataSetId\";\n ReflectionGoa...
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(ReflectionManager.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(ReflectionManager.class);", "type": "org.slf4j.Logge...
{ "body": "@VisibleForTesting\n void handleGoal(ReflectionGoal goal) {\n final ReflectionEntry entry = reflectionStore.get(goal.getId());\n if (entry == null) {\n // no corresponding reflection, goal has been created or enabled\n if (goal.getState() == ReflectionGoalState.ENABLED) { // we still need ...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_3
{ "fields": [ { "declarator": "thrown = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();", "type": "ExpectedException", "var_name": "thrown" }, { "declarator": "kvstore =\n...
{ "body": "@Test\n public void testNoDuplicateUUID() throws Exception {\n DACConfig dacConfig = DACConfig.newConfig();\n Upgrade upgrade = new Upgrade(dacConfig, CLASSPATH_SCAN_RESULT, false);\n\n List<? extends UpgradeTask> tasks = upgrade.getUpgradeTasks();\n Set<String> uuidToCount = new HashSet<>();\...
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(Upgrade.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(Upgrade.class);", "type": "org.slf4j.Logger", "var_name"...
{ "body": "@VisibleForTesting\n List<? extends UpgradeTask> getUpgradeTasks() {\n return upgradeTasks;\n }", "class_method_signature": "Upgrade.getUpgradeTasks()", "constructor": false, "full_signature": "@VisibleForTesting List<? extends UpgradeTask> getUpgradeTasks()", "identifier": "getUpgradeTasks", ...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_39
{ "fields": [ { "declarator": "context", "modifier": "private final", "original_string": "private final DatabindContext context;", "type": "DatabindContext", "var_name": "context" }, { "declarator": "inputValue", "modifier": "private final", "original_string...
{ "body": "@Test\n public void test() {\n Mockito.when(context.getAttribute(DataJsonOutput.DREMIO_JOB_DATA_NUMBERS_AS_STRINGS_ATTRIBUTE)).thenReturn(this.inputValue);\n assertEquals(this.expectedValue, DataJsonOutput.isNumberAsString(context));\n }", "class_method_signature": "TestDataJsonOutput.tes...
{ "fields": [ { "declarator": "FORMAT_DATE = DateFunctionsUtils.getSQLFormatterForFormatString(\"YYYY-MM-DD\").withZoneUTC()", "modifier": "public static final", "original_string": "public static final DateTimeFormatter FORMAT_DATE = DateFunctionsUtils.getSQLFormatterForFormatString(\"YYYY-MM-DD...
{ "body": "public static final boolean isNumberAsString(DatabindContext context) {\n Object attr = context.getAttribute(DataJsonOutput.DREMIO_JOB_DATA_NUMBERS_AS_STRINGS_ATTRIBUTE);\n return attr instanceof Boolean && ((Boolean)attr).booleanValue();\n }", "class_method_signature": "DataJsonOutput.isNumberAsS...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_367
{ "fields": [ { "declarator": "allocator", "modifier": "protected", "original_string": "protected BufferAllocator allocator;", "type": "BufferAllocator", "var_name": "allocator" }, { "declarator": "allocatorRule = AllocatorRule.defaultAllocator()", "modifier": "@R...
{ "body": "@Test\n public void testCopyUtf8() throws Exception {\n testCopyUtf8Helper(new byte[] {'g', 'o', 'o', 'd', 'v', 'a', 'l'}, \"goodval\");\n testCopyUtf8Helper(new byte[] {'b', 'a', 'd', (byte)0xff, 'v', 'a', 'l'}, \"badval\");\n testCopyUtf8Helper(new byte[] {(byte)0xf9, 'g', 'o', 'o', 'd', ' ', '...
{ "fields": [], "file": "sabot/kernel/src/main/java/com/dremio/exec/expr/fn/impl/StringFunctionUtil.java", "identifier": "StringFunctionUtil", "interfaces": "", "methods": [ { "class_method_signature": "StringFunctionUtil.getUTF8CharLength(ByteBuf buffer, int start, int end, final FunctionErrorConte...
{ "body": "public static int copyUtf8(ByteBuf in, final int start, final int end, ArrowBuf out) {\n int i = 0;\n int errBytes = 0;\n while (start + i < end) {\n // Optimize for long runs of ASCII sequences\n byte b = in.getByte(start + i);\n if (b >= 0) {\n out.setByte(i - errBytes, b);...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_222
{ "fields": [ { "declarator": "versionOption = new ImmutableVersionOption.Builder().setTag(\"1\").build()", "modifier": "private static final", "original_string": "private static final VersionOption versionOption = new ImmutableVersionOption.Builder().setTag(\"1\").build();", "type": "Vers...
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void testIndexPutOptionNotSupportedIndexPutOptionFound() {\n KVStoreOptionUtility.checkIndexPutOptionIsNotUsed(new KVStore.PutOption[]{indexPutOption});\n }", "class_method_signature": "KVStoreOptionUtilityTest.testIndexPutOptionNotSupportedI...
{ "fields": [], "file": "services/datastore/src/main/java/com/dremio/datastore/api/options/KVStoreOptionUtility.java", "identifier": "KVStoreOptionUtility", "interfaces": "", "methods": [ { "class_method_signature": "KVStoreOptionUtility.validateOptions(KVStore.KVStoreOption... options)", "con...
{ "body": "public static void checkIndexPutOptionIsNotUsed(KVStore.KVStoreOption... options) {\n if (null == options || options.length == 0) {\n return;\n }\n\n for (KVStore.KVStoreOption option : options) {\n if (option instanceof IndexPutOption) {\n throw new IllegalArgumentException(\"Ind...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_388
{ "fields": [], "file": "sabot/kernel/src/test/java/com/dremio/exec/store/StoragePluginUtilsTest.java", "identifier": "StoragePluginUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGenerateSourceErrorMessageFromFormatString() {\n final String sourceName = \"test-source\";\n final String errorFmtString = \"Returned status code %s from cluster\";\n Assert.assertEquals(\"Source 'test-source' returned error 'Returned status code 500 from cluster'\",\n ...
{ "fields": [], "file": "sabot/kernel/src/main/java/com/dremio/exec/store/StoragePluginUtils.java", "identifier": "StoragePluginUtils", "interfaces": "", "methods": [ { "class_method_signature": "StoragePluginUtils.StoragePluginUtils()", "constructor": true, "full_signature": "private S...
{ "body": "public static String generateSourceErrorMessage(final String storagePluginName, String errorMessage) {\n return String.format(\"Source '%s' returned error '%s'\", storagePluginName, errorMessage);\n }", "class_method_signature": "StoragePluginUtils.generateSourceErrorMessage(final String storagePlugi...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_672
{ "fields": [ { "declarator": "REMOTE_ENDPOINT_1 = newNodeEndpoint(\"10.0.0.2\", 1234)", "modifier": "private static final", "original_string": "private static final NodeEndpoint REMOTE_ENDPOINT_1 = newNodeEndpoint(\"10.0.0.2\", 1234);", "type": "NodeEndpoint", "var_name": "REMOTE_EN...
{ "body": "@Test\n public void testCreateLocalFile() throws IOException {\n try {\n Path path = new Path(\"foo/bar/file\");\n @SuppressWarnings(\"unused\")\n FSDataOutputStream fdos = fs.create(path, FsPermission.getFileDefault(), true, 0, (short) 1, 4096, null);\n fail(\"Expected create call ...
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(PseudoDistributedFileSystem.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(PseudoDistributedFileSystem.class);", "typ...
{ "body": "@Override\n public FSDataOutputStream create(Path f, FsPermission permission, boolean overwrite, int bufferSize,\n short replication, long blockSize, Progressable progress) throws IOException {\n final Path absolutePath = toAbsolutePath(f);\n checkPath(absolutePath);\n\n // Handle root\n ...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_81
{ "fields": [ { "declarator": "table = \"\\\"cp\\\".\\\"tpch/supplier.parquet\\\"\"", "modifier": "private static", "original_string": "private static String table = \"\\\"cp\\\".\\\"tpch/supplier.parquet\\\"\";", "type": "String", "var_name": "table" }, { "declarator":...
{ "body": "@Test\n public void selectConstantNested() {\n final String query = \"SELECT * FROM (SELECT 87539319 AS special ORDER BY 1 LIMIT 1)\";\n final VirtualDatasetState ds = extract(getQueryFromSQL(query));\n assertEquals(new VirtualDatasetState()\n .setFrom(new FromSQL(query).setAlias(\"nested_...
{ "fields": [], "file": "dac/backend/src/main/java/com/dremio/dac/explore/QuerySemantics.java", "identifier": "QuerySemantics", "interfaces": "", "methods": [ { "class_method_signature": "QuerySemantics.QuerySemantics()", "constructor": true, "full_signature": "private QuerySemantics()"...
{ "body": "public static VirtualDatasetState extract(QueryMetadata metadata) {\n final com.dremio.service.jobs.metadata.proto.VirtualDatasetState pState = metadata.getState();\n final VirtualDatasetState state = new VirtualDatasetState();\n if (pState.hasFrom()) {\n state.setFrom(fromBuf(pState.getFrom(...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_449
{ "fields": [ { "declarator": "instance =\n new DayOfWeekFromSundayDateTimeField(\n ISOChronology.getInstanceUTC(),\n ISOChronology.getInstanceUTC().days())", "modifier": "private static final", "original_string": "private static final DayOfWeekFromSundayDateTimeField inst...
{ "body": "@Test\n public void getAsShortText() {\n assertTrue(\"Sun\".equalsIgnoreCase(instance.getAsShortText(1526173261000L)));\n assertTrue(\"Mon\".equalsIgnoreCase(instance.getAsShortText(1526259661000L)));\n assertTrue(\"Sat\".equalsIgnoreCase(instance.getAsShortText(1526086861000L)));\n }", "class...
{ "fields": [ { "declarator": "serialVersionUID = 8020294841735395909L", "modifier": "@SuppressWarnings(\"unused\")\n private static final", "original_string": "@SuppressWarnings(\"unused\")\n private static final long serialVersionUID = 8020294841735395909L;", "type": "long", "var...
{ "body": "@Override\n public String getAsShortText(int fieldValue, Locale locale) {\n return chronology.dayOfWeek().getAsShortText(reverse(fieldValue), locale);\n }", "class_method_signature": "DayOfWeekFromSundayDateTimeField.getAsShortText(int fieldValue, Locale locale)", "constructor": false, "full_sig...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_330
{ "fields": [ { "declarator": "typeFactory = SqlTypeFactoryImpl.INSTANCE", "modifier": "private final", "original_string": "private final RelDataTypeFactory typeFactory = SqlTypeFactoryImpl.INSTANCE;", "type": "RelDataTypeFactory", "var_name": "typeFactory" } ], "file": "sabo...
{ "body": "@Test\n public void testAreRowTypesEqualIgnoresNullability() {\n final RelDataType type1 = typeFactory.createStructType(\n asList(\n typeFactory.createSqlType(SqlTypeName.INTEGER),\n typeFactory.createSqlType(SqlTypeName.DOUBLE),\n typeFactory.createSqlType(SqlTypeName.TIMESTA...
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(MaterializationExpander.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(MaterializationExpander.class);", "type": "org...
{ "body": "@VisibleForTesting\n static boolean areRowTypesEqual(RelDataType rowType1, RelDataType rowType2) {\n if (rowType1 == rowType2) {\n return true;\n }\n\n if (rowType2.getFieldCount() != rowType1.getFieldCount()) {\n return false;\n }\n\n final List<RelDataTypeField> f1...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_625
{ "fields": [], "file": "plugins/azure/src/test/java/com/dremio/plugins/azure/TestAzureAsyncContainerProvider.java", "identifier": "TestAzureAsyncContainerProvider", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testListContainers() throws IOException, ExecutionException, InterruptedException {\n AsyncHttpClient client = mock(AsyncHttpClient.class);\n Response response = mock(Response.class);\n when(response.getHeader(any(String.class))).thenReturn(\"\");\n HttpResponseStatus statu...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(AzureAsyncContainerProvider.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(AzureAsyncContainerProvider.class);", "type": "Logger", "var_name"...
{ "body": "@Override\n public Stream<ContainerFileSystem.ContainerCreator> getContainerCreators() {\n Iterator<String> containerIterator = new DFSContainerIterator(asyncHttpClient, account, authProvider, isSecure, retryer);\n return StreamSupport.stream(Spliterators.spliteratorUnknownSize(containerIterator, Sp...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_275
{ "fields": [], "file": "services/namespace/src/test/java/com/dremio/service/namespace/file/TestFileFormat.java", "identifier": "TestFileFormat", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testExtractHeaderExcelFile() throws Exception {\n ExcelFileConfig fileFormat = new ExcelFileConfig();\n fileFormat.setExtractHeader(true);\n String tableOptions = fileFormat.toTableOptions();\n assertContains(\"type => 'excel'\", tableOptions);\n assertContains(\"xls => ...
{ "fields": [ { "declarator": "buffer = LinkedBuffer.allocate(512)", "modifier": "@JsonIgnore\n private final", "original_string": "@JsonIgnore\n private final LinkedBuffer buffer = LinkedBuffer.allocate(512);", "type": "LinkedBuffer", "var_name": "buffer" }, { "decla...
{ "body": "public String toTableOptions() throws IllegalArgumentException {\n final StringBuilder stringBuilder = new StringBuilder();\n switch (getFileType()) {\n case TEXT:\n case CSV:\n case TSV:\n case PSV:\n final TextFileConfig textFileConfig = (TextFileConfig)this;\n str...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_202
{ "fields": [ { "declarator": "parentSpan", "modifier": "private", "original_string": "private Span parentSpan;", "type": "Span", "var_name": "parentSpan" }, { "declarator": "parentScope", "modifier": "private", "original_string": "private Scope parentScope;...
{ "body": "@Test\n public void testVoidReturnMethod() {\n setupLegitParentSpan();\n\n underTest.delete(\"byebye\");\n\n verify(delegate).delete(\"byebye\");\n assertChildSpanMethod(\"delete\");\n }", "class_method_signature": "TestTracingKVStore.testVoidReturnMethod()", "constructor": false, "full...
{ "fields": [ { "declarator": "METHOD_TAG = \"method\"", "modifier": "public static final", "original_string": "public static final String METHOD_TAG = \"method\";", "type": "String", "var_name": "METHOD_TAG" }, { "declarator": "TABLE_TAG = \"table\"", "modifier":...
{ "body": "@Override\n public void delete(K key, DeleteOption... options) {\n trace(\"delete\", () -> delegate.delete(key, options));\n }", "class_method_signature": "TracingKVStore.delete(K key, DeleteOption... options)", "constructor": false, "full_signature": "@Override public void delete(K key, DeleteO...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_652
{ "fields": [ { "declarator": "TEST_RPC_TIMEOUT_MS = 100", "modifier": "private static final", "original_string": "private static final int TEST_RPC_TIMEOUT_MS = 100;", "type": "int", "var_name": "TEST_RPC_TIMEOUT_MS" }, { "declarator": "logger = org.slf4j.LoggerFactory...
{ "body": "@Test\n public void testRenameWithInvalidPath() throws Exception {\n setupRPC(\n DFS.RpcType.RENAME_REQUEST, DFS.RenameRequest.newBuilder().setOldpath(\"/foo/bar\").setNewpath(\"/foo/bar2\").build(),\n DFS.RenameResponse.class, newRPCException(LOCAL_ENDPOINT, new FileNotFoundException(\"F...
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(RemoteNodeFileSystem.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(RemoteNodeFileSystem.class);", "type": "org.slf4j...
{ "body": "@Override\n public boolean rename(Path src, Path dst) throws IOException {\n Path absoluteSrc = toAbsolutePath(src);\n Path absoluteDst = toAbsolutePath(dst);\n checkPath(absoluteSrc);\n checkPath(absoluteDst);\n\n final RenameCommand command = new RenameCommand(absoluteSrc.toUri().getPath(...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_347
{ "fields": [ { "declarator": "traits = RelTraitSet.createEmpty().plus(Prel.PHYSICAL)", "modifier": "private static final", "original_string": "private static final RelTraitSet traits = RelTraitSet.createEmpty().plus(Prel.PHYSICAL);", "type": "RelTraitSet", "var_name": "traits" }...
{ "body": "@Test\n public void simpleSelectWithLimitWithSoftScanWithLeafLimitsEnabled() {\n OptionValue optionEnabled = OptionValue.createBoolean(OptionValue.OptionType.QUERY, PlannerSettings.ENABLE_LEAF_LIMITS.getOptionName(), true);\n when(optionManager.getOption(PlannerSettings.ENABLE_LEAF_LIMITS.getOptionN...
{ "fields": [], "file": "sabot/kernel/src/main/java/com/dremio/exec/planner/physical/visitor/SimpleLimitExchangeRemover.java", "identifier": "SimpleLimitExchangeRemover", "interfaces": "", "methods": [ { "class_method_signature": "SimpleLimitExchangeRemover.apply(PlannerSettings settings, Prel input...
{ "body": "public static Prel apply(PlannerSettings settings, Prel input){\n if(!settings.isTrivialSingularOptimized() || settings.isLeafLimitsEnabled()) {\n return input;\n }\n\n if(input.accept(new Identifier(), false)){\n return input.accept(new AllExchangeRemover(), null);\n }\n return in...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_717
{ "fields": [ { "declarator": "properties = new TemporarySystemProperties()", "modifier": "@Rule\n public final", "original_string": "@Rule\n public final TemporarySystemProperties properties = new TemporarySystemProperties();", "type": "TemporarySystemProperties", "var_name": "pro...
{ "body": "@Test\n public void testDistroMapRDefaults() throws Exception {\n assumeNonMaprProfile();\n\n YarnController controller = Mockito.mock(YarnController.class);\n YarnService yarnService = new YarnService(new TestListener(), controller, Mockito.mock(NodeProvider.class));\n\n properties.clear(MAPR...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(YarnService.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(YarnService.class);", "type": "Logger", "var_name": "logger" }, { "d...
{ "body": "@VisibleForTesting\n protected String updateYarnConfiguration(Cluster cluster, YarnConfiguration yarnConfiguration) {\n String rmAddress = null;\n // make sure we set defaults first - before we overwrite it with props from ClusterConfig\n setYarnDefaults(cluster, yarnConfiguration);\n List<Pro...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_19
{ "fields": [ { "declarator": "queryProfile = null", "modifier": "private static", "original_string": "private static UserBitShared.QueryProfile queryProfile = null;", "type": "UserBitShared.QueryProfile", "var_name": "queryProfile" }, { "declarator": "dacConfig = DACC...
{ "body": "@Test\n public void testOffline() throws Exception {\n final String tmpPath = folder0.newFolder(\"testOffline\").getAbsolutePath();\n final LegacyKVStoreProvider localKVStoreProvider = l(LegacyKVStoreProvider.class);\n\n final LegacyKVStoreProvider spy = spy(localKVStoreProvider);\n Mockito.do...
{ "fields": [ { "declarator": "isTimeSet = true", "modifier": "private static", "original_string": "private static boolean isTimeSet = true;", "type": "boolean", "var_name": "isTimeSet" } ], "file": "dac/daemon/src/main/java/com/dremio/dac/cmd/ExportProfiles.java", "identif...
{ "body": "private static void exportOffline(ExportProfilesOptions options, DACConfig dacConfig)\n throws Exception {\n Optional<LocalKVStoreProvider> providerOptional = CmdUtils.getKVStoreProvider(dacConfig.getConfig());\n if (!providerOptional.isPresent()) {\n AdminLogger.log(\"No database found. Prof...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_594
{ "fields": [], "file": "client/jdbc/src/test/java/com/dremio/jdbc/impl/TypeConvertingSqlAccessorTest.java", "identifier": "TypeConvertingSqlAccessorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void test_getLong_on_TINYINT_getsIt() throws InvalidAccessException {\n final SqlAccessor uut1 =\n new TypeConvertingSqlAccessor( new TinyIntStubAccessor( (byte) 127 ) );\n assertThat( uut1.getLong( 0 ), equalTo( 127L ) );\n final SqlAccessor uut2 =\n new TypeConverti...
{ "fields": [ { "declarator": "innerAccessor", "modifier": "private final", "original_string": "private final SqlAccessor innerAccessor;", "type": "SqlAccessor", "var_name": "innerAccessor" } ], "file": "client/jdbc/src/main/java/com/dremio/jdbc/impl/TypeConvertingSqlAccessor...
{ "body": "@Override\n public long getLong( int rowOffset ) throws InvalidAccessException {\n final long result;\n switch ( getType().getMinorType() ) {\n // 1. Regular type:\n case BIGINT:\n result = innerAccessor.getLong( rowOffset );\n break;\n\n // 2. Converted-from types:\n ...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_605
{ "fields": [], "file": "client/jdbc/src/test/java/com/dremio/jdbc/impl/TypeConvertingSqlAccessorTest.java", "identifier": "TypeConvertingSqlAccessorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void test_getDouble_on_FLOAT_getsIt() throws InvalidAccessException {\n final SqlAccessor uut1 =\n new TypeConvertingSqlAccessor( new FloatStubAccessor( 6.02e23f ) );\n assertThat( uut1.getDouble( 0 ), equalTo( (double) 6.02e23f ) );\n final SqlAccessor uut2 =\n new T...
{ "fields": [ { "declarator": "innerAccessor", "modifier": "private final", "original_string": "private final SqlAccessor innerAccessor;", "type": "SqlAccessor", "var_name": "innerAccessor" } ], "file": "client/jdbc/src/main/java/com/dremio/jdbc/impl/TypeConvertingSqlAccessor...
{ "body": "@Override\n public double getDouble( int rowOffset ) throws InvalidAccessException {\n final double result;\n switch ( getType().getMinorType() ) {\n // 1. Regular type:\n case FLOAT8:\n result = innerAccessor.getDouble( rowOffset );\n break;\n\n // 2. Converted-from typ...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_255
{ "fields": [], "file": "services/namespace/src/test/java/com/dremio/service/namespace/TestPartitionChunkId.java", "identifier": "TestPartitionChunkId", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testInvalidIdFromString() throws Exception {\n try {\n PartitionChunkId split = PartitionChunkId.of(\"ds1_1\");\n fail(\"ds1_1 is an invalid dataset split id\");\n } catch (IllegalArgumentException e) {\n }\n\n try {\n PartitionChunkId split = PartitionChunkI...
{ "fields": [ { "declarator": "COMPARATOR = Comparator\n .comparing(PartitionChunkId::getDatasetId)\n .thenComparing(PartitionChunkId::getSplitVersion)\n .thenComparing(PartitionChunkId::getSplitIdentifier)", "modifier": "private static final", "original_string": "private static f...
{ "body": "@JsonCreator\n public static PartitionChunkId of(String partitionChunkId) {\n final String[] ids = partitionChunkId.split(DELIMITER, 3);\n Preconditions.checkArgument(ids.length == 3 && !ids[0].isEmpty() && !ids[1].isEmpty() && !ids[2].isEmpty(),\n \"Invalid dataset split id %s\", partitionCh...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_310
{ "fields": [ { "declarator": "testAllocator", "modifier": "private", "original_string": "private BufferAllocator testAllocator;", "type": "BufferAllocator", "var_name": "testAllocator" }, { "declarator": "allocatorRule = AllocatorRule.defaultAllocator()", "modifi...
{ "body": "@Test\n public void testWorkOnOOBRuntimeFilterInvalidFilterSize() {\n int buildMinorFragment1 = 2;\n int buildMajorFragment1 = 1;\n try (ArrowBuf oobMessageBuf = testAllocator.buffer(128)) {\n RuntimeFilter filter1 = newRuntimeFilter(32, \"col1\", \"col2\"); // mismatched...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(ScanOperator.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(ScanOperator.class);", "type": "Logger", "var_name": "logger" }, { ...
{ "body": "@Override\n public void workOnOOB(OutOfBandMessage message) {\n final ArrowBuf msgBuf = message.getBuffer();\n final String senderInfo = String.format(\"Frag %d:%d, OpId %d\", message.getSendingMajorFragmentId(),\n message.getSendingMinorFragmentId(), message.getSendingOperatorId());\n ...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_193
{ "fields": [], "file": "services/datastore/src/test/java/com/dremio/datastore/format/compound/KeyUtilsTest.java", "identifier": "KeyUtilsTest", "interfaces": "", "superclass": "extends FormatTestArtifacts" }
{ "body": "@Test\n public void testHashBytes() {\n assertEquals(918073283, KeyUtils.hash(new byte[]{1, 2, 3, 4, 5, 6}));\n }", "class_method_signature": "KeyUtilsTest.testHashBytes()", "constructor": false, "full_signature": "@Test public void testHashBytes()", "identifier": "testHashBytes", "invocatio...
{ "fields": [], "file": "services/datastore/src/main/java/com/dremio/datastore/format/compound/KeyUtils.java", "identifier": "KeyUtils", "interfaces": "", "methods": [ { "class_method_signature": "KeyUtils.KeyUtils()", "constructor": true, "full_signature": "private KeyUtils()", "...
{ "body": "public static int hash(Object... keys) {\n if (null == keys) {\n return 0;\n }\n\n int result = 1;\n for (Object key : keys) {\n result = 31 * result + hashCode(key);\n }\n return result;\n }", "class_method_signature": "KeyUtils.hash(Object... keys)", "constructor": false,...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_469
{ "fields": [ { "declarator": "properties = new TemporarySystemProperties()", "modifier": "@Rule\n public final", "original_string": "@Rule\n public final TemporarySystemProperties properties = new TemporarySystemProperties();", "type": "TemporarySystemProperties", "var_name": "pro...
{ "body": "@Test\n public void newSystemPropWithDependency() {\n String name = DremioConfig.LOCAL_WRITE_PATH_STRING;\n\n // set setting one way so we make sure we don't depend on external settings.\n properties.set(name, \"my.special.path\");\n assertEquals(\"my.special.path/db\", DremioConfig.create().g...
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(DremioConfig.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(DremioConfig.class);", "type": "org.slf4j.Logger", ...
{ "body": "public static DremioConfig create() {\n return create(null);\n }", "class_method_signature": "DremioConfig.create()", "constructor": false, "full_signature": "public static DremioConfig create()", "identifier": "create", "invocations": [ "create" ], "modifiers": "public static", "pa...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_486
{ "fields": [ { "declarator": "TEST_WORK_NAME = \"span-test-work\"", "modifier": "private static", "original_string": "private static String TEST_WORK_NAME = \"span-test-work\";", "type": "String", "var_name": "TEST_WORK_NAME" }, { "declarator": "tracer = new MockTracer...
{ "body": "@Test\n public void testContextWithRunnable() throws Exception {\n final String testUser = \"testUser2\";\n final Pointer<String> foundUser = new Pointer<>();\n\n Runnable runnable = () -> foundUser.value = RequestContext.current().get(UserContext.CTX_KEY).serialize();\n Future<?> future = Req...
{ "fields": [ { "declarator": "WORK_OPERATION_NAME = \"thread-pool-work\"", "modifier": "public static final", "original_string": "public static final String WORK_OPERATION_NAME = \"thread-pool-work\";", "type": "String", "var_name": "WORK_OPERATION_NAME" }, { "declarat...
{ "body": "@Override\n public <T> Future<T> submit(Callable<T> task) {\n return delegate.submit(decorate(task));\n }", "class_method_signature": "ContextMigratingExecutorService.submit(Callable<T> task)", "constructor": false, "full_signature": "@Override public Future<T> submit(Callable<T> task)", "iden...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_243
{ "fields": [], "file": "services/accelerator/src/test/java/com/dremio/service/reflection/TestReflectionGoalChecker.java", "identifier": "TestReflectionGoalChecker", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testMismatchNonNullVersion() {\n final String testTag = \"1\";\n final ReflectionGoal goal = ReflectionGoal.getDefaultInstance().newMessage()\n .setTag(\"wrongTag\")\n .setVersion(0L);\n assertFalse(ReflectionGoalChecker.checkGoal(goal, new ReflectionEntry().setGoalV...
{ "fields": [ { "declarator": "Instance = new ReflectionGoalChecker()", "modifier": "public static final", "original_string": "public static final ReflectionGoalChecker Instance = new ReflectionGoalChecker();", "type": "ReflectionGoalChecker", "var_name": "Instance" }, { ...
{ "body": "public static boolean checkGoal(ReflectionGoal goal, Materialization materialization) {\n return Instance.isEqual(goal, materialization.getReflectionGoalVersion());\n }", "class_method_signature": "ReflectionGoalChecker.checkGoal(ReflectionGoal goal, Materialization materialization)", "constructor"...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_613
{ "fields": [], "file": "plugins/hive/src/test/hive2/com/dremio/exec/store/hive/exec/TestHiveScanBatchCreator.java", "identifier": "TestHiveScanBatchCreator", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAllSplitsAreOnS3() {\n List<SplitAndPartitionInfo> s3Splits = buildSplits(\"s3\");\n List<SplitAndPartitionInfo> hdfsplits = buildSplits(\"hdfs\");\n HiveScanBatchCreator scanBatchCreator = new HiveScanBatchCreator();\n assertTrue(scanBatchCreator.allSplitsAreOnS3(s3Spl...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(HiveScanBatchCreator.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(HiveScanBatchCreator.class);", "type": "Logger", "var_name": "logger" ...
{ "body": "boolean allSplitsAreOnS3(List<SplitAndPartitionInfo> splits) {\n for (SplitAndPartitionInfo split : splits) {\n try {\n final HiveReaderProto.HiveSplitXattr splitAttr = HiveReaderProto.HiveSplitXattr.parseFrom(split.getDatasetSplitInfo().getExtendedProperty());\n final FileSplit fullF...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_306
{ "fields": [ { "declarator": "testAllocator", "modifier": "private", "original_string": "private BufferAllocator testAllocator;", "type": "BufferAllocator", "var_name": "testAllocator" }, { "declarator": "allocatorRule = AllocatorRule.defaultAllocator()", "modifi...
{ "body": "@Test\n public void testPrepareBloomFilter() throws Exception {\n List<AutoCloseable> closeables = new ArrayList<>();\n try (ArrowBuf keyBuf = testAllocator.buffer(9);\n LBlockHashTableEight table = new LBlockHashTableEight(HashConfig.getDefault(), testAllocator, 16)) {\n ...
{ "fields": [ { "declarator": "KEY_WIDTH = 8", "modifier": "public static final", "original_string": "public static final int KEY_WIDTH = 8;", "type": "int", "var_name": "KEY_WIDTH" }, { "declarator": "ORDINAL_WIDTH = 4", "modifier": "public static final", "...
{ "body": "public Optional<BloomFilter> prepareBloomFilter(final boolean sizeDynamically) throws Exception {\n final long bloomFilterSize = sizeDynamically ? Math.min(BloomFilter.getOptimalSize(size()),\n BLOOMFILTER_MAX_SIZE) : BLOOMFILTER_MAX_SIZE;\n try (ArrowBuf keyHolder = allocator.buffer(9);\n...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_185
{ "fields": [], "file": "services/datastore/src/test/java/com/dremio/datastore/format/compound/KeyUtilsTest.java", "identifier": "KeyUtilsTest", "interfaces": "", "superclass": "extends FormatTestArtifacts" }
{ "body": "@Test\n public void testEqualsReturnsFalseByteProtoObjectWithNull() {\n assertFalse(KeyUtils.equals(\n new KeyPair<>(\n TEST_STRING.getBytes(UTF_8),\n \"some other silly string\".getBytes(UTF_8)),\n new KeyPair<>(\n TEST_STRING.getBytes(UTF_8),\n null)));\n }", ...
{ "fields": [], "file": "services/datastore/src/main/java/com/dremio/datastore/format/compound/KeyUtils.java", "identifier": "KeyUtils", "interfaces": "", "methods": [ { "class_method_signature": "KeyUtils.KeyUtils()", "constructor": true, "full_signature": "private KeyUtils()", "...
{ "body": "public static boolean equals(Object left, Object right) {\n if (left instanceof byte[] && right instanceof byte[]) {\n return Arrays.equals((byte[]) left, (byte[]) right);\n }\n return Objects.equals(left, right);\n }", "class_method_signature": "KeyUtils.equals(Object left, Object right)"...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_58
{ "fields": [ { "declarator": "recommender = new ReplaceRecommender()", "modifier": "private", "original_string": "private ReplaceRecommender recommender = new ReplaceRecommender();", "type": "ReplaceRecommender", "var_name": "recommender" } ], "file": "dac/backend/src/test/j...
{ "body": "@Test\n public void exact() throws Exception {\n final File dataFile = temp.newFile(\"exact.json\");\n try (final PrintWriter printWriter = new PrintWriter(dataFile)) {\n printWriter.append(\"{ \\\"col\\\" : \\\"Los Angeles\\\" }\");\n printWriter.append(\"{ \\\"col\\\" : \\\"LOS ANGELES\\...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(ReplaceRecommender.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(ReplaceRecommender.class);", "type": "Logger", "var_name": "logger" } ...
{ "body": "public TransformRuleWrapper<ReplacePatternRule> wrapRule(ReplacePatternRule rule) {\n return new ReplaceTransformRuleWrapper(rule);\n }", "class_method_signature": "ReplaceRecommender.wrapRule(ReplacePatternRule rule)", "constructor": false, "full_signature": "public TransformRuleWrapper<ReplaceP...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_490
{ "fields": [], "file": "common/src/test/java/com/dremio/common/utils/protos/TestBlackListOutput.java", "identifier": "TestBlackListOutput", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void writeSInt32() throws IOException {\n Output delegate = Mockito.mock(Output.class);\n BlackListOutput subject =\n new BlackListOutput(\n delegate,\n Collections.emptyMap(),\n new int[]{2}\n );\n\n subject.writeSInt32(1, 9, false)...
{ "fields": [ { "declarator": "EmptyArray = new int[0]", "modifier": "private static final", "original_string": "private static final int[] EmptyArray = new int[0];", "type": "int[]", "var_name": "EmptyArray" }, { "declarator": "delegate", "modifier": "private fin...
{ "body": "@Override\n public void writeSInt32(int fieldNumber, int value, boolean repeated) throws IOException {\n if(isBlackListed(fieldNumber)){\n return;\n }\n delegate.writeSInt32(fieldNumber, value, repeated);\n }", "class_method_signature": "BlackListOutput.writeSInt32(int fieldNumber, int va...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_644
{ "fields": [ { "declarator": "TEST_RPC_TIMEOUT_MS = 100", "modifier": "private static final", "original_string": "private static final int TEST_RPC_TIMEOUT_MS = 100;", "type": "int", "var_name": "TEST_RPC_TIMEOUT_MS" }, { "declarator": "logger = org.slf4j.LoggerFactory...
{ "body": "@Test\n public void testDeleteWithValidPath() throws Exception {\n setupRPC(\n DFS.RpcType.DELETE_REQUEST, DFS.DeleteRequest.newBuilder().setPath(\"/foo/bar\").setRecursive(true).build(),\n DFS.RpcType.DELETE_RESPONSE, DFS.DeleteResponse.newBuilder().setValue(true).build());\n\n FileSy...
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(RemoteNodeFileSystem.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(RemoteNodeFileSystem.class);", "type": "org.slf4j...
{ "body": "@Override\n public boolean delete(Path f, boolean recursive) throws IOException {\n Path absolutePath = toAbsolutePath(f);\n checkPath(absolutePath);\n\n final DeleteCommand command = new DeleteCommand(absolutePath.toUri().getPath(), recursive);\n runner.runCommand(command);\n\n RpcFuture<D...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_214
{ "fields": [ { "declarator": "versionOption = new ImmutableVersionOption.Builder().setTag(\"1\").build()", "modifier": "private static final", "original_string": "private static final VersionOption versionOption = new ImmutableVersionOption.Builder().setTag(\"1\").build();", "type": "Vers...
{ "body": "@Test\n public void testValidateOptionsIndexAndVersion() {\n KVStoreOptionUtility.validateOptions(new KVStore.PutOption[]{indexPutOption, versionOption});\n }", "class_method_signature": "KVStoreOptionUtilityTest.testValidateOptionsIndexAndVersion()", "constructor": false, "full_signature": "@Te...
{ "fields": [], "file": "services/datastore/src/main/java/com/dremio/datastore/api/options/KVStoreOptionUtility.java", "identifier": "KVStoreOptionUtility", "interfaces": "", "methods": [ { "class_method_signature": "KVStoreOptionUtility.validateOptions(KVStore.KVStoreOption... options)", "con...
{ "body": "public static void validateOptions(KVStore.KVStoreOption... options) {\n if (null == options || options.length <= 1) {\n return;\n }\n\n boolean foundVersion = false;\n boolean foundCreate = false;\n\n for (KVStore.KVStoreOption option : options) {\n if (option == KVStore.PutOption...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_701
{ "fields": [ { "declarator": "mockTempDir", "modifier": "private static", "original_string": "private static Path mockTempDir;", "type": "Path", "var_name": "mockTempDir" }, { "declarator": "mockNestedTempDir", "modifier": "private static", "original_string...
{ "body": "@Test\n public void validateZipDirectoryValidSelfref() throws IOException {\n ZipEntry entry = new ZipEntry(\"./somedir/somefile\");\n NativeLibPluginClassLoader.validateZipDirectory(mockTempDir, entry);\n NativeLibPluginClassLoader.validateZipDirectory(mockTempDirWithTrailingSlash, entry);\n ...
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(NativeLibPluginClassLoader.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(NativeLibPluginClassLoader.class);", "type"...
{ "body": "@VisibleForTesting\n static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException {\n final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize();\n if (!destinationPath.startsWith(tempDirectory)) {\n throw new IOException(String.format(\"JAR...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_351
{ "fields": [ { "declarator": "PROJECTED_COLUMNS = ImmutableList.of(SchemaPath.getSimplePath(\"b\"))", "modifier": "private static final", "original_string": "private static final ImmutableList<SchemaPath> PROJECTED_COLUMNS = ImmutableList.of(SchemaPath.getSimplePath(\"b\"));", "type": "Im...
{ "body": "@Test\n public void testRuleNoMatch() throws Exception {\n final TestScanPrel scan = new TestScanPrel(cluster, TRAITS, table, pluginId, metadata, PROJECTED_COLUMNS, 0, true);\n final LimitPrel limitNode = new LimitPrel(cluster, TRAITS, scan,\n REX_BUILDER.makeExactLiteral(BigDecimal.valueOf(o...
{ "fields": [ { "declarator": "LOGGER = org.slf4j.LoggerFactory.getLogger(PushLimitToPruneableScan.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger LOGGER = org.slf4j.LoggerFactory.getLogger(PushLimitToPruneableScan.class);", "type": "o...
{ "body": "@Override\n public boolean matches(RelOptRuleCall call) {\n // Check that the second operator is a pruneable scan with no associated filter\n // A filter inside scan could impact rowcount and cause wrong result if less splits were present\n return !((ScanPrelBase) call.rel(1)).hasFilter() && call...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_582
{ "fields": [], "file": "client/jdbc/src/test/java/com/dremio/jdbc/impl/TypeConvertingSqlAccessorTest.java", "identifier": "TypeConvertingSqlAccessorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test( expected = SQLConversionOverflowException.class )\n public void test_getShort_on_FLOAT_thatOverflows_rejectsIt()\n throws InvalidAccessException {\n final SqlAccessor uut =\n new TypeConvertingSqlAccessor( new FloatStubAccessor( -32769f ) );\n try {\n uut.getShort( 0 );\n ...
{ "fields": [ { "declarator": "innerAccessor", "modifier": "private final", "original_string": "private final SqlAccessor innerAccessor;", "type": "SqlAccessor", "var_name": "innerAccessor" } ], "file": "client/jdbc/src/main/java/com/dremio/jdbc/impl/TypeConvertingSqlAccessor...
{ "body": "@Override\n public short getShort( int rowOffset ) throws InvalidAccessException {\n final short result;\n switch ( getType().getMinorType() ) {\n // 1. Regular type:\n case SMALLINT:\n result = innerAccessor.getShort( rowOffset );\n break;\n\n // 2. Converted-from types...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_428
{ "fields": [ { "declarator": "optionManager", "modifier": "private", "original_string": "private OptionManager optionManager;", "type": "OptionManager", "var_name": "optionManager" }, { "declarator": "optionList", "modifier": "private", "original_string": "...
{ "body": "@Test\n public void testDeleteOption() {\n final OptionManager eagerCachingOptionManager = new EagerCachingOptionManager(optionManager);\n eagerCachingOptionManager.deleteOption(optionValueC.getName(), OptionValue.OptionType.SYSTEM);\n assertNull(eagerCachingOptionManager.getOption(optionValueC.g...
{ "fields": [ { "declarator": "delegate", "modifier": "private final", "original_string": "private final OptionManager delegate;", "type": "OptionManager", "var_name": "delegate" } ], "file": "sabot/kernel/src/main/java/com/dremio/exec/server/options/EagerCachingOptionManager...
{ "body": "@Override\n public boolean deleteOption(String name, OptionType type) {\n return super.deleteOption(name, type) && delegate.deleteOption(name, type);\n }", "class_method_signature": "EagerCachingOptionManager.deleteOption(String name, OptionType type)", "constructor": false, "full_signature": "@...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_280
{ "fields": [], "file": "services/coordinator/src/test/java/com/dremio/service/coordinator/zk/TestPathUtils.java", "identifier": "TestPathUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testJoinPreservesAbsoluteOrRelativePaths() {\n final String actual = PathUtils.join(\"/a\", \"/b\", \"/c\");\n final String expected = \"/a/b/c\";\n Assert.assertEquals(\"invalid path\", expected, actual);\n\n final String actual2 = PathUtils.join(\"/a\", \"b\", \"c\");\n ...
{ "fields": [], "file": "services/coordinator/src/main/java/com/dremio/service/coordinator/zk/PathUtils.java", "identifier": "PathUtils", "interfaces": "", "methods": [ { "class_method_signature": "PathUtils.join(final String... parts)", "constructor": false, "full_signature": "public st...
{ "body": "public static final String join(final String... parts) {\n final StringBuilder sb = new StringBuilder();\n for (final String part:parts) {\n Preconditions.checkNotNull(part, \"parts cannot contain null\");\n if (!Strings.isNullOrEmpty(part)) {\n sb.append(part).append(\"/\");\n ...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_146
{ "fields": [ { "declarator": "attemptsHelper", "modifier": "private", "original_string": "private AttemptsHelper attemptsHelper;", "type": "AttemptsHelper", "var_name": "attemptsHelper" } ], "file": "services/jobs/src/test/java/com/dremio/service/jobs/TestAttemptsHelper.java...
{ "body": "@Test\n public void testPlanningTime() {\n Preconditions.checkNotNull(attemptsHelper.getPlanningTime());\n assertTrue(1L == attemptsHelper.getPlanningTime());\n }", "class_method_signature": "TestAttemptsHelper.testPlanningTime()", "constructor": false, "full_signature": "@Test public void te...
{ "fields": [ { "declarator": "stateDurations", "modifier": "private final", "original_string": "private final Map<AttemptEvent.State, Long> stateDurations;", "type": "Map<AttemptEvent.State, Long>", "var_name": "stateDurations" }, { "declarator": "events", "modif...
{ "body": "public Long getPlanningTime() {\n return getDuration(State.PLANNING);\n }", "class_method_signature": "AttemptsHelper.getPlanningTime()", "constructor": false, "full_signature": "public Long getPlanningTime()", "identifier": "getPlanningTime", "invocations": [ "getDuration" ], "modifi...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_516
{ "fields": [ { "declarator": "smallData = new byte[]{0, 1, 2, 3, 0, 127}", "modifier": "private static final", "original_string": "private static final byte[] smallData = new byte[]{0, 1, 2, 3, 0, 127};", "type": "byte[]", "var_name": "smallData" }, { "declarator": "NE...
{ "body": "@Test\n public void testRopeByteStringWithZeroOnLeft() throws Exception {\n ByteString literal = ByteString.copyFrom(smallData);\n\n ByteString data = (ByteString) NEW_ROPE_BYTE_STRING_INSTANCE.invoke(null, ByteString.EMPTY, literal);\n\n OptimisticByteOutput byteOutput = new OptimisticByteOutput...
{ "fields": [ { "declarator": "EMPTY = new byte[0]", "modifier": "private static final", "original_string": "private static final byte[] EMPTY = new byte[0];", "type": "byte[]", "var_name": "EMPTY" }, { "declarator": "payloadSize", "modifier": "private final", ...
{ "body": "public byte[] toByteArray() {\n if (payloadSize == 0) {\n return arrayReference != null ? arrayReference : EMPTY;\n }\n\n Preconditions.checkState(arrayOffset == payloadSize, \"Byte payload not fully received.\");\n return arrayReference;\n\n }", "class_method_signature": "OptimisticByt...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_74
{ "fields": [ { "declarator": "recommender = new ExtractRecommender()", "modifier": "private", "original_string": "private ExtractRecommender recommender = new ExtractRecommender();", "type": "ExtractRecommender", "var_name": "recommender" } ], "file": "dac/backend/src/test/j...
{ "body": "@Test\n public void ruleSuggestionsSelNumberInTheBeginning() {\n Selection selection = new Selection(\"col\", \"883 N Shoreline Blvd., Mountain View, CA 94043\", 0, 3);\n List<ExtractRule> rules = recommender.getRules(selection, TEXT);\n assertEquals(5, rules.size());\n comparePattern(\"\\\\d+...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(ExtractRecommender.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(ExtractRecommender.class);", "type": "Logger", "var_name": "logger" } ...
{ "body": "@Override\n public List<ExtractRule> getRules(Selection selection, DataType selColType) {\n checkArgument(selColType == DataType.TEXT, \"Extract text is supported only on TEXT type columns\");\n\n if (selection.getLength() <= 0) {\n throw UserException.validationError()\n .message(\"te...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_453
{ "fields": [ { "declarator": "collector = new ErrorCollector()", "modifier": "@Rule\n public final", "original_string": "@Rule\n public final ErrorCollector collector = new ErrorCollector();", "type": "ErrorCollector", "var_name": "collector" } ], "file": "common/src/test/...
{ "body": "@Test\n public void testParent() {\n checkParent(Path.of(\"/foo/bar\"), Path.of(\"/foo\"));\n checkParent(Path.of(\"/foo\"), Path.of(\"/\"));\n checkParent(Path.of(\"/\"), null);\n checkParent(Path.of(\"foo/bar\"), Path.of(\"foo\"));\n checkParent(Path.of(\"foo\"), Path.of(\".\"));\n }", ...
{ "fields": [ { "declarator": "SEPARATOR = \"/\"", "modifier": "public static final", "original_string": "public static final String SEPARATOR = \"/\";", "type": "String", "var_name": "SEPARATOR" }, { "declarator": "SEPARATOR_CHAR = '/'", "modifier": "public stati...
{ "body": "public static Path of(URI uri) {\n return new Path(uri);\n }", "class_method_signature": "Path.of(URI uri)", "constructor": false, "full_signature": "public static Path of(URI uri)", "identifier": "of", "invocations": [], "modifiers": "public static", "parameters": "(URI uri)", "return"...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_687
{ "fields": [ { "declarator": "REMOTE_ENDPOINT_1 = newNodeEndpoint(\"10.0.0.2\", 1234)", "modifier": "private static final", "original_string": "private static final NodeEndpoint REMOTE_ENDPOINT_1 = newNodeEndpoint(\"10.0.0.2\", 1234);", "type": "NodeEndpoint", "var_name": "REMOTE_EN...
{ "body": "@Test\n public void testRenameDirectories() throws IOException {\n doReturn(true).when(mockLocalFS).rename(\n new Path(\"/foo/bar\"),\n new Path(\"/foo/baz\"));\n doReturn(true).when(mockRemoteFS).rename(\n new Path(\"/foo/bar\"),\n new Path(\"/foo/baz\"));\n\n Path sr...
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(PseudoDistributedFileSystem.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(PseudoDistributedFileSystem.class);", "typ...
{ "body": "@Override\n public boolean rename(Path src, Path dst) throws IOException {\n Path absoluteSrc = toAbsolutePath(src);\n Path absoluteDst = toAbsolutePath(dst);\n checkPath(absoluteSrc);\n checkPath(absoluteDst);\n\n // Handle root\n if (absoluteSrc.isRoot()) {\n throw new IOException...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_238
{ "fields": [], "file": "services/accelerator/src/test/java/com/dremio/service/reflection/TestReflectionManager.java", "identifier": "TestReflectionManager", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSyncDoesNotUpdateReflectionWhenOnlyBoostIsToggle(){\n ReflectionId reflectionId = new ReflectionId(\"r_id\");\n ReflectionGoalHash reflectionGoalHash = new ReflectionGoalHash(\"MY_HASH\");\n String reflectionGoalName = \"name\";\n String dataSetId = \"dataSetId\";\n ...
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(ReflectionManager.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(ReflectionManager.class);", "type": "org.slf4j.Logge...
{ "body": "@VisibleForTesting\n void sync(){\n long lastWakeupTime = System.currentTimeMillis();\n final long previousLastWakeupTime = lastWakeupTime - WAKEUP_OVERLAP_MS;\n // updating the store's lastWakeupTime here. This ensures that if we're failing we don't do a denial of service attack\n // this ass...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_392
{ "fields": [ { "declarator": "thrown = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();", "type": "ExpectedException", "var_name": "thrown" } ], "file": "sabot/kernel/src/test/j...
{ "body": "@Test\n public void testEmptyUser() throws Exception {\n thrown.expect(IllegalArgumentException.class);\n ImpersonationUtil.createProxyUgi(\"\");\n }", "class_method_signature": "TestImpersonationUtil.testEmptyUser()", "constructor": false, "full_signature": "@Test public void testEmptyUser()...
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(ImpersonationUtil.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(ImpersonationUtil.class);", "type": "org.slf4j.Logge...
{ "body": "public static UserGroupInformation createProxyUgi(String proxyUserName) {\n try {\n if (Strings.isNullOrEmpty(proxyUserName)) {\n throw new IllegalArgumentException(\"Invalid value for proxy user name\");\n }\n\n // If the request proxy user is same as process user name or same as ...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_668
{ "fields": [ { "declarator": "REMOTE_ENDPOINT_1 = newNodeEndpoint(\"10.0.0.2\", 1234)", "modifier": "private static final", "original_string": "private static final NodeEndpoint REMOTE_ENDPOINT_1 = newNodeEndpoint(\"10.0.0.2\", 1234);", "type": "NodeEndpoint", "var_name": "REMOTE_EN...
{ "body": "@Test\n public void testOpenFile() throws IOException {\n FSDataInputStream mockFDIS = mock(FSDataInputStream.class);\n doReturn(mockFDIS).when(mockLocalFS).open(new Path(\"/foo/bar/file\"), 32768);\n\n Path root = new Path(\"/foo/bar/10.0.0.1@file\");\n FSDataInputStream fdis = fs.open(root, ...
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(PseudoDistributedFileSystem.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(PseudoDistributedFileSystem.class);", "typ...
{ "body": "@Override\n public FSDataInputStream open(Path f, int bufferSize) throws IOException {\n Path absolutePath = toAbsolutePath(f);\n checkPath(absolutePath);\n\n // Handle root\n if (absolutePath.isRoot()) {\n throw new AccessControlException(\"Cannot open \" + f);\n }\n\n try {\n ...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_541
{ "fields": [ { "declarator": "NON_NULL_VALUE = 89683200000L", "modifier": "public static final", "original_string": "public static final long NON_NULL_VALUE = 89683200000L;", "type": "long", "var_name": "NON_NULL_VALUE" }, { "declarator": "DST_VALUE = 1558999993123L", ...
{ "body": "@Test(expected=NullPointerException.class)\n public void testNullCalendar() throws InvalidAccessException {\n accessor.getDate(0, null);\n }", "class_method_signature": "TestDateMilliAccessor.testNullCalendar()", "constructor": false, "full_signature": "@Test(expected=NullPointerException.class)...
{ "fields": [ { "declarator": "TYPE = Types.optional(MinorType.DATE)", "modifier": "private static final", "original_string": "private static final MajorType TYPE = Types.optional(MinorType.DATE);", "type": "MajorType", "var_name": "TYPE" }, { "declarator": "defaultTime...
{ "body": "@Override\n public Date getDate(int index, Calendar calendar) {\n Preconditions.checkNotNull(calendar, \"Invalid calendar used when attempting to retrieve date.\");\n return getDate(index, calendar.getTimeZone());\n }", "class_method_signature": "DateMilliAccessor.getDate(int index, Calendar cale...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_111
{ "fields": [ { "declarator": "JOB_PATH = \"/job/\"", "modifier": "private static final", "original_string": "private static final String JOB_PATH = \"/job/\";", "type": "String", "var_name": "JOB_PATH" }, { "declarator": "globalTimeout = new Timeout(30, TimeUnit.SECOND...
{ "body": "@Test\n public void testCancelJob() throws InterruptedException {\n JobsService jobs = l(JobsService.class);\n\n SqlQuery query = new SqlQuery(\"select * from sys.version\", Collections.emptyList(), SystemUser.SYSTEM_USERNAME);\n\n final String id = submitAndWaitUntilSubmitted(\n JobRequest....
{ "fields": [ { "declarator": "jobs", "modifier": "private final", "original_string": "private final JobsService jobs;", "type": "JobsService", "var_name": "jobs" }, { "declarator": "securityContext", "modifier": "private final", "original_string": "private ...
{ "body": "@POST\n @Path(\"/{id}/cancel\")\n public void cancelJob(@PathParam(\"id\") String id) throws JobException {\n final String username = securityContext.getUserPrincipal().getName();\n\n try {\n jobs.cancel(CancelJobRequest.newBuilder()\n .setUsername(username)\n .setJobId(JobsP...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_404
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(TestTimedRunnable.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(TestTimedRunnable.class);", "type": "org.slf4j.Logge...
{ "body": "@Test\n public void withOverriddenHighTimeout() throws Exception {\n List<TimedRunnable<Void>> tasks = Lists.newArrayList();\n\n for(int i=0; i<10; i++){\n tasks.add(new TestTask(20_000));\n }\n\n TimedRunnable.run(\"Execution without triggering timeout\", logger, tasks, 2, 150_000);\n }...
{ "fields": [ { "declarator": "TIMEOUT_PER_RUNNABLE_IN_MSECS = 15000", "modifier": "private static", "original_string": "private static long TIMEOUT_PER_RUNNABLE_IN_MSECS = 15000;", "type": "long", "var_name": "TIMEOUT_PER_RUNNABLE_IN_MSECS" }, { "declarator": "e", ...
{ "body": "@Override\n public final void run() {\n long start = System.nanoTime();\n threadStart=start;\n try{\n value = runInner();\n }catch(Exception e){\n this.e = e;\n }finally{\n timeNanos = System.nanoTime() - start;\n }\n }", "class_method_signature": "TimedRunnable.run()",...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_23
{ "fields": [], "file": "dac/backend/src/test/java/com/dremio/dac/util/TestDateUtils.java", "identifier": "TestDateUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetLastSundayDate() {\n LocalDate testDate1 = LocalDate.parse(\"2020-03-29\");\n LocalDate date1LastSunday = DateUtils.getLastSundayDate(testDate1);\n assertEquals(testDate1, date1LastSunday);\n\n LocalDate testDate2 = LocalDate.parse(\"2020-03-28\");\n LocalDate dat...
{ "fields": [], "file": "dac/backend/src/main/java/com/dremio/dac/util/DateUtils.java", "identifier": "DateUtils", "interfaces": "", "methods": [ { "class_method_signature": "DateUtils.getStartOfLastMonth()", "constructor": false, "full_signature": "public static long getStartOfLastMonth...
{ "body": "public static LocalDate getLastSundayDate(final LocalDate dateWithinWeek) {\n int dayOfWeek = dateWithinWeek.getDayOfWeek().getValue();\n dayOfWeek = (dayOfWeek == 7) ? 0 : dayOfWeek;\n return dateWithinWeek.minusDays(dayOfWeek);\n }", "class_method_signature": "DateUtils.getLastSundayDate(fina...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_691
{ "fields": [ { "declarator": "REMOTE_ENDPOINT_1 = newNodeEndpoint(\"10.0.0.2\", 1234)", "modifier": "private static final", "original_string": "private static final NodeEndpoint REMOTE_ENDPOINT_1 = newNodeEndpoint(\"10.0.0.2\", 1234);", "type": "NodeEndpoint", "var_name": "REMOTE_EN...
{ "body": "@Test\n public void testGetFileBlockLocationsNegativeLen() throws IOException {\n Path path = new Path(\"/foo/10.0.0.1@bar\");\n\n try {\n fs.getFileBlockLocations(new FileStatus(1024, false, 1,4096, 123456, path), 18, -2);\n fail(\"Expected getFileBlockLocation to throw an exception\");\n...
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(PseudoDistributedFileSystem.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(PseudoDistributedFileSystem.class);", "typ...
{ "body": "@Override\n public BlockLocation[] getFileBlockLocations(FileStatus file, long start, long len) throws IOException {\n Preconditions.checkArgument(start >= 0, \"start should be positive\");\n Preconditions.checkArgument(len >= 0, \"len should be positive\");\n\n if (start >= file.getLen()) {\n ...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_384
{ "fields": [ { "declarator": "ENDPOINT_1_1 = newNodeEndpoint(\"10.0.0.1\", 1234)", "modifier": "private static final", "original_string": "private static final NodeEndpoint ENDPOINT_1_1 = newNodeEndpoint(\"10.0.0.1\", 1234);", "type": "NodeEndpoint", "var_name": "ENDPOINT_1_1" }...
{ "body": "@Test\n public void simpleTwoFileOneOnEachHost() throws Exception {\n final List<CompleteWork> workUnits = asList(\n newWork(\"/10.0.0.1/table/foo1\", 1024, ENDPOINT_1_1, 0.33),\n newWork(\"/10.0.0.2/table/foo2\", 2048, ENDPOINT_2_2, 0.66)\n );\n\n ListMultimap<Integer, CompleteWork...
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(HardAssignmentCreator.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(HardAssignmentCreator.class);", "type": "org.slf...
{ "body": "public <T extends CompleteWork> ListMultimap<Integer, T> getMappings(\n final List<NodeEndpoint> endpoints, final List<T> units) throws PhysicalOperatorSetupException {\n verify(endpoints, units, units.size() >= endpoints.size(), \"There should be at least one work unit for each hard affinity node....
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_107
{ "fields": [ { "declarator": "SOURCES_PATH = \"/source/\"", "modifier": "private static final", "original_string": "private static final String SOURCES_PATH = \"/source/\";", "type": "String", "var_name": "SOURCES_PATH" }, { "declarator": "reader = ConnectionReader.of(...
{ "body": "@Test\n public void testUpdateSourceBoundaryValues() throws Exception {\n SourceConfig sourceConfig = new SourceConfig();\n sourceConfig.setName(\"Foopy2\");\n\n NASConf nasConfig = new NASConf();\n sourceConfig.setType(nasConfig.getType());\n nasConfig.path = \"/\";\n\n sourceConfig.set...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(SourceResource.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(SourceResource.class);", "type": "Logger", "var_name": "logger" }, { ...
{ "body": "@DELETE\n @RolesAllowed(\"admin\")\n @Path(\"/{id}\")\n public Response deleteSource(@PathParam(\"id\") String id) throws NamespaceException {\n SourceConfig config = sourceService.getById(id);\n sourceService.deleteSource(config);\n return Response.ok().build();\n }", "class_method_signatur...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_557
{ "fields": [ { "declarator": "STATUS_SERVER_PROPERTY_NAME =\n ExecConstants.HTTP_ENABLE", "modifier": "private static final", "original_string": "private static final String STATUS_SERVER_PROPERTY_NAME =\n ExecConstants.HTTP_ENABLE;", "type": "String", "var_name": "STATUS_...
{ "body": "@Ignore( \"Just hangs, trying to connect to non-existent local zookeeper.\" )\n @Test\n public void test_connect_DECIDEWHICHBogusDremioJdbcUrl()\n throws SQLException\n {\n assertThat( uut.connect( \"jdbc:dremio:x=y;z;;a=b=c=d;what=ever\", null ),\n nullValue() );\n fail( \"Not...
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(Driver.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(Driver.class);", "type": "org.slf4j.Logger", "var_name": ...
{ "body": "@Override\n public Connection connect( String url, Properties info ) throws SQLException {\n return impl.connect( url, info );\n }", "class_method_signature": "Driver.connect( String url, Properties info )", "constructor": false, "full_signature": "@Override public Connection connect( String url...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_35
{ "fields": [], "file": "dac/backend/src/test/java/com/dremio/dac/explore/TestJSONElementLocator.java", "identifier": "TestJSONElementLocator", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testParseJsonPath4() throws Exception {\n JsonPath p = JSONElementLocator.parsePath(\"value[0].a[1]\");\n assertEquals(p.toString(), 3, p.size());\n assertEquals(new JsonPath(new ArrayJsonPathElement(0), new ObjectJsonPathElement(\"a\"), new ArrayJsonPathElement(1)), p);\n }"...
{ "fields": [ { "declarator": "cellText", "modifier": "private final", "original_string": "private final String cellText;", "type": "String", "var_name": "cellText" }, { "declarator": "parser", "modifier": "private", "original_string": "private JsonParser pa...
{ "body": "public static JsonPath parsePath(String path) {\n if (path.startsWith(VALUE_PLACEHOLDER)) {\n return new JsonPath(path.substring(VALUE_PLACEHOLDER.length()));\n }\n throw new IllegalArgumentException(path + \" must start with 'value'\");\n }", "class_method_signature": "JSONElementLocator....
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_412
{ "fields": [], "file": "sabot/kernel/src/test/java/com/dremio/exec/server/options/TestOptionValueProtoUtils.java", "identifier": "TestOptionValueProtoUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testStringOptionToProto() {\n final OptionValue option = OptionValue.createString(OptionValue.OptionType.SYSTEM, \"test.option\", \"test-option\");\n final OptionValueProto optionProto = OptionValueProtoUtils.toOptionValueProto(option);\n assertTrue(verifyEquivalent(option, op...
{ "fields": [], "file": "sabot/kernel/src/main/java/com/dremio/exec/server/options/OptionValueProtoUtils.java", "identifier": "OptionValueProtoUtils", "interfaces": "", "methods": [ { "class_method_signature": "OptionValueProtoUtils.OptionValueProtoUtils()", "constructor": true, "full_si...
{ "body": "public static OptionValueProto toOptionValueProto(OptionValue optionValue) {\n checkArgument(optionValue.getType() == OptionValue.OptionType.SYSTEM,\n String.format(\"Invalid OptionType. OptionType must be 'SYSTEM', was given '%s'\", optionValue.getType()));\n\n final OptionValue.Kind kind = opt...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_296
{ "fields": [ { "declarator": "rpcConfig = RpcConfig.newBuilder().timeout(10).name(\"testing\").build()", "modifier": "", "original_string": "RpcConfig rpcConfig = RpcConfig.newBuilder().timeout(10).name(\"testing\").build();", "type": "RpcConfig", "var_name": "rpcConfig" }, ...
{ "body": "@Test\n public void testHandleSpansWhileSendingFailure() throws RpcException {\n setup(true);\n\n server.handle(connection, GET_CATALOGS_VALUE, pBody, dBody, responseSender);\n\n\n verify(ingestor).feedWork(eq(connection), eq(GET_CATALOGS_VALUE), eq(pBody), eq(dBody), captorSender.capture());\n ...
{ "fields": [ { "declarator": "CONNECTION_LOGGER = org.slf4j.LoggerFactory.getLogger(\"com.dremio.ConnectionLog\")", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger CONNECTION_LOGGER = org.slf4j.LoggerFactory.getLogger(\"com.dremio.ConnectionLog\");"...
{ "body": "@Override\n protected Response handle(UserClientConnectionImpl connection, int rpcType, byte[] pBody, ByteBuf dBody)\n throws RpcException {\n // there are two #handle methods, since the other one is overridden, this is never invoked\n throw new IllegalStateException(\"UserRPCServer#handle must...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_279
{ "fields": [], "file": "services/coordinator/src/test/java/com/dremio/service/coordinator/zk/TestPathUtils.java", "identifier": "TestPathUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test(expected = NullPointerException.class)\n public void testNullSegmentThrowsNPE() {\n PathUtils.join(\"\", null, \"\");\n }", "class_method_signature": "TestPathUtils.testNullSegmentThrowsNPE()", "constructor": false, "full_signature": "@Test(expected = NullPointerException.class) public voi...
{ "fields": [], "file": "services/coordinator/src/main/java/com/dremio/service/coordinator/zk/PathUtils.java", "identifier": "PathUtils", "interfaces": "", "methods": [ { "class_method_signature": "PathUtils.join(final String... parts)", "constructor": false, "full_signature": "public st...
{ "body": "public static final String join(final String... parts) {\n final StringBuilder sb = new StringBuilder();\n for (final String part:parts) {\n Preconditions.checkNotNull(part, \"parts cannot contain null\");\n if (!Strings.isNullOrEmpty(part)) {\n sb.append(part).append(\"/\");\n ...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_629
{ "fields": [], "file": "plugins/azure/src/test/java/com/dremio/plugins/azure/TestAzureAsyncContainerProvider.java", "identifier": "TestAzureAsyncContainerProvider", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDoesContainerExistsAccessDenied() throws ExecutionException, InterruptedException {\n AzureStorageFileSystem parentClass = mock(AzureStorageFileSystem.class);\n AzureAuthTokenProvider authTokenProvider = getMockAuthTokenProvider();\n AsyncHttpClient client = mock(AsyncHttp...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(AzureAsyncContainerProvider.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(AzureAsyncContainerProvider.class);", "type": "Logger", "var_name"...
{ "body": "@Override\n public void assertContainerExists(final String containerName) {\n // API: https://docs.microsoft.com/en-gb/rest/api/storageservices/datalakestoragegen2/filesystem/getproperties\n logger.debug(\"Checking for missing azure container \" + account + \":\" + containerName);\n final Request...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_500
{ "fields": [], "file": "common/src/test/java/com/dremio/common/utils/protos/TestBlackListOutput.java", "identifier": "TestBlackListOutput", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void writeBool() throws IOException {\n Output delegate = Mockito.mock(Output.class);\n BlackListOutput subject =\n new BlackListOutput(\n delegate,\n Collections.emptyMap(),\n new int[]{2}\n );\n\n subject.writeBool(1, true, false);...
{ "fields": [ { "declarator": "EmptyArray = new int[0]", "modifier": "private static final", "original_string": "private static final int[] EmptyArray = new int[0];", "type": "int[]", "var_name": "EmptyArray" }, { "declarator": "delegate", "modifier": "private fin...
{ "body": "@Override\n public void writeBool(int fieldNumber, boolean value, boolean repeated) throws IOException {\n if(isBlackListed(fieldNumber)){\n return;\n }\n delegate.writeBool(fieldNumber, value, repeated);\n }", "class_method_signature": "BlackListOutput.writeBool(int fieldNumber, boolean ...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_150
{ "fields": [ { "declarator": "attemptsHelper", "modifier": "private", "original_string": "private AttemptsHelper attemptsHelper;", "type": "AttemptsHelper", "var_name": "attemptsHelper" } ], "file": "services/jobs/src/test/java/com/dremio/service/jobs/TestAttemptsHelper.java...
{ "body": "@Test\n public void testGetStartingTime() {\n Preconditions.checkNotNull(attemptsHelper.getStartingTime());\n assertTrue(1L == attemptsHelper.getStartingTime());\n }", "class_method_signature": "TestAttemptsHelper.testGetStartingTime()", "constructor": false, "full_signature": "@Test public v...
{ "fields": [ { "declarator": "stateDurations", "modifier": "private final", "original_string": "private final Map<AttemptEvent.State, Long> stateDurations;", "type": "Map<AttemptEvent.State, Long>", "var_name": "stateDurations" }, { "declarator": "events", "modif...
{ "body": "public Long getStartingTime() {\n return getDuration(State.STARTING);\n }", "class_method_signature": "AttemptsHelper.getStartingTime()", "constructor": false, "full_signature": "public Long getStartingTime()", "identifier": "getStartingTime", "invocations": [ "getDuration" ], "modifi...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_445
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(TestCatalogServiceImpl.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(TestCatalogServiceImpl.class);", "type": "org.s...
{ "body": "@Test\n public void refreshSourceMetadata_FirstTime_MultipleUpdatesWithNewDatasetsDeletedDatasets() throws Exception {\n doMockDatasets(mockUpPlugin, mockDatasets);\n catalogService.refreshSource(mockUpKey, CatalogService.REFRESH_EVERYTHING_NOW, CatalogServiceImpl.UpdateType.FULL);\n catalogServi...
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(CatalogServiceImpl.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(CatalogServiceImpl.class);", "type": "org.slf4j.Log...
{ "body": "@VisibleForTesting\n public boolean refreshSource(NamespaceKey source, MetadataPolicy metadataPolicy, UpdateType updateType) throws NamespaceException {\n ManagedStoragePlugin plugin = getPlugins().get(source.getRoot());\n if (plugin == null){\n throw UserException.validationError().message(\"U...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_62
{ "fields": [ { "declarator": "recommender = new SplitRecommender()", "modifier": "private", "original_string": "private SplitRecommender recommender = new SplitRecommender();", "type": "SplitRecommender", "var_name": "recommender" } ], "file": "dac/backend/src/test/java/com/...
{ "body": "@Test\n public void ruleSuggestionsPipeDelimiter() {\n // Select text containing non-alphabet characters as delimiter\n Selection selection = new Selection(\"col\", \"1|2|3|4|5\", 1, 1); // \"|\" is selected\n List<SplitRule> rules = recommender.getRules(selection, TEXT);\n assertEquals(1, rul...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(SplitRecommender.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(SplitRecommender.class);", "type": "Logger", "var_name": "logger" } ], ...
{ "body": "@Override\n public List<SplitRule> getRules(Selection selection, DataType selColType) {\n checkArgument(selColType == DataType.TEXT, \"Split is supported only on TEXT type columns\");\n\n List<SplitRule> rules = new ArrayList<>();\n String seltext = selection.getCellText().substring(selection.get...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_337
{ "fields": [], "file": "sabot/kernel/src/test/java/com/dremio/exec/planner/sql/handlers/commands/TestMetadataProviderConditions.java", "identifier": "TestMetadataProviderConditions", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testLikeFilter() {\n Predicate<String> filter = MetadataProviderConditions.getCatalogNamePredicate(newLikeFilter(\"abc\", \"\\\\\"));\n assertTrue(filter.test(\"abc\"));\n assertFalse(filter.test(\"abcd\"));\n assertTrue(filter.test(\"ABC\"));\n }", "class_method_signatu...
{ "fields": [ { "declarator": "ALWAYS_TRUE = x -> true", "modifier": "static final", "original_string": "static final Predicate<String> ALWAYS_TRUE = x -> true;", "type": "Predicate<String>", "var_name": "ALWAYS_TRUE" }, { "declarator": "SQL_LIKE_ANY_STRING_PATTERN = \"...
{ "body": "public static Predicate<String> getCatalogNamePredicate(LikeFilter filter) {\n if (filter == null || !filter.hasPattern() || SQL_LIKE_ANY_STRING_PATTERN.equals(filter.getPattern())) {\n return ALWAYS_TRUE;\n }\n\n final String patternString =\n RegexpUtil.sqlToRegexLike(filter.getPattern...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_622
{ "fields": [], "file": "plugins/s3/src/test/java/com/dremio/plugins/s3/store/TestS3FileSystem.java", "identifier": "TestS3FileSystem", "interfaces": "", "superclass": "" }
{ "body": "@Test(expected = RuntimeException.class)\n public void testVerifyCredentialsNoRetryOnAuthnError() {\n PowerMockito.mockStatic(StsClient.class);\n StsClient mockedClient = mock(StsClient.class);\n StsClientBuilder mockedClientBuilder = mock(StsClientBuilder.class);\n when(mockedClientBuilder.cr...
{ "fields": [ { "declarator": "S3_PERMISSION_ERROR_MSG = \"Access was denied by S3\"", "modifier": "public static final", "original_string": "public static final String S3_PERMISSION_ERROR_MSG = \"Access was denied by S3\";", "type": "String", "var_name": "S3_PERMISSION_ERROR_MSG" ...
{ "body": "protected void verifyCredentials(Configuration conf) throws RuntimeException {\n AwsCredentialsProvider awsCredentialsProvider = getAsync2Provider(conf);\n final StsClientBuilder stsClientBuilder = StsClient.builder()\n // Note that AWS SDKv2 client will close the credentials provider if n...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_272
{ "fields": [], "file": "services/namespace/src/test/java/com/dremio/service/namespace/file/TestFileFormat.java", "identifier": "TestFileFormat", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSheetExcelFile() throws Exception {\n ExcelFileConfig fileFormat = new ExcelFileConfig();\n fileFormat.setSheetName(\"foo\");\n String tableOptions = fileFormat.toTableOptions();\n assertContains(\"type => 'excel'\", tableOptions);\n assertContains(\"xls => false\", ...
{ "fields": [ { "declarator": "buffer = LinkedBuffer.allocate(512)", "modifier": "@JsonIgnore\n private final", "original_string": "@JsonIgnore\n private final LinkedBuffer buffer = LinkedBuffer.allocate(512);", "type": "LinkedBuffer", "var_name": "buffer" }, { "decla...
{ "body": "public String toTableOptions() throws IllegalArgumentException {\n final StringBuilder stringBuilder = new StringBuilder();\n switch (getFileType()) {\n case TEXT:\n case CSV:\n case TSV:\n case PSV:\n final TextFileConfig textFileConfig = (TextFileConfig)this;\n str...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_86
{ "fields": [ { "declarator": "table = \"\\\"cp\\\".\\\"tpch/supplier.parquet\\\"\"", "modifier": "private static", "original_string": "private static String table = \"\\\"cp\\\".\\\"tpch/supplier.parquet\\\"\";", "type": "String", "var_name": "table" }, { "declarator":...
{ "body": "@Test\n public void testFlatten() {\n VirtualDatasetState ds =\n extract(getQueryFromSQL(\"select flatten(b), a as mycol from cp.\\\"json/nested.json\\\"\"));\n assertEquals(\n new VirtualDatasetState()\n .setFrom(new FromTable(\"\\\"cp\\\".\\\"json/nested.json\\\"\").setAli...
{ "fields": [], "file": "dac/backend/src/main/java/com/dremio/dac/explore/QuerySemantics.java", "identifier": "QuerySemantics", "interfaces": "", "methods": [ { "class_method_signature": "QuerySemantics.QuerySemantics()", "constructor": true, "full_signature": "private QuerySemantics()"...
{ "body": "public static VirtualDatasetState extract(QueryMetadata metadata) {\n final com.dremio.service.jobs.metadata.proto.VirtualDatasetState pState = metadata.getState();\n final VirtualDatasetState state = new VirtualDatasetState();\n if (pState.hasFrom()) {\n state.setFrom(fromBuf(pState.getFrom(...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_69
{ "fields": [ { "declarator": "allocator", "modifier": "private", "original_string": "private BufferAllocator allocator;", "type": "BufferAllocator", "var_name": "allocator" } ], "file": "dac/backend/src/test/java/com/dremio/dac/explore/TestHistogramGenerator.java", "identi...
{ "body": "@Test\n public void testProduceRanges() {\n List<Number> ranges = new ArrayList<>();\n HistogramGenerator.produceRanges(ranges , new LocalDateTime(1970, 1, 1, 1, 0, 0), new LocalDateTime(1970, 1, 1, 11, 59, 0), TruncEvalEnum.HOUR);\n List<Number> expected = new ArrayList<>();\n for (int i = 0;...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(HistogramGenerator.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(HistogramGenerator.class);", "type": "Logger", "var_name": "logger" }, ...
{ "body": "@VisibleForTesting\n static void produceRanges(List<Number> ranges, LocalDateTime min, LocalDateTime max, TruncEvalEnum truncateTo) {\n long timeValue = toMillis(roundTime(min, truncateTo, true));\n long maxTimeValue = toMillis(roundTime(max, truncateTo, false));\n ranges.add(timeValue);\n // ...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_730
{ "fields": [ { "declarator": "temporaryFolder = new TemporaryFolder()", "modifier": "@Rule\n public final", "original_string": "@Rule\n public final TemporaryFolder temporaryFolder = new TemporaryFolder();", "type": "TemporaryFolder", "var_name": "temporaryFolder" } ], "fi...
{ "body": "@Test\n public void testToPathStreamFromClassPath() throws MalformedURLException, IOException {\n Path mainFolder = temporaryFolder.newFolder().toPath();\n\n Files.createFile(mainFolder.resolve(\"a.jar\"));\n Files.createFile(mainFolder.resolve(\"b.jar\"));\n Files.createFile(mainFolder.resolv...
{ "fields": [ { "declarator": "X_DREMIO_LIBRARY_PATH_MANIFEST_ATTRIBUTE = \"X-Dremio-Library-Path\"", "modifier": "public static final", "original_string": "public static final String X_DREMIO_LIBRARY_PATH_MANIFEST_ATTRIBUTE = \"X-Dremio-Library-Path\";", "type": "String", "var_name"...
{ "body": "@VisibleForTesting\n static Stream<Path> toPathStream(ClassLoader classLoader) {\n if (classLoader == null) {\n return Stream.of();\n }\n\n if (classLoader != ClassLoader.getSystemClassLoader()) {\n // First add jar/classes loaded by the parent classloader in order to preserve\n //...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_225
{ "fields": [ { "declarator": "versionOption = new ImmutableVersionOption.Builder().setTag(\"1\").build()", "modifier": "private static final", "original_string": "private static final VersionOption versionOption = new ImmutableVersionOption.Builder().setTag(\"1\").build();", "type": "Vers...
{ "body": "@Test\n public void testGetCreateOrVersionOptionEmpty() {\n // Act\n final Optional<KVStore.PutOption> ret = KVStoreOptionUtility.getCreateOrVersionOption(new KVStore.PutOption[]{});\n\n // Assert\n assertFalse(ret.isPresent());\n }", "class_method_signature": "KVStoreOptionUtilityTest.test...
{ "fields": [], "file": "services/datastore/src/main/java/com/dremio/datastore/api/options/KVStoreOptionUtility.java", "identifier": "KVStoreOptionUtility", "interfaces": "", "methods": [ { "class_method_signature": "KVStoreOptionUtility.validateOptions(KVStore.KVStoreOption... options)", "con...
{ "body": "public static Optional<KVStore.PutOption> getCreateOrVersionOption(KVStore.KVStoreOption... options) {\n validateOptions(options);\n\n if (null == options || options.length == 0) {\n return Optional.empty();\n }\n\n for (KVStore.KVStoreOption option : options) {\n if (option == KVStor...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_675
{ "fields": [ { "declarator": "REMOTE_ENDPOINT_1 = newNodeEndpoint(\"10.0.0.2\", 1234)", "modifier": "private static final", "original_string": "private static final NodeEndpoint REMOTE_ENDPOINT_1 = newNodeEndpoint(\"10.0.0.2\", 1234);", "type": "NodeEndpoint", "var_name": "REMOTE_EN...
{ "body": "@Test\n public void testAppendLocalFile() throws IOException {\n try {\n Path path = new Path(\"/foo/bar/file\");\n @SuppressWarnings(\"unused\")\n FSDataOutputStream fdos = fs.append(path, 4096, null);\n fail(\"Expected append call to throw an exception\");\n } catch (IOExceptio...
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(PseudoDistributedFileSystem.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(PseudoDistributedFileSystem.class);", "typ...
{ "body": "@Override\n public FSDataOutputStream append(Path f, int bufferSize, Progressable progress) throws IOException {\n Path absolutePath = toAbsolutePath(f);\n checkPath(absolutePath);\n\n // Handle root\n if (absolutePath.isRoot()) {\n throw new AccessControlException(\"Cannot open \" + f);\...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_419
{ "fields": [ { "declarator": "som", "modifier": "private", "original_string": "private SystemOptionManager som;", "type": "SystemOptionManager", "var_name": "som" }, { "declarator": "kvStore", "modifier": "private", "original_string": "private LegacyKVStore...
{ "body": "@Test\n public void testSet() {\n registerTestOption(OptionValue.Kind.LONG, \"already-added-option\", \"0\");\n OptionValue toAddOptionDefault = registerTestOption(OptionValue.Kind.STRING, \"to-add-option\", \"default-value\");\n\n OptionValue alreadyAddedOption = OptionValue.createLong(OptionV...
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(SystemOptionManager.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(SystemOptionManager.class);", "type": "org.slf4j.L...
{ "body": "@Override\n public boolean setOption(final OptionValue value) {\n checkArgument(value.getType() == OptionType.SYSTEM, \"OptionType must be SYSTEM.\");\n final String name = value.getName().toLowerCase(Locale.ROOT);\n final OptionValidator validator = optionValidatorListing.getValidator(name);\n ...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_4
{ "fields": [ { "declarator": "thrown = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();", "type": "ExpectedException", "var_name": "thrown" }, { "declarator": "kvstore =\n...
{ "body": "@Test\n public void testDependenciesResolver() throws Exception {\n DACConfig dacConfig = DACConfig.newConfig();\n Upgrade upgrade = new Upgrade(dacConfig, CLASSPATH_SCAN_RESULT, false);\n\n List<? extends UpgradeTask> tasks = upgrade.getUpgradeTasks();\n\n // Get MapR profile variable from Ma...
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(Upgrade.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(Upgrade.class);", "type": "org.slf4j.Logger", "var_name"...
{ "body": "@VisibleForTesting\n List<? extends UpgradeTask> getUpgradeTasks() {\n return upgradeTasks;\n }", "class_method_signature": "Upgrade.getUpgradeTasks()", "constructor": false, "full_signature": "@VisibleForTesting List<? extends UpgradeTask> getUpgradeTasks()", "identifier": "getUpgradeTasks", ...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_726
{ "fields": [ { "declarator": "properties = new TemporarySystemProperties()", "modifier": "@Rule\n public final", "original_string": "@Rule\n public final TemporarySystemProperties properties = new TemporarySystemProperties();", "type": "TemporarySystemProperties", "var_name": "pro...
{ "body": "@Test\n public void testGetClusterInfo() throws Exception {\n assumeNonMaprProfile();\n\n YarnController controller = Mockito.mock(YarnController.class);\n YarnService yarnService = new YarnService(new TestListener(), controller, Mockito.mock(NodeProvider.class));\n Cluster cluster = new Clust...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(YarnService.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(YarnService.class);", "type": "Logger", "var_name": "logger" }, { "d...
{ "body": "@Override\n public ClusterEnriched getClusterInfo(final Cluster cluster) throws YarnProvisioningHandlingException {\n // get info about cluster\n // children should do the rest\n TwillController controller = getTwillControllerHelper(cluster);\n final ClusterEnriched clusterEnriched = new Clust...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_376
{ "fields": [ { "declarator": "schema", "modifier": "private", "original_string": "private Schema schema;", "type": "Schema", "var_name": "schema" }, { "declarator": "folder = new TemporaryFolder()", "modifier": "@Rule\n public", "original_string": "@Rule\n...
{ "body": "@Test\n public void testBinarySpec() throws Exception{\n String columnName = \"bytes\";\n byte[] expectedValue = \"test\".getBytes();\n PartitionSpec partitionSpec = PartitionSpec\n .builderFor(schema)\n .identity(columnName)\n .build();\n\n IcebergPartitionData icebergPartition...
{ "fields": [ { "declarator": "partitionType", "modifier": "private final", "original_string": "private final Types.StructType partitionType;", "type": "Types.StructType", "var_name": "partitionType" }, { "declarator": "size", "modifier": "private final", "o...
{ "body": "public void setBytes(int position, byte[] value) {\n set(position, value);\n }", "class_method_signature": "IcebergPartitionData.setBytes(int position, byte[] value)", "constructor": false, "full_signature": "public void setBytes(int position, byte[] value)", "identifier": "setBytes", "invoca...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_399
{ "fields": [], "file": "sabot/kernel/src/test/java/com/dremio/exec/store/dfs/TestDremioFileSystemCache.java", "identifier": "TestDremioFileSystemCache", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void withoutUniqueConnProps() throws Exception {\n final DremioFileSystemCache dfsc = new DremioFileSystemCache();\n final URI uri = URI.create(\"file:///path\");\n\n Configuration conf1 = new Configuration();\n\n // get a filesystem\n FileSystem fs1 = dfsc.get(uri, conf1, n...
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(DremioFileSystemCache.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(DremioFileSystemCache.class);", "type": "org.slf...
{ "body": "public FileSystem get(URI uri, Configuration conf, List<String> uniqueConnectionProps) throws IOException{\n final Key key = new Key(uri, conf, uniqueConnectionProps);\n\n FileSystem fs;\n synchronized (this) {\n fs = map.get(key);\n }\n if (fs != null) {\n return fs;\n }\n\n ...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_663
{ "fields": [ { "declarator": "REMOTE_ENDPOINT_1 = newNodeEndpoint(\"10.0.0.2\", 1234)", "modifier": "private static final", "original_string": "private static final NodeEndpoint REMOTE_ENDPOINT_1 = newNodeEndpoint(\"10.0.0.2\", 1234);", "type": "NodeEndpoint", "var_name": "REMOTE_EN...
{ "body": "@Test\n public void testListStatusWithValidPath() throws IOException {\n Path path = new Path(\"/foo/bar\");\n FileStatus[] statuses = fs.listStatus(path);\n\n assertEquals(5, statuses.length);\n\n // Note -- listStatus does not guarantee ordering. Sorting/then searching for paths\n // rath...
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(PseudoDistributedFileSystem.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(PseudoDistributedFileSystem.class);", "typ...
{ "body": "@Override\n public FileStatus[] listStatus(Path f) throws FileNotFoundException, IOException {\n final RemoteIterator<FileStatus> remoteIterator = listStatusIterator(f);\n\n // Note: RemoteIterator has no relation to java.util.Iterator so frequently used\n // helper functions can't be called on t...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_233
{ "fields": [], "file": "services/accelerator/src/test/java/com/dremio/service/reflection/TestReflectionManager.java", "identifier": "TestReflectionManager", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void handleGoalWithNoEntry(){\n ReflectionId reflectionId = new ReflectionId(\"r_id\");\n ReflectionGoalHash reflectionGoalHash = new ReflectionGoalHash(\"MY_HASH\");\n String reflectionGoalName = \"name\";\n String dataSetId = \"dataSetId\";\n String tag = \"rgTag\";\n Re...
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(ReflectionManager.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(ReflectionManager.class);", "type": "org.slf4j.Logge...
{ "body": "@VisibleForTesting\n void handleGoal(ReflectionGoal goal) {\n final ReflectionEntry entry = reflectionStore.get(goal.getId());\n if (entry == null) {\n // no corresponding reflection, goal has been created or enabled\n if (goal.getState() == ReflectionGoalState.ENABLED) { // we still need ...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_28
{ "fields": [ { "declarator": "datasetPath = new DatasetPath(\"myspace.parentDS\")", "modifier": "private final", "original_string": "private final DatasetPath datasetPath = new DatasetPath(\"myspace.parentDS\");", "type": "DatasetPath", "var_name": "datasetPath" }, { "...
{ "body": "@Test\n public void testMutatorApplyDropNonPreview() {\n boolean preview = false;\n TransformResult result2 = mutator(preview).apply(\"foo\", \"foo2\", newValue, true);\n assertEquals(newHashSet(\"foo2\"), result2.getAddedColumns());\n assertEquals(newHashSet(), result2.getModifiedColumns());\...
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(DatasetStateMutator.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(DatasetStateMutator.class);", "type": "org.slf4j.L...
{ "body": "public TransformResult apply(String oldCol, String newCol, ExpressionBase newExp, boolean dropSourceColumn) {\n return apply(oldCol, newCol, newExp.wrap(), dropSourceColumn);\n }", "class_method_signature": "DatasetStateMutator.apply(String oldCol, String newCol, ExpressionBase newExp, boolean dropSo...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_321
{ "fields": [ { "declarator": "N1_EP1 = newNodeEndpoint(\"node1\", 30010)", "modifier": "private static final", "original_string": "private static final NodeEndpoint N1_EP1 = newNodeEndpoint(\"node1\", 30010);", "type": "NodeEndpoint", "var_name": "N1_EP1" }, { "declara...
{ "body": "@Test\n public void simpleCase2() throws Exception {\n // Set the slice target to 1\n final Wrapper wrapper = newWrapper(200, 1, 20, Collections.singletonList(new EndpointAffinity(N1_EP1, 1.0, true, 50)));\n INSTANCE.parallelizeFragment(wrapper, newParameters(1, 5, 20), null);\n\n // Expect th...
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(HardAffinityFragmentParallelizer.class)", "modifier": "private static final", "original_string": "private static final Logger logger = org.slf4j.LoggerFactory.getLogger(HardAffinityFragmentParallelizer.class);", "typ...
{ "body": "@Override\n public void parallelizeFragment(final Wrapper fragmentWrapper, final ParallelizationParameters parameters,\n final Collection<NodeEndpoint> activeEndpoints) throws PhysicalOperatorSetupException {\n\n final Stats stats = fragmentWrapper.getStats();\n final ParallelizationInfo pInfo ...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_264
{ "fields": [], "file": "services/namespace/src/test/java/com/dremio/service/namespace/file/TestFileFormat.java", "identifier": "TestFileFormat", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testExtractHeaderTextFile() throws Exception {\n TextFileConfig fileFormat = new TextFileConfig();\n fileFormat.setExtractHeader(true);\n String tableOptions = fileFormat.toTableOptions();\n assertContains(\"extractHeader => true\", tableOptions);\n }", "class_method_sig...
{ "fields": [ { "declarator": "buffer = LinkedBuffer.allocate(512)", "modifier": "@JsonIgnore\n private final", "original_string": "@JsonIgnore\n private final LinkedBuffer buffer = LinkedBuffer.allocate(512);", "type": "LinkedBuffer", "var_name": "buffer" }, { "decla...
{ "body": "public String toTableOptions() throws IllegalArgumentException {\n final StringBuilder stringBuilder = new StringBuilder();\n switch (getFileType()) {\n case TEXT:\n case CSV:\n case TSV:\n case PSV:\n final TextFileConfig textFileConfig = (TextFileConfig)this;\n str...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_634
{ "fields": [ { "declarator": "TEST_RPC_TIMEOUT_MS = 100", "modifier": "private static final", "original_string": "private static final int TEST_RPC_TIMEOUT_MS = 100;", "type": "int", "var_name": "TEST_RPC_TIMEOUT_MS" }, { "declarator": "logger = org.slf4j.LoggerFactory...
{ "body": "@Test\n public void testToProtobuFileStatus() throws IOException {\n FileStatus status = TEST_FILE_STATUS;\n\n DFS.FileStatus result = RemoteNodeFileSystem.toProtoFileStatus(status);\n assertEquals(TEST_PATH_STRING, result.getPath());\n assertEquals(1024,result.getLength());\n assertFalse(r...
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(RemoteNodeFileSystem.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(RemoteNodeFileSystem.class);", "type": "org.slf4j...
{ "body": "static DFS.FileStatus toProtoFileStatus(FileStatus status) throws IOException {\n DFS.FileStatus.Builder builder = DFS.FileStatus.newBuilder();\n\n builder\n .setLength(status.getLen())\n .setIsDirectory(status.isDirectory())\n .setBlockReplication(status.getReplication())\n .setB...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_90
{ "fields": [ { "declarator": "table = \"\\\"cp\\\".\\\"tpch/supplier.parquet\\\"\"", "modifier": "private static", "original_string": "private static String table = \"\\\"cp\\\".\\\"tpch/supplier.parquet\\\"\";", "type": "String", "var_name": "table" }, { "declarator":...
{ "body": "@Test\n public void testMultipleOrder() {\n VirtualDatasetState ds =\n extract(getQueryFromSQL(\"select a, b from cp.\\\"json/nested.json\\\" order by b desc, a asc\"));\n assertEquals(\n new VirtualDatasetState()\n .setFrom(new FromTable(\"\\\"cp\\\".\\\"json/nested.json\\\...
{ "fields": [], "file": "dac/backend/src/main/java/com/dremio/dac/explore/QuerySemantics.java", "identifier": "QuerySemantics", "interfaces": "", "methods": [ { "class_method_signature": "QuerySemantics.QuerySemantics()", "constructor": true, "full_signature": "private QuerySemantics()"...
{ "body": "public static VirtualDatasetState extract(QueryMetadata metadata) {\n final com.dremio.service.jobs.metadata.proto.VirtualDatasetState pState = metadata.getState();\n final VirtualDatasetState state = new VirtualDatasetState();\n if (pState.hasFrom()) {\n state.setFrom(fromBuf(pState.getFrom(...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_458
{ "fields": [ { "declarator": "collector = new ErrorCollector()", "modifier": "@Rule\n public final", "original_string": "@Rule\n public final ErrorCollector collector = new ErrorCollector();", "type": "ErrorCollector", "var_name": "collector" } ], "file": "common/src/test/...
{ "body": "@Test\n public void testIsAbsolute() {\n checkIsAbsolute(Path.of(\"/\"), true);\n checkIsAbsolute(Path.of(\"/foo\"), true);\n checkIsAbsolute(Path.of(\"/foo/bar\"), true);\n checkIsAbsolute(Path.of(\"foo\"), false);\n checkIsAbsolute(Path.of(\"foo/bar\"), false);\n checkIsAbsolute(Path.o...
{ "fields": [ { "declarator": "SEPARATOR = \"/\"", "modifier": "public static final", "original_string": "public static final String SEPARATOR = \"/\";", "type": "String", "var_name": "SEPARATOR" }, { "declarator": "SEPARATOR_CHAR = '/'", "modifier": "public stati...
{ "body": "public boolean isAbsolute() {\n return uri.getPath().startsWith(SEPARATOR);\n }", "class_method_signature": "Path.isAbsolute()", "constructor": false, "full_signature": "public boolean isAbsolute()", "identifier": "isAbsolute", "invocations": [ "startsWith", "getPath" ], "modifier...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_423
{ "fields": [ { "declarator": "som", "modifier": "private", "original_string": "private SystemOptionManager som;", "type": "SystemOptionManager", "var_name": "som" }, { "declarator": "kvStore", "modifier": "private", "original_string": "private LegacyKVStore...
{ "body": "@Test\n public void testIterator() {\n registerTestOption(OptionValue.Kind.LONG, \"test-option-0\", \"0\");\n registerTestOption(OptionValue.Kind.LONG, \"test-option-1\", \"1\");\n\n OptionValue optionValue0 = OptionValue.createLong(OptionValue.OptionType.SYSTEM, \"test-option-0\", 100);\n Opt...
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(SystemOptionManager.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(SystemOptionManager.class);", "type": "org.slf4j.L...
{ "body": "@Override\n public Iterator<OptionValue> iterator() {\n return getOptionProtoList().stream()\n .map(OptionValueProtoUtils::toOptionValue)\n .iterator();\n }", "class_method_signature": "SystemOptionManager.iterator()", "constructor": false, "full_signature": "@Override public Iterator<...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_589
{ "fields": [], "file": "client/jdbc/src/test/java/com/dremio/jdbc/impl/TypeConvertingSqlAccessorTest.java", "identifier": "TypeConvertingSqlAccessorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test( expected = SQLConversionOverflowException.class )\n public void test_getInt_on_BIGINT_thatOverflows_throws() throws\n InvalidAccessException {\n final SqlAccessor uut =\n new TypeConvertingSqlAccessor( new BigIntStubAccessor( 2147483648L ) );\n try {\n uut.getInt( 0 );\n }\n ...
{ "fields": [ { "declarator": "innerAccessor", "modifier": "private final", "original_string": "private final SqlAccessor innerAccessor;", "type": "SqlAccessor", "var_name": "innerAccessor" } ], "file": "client/jdbc/src/main/java/com/dremio/jdbc/impl/TypeConvertingSqlAccessor...
{ "body": "@Override\n public int getInt( int rowOffset ) throws InvalidAccessException {\n final int result;\n switch ( getType().getMinorType() ) {\n // 1. Regular type:\n case INT:\n result = innerAccessor.getInt( rowOffset );\n break;\n\n // 2. Converted-from types:\n case...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_566
{ "fields": [], "file": "client/jdbc/src/test/java/com/dremio/jdbc/impl/TypeConvertingSqlAccessorTest.java", "identifier": "TypeConvertingSqlAccessorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test( expected = SQLConversionOverflowException.class )\n public void test_getByte_on_SMALLINT_thatOverflows_rejectsIt()\n throws InvalidAccessException {\n final SqlAccessor uut =\n new TypeConvertingSqlAccessor( new SmallIntStubAccessor( (short) 128 ) );\n try {\n uut.getByte( 0 ...
{ "fields": [ { "declarator": "innerAccessor", "modifier": "private final", "original_string": "private final SqlAccessor innerAccessor;", "type": "SqlAccessor", "var_name": "innerAccessor" } ], "file": "client/jdbc/src/main/java/com/dremio/jdbc/impl/TypeConvertingSqlAccessor...
{ "body": "@Override\n public byte getByte( int rowOffset ) throws InvalidAccessException {\n final byte result;\n switch ( getType().getMinorType() ) {\n // 1. Regular type:\n case TINYINT:\n result = innerAccessor.getByte( rowOffset );\n break;\n\n // 2. Converted-from types:\n ...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_136
{ "fields": [], "file": "services/jobs/src/test/java/com/dremio/service/jobs/TestJobResultToLogEntryConverter.java", "identifier": "TestJobResultToLogEntryConverter", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testOutcomeReasonCancelled() throws Exception {\n JobResultToLogEntryConverter converter = new JobResultToLogEntryConverter();\n Job job = mock(Job.class);\n JobAttempt jobAttempt = new JobAttempt();\n JobInfo jobInfo = new JobInfo();\n JobId jobId = new JobId();\n jo...
{ "fields": [], "file": "services/jobs/src/main/java/com/dremio/service/jobs/JobResultToLogEntryConverter.java", "identifier": "JobResultToLogEntryConverter", "interfaces": "implements Function<Job, LoggedQuery>", "methods": [ { "class_method_signature": "JobResultToLogEntryConverter.apply(Job job)"...
{ "body": "@Override\n public LoggedQuery apply(Job job) {\n final JobInfo info = job.getJobAttempt().getInfo();\n final List<String> contextList = info.getContextList();\n String outcomeReason = null;\n switch(job.getJobAttempt().getState()) {\n case CANCELED:\n outcomeReason = info.getCance...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_618
{ "fields": [], "file": "plugins/s3/src/test/java/com/dremio/plugins/s3/store/TestS3FileSystem.java", "identifier": "TestS3FileSystem", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testUnknownContainerExists() {\n TestExtendedS3FileSystem fs = new TestExtendedS3FileSystem();\n AmazonS3 mockedS3Client = mock(AmazonS3.class);\n when(mockedS3Client.doesBucketExistV2(any(String.class))).thenReturn(true);\n ListObjectsV2Result result = new ListObjectsV2Res...
{ "fields": [ { "declarator": "S3_PERMISSION_ERROR_MSG = \"Access was denied by S3\"", "modifier": "public static final", "original_string": "public static final String S3_PERMISSION_ERROR_MSG = \"Access was denied by S3\";", "type": "String", "var_name": "S3_PERMISSION_ERROR_MSG" ...
{ "body": "@Override\n protected ContainerHolder getUnknownContainer(String containerName) throws IOException {\n // Per docs, if invalid security credentials are used to execute\n // AmazonS3#doesBucketExist method, the client is not able to distinguish\n // between bucket permission errors and invalid cre...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }
97518356_248
{ "fields": [], "file": "services/accelerator/src/test/java/com/dremio/service/reflection/TestReflectionGoalChecker.java", "identifier": "TestReflectionGoalChecker", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testHashingEmptyIfExcludingBlackListFieldsGoal(){\n ReflectionGoal goal = new ReflectionGoal()\n .setTag(Long.toString(System.currentTimeMillis()))\n .setCreatedAt(System.currentTimeMillis())\n .setModifiedAt(System.currentTimeMillis())\n .setVersion(System.curre...
{ "fields": [ { "declarator": "Instance = new ReflectionGoalChecker()", "modifier": "public static final", "original_string": "public static final ReflectionGoalChecker Instance = new ReflectionGoalChecker();", "type": "ReflectionGoalChecker", "var_name": "Instance" }, { ...
{ "body": "public ReflectionGoalHash calculateReflectionGoalVersion(ReflectionGoal reflectionGoal){\n HasherOutput hasherOutput = new HasherOutput();\n Output blackListedOutput = reflectionGoalMaterializationBlackLister.apply(hasherOutput);\n try {\n reflectionGoal.writeTo(blackListedOutput, reflectionG...
{ "created": null, "fork": null, "fork_count": 232, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 97518356, "size": 51402, "stargazer_count": 737, "stars": null, "updates": null, "url": "https://github.com/dremio/dremio-oss" }