id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
97518356_53
{ "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 ruleSuggestionsSelectNumberAtTheEnd() {\n // Select number at the end of the cell text\n Selection selection = new Selection(\"col\", \"883 N Shoreline Blvd, Mountain View, CA 94043\", 40, 5); // \"94043\" is selected\n List<ReplacePatternRule> rules = recommender.getRules(sel...
{ "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": "@Override\n public List<ReplacePatternRule> getRules(Selection selection, DataType selColType) {\n Preconditions.checkArgument(selColType == DataType.TEXT,\n \"Cards generation for Replace/Keeponly/Exclude transforms is supported only on TEXT type columns\");\n\n List<ReplacePatternRule> rule...
{ "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_474
{ "fields": [], "file": "common/src/test/java/com/dremio/common/util/concurrent/TestDremioFutures.java", "identifier": "TestDremioFutures", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testTimeout() {\n SettableFuture future = SettableFuture.create();\n Futures.addCallback(future, new FutureCallback<Integer>() {\n @Override\n public void onSuccess(@Nullable Integer result) {\n try {\n Thread.sleep(10000);\n } catch (InterruptedE...
{ "fields": [], "file": "common/src/main/java/com/dremio/common/util/concurrent/DremioFutures.java", "identifier": "DremioFutures", "interfaces": "", "methods": [ { "class_method_signature": "DremioFutures.DremioFutures()", "constructor": true, "full_signature": "private DremioFutures()...
{ "body": "public static <T, X extends Exception> T getChecked(\n Future<T> future,\n Class<X> exceptionClass,\n Function<? super Throwable, ? extends X> mapper\n ) throws X {\n try {\n return Futures.getChecked(future, ExecutionException.class);\n } catch (ExecutionException e) {\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_161
{ "fields": [], "file": "services/jobtelemetry/server/src/test/java/com/dremio/service/jobtelemetry/server/TestProfileMerger.java", "identifier": "TestProfileMerger", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testMergeWithInconsistentExecutorProfiles2() {\n final CoordinationProtos.NodeEndpoint nodeEndPoint = CoordinationProtos.NodeEndpoint\n .newBuilder()\n .setAddress(\"190.190.0.666\")\n .build();\n\n final UserBitShared.QueryProfile planningProfile =\n UserBitS...
{ "fields": [ { "declarator": "planningProfile", "modifier": "private final", "original_string": "private final QueryProfile planningProfile;", "type": "QueryProfile", "var_name": "planningProfile" }, { "declarator": "tailProfile", "modifier": "private final", ...
{ "body": "static QueryProfile merge(QueryProfile planningProfile, QueryProfile tailProfile,\n Stream<ExecutorQueryProfile> executorProfiles) {\n\n return new ProfileMerger(planningProfile, tailProfile, executorProfiles).merge();\n }", "class_method_signature": "ProfileMerger.merge(QueryProfile planningProfi...
{ "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_531
{ "fields": [ { "declarator": "stringLocalValue = new LocalValue<>()", "modifier": "private static final", "original_string": "private static final LocalValue<String> stringLocalValue = new LocalValue<>();", "type": "LocalValue<String>", "var_name": "stringLocalValue" }, { ...
{ "body": "@Test\n public void testSet() throws Exception {\n stringLocalValue.set(\"value1\");\n intLocalValue.set(1);\n assertEquals(\"value1\", stringLocalValue.get().get());\n assertEquals(new Integer(1), intLocalValue.get().get());\n\n stringLocalValue.set(\"value2\");\n intLocalValue.set(2);\...
{ "fields": [ { "declarator": "VALUES = new ThreadLocal<>()", "modifier": "private static final", "original_string": "private static final ThreadLocal<LocalValuesImpl> VALUES = new ThreadLocal<>();", "type": "ThreadLocal<LocalValuesImpl>", "var_name": "VALUES" }, { "dec...
{ "body": "public void set(T value) {\n Preconditions.checkNotNull(value, \"LocalValue cannot be set to null\");\n doSet(value);\n }", "class_method_signature": "LocalValue.set(T value)", "constructor": false, "full_signature": "public void set(T value)", "identifier": "set", "invocations": [ "ch...
{ "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_198
{ "fields": [ { "declarator": "thrown = ExpectedException.none()", "modifier": "@Rule\n public final", "original_string": "@Rule\n public final ExpectedException thrown = ExpectedException.none();", "type": "ExpectedException", "var_name": "thrown" }, { "declarator": ...
{ "body": "@Test\n public void testOf() {\n //setup expected exception\n if (!valid) {\n thrown.expect(IllegalArgumentException.class);\n }\n\n final KeyTriple<String, String, String> keyPair = KeyTriple.of(values);\n\n assertNotNull(keyPair);\n assertEquals(values.get(0), keyPair.getKey1());\...
{ "fields": [ { "declarator": "key1", "modifier": "private final", "original_string": "private final K1 key1;", "type": "K1", "var_name": "key1" }, { "declarator": "key2", "modifier": "private final", "original_string": "private final K2 key2;", "type"...
{ "body": "@SuppressWarnings(\"unchecked\")\n public static <K1, K2, K3> KeyTriple<K1, K2, K3> of(List<Object> list) {\n checkArgument(list.size() == 3, \"list should be of size 3, had actually %s elements\", list);\n\n final K1 value1 = (K1) list.get(0);\n final K2 value2 = (K2) list.get(1);\n final K3 ...
{ "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_462
{ "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 fileOverride() {\n // clear relevant parameters.\n properties.clear(DremioConfig.EMBEDDED_MASTER_ZK_ENABLED_BOOL);\n properties.clear(DremioConfig.LOCAL_WRITE_PATH_STRING);\n properties.clear(DremioConfig.DB_PATH_STRING);\n properties.clear(\"dremd.write\");\n\n Dremi...
{ "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_45
{ "fields": [ { "declarator": "recommender = new ExtractListRecommender()", "modifier": "private", "original_string": "private ExtractListRecommender recommender = new ExtractListRecommender();", "type": "ExtractListRecommender", "var_name": "recommender" }, { "declarat...
{ "body": "@Test\n public void ruleSuggestionsMultiElement() throws Exception {\n List<ExtractListRule> rules = recommender.getRules(new Selection(\"foo\", \"[ \\\"foo\\\", \\\"bar\\\", \\\"baz\\\" ]\", 3, 10), DataType.LIST);\n assertEquals(4, rules.size());\n compare(new Offset(0, FROM_THE_START), new Off...
{ "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": "@Override\n public List<ExtractListRule> getRules(Selection selection, DataType selColType) {\n checkArgument(selColType == DataType.LIST, \"Extract list items is supported only on LIST type columns\");\n JsonSelection jsonSelection;\n try {\n jsonSelection = new JSONElementLocator(selection...
{ "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_527
{ "fields": [], "file": "common/src/test/java/com/dremio/common/utils/TestPathUtils.java", "identifier": "TestPathUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testVerifyNoAccessOutsideBase() {\n PathUtils.verifyNoAccessOutsideBase(Path.of(\"/\"), Path.of(\"/\"));\n PathUtils.verifyNoAccessOutsideBase(Path.of(\"/\"), Path.of(\"/a\"));\n PathUtils.verifyNoAccessOutsideBase(Path.of(\"/\"), Path.of(\"/a/b\"));\n PathUtils.verifyNoAcc...
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(PathUtils.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(PathUtils.class);", "type": "org.slf4j.Logger", "var_n...
{ "body": "public static void verifyNoAccessOutsideBase(Path basePath, Path givenPath) {\n if (!checkNoAccessOutsideBase(basePath, givenPath)) {\n throw UserException.permissionError()\n .message(\"Not allowed to access files outside of the source root\")\n .addContext(\"Source root\", Path....
{ "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_177
{ "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 testEqualsReturnsTrueWithBooleanFalseFalse() {\n assertTrue(KeyUtils.equals(Boolean.FALSE, Boolean.FALSE));\n }", "class_method_signature": "KeyUtilsTest.testEqualsReturnsTrueWithBooleanFalseFalse()", "constructor": false, "full_signature": "@Test public void testEqualsReturn...
{ "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_659
{ "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 testGetFileStatusWithValidLocalPath() throws IOException {\n Path tmpPath = new Path(\"/tmp/file\");\n doReturn(new FileStatus(1024, false, 1, 4096, 37, 42, FsPermission.createImmutable((short) 0644), \"root\", \"wheel\", tmpPath)).when(mockLocalFS).getFileStatus(tmpPath);\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 getFileStatus(Path f) throws IOException {\n Path absolutePath = toAbsolutePath(f);\n checkPath(absolutePath);\n\n // if the path is not a remote file path\n if (!isRemoteFile(absolutePath)) {\n return new GetFileStatusTask(absolutePath).get();\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_209
{ "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 testValidateOptionsIndexAndCreate() {\n KVStoreOptionUtility.validateOptions(new KVStore.PutOption[]{indexPutOption, createOption});\n }", "class_method_signature": "KVStoreOptionUtilityTest.testValidateOptionsIndexAndCreate()", "constructor": false, "full_signature": "@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 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_12
{ "fields": [ { "declarator": "optionManager", "modifier": "private", "original_string": "private SystemOptionManager optionManager;", "type": "SystemOptionManager", "var_name": "optionManager" }, { "declarator": "kvStoreProvider", "modifier": "private", "or...
{ "body": "@Test\n public void testPre460VersionAndKeyExists() throws Exception {\n final Version version = new Version(\"5.1.0\", 5, 2, 0, 0, \"\");\n assertFalse(SetTableauDefaults.updateOptionsIfNeeded(version, () -> optionManager, true));\n assertFalse(optionManager.isSet(TableauResource.CLIENT_TOOLS_TA...
{ "fields": [ { "declarator": "taskUUID = \"67780ff3-80e1-4d40-88f1-cb7139b5c3de\"", "modifier": "static final", "original_string": "static final String taskUUID = \"67780ff3-80e1-4d40-88f1-cb7139b5c3de\";", "type": "String", "var_name": "taskUUID" }, { "declarator": "V...
{ "body": "@VisibleForTesting\n static boolean updateOptionsIfNeeded(Version previousVersion, Supplier<SystemOptionManager> optionManagerSupplier,\n boolean isOptionManagerOpen) throws Exception {\n // We write a default only when upgrading from versions older than 4.6.0.\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_435
{ "fields": [ { "declarator": "MAX_COLUMNS = 800", "modifier": "private static final", "original_string": "private static final int MAX_COLUMNS = 800;", "type": "int", "var_name": "MAX_COLUMNS" }, { "declarator": "MAX_NESTED_LEVELS = 16", "modifier": "private stat...
{ "body": "@Test\n public void doNotDeleteUnavailableDataset() throws Exception {\n NamespaceService ns = mock(NamespaceService.class);\n when(ns.getDataset(any()))\n .thenReturn(new DatasetConfig()\n .setReadDefinition(new ReadDefinition())\n .setFullPathLi...
{ "fields": [ { "declarator": "MAXIMUM_CACHE_SIZE = 10_000L", "modifier": "private static final", "original_string": "private static final long MAXIMUM_CACHE_SIZE = 10_000L;", "type": "long", "var_name": "MAXIMUM_CACHE_SIZE" }, { "declarator": "logger = org.slf4j.Logger...
{ "body": "UpdateStatus refreshDataset(NamespaceKey datasetKey, DatasetRetrievalOptions options)\n throws ConnectorException, NamespaceException {\n options.withFallback(bridge.getDefaultRetrievalOptions());\n final NamespaceService namespace = bridge.getNamespaceService();\n final DatasetSaver saver = ...
{ "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_120
{ "fields": [ { "declarator": "USER_PATH = \"/user/\"", "modifier": "private static final", "original_string": "private static final String USER_PATH = \"/user/\";", "type": "String", "var_name": "USER_PATH" }, { "declarator": "password = \"foo12bar\"", "modifier"...
{ "body": "@Test\n public void testGetUserByName() throws Exception {\n final UserService userService = l(UserService.class);\n\n User user = expectSuccess(getBuilder(getPublicAPI(3).path(USER_PATH).path(\"by-name\").path(createdUser.getUserName())).buildGet(), User.class);\n assertEquals(user.getId(), crea...
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(UserResource.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(UserResource.class);", "type": "org.slf4j.Logger", ...
{ "body": "@GET\n @Path(\"/by-name/{name}\")\n public User getUserByName(@PathParam(\"name\") String name) throws UserNotFoundException {\n return User.fromUser(userGroupService.getUser(name));\n }", "class_method_signature": "UserResource.getUserByName(@PathParam(\"name\") String name)", "constructor": fal...
{ "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_570
{ "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_BIGINT_thatOverflows_rejectsIt()\n throws InvalidAccessException {\n final SqlAccessor uut =\n new TypeConvertingSqlAccessor( new BigIntStubAccessor( 129 ) );\n try {\n uut.getByte( 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 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_507
{ "fields": [], "file": "common/src/test/java/com/dremio/common/utils/protos/TestBlackListOutput.java", "identifier": "TestBlackListOutput", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void writeObject() throws IOException {\n\n Output delegate = Mockito.mock(Output.class);\n Object object = new Object();\n String schemaName = \"Hello Schema\";\n String shortName = \"Hello\";\n Schema<Object> schema = Mockito.mock(Schema.class);\n int[] sub...
{ "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 <T> void writeObject(int fieldNumber, T value, Schema<T> schema, boolean repeated) throws IOException {\n if(isBlackListed(fieldNumber)){\n return;\n }\n int[] parentBlackList = currentBlackList;\n try {\n //HACK the protostuff api ping pongs back and fourth betwee...
{ "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_157
{ "fields": [], "file": "services/jobtelemetry/server/src/test/java/com/dremio/service/jobtelemetry/server/TestProfileMerger.java", "identifier": "TestProfileMerger", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testMergeWithOnlyThreeParts() {\n final CoordinationProtos.NodeEndpoint nodeEndPoint = CoordinationProtos.NodeEndpoint\n .newBuilder()\n .setAddress(\"190.190.0.666\")\n .build();\n\n final UserBitShared.QueryProfile planningProfile =\n UserBitShared.QueryProf...
{ "fields": [ { "declarator": "planningProfile", "modifier": "private final", "original_string": "private final QueryProfile planningProfile;", "type": "QueryProfile", "var_name": "planningProfile" }, { "declarator": "tailProfile", "modifier": "private final", ...
{ "body": "static QueryProfile merge(QueryProfile planningProfile, QueryProfile tailProfile,\n Stream<ExecutorQueryProfile> executorProfiles) {\n\n return new ProfileMerger(planningProfile, tailProfile, executorProfiles).merge();\n }", "class_method_signature": "ProfileMerger.merge(QueryProfile planningProfi...
{ "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_442
{ "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_EmptySource() throws Exception {\n doMockDatasets(mockUpPlugin, ImmutableList.of());\n catalogService.refreshSource(mockUpKey, CatalogService.REFRESH_EVERYTHING_NOW, CatalogServiceImpl.UpdateType.FULL);\n\n // make sure the namespace has no datasets under...
{ "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_65
{ "fields": [], "file": "dac/backend/src/test/java/com/dremio/dac/explore/TestDatasetTool.java", "identifier": "TestDatasetTool", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testBrokenHistory() throws Exception {\n DatasetPath datasetPath = new DatasetPath(Arrays.asList(\"space\", \"dataset\"));\n DatasetVersion current = new DatasetVersion(\"123\");\n DatasetVersion tip = new DatasetVersion(\"456\");\n DatasetVersion broken = new DatasetVersio...
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(DatasetTool.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(DatasetTool.class);", "type": "org.slf4j.Logger", "v...
{ "body": "History getHistory(final DatasetPath datasetPath, DatasetVersion currentDataset) throws DatasetVersionNotFoundException {\n return getHistory(datasetPath, currentDataset, currentDataset);\n }", "class_method_signature": "DatasetTool.getHistory(final DatasetPath datasetPath, DatasetVersion currentData...
{ "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_291
{ "fields": [], "file": "services/telemetry-api/src/test/java/com/dremio/telemetry/api/config/TestIncludesExcludesFilter.java", "identifier": "TestIncludesExcludesFilter", "interfaces": "", "superclass": "extends DremioTest" }
{ "body": "@Test\n public void noValues() {\n IncludesExcludesFilter f = new IncludesExcludesFilter(Arrays.asList(), Arrays.asList());\n assertTrue(f.matches(null, null));\n }", "class_method_signature": "TestIncludesExcludesFilter.noValues()", "constructor": false, "full_signature": "@Test public void ...
{ "fields": [ { "declarator": "includes", "modifier": "private final", "original_string": "private final List<Pattern> includes;", "type": "List<Pattern>", "var_name": "includes" }, { "declarator": "excludes", "modifier": "private final", "original_string": ...
{ "body": "@Override\n public boolean matches(String name, Metric metric) {\n if (includes.isEmpty() || matches(name, includes)) {\n return allowedViaExcludes(name);\n }\n return false;\n }", "class_method_signature": "IncludesExcludesFilter.matches(String name, Metric metric)", "constructor": fal...
{ "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_100
{ "fields": [ { "declarator": "REFLECTIONS_PATH = \"/reflection/\"", "modifier": "private static final", "original_string": "private static final String REFLECTIONS_PATH = \"/reflection/\";", "type": "String", "var_name": "REFLECTIONS_PATH" }, { "declarator": "CATALOG_P...
{ "body": "@Test\n public void testUpdateReflection() {\n Reflection newReflection = createReflection();\n Reflection response = expectSuccess(getBuilder(getPublicAPI(3).path(REFLECTIONS_PATH)).buildPost(Entity.entity(newReflection, JSON)), Reflection.class);\n\n String betterName = \"much better name\";\n ...
{ "fields": [ { "declarator": "reflectionServiceHelper", "modifier": "private final", "original_string": "private final ReflectionServiceHelper reflectionServiceHelper;", "type": "ReflectionServiceHelper", "var_name": "reflectionServiceHelper" }, { "declarator": "catalo...
{ "body": "@POST\n public Reflection createReflection(Reflection reflection) {\n // TODO: handle exceptions\n ReflectionGoal newReflection = reflectionServiceHelper.createReflection(reflection.toReflectionGoal());\n\n String id = newReflection.getId().getId();\n\n return new Reflection(newReflection, ref...
{ "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_550
{ "fields": [ { "declarator": "NON_NULL_VALUE = 89723408957L", "modifier": "public static final", "original_string": "public static final long NON_NULL_VALUE = 89723408957L;", "type": "long", "var_name": "NON_NULL_VALUE" }, { "declarator": "DST_VALUE = 1558999993123L", ...
{ "body": "@Test\n public void testGetTimestamp() throws Exception {\n assertEquals(\n new Timestamp(72, 10, 4, 3, 10, 8, (int)TimeUnit.MILLISECONDS.toNanos(957)),\n accessor.getTimestamp(0, PST_CALENDAR));\n assertEquals(\n new Timestamp(72, 10, 4, 11, 10, 8, (int)TimeUnit.MILLISECONDS.toNanos(...
{ "fields": [ { "declarator": "TYPE = Types.optional(MinorType.TIMESTAMP)", "modifier": "private static final", "original_string": "private static final MajorType TYPE = Types.optional(MinorType.TIMESTAMP);", "type": "MajorType", "var_name": "TYPE" }, { "declarator": "d...
{ "body": "@Override\n public Timestamp getTimestamp(int index, Calendar calendar) {\n Preconditions.checkNotNull(calendar, \"Invalid calendar used when attempting to retrieve timestamp.\");\n return getTimestamp(index, calendar.getTimeZone());\n }", "class_method_signature": "TimeStampMilliAccessor.getTime...
{ "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_8
{ "fields": [ { "declarator": "optionManager", "modifier": "private", "original_string": "private SystemOptionManager optionManager;", "type": "SystemOptionManager", "var_name": "optionManager" }, { "declarator": "kvStoreProvider", "modifier": "private", "or...
{ "body": "@Test\n public void testPre460Version() throws Exception {\n final Version version = new Version(\"4.5.9\", 4, 5, 9, 0, \"\");\n assertTrue(SetTableauDefaults.updateOptionsIfNeeded(version, () -> optionManager, true));\n assertTrue(optionManager.getOption(TableauResource.CLIENT_TOOLS_TABLEAU));\n...
{ "fields": [ { "declarator": "taskUUID = \"67780ff3-80e1-4d40-88f1-cb7139b5c3de\"", "modifier": "static final", "original_string": "static final String taskUUID = \"67780ff3-80e1-4d40-88f1-cb7139b5c3de\";", "type": "String", "var_name": "taskUUID" }, { "declarator": "V...
{ "body": "@VisibleForTesting\n static boolean updateOptionsIfNeeded(Version previousVersion, Supplier<SystemOptionManager> optionManagerSupplier,\n boolean isOptionManagerOpen) throws Exception {\n // We write a default only when upgrading from versions older than 4.6.0.\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_32
{ "fields": [], "file": "dac/backend/src/test/java/com/dremio/dac/explore/TestJSONElementLocator.java", "identifier": "TestJSONElementLocator", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testParseJsonPath() throws Exception {\n JsonPath p = JSONElementLocator.parsePath(\"value.a\");\n assertEquals(p.toString(), 1, p.size());\n assertEquals(p.toString(), \"a\", p.last().asObject().getField());\n }", "class_method_signature": "TestJSONElementLocator.testParse...
{ "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_415
{ "fields": [], "file": "sabot/kernel/src/test/java/com/dremio/exec/server/options/TestOptionValueProtoUtils.java", "identifier": "TestOptionValueProtoUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testLongOptionFromProto() {\n final OptionValueProto optionProto = OptionValueProto.newBuilder()\n .setName(\"test.option\")\n .setNumVal(1234)\n .build();\n final OptionValue option = OptionValueProtoUtils.toOptionValue(optionProto);\n assertTrue(verifyEquivale...
{ "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 OptionValue toOptionValue(OptionValueProto value) {\n switch (value.getOptionValCase()) {\n case NUM_VAL:\n return OptionValue.createLong(\n OptionValue.OptionType.SYSTEM,\n value.getName(),\n value.getNumVal()\n );\n case STRING_VAL:\n r...
{ "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_696
{ "fields": [ { "declarator": "TEST_USER_NAME = \"testUser\"", "modifier": "private static final", "original_string": "private static final String TEST_USER_NAME = \"testUser\";", "type": "String", "var_name": "TEST_USER_NAME" } ], "file": "plugins/hive3/plugin/src/test/java/...
{ "body": "@Test\n public void impersonationDisabledShouldReturnSystemUser() {\n final HiveConf hiveConf = new HiveConf();\n hiveConf.setBoolVar(HIVE_SERVER2_ENABLE_DOAS, false);\n final SabotContext context = mock(SabotContext.class);\n\n final Hive3StoragePlugin plugin = createHiveStoragePlugin(hiveCon...
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(Hive3StoragePlugin.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(Hive3StoragePlugin.class);", "type": "org.slf4j.Log...
{ "body": "public String getUsername(String name) {\n if (isStorageImpersonationEnabled()) {\n return name;\n }\n return SystemUser.SYSTEM_USERNAME;\n }", "class_method_signature": "Hive3StoragePlugin.getUsername(String name)", "constructor": false, "full_signature": "public String getUsername(St...
{ "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_383
{ "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 simpleOneFileOnAHost() throws Exception {\n final List<CompleteWork> workUnits = asList(\n newWork(\"/10.0.0.1/table/foo1\", 1024, ENDPOINT_1_1, 1.00)\n );\n\n ListMultimap<Integer, CompleteWork> mappings;\n List<NodeEndpoint> endpoints;\n\n endpoints = asList(END...
{ "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_679
{ "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 testDeleteUnknownLocalFile() throws IOException {\n doThrow(FileNotFoundException.class).when(mockLocalFS).delete(\n new Path(\"/foo/unknown\"),\n false);\n\n Path path = new Path(\"/foo/10.0.0.1@unknown\");\n try{\n fs.delete(path, false);\n fail(\"Exp...
{ "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 delete(Path f, boolean recursive) throws IOException {\n Path absolutePath = toAbsolutePath(f);\n checkPath(absolutePath);\n\n // Handle root\n if (absolutePath.isRoot()) {\n throw new AccessControlException(\"Cannot delete \" + f);\n }\n\n if (!isRemoteFi...
{ "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_229
{ "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 testGetCreateOrVersionOptionIndexPutOptionFound() {\n // Act\n final Optional<KVStore.PutOption> ret = KVStoreOptionUtility.getCreateOrVersionOption(new KVStore.PutOption[]{indexPutOption});\n\n // Assert\n assertFalse(ret.isPresent());\n }", "class_method_signature": "K...
{ "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_546
{ "fields": [ { "declarator": "NON_NULL_VALUE = \"Non-null value\"", "modifier": "public static final", "original_string": "public static final Object NON_NULL_VALUE = \"Non-null value\";", "type": "Object", "var_name": "NON_NULL_VALUE" }, { "declarator": "genericAccess...
{ "body": "@Test\n public void testGetType() throws Exception {\n assertEquals(UserBitShared.SerializedField.getDefaultInstance().getMajorType(), genericAccessor.getType());\n }", "class_method_signature": "GenericAccessorTest.testGetType()", "constructor": false, "full_signature": "@Test public void testG...
{ "fields": [ { "declarator": "v", "modifier": "private", "original_string": "private ValueVector v;", "type": "ValueVector", "var_name": "v" } ], "file": "client/jdbc/src/main/java/com/dremio/exec/vector/accessor/GenericAccessor.java", "identifier": "GenericAccessor", "i...
{ "body": "@Override\n public MajorType getType() {\n return getMajorTypeForField(v.getField());\n }", "class_method_signature": "GenericAccessor.getType()", "constructor": false, "full_signature": "@Override public MajorType getType()", "identifier": "getType", "invocations": [ "getMajorTypeForFie...
{ "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_116
{ "fields": [ { "declarator": "USER_PATH = \"/user/\"", "modifier": "private static final", "original_string": "private static final String USER_PATH = \"/user/\";", "type": "String", "var_name": "USER_PATH" }, { "declarator": "password = \"foo12bar\"", "modifier"...
{ "body": "@Test\n public void testGetUserById() throws Exception {\n final UserService userService = l(UserService.class);\n com.dremio.service.users.User user1 = userService.getUser(\"user1\");\n\n User user = expectSuccess(getBuilder(getPublicAPI(3).path(USER_PATH).path(user1.getUID().getId())).buildGet(...
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(UserResource.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(UserResource.class);", "type": "org.slf4j.Logger", ...
{ "body": "@GET\n @Path(\"/{id}\")\n public User getUser(@PathParam(\"id\") String id) throws UserNotFoundException {\n return User.fromUser(userGroupService.getUser(new UID(id)));\n }", "class_method_signature": "UserResource.getUser(@PathParam(\"id\") String id)", "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_403
{ "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 withManyTasks() throws Exception {\n\n List<TimedRunnable<Void>> tasks = Lists.newArrayList();\n\n for (int i = 0; i < 150000; i++) {\n tasks.add(new TestTask(0));\n }\n\n TimedRunnable.run(\"Execution with lots of tasks\", logger, tasks, 16);\n }", "class_method_si...
{ "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_24
{ "fields": [], "file": "dac/backend/src/test/java/com/dremio/dac/util/TestDateUtils.java", "identifier": "TestDateUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetMonthStartDate() {\n LocalDate testDate1 = LocalDate.parse(\"2020-03-01\");\n LocalDate monthStartDate = DateUtils.getMonthStartDate(testDate1);\n assertEquals(testDate1, monthStartDate);\n\n LocalDate testDate2 = LocalDate.parse(\"2020-03-31\");\n LocalDate date2...
{ "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 getMonthStartDate(final LocalDate dateWithinMonth) {\n int dayOfMonth = dateWithinMonth.getDayOfMonth();\n return dateWithinMonth.minusDays((dayOfMonth - 1)); // minus one to adjust today\n }", "class_method_signature": "DateUtils.getMonthStartDate(final LocalDate dateWithi...
{ "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_680
{ "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 testDeleteUnknownRemoteFile() throws IOException {\n doThrow(FileNotFoundException.class).when(mockRemoteFS).delete(\n new Path(\"/foo/unknown\"),\n false);\n\n Path path = new Path(\"/foo/10.0.0.2@unknown\");\n try{\n fs.delete(path, false);\n fail(\"E...
{ "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 delete(Path f, boolean recursive) throws IOException {\n Path absolutePath = toAbsolutePath(f);\n checkPath(absolutePath);\n\n // Handle root\n if (absolutePath.isRoot()) {\n throw new AccessControlException(\"Cannot delete \" + f);\n }\n\n if (!isRemoteFi...
{ "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_395
{ "fields": [], "file": "sabot/kernel/src/test/java/com/dremio/exec/store/dfs/easy/TestEasyScanOperatorCreator.java", "identifier": "TestEasyScanOperatorCreator", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void selectionIgnoresIncremental() {\n BatchSchema schema = mock(BatchSchema.class);\n when(schema.iterator())\n .thenReturn(Lists.newArrayList(Field.nullable(\"a1\", new ArrowType.Bool()),\n Field.nullable(IncrementalUpdateUtils.UPDATE_COLUMN, new ArrowType.Bool()))...
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(com.dremio.exec.store.dfs.easy.EasyScanOperatorCreator.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(com.dremio.exec.store...
{ "body": "static boolean selectsAllColumns(final BatchSchema datasetSchema, final List<SchemaPath> projectedColumns) {\n final Set<String> columnsInTable = FluentIterable.from(datasetSchema)\n .transform(\n new Function<Field, String>() {\n @Override\n public String app...
{ "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_141
{ "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 testGetEnqueuedTimeFailedJob() {\n // job that has been enqueued for at 3 hours\n final ResourceSchedulingInfo schedulingInfo = new ResourceSchedulingInfo()\n .setResourceSchedulingStart(System.currentTimeMillis() - TimeUnit.HOURS.toMillis(3))\n .setResourceSchedulingEn...
{ "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 static long getLegacyEnqueuedTime(JobAttempt jobAttempt) {\n final JobInfo jobInfo = jobAttempt.getInfo();\n if (jobInfo == null) {\n return 0;\n }\n\n final ResourceSchedulingInfo schedulingInfo = jobInfo.getResourceSchedulingInfo();\n if (schedulingInfo == null) {\n 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_511
{ "fields": [], "file": "common/src/test/java/com/dremio/common/utils/TestSqlUtils.java", "identifier": "TestSqlUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testIsKeyword() {\n assertTrue(SqlUtils.isKeyword(\"USER\"));\n assertTrue(SqlUtils.isKeyword(\"FiLeS\"));\n assertFalse(SqlUtils.isKeyword(\"myUSER\"));\n }", "class_method_signature": "TestSqlUtils.testIsKeyword()", "constructor": false, "full_signature": "@Test publi...
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(SqlUtils.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(SqlUtils.class);", "type": "org.slf4j.Logger", "var_nam...
{ "body": "public static boolean isKeyword(String id) {\n Preconditions.checkState(RESERVED_SQL_KEYWORDS != null,\n \"SQL reserved keyword list is not loaded. Please check the logs for error messages.\");\n return RESERVED_SQL_KEYWORDS.contains(id.toUpperCase());\n }", "class_method_signature": "SqlUt...
{ "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_73
{ "fields": [ { "declarator": "cardGenerator = new CardGenerator(null, null, null)", "modifier": "private", "original_string": "private CardGenerator cardGenerator = new CardGenerator(null, null, null);", "type": "CardGenerator", "var_name": "cardGenerator" }, { "declar...
{ "body": "@Test\n public void matchCountGeneratorQuery() {\n // Expect backticks around column name as it has special characters in it.\n String outputQuery1 = cardGenerator.generateMatchCountQuery(\"col with spaces\",\n \"TABLE(\\\"jobstore\\\".\\\"path\\\"(type => 'arrow))\", rules);\n String expQ...
{ "fields": [ { "declarator": "executor", "modifier": "private final", "original_string": "private final QueryExecutor executor;", "type": "QueryExecutor", "var_name": "executor" }, { "declarator": "datasetPath", "modifier": "private final", "original_string...
{ "body": "<T> String generateMatchCountQuery(String inputColName, String datasetPreviewTable, List<TransformRuleWrapper<T>> evaluators) {\n\n StringBuilder queryBuilder = new StringBuilder();\n\n String inputExpr = String.format(\"%s.%s\", quoteIdentifier(\"dremio_preview_data\"), quoteIdentifier(inputColName)...
{ "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_454
{ "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 testResolveOfPath() {\n checkResolveOfPath(Path.of(\"hdfs://hostname/base\"), Path.of(\"/foo/bar\"), Path.of(\"/foo/bar\"));\n checkResolveOfPath(Path.of(\"hdfs://hostname/base\"), Path.of(\"foo/bar\"), Path.of(\"hdfs://hostname/base/foo/bar\"));\n checkResolveOfPath(Path.of(\...
{ "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_287
{ "fields": [], "file": "services/scheduler/src/test/java/com/dremio/service/scheduler/TestLocalSchedulerService.java", "identifier": "TestLocalSchedulerService", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void scheduleCancelledBeforeRun() throws Exception {\n final List<MockScheduledFuture<?>> futures = Lists.newArrayList();\n final CloseableSchedulerThreadPool executorService = mock(CloseableSchedulerThreadPool.class);\n\n doAnswer(new Answer<ScheduledFuture<Object>>() {\n @Ov...
{ "fields": [ { "declarator": "LOGGER = org.slf4j.LoggerFactory.getLogger(LocalSchedulerService.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger LOGGER = org.slf4j.LoggerFactory.getLogger(LocalSchedulerService.class);", "type": "org.slf...
{ "body": "@Override\n public Cancellable schedule(Schedule schedule, Runnable task) {\n if (!assumeTaskLeadership) {\n return plainSchedule(schedule, task);\n }\n\n if (!schedule.isDistributedSingleton()) {\n return plainSchedule(schedule, task);\n }\n\n final TaskLeaderElection taskLeaderE...
{ "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_638
{ "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(expected = FileNotFoundException.class)\n public void testGetFileStatusWithInvalidPath() throws Exception {\n {\n setupRPC(\n DFS.RpcType.GET_FILE_STATUS_REQUEST, DFS.GetFileStatusRequest.newBuilder().setPath(\"/foo/bar\").build(),\n DFS.GetFileStatusResponse.class, newRPCE...
{ "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 FileStatus getFileStatus(Path f) throws IOException {\n Path absolutePath = toAbsolutePath(f);\n checkPath(absolutePath);\n\n final GetFileStatusCommand command = new GetFileStatusCommand(absolutePath.toUri().getPath());\n runner.runCommand(command);\n\n RpcFuture<DFS.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_268
{ "fields": [], "file": "services/namespace/src/test/java/com/dremio/service/namespace/file/TestFileFormat.java", "identifier": "TestFileFormat", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDefaultParquetFileFormatOptions() throws Exception {\n ParquetFileConfig fileFormat = new ParquetFileConfig();\n String tableOptions = fileFormat.toTableOptions();\n assertContains(\"type => 'parquet'\", tableOptions);\n }", "class_method_signature": "TestFileFormat.tes...
{ "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_585
{ "fields": [], "file": "client/jdbc/src/test/java/com/dremio/jdbc/impl/TypeConvertingSqlAccessorTest.java", "identifier": "TypeConvertingSqlAccessorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void test_getInt_on_TINYINT_getsIt() throws InvalidAccessException {\n final SqlAccessor uut1 =\n new TypeConvertingSqlAccessor( new TinyIntStubAccessor( (byte) 127 ) );\n assertThat( uut1.getInt( 0 ), equalTo( 127 ) );\n final SqlAccessor uut2 =\n new TypeConvertingS...
{ "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_643
{ "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(expected = FileNotFoundException.class)\n public void testListStatusWithInvalidPath() throws Exception {\n setupRPC(\n DFS.RpcType.LIST_STATUS_REQUEST, DFS.ListStatusRequest.newBuilder().setPath(\"/foo/bar\").setLimit(RemoteNodeFileSystem.LIST_STATUS_BATCH_SIZE_DEFAULT).build(),\n D...
{ "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 FileStatus[] listStatus(Path f) throws FileNotFoundException, IOException {\n RemoteIterator<FileStatus> remoteIterator = listStatusIterator(f);\n List<FileStatus> statuses = new ArrayList<>();\n while(remoteIterator.hasNext()) {\n statuses.add(remoteIterator.next());\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_213
{ "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 testValidateOptionsVersionAndIndex() {\n KVStoreOptionUtility.validateOptions(new KVStore.PutOption[]{versionOption, indexPutOption});\n }", "class_method_signature": "KVStoreOptionUtilityTest.testValidateOptionsVersionAndIndex()", "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_706
{ "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 validateZipDirectoryZipSlipTestUpdirMoreThanNestedCorrectDir() throws IOException {\n // This expected to pass, because this will eventually resolve to /baseTmpDir/nestedTmpDir/somedir/somefile,\n // which is a legal path within the base directory.\n ZipEntry entry = new ZipEn...
{ "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_356
{ "fields": [ { "declarator": "ARBTRIARY_LEAF", "modifier": "private static final", "original_string": "private static final EmptyValues ARBTRIARY_LEAF;", "type": "EmptyValues", "var_name": "ARBTRIARY_LEAF" }, { "declarator": "SORT_FACTOR = new TypeValidators.RangeDoubl...
{ "body": "@Test\n public void doubleSort() {\n ExternalSort es1 = new ExternalSort(OpProps.prototype().cloneWithNewReserve(0).cloneWithMemoryExpensive(true).cloneWithMemoryFactor(options.getOption(SORT_FACTOR)).cloneWithBound(options.getOption(SORT_BOUNDED)), ARBTRIARY_LEAF, Collections.emptyList(), false);\n ...
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(MemoryAllocationUtilities.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(MemoryAllocationUtilities.class);", "type": ...
{ "body": "@VisibleForTesting\n static void setMemory(final OptionManager optionManager, Map<Fragment, Wrapper> fragments, long maxMemoryPerNodePerQuery) {\n final ArrayListMultimap<NodeEndpoint, PhysicalOperator> consideredOps = ArrayListMultimap.create();\n final ArrayListMultimap<NodeEndpoint, PhysicalOpera...
{ "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_182
{ "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 testEqualsReturnsFalseWithByteArraysDifferentLength() {\n byte[] left = new byte[]{0, 1, 2, 3, 4};\n byte[] right = new byte[]{0, 1, 2, 3};\n\n assertFalse(KeyUtils.equals(left, right));\n }", "class_method_signature": "KeyUtilsTest.testEqualsReturnsFalseWithByteArraysDiffe...
{ "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_478
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory\n .getLogger(\"--ignore.as.this.is.for.testing.exceptions--\")", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory\n .getLogger(\"--ignore.as.this.is...
{ "body": "@Test\n public void testSerializeDeserialize() throws Exception {\n UserException ex = UserException.functionError()\n .message(\"test\")\n .setAdditionalExceptionContext(new TestContext(TEST_DATA))\n .build(logger);\n Assert.assertTrue(ex.getRawAdditionalExceptionContext() != null);\...
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(JsonAdditionalExceptionContext.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(JsonAdditionalExceptionContext.class);", ...
{ "body": "protected static <T extends AdditionalExceptionContext> T fromUserException(Class<T> clazz, UserException ex) {\n if (ex.getRawAdditionalExceptionContext() == null) {\n logger.debug(\"missing additional context in UserException\");\n return null;\n }\n\n try {\n return ProtobufByteS...
{ "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_497
{ "fields": [], "file": "common/src/test/java/com/dremio/common/utils/protos/TestBlackListOutput.java", "identifier": "TestBlackListOutput", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void writeSFixed64() 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.writeSFixed64(1, 9, fa...
{ "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 writeSFixed64(int fieldNumber, long value, boolean repeated) throws IOException {\n if(isBlackListed(fieldNumber)){\n return;\n }\n delegate.writeSFixed64(fieldNumber, value, repeated);\n }", "class_method_signature": "BlackListOutput.writeSFixed64(int fieldNumber,...
{ "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_244
{ "fields": [], "file": "services/accelerator/src/test/java/com/dremio/service/reflection/TestReflectionGoalChecker.java", "identifier": "TestReflectionGoalChecker", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testMismatchNullVersion() {\n final String testTag = \"1\";\n final ReflectionGoal goal = ReflectionGoal.getDefaultInstance().newMessage()\n .setTag(\"wrongTag\")\n .setVersion(null);\n assertFalse(ReflectionGoalChecker.checkGoal(goal, new ReflectionEntry().setGoalVe...
{ "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_614
{ "fields": [ { "declarator": "TEST_USER_NAME = \"testUser\"", "modifier": "private static final", "original_string": "private static final String TEST_USER_NAME = \"testUser\";", "type": "String", "var_name": "TEST_USER_NAME" } ], "file": "plugins/hive/src/test/hive2/com/dre...
{ "body": "@Test\n public void impersonationDisabledShouldReturnSystemUser() {\n final HiveConf hiveConf = new HiveConf();\n hiveConf.setBoolVar(HIVE_SERVER2_ENABLE_DOAS, false);\n final SabotContext context = mock(SabotContext.class);\n\n final HiveStoragePlugin plugin = createHiveStoragePlugin(hiveConf...
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(HiveStoragePlugin.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(HiveStoragePlugin.class);", "type": "org.slf4j.Logge...
{ "body": "public String getUsername(String name) {\n if (isStorageImpersonationEnabled()) {\n return name;\n }\n return SystemUser.SYSTEM_USERNAME;\n }", "class_method_signature": "HiveStoragePlugin.getUsername(String name)", "constructor": false, "full_signature": "public String getUsername(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_301
{ "fields": [ { "declarator": "bfTestAllocator", "modifier": "private", "original_string": "private BufferAllocator bfTestAllocator;", "type": "BufferAllocator", "var_name": "bfTestAllocator" }, { "declarator": "allocatorRule = AllocatorRule.defaultAllocator()", "...
{ "body": "@Test\n public void testSendRuntimeFilterToProbeScan() {\n int probeScanId = 2;\n int probeOpId = 131074;\n int buildMajorFragment = 1;\n int buildMinorFragment = 2;\n int buildOpId = 65541;\n QueryId queryId = QueryId.newBuilder().build();\n try (ArrowBu...
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(VectorizedHashJoinOperator.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(VectorizedHashJoinOperator.class);", "type"...
{ "body": "@VisibleForTesting\n void sendRuntimeFilterToProbeScan(RuntimeFilter filter, Optional<BloomFilter> partitionColFilter) {\n logger.debug(\"Sending join runtime filter to probe scan {}:{}, Filter {}\", filter.getProbeScanOperatorId(), filter.getProbeScanMajorFragmentId(), partitionColFilter);\n logger...
{ "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_49
{ "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 ruleSuggestionsSelectMiddleNumber() {\n // Select a number within a text type cell\n Selection selection = new Selection(\"col\", \"There are 20 types of people\", 10, 2); // \"20\" is selected\n List<ReplacePatternRule> rules = recommender.getRules(selection, TEXT);\n asse...
{ "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": "@Override\n public List<ReplacePatternRule> getRules(Selection selection, DataType selColType) {\n Preconditions.checkArgument(selColType == DataType.TEXT,\n \"Cards generation for Replace/Keeponly/Exclude transforms is supported only on TEXT type columns\");\n\n List<ReplacePatternRule> rule...
{ "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_194
{ "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 testHashBytesAndString() {\n assertEquals(214780274, KeyUtils.hash(new byte[]{1, 2, 3, 4, 5, 6}, \"test hash string\"));\n }", "class_method_signature": "KeyUtilsTest.testHashBytesAndString()", "constructor": false, "full_signature": "@Test public void testHashBytesAndString(...
{ "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_481
{ "fields": [], "file": "common/src/test/java/com/dremio/common/TestAutoCloseables.java", "identifier": "TestAutoCloseables", "interfaces": "", "superclass": "" }
{ "body": "@Test(expected = RuntimeException.class)\n public void testCloseWithExpectedRuntimeException() throws IOException {\n Resource r1 = new Resource();\n Resource r2 = new Resource();\n AutoCloseables.close(IOException.class,\n () -> r1.closeWithException(new RuntimeException(\"R1 exception\")),...
{ "fields": [ { "declarator": "noOpAutocloseable = new AutoCloseable() {\n @Override\n public void close() {\n }\n }", "modifier": "private static final", "original_string": "private static final AutoCloseable noOpAutocloseable = new AutoCloseable() {\n @Override\n public void cl...
{ "body": "public static void close(Throwable t, AutoCloseable... autoCloseables) {\n close(t, Arrays.asList(autoCloseables));\n }", "class_method_signature": "AutoCloseables.close(Throwable t, AutoCloseable... autoCloseables)", "constructor": false, "full_signature": "public static void close(Throwable 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_602
{ "fields": [], "file": "client/jdbc/src/test/java/com/dremio/jdbc/impl/TypeConvertingSqlAccessorTest.java", "identifier": "TypeConvertingSqlAccessorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void test_getFloat_on_FLOAT_getsIt() throws InvalidAccessException {\n final SqlAccessor uut1 =\n new TypeConvertingSqlAccessor( new FloatStubAccessor( 1.23f ) );\n assertThat( uut1.getFloat( 0 ), equalTo( 1.23f ) );\n final SqlAccessor uut2 =\n new TypeConvertingSqlA...
{ "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 float getFloat( int rowOffset ) throws InvalidAccessException {\n final float result;\n switch ( getType().getMinorType() ) {\n // 1. Regular type:\n case FLOAT4:\n result = innerAccessor.getFloat( 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_252
{ "fields": [], "file": "services/options/src/test/java/com/dremio/options/TestOptionList.java", "identifier": "TestOptionList", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testMergeOptionLists() {\n final OptionValue optionValue0 = OptionValue.createBoolean(OptionValue.OptionType.SYSTEM, \"test-option0\", false);\n final OptionValue optionValue1 = OptionValue.createLong(OptionValue.OptionType.SYSTEM, \"test-option1\", 2);\n final OptionValue opt...
{ "fields": [ { "declarator": "EXTRACT_OPTION_NAME = new Function<OptionValue, String>() {\n @Override\n public String apply(OptionValue input) {\n return input.getName();\n }\n }", "modifier": "private static final", "original_string": "private static final Function<OptionValue,...
{ "body": "public void mergeIfNotPresent(OptionList list) {\n final Set<OptionValue> options = Sets.newTreeSet(this);\n for (OptionValue optionValue : list) {\n if (options.add(optionValue)) {\n this.add(optionValue);\n }\n }\n }", "class_method_signature": "OptionList.mergeIfNotPresent(O...
{ "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_317
{ "fields": [], "file": "sabot/kernel/src/test/java/com/dremio/exec/planner/fragment/TestEndpointsIndex.java", "identifier": "TestEndpointsIndex", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void indexEndpointSingle() {\n EndpointsIndex.Builder indexBuilder = new EndpointsIndex.Builder();\n\n NodeEndpoint ep = NodeEndpoint.newBuilder()\n .setAddress(\"localhost\")\n .setFabricPort(1700)\n .build();\n MinorFragmentEndpoint expected = new MinorFragme...
{ "fields": [ { "declarator": "fragmentsEndpointMap = new ConcurrentHashMap<>()", "modifier": "private", "original_string": "private Map<MinorFragmentIndexEndpoint, MinorFragmentEndpoint> fragmentsEndpointMap = new ConcurrentHashMap<>();", "type": "Map<MinorFragmentIndexEndpoint, MinorFrag...
{ "body": "public MinorFragmentEndpoint getFragmentEndpoint(MinorFragmentIndexEndpoint ep) {\n // These tend to be repetitive. so, reuse object where possible.\n return fragmentsEndpointMap.computeIfAbsent(ep,\n k -> new MinorFragmentEndpoint(k.getMinorFragmentId(), endpoints.get(k.getEndpointIndex())));\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_439
{ "fields": [ { "declarator": "MAX_COLUMNS = 800", "modifier": "private static final", "original_string": "private static final int MAX_COLUMNS = 800;", "type": "int", "var_name": "MAX_COLUMNS" }, { "declarator": "MAX_NESTED_LEVELS = 16", "modifier": "private stat...
{ "body": "@Test\n public void dataSetPathCaseSensitivity() throws Exception {\n final String qualifier = \"inspector\";\n final String original = \"testPath\";\n final String capital = \"TESTPATH\";\n final ImmutableList<String> fullPathList = ImmutableList.of(qualifier, original);\n final EntityPath...
{ "fields": [ { "declarator": "MAXIMUM_CACHE_SIZE = 10_000L", "modifier": "private static final", "original_string": "private static final long MAXIMUM_CACHE_SIZE = 10_000L;", "type": "long", "var_name": "MAXIMUM_CACHE_SIZE" }, { "declarator": "logger = org.slf4j.Logger...
{ "body": "UpdateStatus refreshDataset(NamespaceKey datasetKey, DatasetRetrievalOptions options)\n throws ConnectorException, NamespaceException {\n options.withFallback(bridge.getDefaultRetrievalOptions());\n final NamespaceService namespace = bridge.getNamespaceService();\n final DatasetSaver saver = ...
{ "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_593
{ "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_DOUBLE_thatOverflows_rejectsIt() throws\n InvalidAccessException {\n final SqlAccessor uut =\n new TypeConvertingSqlAccessor( new DoubleStubAccessor( -2147483649.0d ) );\n try {\n uut.getInt( 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 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_205
{ "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 testValidateOptionsSingleCreate() {\n KVStoreOptionUtility.validateOptions(new KVStore.PutOption[]{createOption});\n }", "class_method_signature": "KVStoreOptionUtilityTest.testValidateOptionsSingleCreate()", "constructor": false, "full_signature": "@Test public void testVali...
{ "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_655
{ "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 testGetFileStatusForInvalidPath() throws IOException {\n Path path = new Path(\"/foo/baz\");\n try {\n fs.getFileStatus(path);\n fail(\"Expected getFileStatus to throw FileNotFoundException\");\n } catch (FileNotFoundException e) {\n }\n }", "class_method_signa...
{ "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 getFileStatus(Path f) throws IOException {\n Path absolutePath = toAbsolutePath(f);\n checkPath(absolutePath);\n\n // if the path is not a remote file path\n if (!isRemoteFile(absolutePath)) {\n return new GetFileStatusTask(absolutePath).get();\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_340
{ "fields": [], "file": "sabot/kernel/src/test/java/com/dremio/exec/planner/sql/TestSQLAnalyzerFactory.java", "identifier": "TestSQLAnalyzerFactory", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCreationOfValidator() {\n SabotContext sabotContext = mock(SabotContext.class);\n FunctionImplementationRegistry functionImplementationRegistry = mock(FunctionImplementationRegistry.class);\n CatalogService catalogService = mock(CatalogService.class);\n Catalog catalog ...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(SQLAnalyzerFactory.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(SQLAnalyzerFactory.class);", "type": "Logger", "var_name": "logger" } ...
{ "body": "public static SQLAnalyzer createSQLAnalyzer(final String username,\n final SabotContext sabotContext,\n final List<String> context,\n final boolean createForSqlSuggestions,...
{ "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_710
{ "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(expected = IOException.class)\n public void validateZipDirectoryZipSlipTestNestedUpdirMore() throws IOException {\n ZipEntry entry = new ZipEntry(\"../../../../../tmpDir/somedir/somefile\");\n NativeLibPluginClassLoader.validateZipDirectory(mockNestedTempDir, entry);\n }", "class_method_sig...
{ "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_204
{ "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 testValidateOptionsEmpty() {\n KVStoreOptionUtility.validateOptions(new KVStore.PutOption[]{});\n }", "class_method_signature": "KVStoreOptionUtilityTest.testValidateOptionsEmpty()", "constructor": false, "full_signature": "@Test public void testValidateOptionsEmpty()", "id...
{ "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_654
{ "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 testGetFileStatusRoot() throws IOException {\n Path root = new Path(\"/\");\n FileStatus status = fs.getFileStatus(root);\n\n assertEquals(new Path(\"pdfs:/\"), status.getPath());\n assertTrue(status.isDirectory());\n assertEquals(0555, status.getPermission().toExtendedS...
{ "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 getFileStatus(Path f) throws IOException {\n Path absolutePath = toAbsolutePath(f);\n checkPath(absolutePath);\n\n // if the path is not a remote file path\n if (!isRemoteFile(absolutePath)) {\n return new GetFileStatusTask(absolutePath).get();\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_341
{ "fields": [], "file": "sabot/kernel/src/test/java/com/dremio/exec/planner/sql/TestSQLConverter.java", "identifier": "TestSQLConverter", "interfaces": "", "superclass": "" }
{ "body": "@Test(expected = UserException.class)\n public void testFailMultipleQueries() {\n ParserConfig config = new ParserConfig(ParserConfig.QUOTING, 100);\n SqlConverter.parseSingleStatementImpl(\"select * from t1; select * from t2\", config, false);\n }", "class_method_signature": "TestSQLConverter.te...
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(SqlConverter.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(SqlConverter.class);", "type": "org.slf4j.Logger", ...
{ "body": "@VisibleForTesting\n static SqlNode parseSingleStatementImpl(String sql, ParserConfig parserConfig, boolean isInnerQuery) {\n SqlNodeList list = parseMultipleStatementsImpl(sql, parserConfig, isInnerQuery);\n if (list.size() > 1) {\n SqlParserPos pos = list.get(1).getParserPosition();\n 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_711
{ "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(expected = IOException.class)\n public void validateZipDirectoryZipSlipTest() throws IOException {\n ZipEntry entry = new ZipEntry(\"../somefile\");\n NativeLibPluginClassLoader.validateZipDirectory(mockTempDir, entry);\n }", "class_method_signature": "TestNativeLibPluginClassLoader.validat...
{ "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_438
{ "fields": [ { "declarator": "MAX_COLUMNS = 800", "modifier": "private static final", "original_string": "private static final int MAX_COLUMNS = 800;", "type": "int", "var_name": "MAX_COLUMNS" }, { "declarator": "MAX_NESTED_LEVELS = 16", "modifier": "private stat...
{ "body": "@Test\n public void checkForceUpdate() throws Exception {\n NamespaceService ns = mock(NamespaceService.class);\n when(ns.getDataset(any())).thenReturn(null);\n\n DatasetMetadataSaver saver = mock(DatasetMetadataSaver.class);\n doNothing().when(saver).saveDataset(any(), anyBoolean(), any(), an...
{ "fields": [ { "declarator": "MAXIMUM_CACHE_SIZE = 10_000L", "modifier": "private static final", "original_string": "private static final long MAXIMUM_CACHE_SIZE = 10_000L;", "type": "long", "var_name": "MAXIMUM_CACHE_SIZE" }, { "declarator": "logger = org.slf4j.Logger...
{ "body": "UpdateStatus refreshDataset(NamespaceKey datasetKey, DatasetRetrievalOptions options)\n throws ConnectorException, NamespaceException {\n options.withFallback(bridge.getDefaultRetrievalOptions());\n final NamespaceService namespace = bridge.getNamespaceService();\n final DatasetSaver saver = ...
{ "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_592
{ "fields": [], "file": "client/jdbc/src/test/java/com/dremio/jdbc/impl/TypeConvertingSqlAccessorTest.java", "identifier": "TypeConvertingSqlAccessorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void test_getInt_on_DOUBLE_thatFits_getsIt() throws InvalidAccessException {\n final SqlAccessor uut =\n new TypeConvertingSqlAccessor( new DoubleStubAccessor( -2147483648.0d ) );\n assertThat( uut.getInt( 0 ), equalTo( -2147483648 ) );\n }", "class_method_signature": "TypeC...
{ "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_603
{ "fields": [], "file": "client/jdbc/src/test/java/com/dremio/jdbc/impl/TypeConvertingSqlAccessorTest.java", "identifier": "TypeConvertingSqlAccessorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void test_getFloat_on_DOUBLE_thatFits_getsIt() throws InvalidAccessException {\n final SqlAccessor uut1 =\n new TypeConvertingSqlAccessor( new DoubleStubAccessor( 1.125 ) );\n assertThat( uut1.getFloat( 0 ), equalTo( 1.125f ) );\n final SqlAccessor uut2 =\n new TypeCo...
{ "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 float getFloat( int rowOffset ) throws InvalidAccessException {\n final float result;\n switch ( getType().getMinorType() ) {\n // 1. Regular type:\n case FLOAT4:\n result = innerAccessor.getFloat( 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_253
{ "fields": [ { "declarator": "counter = new AtomicInteger()", "modifier": "private final", "original_string": "private final AtomicInteger counter = new AtomicInteger();", "type": "AtomicInteger", "var_name": "counter" } ], "file": "services/command-pool/src/test/java/com/dr...
{ "body": "@Test\n public void testSamePrioritySuppliers() throws Exception {\n // single threaded pool to have a deterministic ordering of execution\n final CommandPool pool = newTestCommandPool();\n\n final BlockingCommand blocking = new BlockingCommand();\n pool.submit(CommandPool.Priority.HIGH, \"tes...
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(BoundCommandPool.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(BoundCommandPool.class);", "type": "org.slf4j.Logger"...
{ "body": "@Override\n public <V> CompletableFuture<V> submit(Priority priority, String descriptor, Command<V> command, boolean runInSameThread) {\n final long time = System.currentTimeMillis();\n final CommandWrapper<V> wrapper = new CommandWrapper<>(priority, descriptor, time, command);\n logger.debug(\"c...
{ "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_316
{ "fields": [ { "declarator": "N1_EP1 = newNodeEndpoint(\"node1\", 30010)", "modifier": "private static final", "original_string": "private static final CoordinationProtos.NodeEndpoint N1_EP1 = newNodeEndpoint(\"node1\", 30010);", "type": "CoordinationProtos.NodeEndpoint", "var_name"...
{ "body": "@Test\n public void testNodesSorting() throws Exception {\n\n List<CoordinationProtos.NodeEndpoint> activeEndpoints = ImmutableList.of(N2_EP1, N3_EP1, N4_EP2);\n\n EndpointAffinity N1_EP1A = new EndpointAffinity(N1_EP1, 0.5);\n EndpointAffinity N1_EP2A = new EndpointAffinity(N1_EP2, 0.5);\n En...
{ "fields": [ { "declarator": "INSTANCE = new SoftAffinityFragmentParallelizer()", "modifier": "public static final", "original_string": "public static final SoftAffinityFragmentParallelizer INSTANCE = new SoftAffinityFragmentParallelizer();", "type": "SoftAffinityFragmentParallelizer", ...
{ "body": "@VisibleForTesting\n List<NodeEndpoint> findEndpoints(final Collection<NodeEndpoint> activeEndpoints,\n final Map<NodeEndpoint, EndpointAffinity> endpointAffinityMap, final int width,\n final ParallelizationParameters parameters)\n throws PhysicalOperatorSetupException {\n\n List<EndpointA...
{ "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_48
{ "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 ruleSuggestionsSelectMiddleText() {\n // Select some text in the middle of cell\n Selection selection = new Selection(\"col\", \"This is a text\", 5, 2); // \"is\" is selected\n List<ReplacePatternRule> rules = recommender.getRules(selection, TEXT);\n assertEquals(2, rules....
{ "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": "@Override\n public List<ReplacePatternRule> getRules(Selection selection, DataType selColType) {\n Preconditions.checkArgument(selColType == DataType.TEXT,\n \"Cards generation for Replace/Keeponly/Exclude transforms is supported only on TEXT type columns\");\n\n List<ReplacePatternRule> rule...
{ "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_195
{ "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 testHashBytesAndStringAndNull() {\n assertEquals(-1931746098, KeyUtils.hash(new byte[]{1, 2, 3, 4, 5, 6}, \"test hash string\", null));\n }", "class_method_signature": "KeyUtilsTest.testHashBytesAndStringAndNull()", "constructor": false, "full_signature": "@Test public void t...
{ "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_480
{ "fields": [], "file": "common/src/test/java/com/dremio/common/TestAutoCloseables.java", "identifier": "TestAutoCloseables", "interfaces": "", "superclass": "" }
{ "body": "@Test(expected = IOException.class)\n public void testCloseWithExpectedException() throws IOException {\n Resource r1 = new Resource();\n Resource r2 = new Resource();\n AutoCloseables.close(IOException.class,\n () -> r1.closeWithException(new IOException(\"R1 exception\")),\n () -> r2....
{ "fields": [ { "declarator": "noOpAutocloseable = new AutoCloseable() {\n @Override\n public void close() {\n }\n }", "modifier": "private static final", "original_string": "private static final AutoCloseable noOpAutocloseable = new AutoCloseable() {\n @Override\n public void cl...
{ "body": "public static void close(Throwable t, AutoCloseable... autoCloseables) {\n close(t, Arrays.asList(autoCloseables));\n }", "class_method_signature": "AutoCloseables.close(Throwable t, AutoCloseable... autoCloseables)", "constructor": false, "full_signature": "public static void close(Throwable 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_245
{ "fields": [], "file": "services/accelerator/src/test/java/com/dremio/service/reflection/TestReflectionGoalChecker.java", "identifier": "TestReflectionGoalChecker", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCheckHashAgainstHash(){\n ReflectionGoal goal = new ReflectionGoal();\n ReflectionEntry entry = new ReflectionEntry()\n .setReflectionGoalHash(new ReflectionGoalHash(\"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\"));\n\n assertTrue(ReflectionGoalC...
{ "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 boolean checkHash(ReflectionGoal goal, ReflectionEntry entry){\n if(null == entry.getReflectionGoalHash()){\n return false;\n }\n return entry.getReflectionGoalHash().equals(calculateReflectionGoalVersion(goal));\n }", "class_method_signature": "ReflectionGoalChecker.checkHash(Refle...
{ "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_615
{ "fields": [ { "declarator": "TEST_USER_NAME = \"testUser\"", "modifier": "private static final", "original_string": "private static final String TEST_USER_NAME = \"testUser\";", "type": "String", "var_name": "TEST_USER_NAME" } ], "file": "plugins/hive/src/test/hive2/com/dre...
{ "body": "@Test\n public void impersonationEnabledShouldReturnUser() {\n final HiveConf hiveConf = new HiveConf();\n hiveConf.setBoolVar(HIVE_SERVER2_ENABLE_DOAS, true);\n final SabotContext context = mock(SabotContext.class);\n\n final HiveStoragePlugin plugin = new HiveStoragePlugin(hiveConf, context,...
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(HiveStoragePlugin.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(HiveStoragePlugin.class);", "type": "org.slf4j.Logge...
{ "body": "public String getUsername(String name) {\n if (isStorageImpersonationEnabled()) {\n return name;\n }\n return SystemUser.SYSTEM_USERNAME;\n }", "class_method_signature": "HiveStoragePlugin.getUsername(String name)", "constructor": false, "full_signature": "public String getUsername(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_300
{ "fields": [], "file": "sabot/kernel/src/test/java/com/dremio/sabot/exec/TestThreadsStatsCollector.java", "identifier": "TestThreadsStatsCollector", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testOldThreadsArePruned() throws InterruptedException {\n\n Thread t = new Thread() {\n public void run () {\n try {\n sleep(400l);\n } catch (InterruptedException e) {\n }\n }\n };\n\n Thread t1 = new Thread() {\n public void run (...
{ "fields": [ { "declarator": "ONE_BILLION = 1000000000", "modifier": "private static final", "original_string": "private static final long ONE_BILLION = 1000000000;", "type": "long", "var_name": "ONE_BILLION" }, { "declarator": "RETAIN_INTERVAL = 5 * ONE_BILLION", ...
{ "body": "public Integer getCpuTrailingAverage(long id, int seconds) {\n return cpuStat.getTrailingAverage(id, seconds);\n }", "class_method_signature": "ThreadsStatsCollector.getCpuTrailingAverage(long id, int seconds)", "constructor": false, "full_signature": "public Integer getCpuTrailingAverage(long id...
{ "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_183
{ "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 testEqualsReturnsTrueByteProtoObject() {\n assertTrue(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 \"some other silly string\"....
{ "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_479
{ "fields": [], "file": "common/src/test/java/com/dremio/common/TestAutoCloseables.java", "identifier": "TestAutoCloseables", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testClose() {\n Resource r1 = new Resource();\n Resource r2 = new Resource();\n Resource r3 = new Resource();\n Resource r4 = new Resource();\n\n try {\n AutoCloseables.close(\n () -> r1.closeWithException(new IOException(\"R1 exception\")),\n () -> r2...
{ "fields": [ { "declarator": "noOpAutocloseable = new AutoCloseable() {\n @Override\n public void close() {\n }\n }", "modifier": "private static final", "original_string": "private static final AutoCloseable noOpAutocloseable = new AutoCloseable() {\n @Override\n public void cl...
{ "body": "public static void close(Throwable t, AutoCloseable... autoCloseables) {\n close(t, Arrays.asList(autoCloseables));\n }", "class_method_signature": "AutoCloseables.close(Throwable t, AutoCloseable... autoCloseables)", "constructor": false, "full_signature": "public static void close(Throwable 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_496
{ "fields": [], "file": "common/src/test/java/com/dremio/common/utils/protos/TestBlackListOutput.java", "identifier": "TestBlackListOutput", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void writeFixed64() 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.writeFixed64(1, 9, fals...
{ "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 writeFixed64(int fieldNumber, long value, boolean repeated) throws IOException {\n if(isBlackListed(fieldNumber)){\n return;\n }\n delegate.writeFixed64(fieldNumber, value, repeated);\n }", "class_method_signature": "BlackListOutput.writeFixed64(int fieldNumber, lo...
{ "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_642
{ "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 testListStatusWithValidPath() throws Exception {\n {\n DFS.ListStatusResponse listStatusResponse = DFS.ListStatusResponse.newBuilder()\n .addStatuses(newFileStatus(42, true, 0, 0, 456, 879, 0755, \"root\", \"wheel\", \"/foo/bar/dir\"))\n .addStatuses(newFileSt...
{ "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 FileStatus[] listStatus(Path f) throws FileNotFoundException, IOException {\n RemoteIterator<FileStatus> remoteIterator = listStatusIterator(f);\n List<FileStatus> statuses = new ArrayList<>();\n while(remoteIterator.hasNext()) {\n statuses.add(remoteIterator.next());\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_212
{ "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 testValidateOptionsMultipleVersionWithIndex() {\n KVStoreOptionUtility.validateOptions(new KVStore.PutOption[]{versionOption, indexPutOption, versionOption});\n }", "class_method_signature": "KVStoreOptionUtilityTest.testValidateOptionsM...
{ "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_707
{ "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 validateZipDirectoryZipSlipTestUpdirMoreThanNestedCorrectDir2() throws IOException {\n // This expected to pass, because this will eventually resolve to /baseTmpDir/nestedTmpDir/somedir/somefile,\n // which is a legal path within the base directory.\n ZipEntry entry = new ZipE...
{ "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_357
{ "fields": [ { "declarator": "ARBTRIARY_LEAF", "modifier": "private static final", "original_string": "private static final EmptyValues ARBTRIARY_LEAF;", "type": "EmptyValues", "var_name": "ARBTRIARY_LEAF" }, { "declarator": "SORT_FACTOR = new TypeValidators.RangeDoubl...
{ "body": "@Test\n public void doubleSortWithExchange() {\n ExternalSort es1 = new ExternalSort(OpProps.prototype(0, Long.MAX_VALUE).cloneWithMemoryExpensive(true).cloneWithMemoryFactor(options.getOption(SORT_FACTOR)).cloneWithBound(options.getOption(SORT_BOUNDED)), ARBTRIARY_LEAF, Collections.emptyList(), false)...
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(MemoryAllocationUtilities.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(MemoryAllocationUtilities.class);", "type": ...
{ "body": "@VisibleForTesting\n static void setMemory(final OptionManager optionManager, Map<Fragment, Wrapper> fragments, long maxMemoryPerNodePerQuery) {\n final ArrayListMultimap<NodeEndpoint, PhysicalOperator> consideredOps = ArrayListMultimap.create();\n final ArrayListMultimap<NodeEndpoint, PhysicalOpera...
{ "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_584
{ "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_DOUBLE_thatOverflows_rejectsIt()\n throws InvalidAccessException {\n final SqlAccessor uut =\n new TypeConvertingSqlAccessor( new DoubleStubAccessor( 32768 ) );\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_286
{ "fields": [], "file": "services/scheduler/src/test/java/com/dremio/service/scheduler/TestLocalSchedulerService.java", "identifier": "TestLocalSchedulerService", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void schedule() throws Exception {\n final List<MockScheduledFuture<?>> futures = Lists.newArrayList();\n final CloseableSchedulerThreadPool executorService = mock(CloseableSchedulerThreadPool.class);\n\n doAnswer(new Answer<ScheduledFuture<Object>>() {\n @Override\n publ...
{ "fields": [ { "declarator": "LOGGER = org.slf4j.LoggerFactory.getLogger(LocalSchedulerService.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger LOGGER = org.slf4j.LoggerFactory.getLogger(LocalSchedulerService.class);", "type": "org.slf...
{ "body": "@Override\n public Cancellable schedule(Schedule schedule, Runnable task) {\n if (!assumeTaskLeadership) {\n return plainSchedule(schedule, task);\n }\n\n if (!schedule.isDistributedSingleton()) {\n return plainSchedule(schedule, task);\n }\n\n final TaskLeaderElection taskLeaderE...
{ "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_639
{ "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 testGetFileStatusWithValidPath() throws Exception {\n {\n DFS.FileStatus status = newFileStatus(1024, false, 1, 4096, 42, 37, 0644 , \"root\", \"wheel\", \"/foo/bar\");\n setupRPC(\n DFS.RpcType.GET_FILE_STATUS_REQUEST, DFS.GetFileStatusRequest.newBuilder().setPat...
{ "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 FileStatus getFileStatus(Path f) throws IOException {\n Path absolutePath = toAbsolutePath(f);\n checkPath(absolutePath);\n\n final GetFileStatusCommand command = new GetFileStatusCommand(absolutePath.toUri().getPath());\n runner.runCommand(command);\n\n RpcFuture<DFS.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_269
{ "fields": [], "file": "services/namespace/src/test/java/com/dremio/service/namespace/file/TestFileFormat.java", "identifier": "TestFileFormat", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDefaultAvroFileFormatOptions() throws Exception {\n AvroFileConfig fileFormat = new AvroFileConfig();\n String tableOptions = fileFormat.toTableOptions();\n assertContains(\"type => 'avro'\", tableOptions);\n }", "class_method_signature": "TestFileFormat.testDefaultAvro...
{ "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_140
{ "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 testGetEnqueuedTime() {\n // job that has been enqueued for at 3 hours\n final ResourceSchedulingInfo schedulingInfo = new ResourceSchedulingInfo()\n .setResourceSchedulingStart(System.currentTimeMillis() - TimeUnit.HOURS.toMillis(3))\n .setResourceSchedulingEnd(0L);\n ...
{ "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 static long getLegacyEnqueuedTime(JobAttempt jobAttempt) {\n final JobInfo jobInfo = jobAttempt.getInfo();\n if (jobInfo == null) {\n return 0;\n }\n\n final ResourceSchedulingInfo schedulingInfo = jobInfo.getResourceSchedulingInfo();\n if (schedulingInfo == null) {\n 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_510
{ "fields": [], "file": "common/src/test/java/com/dremio/common/utils/TestUUIDAdapter.java", "identifier": "TestUUIDAdapter", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testShouldNotGenerateSameUUIDFromBytes() {\n UUID uuid = UUID.fromString(\"38400000-8cf0-11bd-b23e-10b96e4ef00d\");\n byte[] result = UUIDAdapter.getBytesFromUUID(uuid);\n UUID newUuid = UUID.nameUUIDFromBytes(result);\n assertFalse(uuid.equals(newUuid));\n }", "class_me...
{ "fields": [], "file": "common/src/main/java/com/dremio/common/utils/UUIDAdapter.java", "identifier": "UUIDAdapter", "interfaces": "", "methods": [ { "class_method_signature": "UUIDAdapter.UUIDAdapter()", "constructor": true, "full_signature": "private UUIDAdapter()", "identifier...
{ "body": "public static byte[] getBytesFromUUID(UUID uuid) {\n byte[] result = new byte[16];\n long msb = uuid.getMostSignificantBits();\n long lsb = uuid.getLeastSignificantBits();\n for (int i =15;i>=8;i--) {\n result[i] = (byte) (lsb & 0xFF);\n lsb >>= 8;\n }\n for (int i =7;i>=0;i--) ...
{ "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_72
{ "fields": [ { "declarator": "cardGenerator = new CardGenerator(null, null, null)", "modifier": "private", "original_string": "private CardGenerator cardGenerator = new CardGenerator(null, null, null);", "type": "CardGenerator", "var_name": "cardGenerator" }, { "declar...
{ "body": "@Test\n public void exampleGeneratorQuery() {\n // Expect backticks around column name as it has special characters in it.\n String outputQuery1 = cardGenerator.generateCardGenQuery(\"col.with.dots\",\n \"TABLE(\\\"jobstore\\\".\\\"path\\\"(type => 'arrow))\", rules);\n String expQuery1 = ...
{ "fields": [ { "declarator": "executor", "modifier": "private final", "original_string": "private final QueryExecutor executor;", "type": "QueryExecutor", "var_name": "executor" }, { "declarator": "datasetPath", "modifier": "private final", "original_string...
{ "body": "<T> String generateCardGenQuery(String inputColName, String datasetPreviewTable, List<TransformRuleWrapper<T>> evaluators) {\n\n StringBuilder queryBuilder = new StringBuilder();\n\n String inputExpr = String.format(\"%s.%s\", quoteIdentifier(\"dremio_preview_data\"), quoteIdentifier(inputColName));\...
{ "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_455
{ "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 testResolveOfString() {\n checkResolveOfString(Path.of(\"hdfs://hostname/base\"), \"/foo/bar\", Path.of(\"/foo/bar\"));\n checkResolveOfString(Path.of(\"hdfs://hostname/base\"), \"foo/bar\", Path.of(\"hdfs://hostname/base/foo/bar\"));\n checkResolveOfString(Path.of(\"hdfs://ho...
{ "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_681
{ "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 testMkdirsRoot() throws IOException {\n Path root = new Path(\"/\");\n\n assertTrue(fs.mkdirs(root, FsPermission.getDirDefault()));\n }", "class_method_signature": "TestPseudoDistributedFileSystem.testMkdirsRoot()", "constructor": false, "full_signature": "@Test public voi...
{ "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 mkdirs(Path f, FsPermission permission) throws IOException {\n Path absolutePath = toAbsolutePath(f);\n checkPath(absolutePath);\n\n // Handle root\n if (absolutePath.isRoot()) {\n // Path always exists\n return true;\n }\n\n if (isRemoteFile(absolute...
{ "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_394
{ "fields": [], "file": "sabot/kernel/src/test/java/com/dremio/exec/store/dfs/easy/TestEasyScanOperatorCreator.java", "identifier": "TestEasyScanOperatorCreator", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void trueWhenAllColumnsAreSelected() {\n BatchSchema schema = mock(BatchSchema.class);\n when(schema.iterator())\n .thenReturn(Lists.newArrayList(Field.nullable(\"a1\", new ArrowType.Bool())).iterator());\n assertTrue(EasyScanOperatorCreator.selectsAllColumns(schema,\n ...
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(com.dremio.exec.store.dfs.easy.EasyScanOperatorCreator.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(com.dremio.exec.store...
{ "body": "static boolean selectsAllColumns(final BatchSchema datasetSchema, final List<SchemaPath> projectedColumns) {\n final Set<String> columnsInTable = FluentIterable.from(datasetSchema)\n .transform(\n new Function<Field, String>() {\n @Override\n public String app...
{ "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_547
{ "fields": [ { "declarator": "NON_NULL_VALUE = 89723408957L", "modifier": "public static final", "original_string": "public static final long NON_NULL_VALUE = 89723408957L;", "type": "long", "var_name": "NON_NULL_VALUE" }, { "declarator": "DST_VALUE = 1558999993123L", ...
{ "body": "@Test\n public void testIsNull() throws Exception {\n assertNotNull(accessor.getObject(0));\n assertNotNull(accessor.getTimestamp(0, PST_CALENDAR));\n assertNull(accessor.getObject(2));\n assertNull(accessor.getTimestamp(2, PST_CALENDAR));\n }", "class_method_signature": "TestTimeStampMilli...
{ "fields": [ { "declarator": "TYPE = Types.optional(MinorType.TIMESTAMP)", "modifier": "private static final", "original_string": "private static final MajorType TYPE = Types.optional(MinorType.TIMESTAMP);", "type": "MajorType", "var_name": "TYPE" }, { "declarator": "d...
{ "body": "@Override\n public boolean isNull(int index) {\n return ac.isNull(index);\n }", "class_method_signature": "TimeStampMilliAccessor.isNull(int index)", "constructor": false, "full_signature": "@Override public boolean isNull(int index)", "identifier": "isNull", "invocations": [ "isNull" ...
{ "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_117
{ "fields": [ { "declarator": "USER_PATH = \"/user/\"", "modifier": "private static final", "original_string": "private static final String USER_PATH = \"/user/\";", "type": "String", "var_name": "USER_PATH" }, { "declarator": "password = \"foo12bar\"", "modifier"...
{ "body": "@Test\n public void testGetUserDetails() throws Exception {\n final UserService userService = l(UserService.class);\n com.dremio.service.users.User user1 = userService.getUser(\"user1\");\n\n User user = expectSuccess(getBuilder(getPublicAPI(3).path(USER_PATH).path(user1.getUID().getId()))\n ...
{ "fields": [ { "declarator": "logger = org.slf4j.LoggerFactory.getLogger(UserResource.class)", "modifier": "private static final", "original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(UserResource.class);", "type": "org.slf4j.Logger", ...
{ "body": "@GET\n @Path(\"/{id}\")\n public User getUser(@PathParam(\"id\") String id) throws UserNotFoundException {\n return User.fromUser(userGroupService.getUser(new UID(id)));\n }", "class_method_signature": "UserResource.getUser(@PathParam(\"id\") String id)", "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_402
{ "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 withTasksExceedingTimeout() throws Exception {\n UserException ex = null;\n\n try {\n List<TimedRunnable<Void>> tasks = Lists.newArrayList();\n\n for (int i = 0; i < 100; i++) {\n if ((i & (i + 1)) == 0) {\n tasks.add(new TestTask(2000));\n } else...
{ "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" }