id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
146510094_167 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
},
... | {
"body": "@Test\n public void tellsTheUGICacheToCleanItselfOnTheLastCallForASegment() throws Exception {\n when(mockServletRequest.getHeader(\"X-GP-LAST-FRAGMENT\")).thenReturn(\"true\");\n expectScenario(false, false, false);\n filter.doFilter(mockServletRequest, mockServletResponse, mockFil... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(SecurityServletFilter.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(SecurityServletFilter.class);",
"type": "Logger",
"var_name": "LOG"
},
... | {
"body": "@Override\n public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain)\n throws IOException, ServletException {\n\n // retrieve user header and make sure header is present and is not empty\n final String gpdbUser = getHeaderValue(... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_171 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
}
... | {
"body": "@Test\n public void undefinedProfile() {\n expectedException.expect(ProfileConfException.class);\n expectedException.expectMessage(\"UndefinedProfile is not defined in profile/undefinedProfile/pxf-profiles.xml\");\n\n ProfilesConf profilesConf = getProfilesConf(\"undefinedProfile\")... | {
"fields": [
{
"declarator": "EXTERNAL_PROFILES = \"pxf-profiles.xml\"",
"modifier": "private final static",
"original_string": "private final static String EXTERNAL_PROFILES = \"pxf-profiles.xml\";",
"type": "String",
"var_name": "EXTERNAL_PROFILES"
},
{
"declarator":... | {
"body": "@Override\n public Map<String, String> getPlugins(String profileName) {\n Profile profile = getProfile(profileName);\n Map<String, String> result = profile.getPluginsMap();\n if (result.isEmpty()) {\n throw new ProfileConfException(NO_PLUGINS_IN_PROFILE_DEF, profileName, ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_258 | {
"fields": [
{
"declarator": "context",
"modifier": "private",
"original_string": "private RequestContext context;",
"type": "RequestContext",
"var_name": "context"
},
{
"declarator": "schema",
"modifier": "private",
"original_string": "private Schema schem... | {
"body": "@Test\n public void testObtainSchema_OnWrite_WithUserProvidedSchema_Json_HCFS() {\n avroUtilities = new AvroUtilities((file) -> dontFindLocalFile());\n context.setRequestType(RequestContext.RequestType.WRITE_BRIDGE);\n context.addOption(\"SCHEMA\", avroDirectory + \"user-provided.av... | {
"fields": [
{
"declarator": "COMMON_NAMESPACE = \"public.avro\"",
"modifier": "private static",
"original_string": "private static String COMMON_NAMESPACE = \"public.avro\";",
"type": "String",
"var_name": "COMMON_NAMESPACE"
},
{
"declarator": "fileSearcher",
"m... | {
"body": "public Schema obtainSchema(RequestContext context, Configuration configuration, HcfsType hcfsType) {\n Schema schema = (Schema) context.getMetadata();\n\n if (schema != null) {\n return schema;\n }\n try {\n schemaPath = context.getDataSource();\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_95 | {
"fields": [
{
"declarator": "PROPERTY_KEY_USER_IMPERSONATION = \"pxf.service.user.impersonation.enabled\"",
"modifier": "private static final",
"original_string": "private static final String PROPERTY_KEY_USER_IMPERSONATION = \"pxf.service.user.impersonation.enabled\";",
"type": "String"... | {
"body": "@Test\n public void testGlobalImpersonationPropertyEmpty() {\n System.setProperty(PROPERTY_KEY_USER_IMPERSONATION, \"\");\n assertFalse(secureLogin.isUserImpersonationEnabled(configuration));\n }",
"class_method_signature": "SecureLoginTest.testGlobalImpersonationPropertyEmpty()",
"... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(SecureLogin.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(SecureLogin.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator... | {
"body": "public boolean isUserImpersonationEnabled(Configuration configuration) {\n String valueFromUserImpersonationOnServer = configuration.get(SecureLogin.CONFIG_KEY_SERVICE_USER_IMPERSONATION, System.getProperty(PROPERTY_KEY_USER_IMPERSONATION, \"false\"));\n return StringUtils.equalsIgnoreCase(va... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_126 | {
"fields": [
{
"declarator": "MINUTES = 60 * 1000L",
"modifier": "private static final",
"original_string": "private static final long MINUTES = 60 * 1000L;",
"type": "long",
"var_name": "MINUTES"
},
{
"declarator": "provider = null",
"modifier": "private",
... | {
"body": "@Test\n public void getSameProxyUGITwiceUsesCache() throws Exception {\n UserGroupInformation ugi1 = cache.getUserGroupInformation(session, true);\n UserGroupInformation ugi2 = cache.getUserGroupInformation(session, true);\n assertEquals(ugi1, ugi2);\n verify(provider, times(... | {
"fields": [
{
"declarator": "NANOS_PER_MILLIS = 1000000",
"modifier": "static final",
"original_string": "static final int NANOS_PER_MILLIS = 1000000;",
"type": "int",
"var_name": "NANOS_PER_MILLIS"
},
{
"declarator": "UGI_CACHE_EXPIRY = 15 * 60 * 1000L",
"modif... | {
"body": "@SuppressWarnings(\"SynchronizationOnLocalVariableOrMethodParameter\")\n public UserGroupInformation getUserGroupInformation(SessionId session, boolean isProxyUser) throws IOException {\n Integer segmentId = session.getSegmentId();\n String user = session.getUser();\n DelayQueue<Ent... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_331 | {
"fields": [
{
"declarator": "SQL = \"SELECT id, cdate, amt, grade, b FROM sales\"",
"modifier": "private static final",
"original_string": "private static final String SQL = \"SELECT id, cdate, amt, grade, b FROM sales\";",
"type": "String",
"var_name": "SQL"
},
{
"de... | {
"body": "@Test\n public void testSimpleNamedQuery() throws Exception {\n SQLQueryBuilder builder = new SQLQueryBuilder(context, mockMetaData, NAMED_QUERY_WHERE);\n String query = builder.buildSelectQuery();\n assertEquals(\"SELECT id, cdate, amt, grade, b FROM (SELECT a, b FROM c WHERE d = '... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(SQLQueryBuilder.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(SQLQueryBuilder.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"de... | {
"body": "public String buildSelectQuery() {\n StringBuilder sb = new StringBuilder(\"SELECT \")\n .append(buildColumnsQuery())\n .append(\" FROM \")\n .append(getSource());\n\n // Insert regular WHERE constraints\n buildWhereSQL(sb);\n\n // In... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_274 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
},
{
"declarator": "context... | {
"body": "@Test\n public void compressCodec() throws Exception {\n //using BZip2 as a valid example\n prepareTest(\"org.apache.hadoop.io.compress.BZip2Codec\", null);\n assertEquals(\".bz2\", accessor.getCodec().getDefaultExtension());\n }",
"class_method_signature": "SequenceFileAccesso... | {
"fields": [
{
"declarator": "fc",
"modifier": "private",
"original_string": "private FileContext fc;",
"type": "FileContext",
"var_name": "fc"
},
{
"declarator": "file",
"modifier": "private",
"original_string": "private Path file;",
"type": "Path",
... | {
"body": "public CompressionCodec getCodec() {\n return codec;\n }",
"class_method_signature": "SequenceFileAccessor.getCodec()",
"constructor": false,
"full_signature": "public CompressionCodec getCodec()",
"identifier": "getCodec",
"invocations": [],
"modifiers": "public",
"parameters": "()... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_56 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
}
],
"file": "server/pxf-api/src/... | {
"body": "@Test\n public void testFailsWhenNoVisitorIsProvided() {\n thrown.expect(IllegalArgumentException.class);\n thrown.expectMessage(\"You need to provide at least one visitor for this traverser\");\n\n new TreeTraverser().traverse(new Node());\n }",
"class_method_signature": "Tree... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(TreeTraverser.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(TreeTraverser.class);",
"type": "Logger",
"var_name": "LOG"
}
],
"file": "serv... | {
"body": "public Node traverse(Node node, TreeVisitor... visitors) {\n\n if (ArrayUtils.isEmpty(visitors)) {\n throw new IllegalArgumentException(\"You need to provide at least one visitor for this traverser\");\n }\n\n Node result = node;\n for (TreeVisitor visitor : visitors)... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_366 | {
"fields": [
{
"declarator": "connConfig",
"modifier": "private",
"original_string": "private Properties connConfig, poolConfig;",
"type": "Properties",
"var_name": "connConfig"
},
{
"declarator": "poolDescriptor",
"modifier": "private",
"original_string": ... | {
"body": "@Test\n public void testPoolDescriptor() {\n poolDescriptor = new PoolDescriptor(\"test-server\", \"test-jdbcUrl\", connConfig, poolConfig, null);\n assertEquals(\"test-server\", poolDescriptor.getServer());\n assertEquals(\"test-jdbcUrl\", poolDescriptor.getJdbcUrl());\n ass... | {
"fields": [
{
"declarator": "USER_PROPERTY_NAME = \"user\"",
"modifier": "private static final",
"original_string": "private static final String USER_PROPERTY_NAME = \"user\";",
"type": "String",
"var_name": "USER_PROPERTY_NAME"
},
{
"declarator": "PASSWORD_PROPERTY_N... | {
"body": "public PoolDescriptor(String server, String jdbcUrl, Properties connectionConfig, Properties poolConfig, String qualifier) {\n this.server = server;\n this.jdbcUrl = jdbcUrl;\n\n if (connectionConfig != null) {\n this.connectionConfig = (Properties) connectionConfig.clone();... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_389 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
},
{
"declarator": "context... | {
"body": "@Test\n public void testPartitionByTypeInvalid() {\n thrown.expect(IllegalArgumentException.class);\n\n context.addOption(\"PARTITION_BY\", \"level:float\");\n new JdbcPartitionFragmenter().initialize(context);\n }",
"class_method_signature": "JdbcPartitionFragmenterTest.testPa... | {
"fields": [
{
"declarator": "pxfHosts = {\"localhost\"}",
"modifier": "private static final",
"original_string": "private static final String[] pxfHosts = {\"localhost\"};",
"type": "String[]",
"var_name": "pxfHosts"
},
{
"declarator": "partitionType",
"modifier... | {
"body": "@Override\n public void initialize(RequestContext context) {\n super.initialize(context);\n\n String partitionByOption = context.getOption(\"PARTITION_BY\");\n if (partitionByOption == null) return;\n\n try {\n String[] partitionBy = partitionByOption.split(\":\");... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_223 | {
"fields": [
{
"declarator": "parameters",
"modifier": "private",
"original_string": "private MultivaluedMap<String, String> parameters;",
"type": "MultivaluedMap<String, String>",
"var_name": "parameters"
},
{
"declarator": "parser",
"modifier": "private",
... | {
"body": "@Test\n public void testInvalidHandlerCausesException() {\n thrown.expect(RuntimeException.class);\n thrown.expectMessage(\"Error when invoking handlerClass 'foo' : java.lang.ClassNotFoundException: foo\");\n when(mockPluginConf.getHandler(\"test-profile\")).thenReturn(\"foo\");\n ... | {
"fields": [
{
"declarator": "TRUE_LCASE = \"true\"",
"modifier": "private static final",
"original_string": "private static final String TRUE_LCASE = \"true\";",
"type": "String",
"var_name": "TRUE_LCASE"
},
{
"declarator": "FALSE_LCASE = \"false\"",
"modifier":... | {
"body": "@Override\n public RequestContext parseRequest(HttpHeaders request, RequestContext.RequestType requestType) {\n\n RequestMap params = new RequestMap(request.getRequestHeaders());\n\n if (LOG.isDebugEnabled()) {\n // Logging only keys to prevent sensitive data to be logged\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_40 | {
"fields": [],
"file": "server/pxf-api/src/test/java/org/greenplum/pxf/api/filter/NodeTest.java",
"identifier": "NodeTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testChildCount() {\n Node root = new Node();\n\n assertEquals(0, root.childCount());\n\n Node left = new Node();\n root.setLeft(left);\n\n assertEquals(1, root.childCount());\n\n Node right = new Node();\n root.setRight(right);\n\n ... | {
"fields": [
{
"declarator": "left",
"modifier": "private",
"original_string": "private Node left;",
"type": "Node",
"var_name": "left"
},
{
"declarator": "right",
"modifier": "private",
"original_string": "private Node right;",
"type": "Node",
... | {
"body": "public int childCount() {\n int count = 0;\n if (left != null) count++;\n if (right != null) count++;\n return count;\n }",
"class_method_signature": "Node.childCount()",
"constructor": false,
"full_signature": "public int childCount()",
"identifier": "childCount",
... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_409 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
}
],
"file": "server/pxf-s3/src/t... | {
"body": "@Test\n public void testFailsToParseNullDataSource() {\n thrown.expect(NullPointerException.class);\n\n RequestContext context = new RequestContext();\n new S3SelectAccessor().generateBaseCSVRequest(context);\n }",
"class_method_signature": "S3SelectAccessorTest.testFailsToPars... | {
"fields": [
{
"declarator": "COMPRESSION_TYPE = \"COMPRESSION_CODEC\"",
"modifier": "public static final",
"original_string": "public static final String COMPRESSION_TYPE = \"COMPRESSION_CODEC\";",
"type": "String",
"var_name": "COMPRESSION_TYPE"
},
{
"declarator": "F... | {
"body": "SelectObjectContentRequest generateBaseCSVRequest(RequestContext context) {\n\n InputSerialization inputSerialization = getInputSerialization(context);\n\n String fileHeaderInfo = context.getOption(FILE_HEADER_INFO);\n boolean usePositionToIdentifyColumn = inputSerialization.getCsv() !... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_370 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
},
{
"declarator": "dbProdu... | {
"body": "@Test\n public void testRightBounded() {\n IntPartition partition = new IntPartition(COL_RAW, null, 0L);\n String constraint = partition.toSqlConstraint(QUOTE, dbProduct);\n\n assertEquals(COL + \" < 0\", constraint);\n }",
"class_method_signature": "IntPartitionTest.testRightB... | {
"fields": [
{
"declarator": "serialVersionUID = 0L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 0L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "boundaries",
"modifier": "private f... | {
"body": "@Override\n public String toSqlConstraint(String quoteString, DbProduct dbProduct) {\n if (quoteString == null) {\n throw new RuntimeException(\"Quote string cannot be null\");\n }\n\n return generateRangeConstraint(\n quoteString + column + quoteString,\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_235 | {
"fields": [
{
"declarator": "PRUNER = new SupportedOperatorPruner(SUPPORTED_OPERATORS)",
"modifier": "private static final",
"original_string": "private static final TreeVisitor PRUNER = new SupportedOperatorPruner(SUPPORTED_OPERATORS);",
"type": "TreeVisitor",
"var_name": "PRUNER"... | {
"body": "@Test\n public void testOrOperator() throws Exception {\n // a1 > '2008-02-01' or a2 > 1200\n Filter filter = helper(\"a1c25s10d2008-02-01o2a2c20s4d1200o2l1\", tupleDescription);\n assertNotNull(filter);\n assertTrue(filter instanceof FilterList);\n FilterList filterLi... | {
"fields": [
{
"declarator": "OPERATORS_MAP =\n Collections.unmodifiableMap(new HashMap<Operator, CompareFilter.CompareOp>() {{\n put(Operator.LESS_THAN, CompareFilter.CompareOp.LESS); // \"<\"\n put(Operator.GREATER_THAN, CompareFilter.CompareOp.GREATER); // \">\"\... | {
"body": "private ByteArrayComparable getComparator(int type, OperandNode data) {\n ByteArrayComparable result;\n switch (DataType.get(type)) {\n case TEXT:\n result = new BinaryComparator(Bytes.toBytes(data.toString()));\n break;\n case SMALLINT:\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_9 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
},
{
"declarator": "factory... | {
"body": "@Test\n public void testConfigurationsLoadedAndOptionsAdded() {\n additionalProperties.put(\"test.newOption\", \"newOption\");\n additionalProperties.put(\"test.red\", \"purple\");\n additionalProperties.put(\"test.blue.key\", \"bluevaluechanged\");\n additionalProperties.put... | {
"fields": [
{
"declarator": "instance = new BaseConfigurationFactory()",
"modifier": "private static final",
"original_string": "private static final BaseConfigurationFactory instance = new BaseConfigurationFactory();",
"type": "BaseConfigurationFactory",
"var_name": "instance"
... | {
"body": "@Override\n public Configuration initConfiguration(String configDirectory, String serverName, String userName, Map<String, String> additionalProperties) {\n // start with built-in Hadoop configuration that loads core-site.xml\n LOG.debug(\"Initializing configuration for server {}\", server... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_17 | {
"fields": [],
"file": "server/pxf-api/src/test/java/org/greenplum/pxf/api/model/FragmentStatsTest.java",
"identifier": "FragmentStatsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void dataToString() {\n FragmentStats fragmentStats = new FragmentStats(25, 2000000000, (long) Math.pow(5, 30));\n String path = \"la la la\";\n String str = FragmentStats.dataToString(fragmentStats, path);\n String expected = \"Statistics information for \\\"... | {
"fields": [
{
"declarator": "DEFAULT_FRAGMENT_SIZE = 67108864L",
"modifier": "public static final",
"original_string": "public static final long DEFAULT_FRAGMENT_SIZE = 67108864L;",
"type": "long",
"var_name": "DEFAULT_FRAGMENT_SIZE"
},
{
"declarator": "LOG = LogFacto... | {
"body": "public static String dataToString(FragmentStats stats, String datapath) {\n return \"Statistics information for \\\"\" + datapath + \"\\\" \"\n + \" Number of Fragments: \" + stats.fragmentsNumber\n + \", first Fragment size: \" + stats.firstFragmentSize\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_327 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
},
... | {
"body": "@Test\n public void getTableMetadata() throws Exception {\n\n fetcher = new HiveMetadataFetcher(context, mockConfigurationFactory, fakeHiveClientWrapper);\n String tableName = \"cause\";\n\n // mock hive table returned from hive client\n List<FieldSchema> fields = new ArrayLi... | {
"fields": [
{
"declarator": "DELIM_FIELD = \"DELIMITER\"",
"modifier": "private static final",
"original_string": "private static final String DELIM_FIELD = \"DELIMITER\";",
"type": "String",
"var_name": "DELIM_FIELD"
},
{
"declarator": "LOG = LogFactory.getLog(HiveMe... | {
"body": "@Override\n public List<Metadata> getMetadata(String pattern) throws Exception {\n\n boolean ignoreErrors = false;\n List<Metadata.Item> tblsDesc = hiveClientWrapper.extractTablesFromPattern(client, pattern);\n\n if (tblsDesc == null || tblsDesc.isEmpty()) {\n LOG.warn(\"... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_262 | {
"fields": [
{
"declarator": "context",
"modifier": "private",
"original_string": "private RequestContext context;",
"type": "RequestContext",
"var_name": "context"
},
{
"declarator": "schema",
"modifier": "private",
"original_string": "private Schema schem... | {
"body": "@Test\n public void testObtainSchema_OnWrite_WithUserProvidedSchema_Json_FullPathToLocalFile() {\n context.setRequestType(RequestContext.RequestType.WRITE_BRIDGE);\n context.addOption(\"SCHEMA\", avroDirectory + \"user-provided.avsc\");\n\n schema = avroUtilities.obtainSchema(contex... | {
"fields": [
{
"declarator": "COMMON_NAMESPACE = \"public.avro\"",
"modifier": "private static",
"original_string": "private static String COMMON_NAMESPACE = \"public.avro\";",
"type": "String",
"var_name": "COMMON_NAMESPACE"
},
{
"declarator": "fileSearcher",
"m... | {
"body": "public Schema obtainSchema(RequestContext context, Configuration configuration, HcfsType hcfsType) {\n Schema schema = (Schema) context.getMetadata();\n\n if (schema != null) {\n return schema;\n }\n try {\n schemaPath = context.getDataSource();\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_326 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
},
... | {
"body": "@Test\n public void getTableMetadataView() throws Exception {\n expectedException.expect(UnsupportedOperationException.class);\n expectedException.expectMessage(\"Hive views are not supported by PXF\");\n\n String tableName = \"cause\";\n fetcher = new HiveMetadataFetcher(con... | {
"fields": [
{
"declarator": "DELIM_FIELD = \"DELIMITER\"",
"modifier": "private static final",
"original_string": "private static final String DELIM_FIELD = \"DELIMITER\";",
"type": "String",
"var_name": "DELIM_FIELD"
},
{
"declarator": "LOG = LogFactory.getLog(HiveMe... | {
"body": "@Override\n public List<Metadata> getMetadata(String pattern) throws Exception {\n\n boolean ignoreErrors = false;\n List<Metadata.Item> tblsDesc = hiveClientWrapper.extractTablesFromPattern(client, pattern);\n\n if (tblsDesc == null || tblsDesc.isEmpty()) {\n LOG.warn(\"... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_263 | {
"fields": [
{
"declarator": "context",
"modifier": "private",
"original_string": "private RequestContext context;",
"type": "RequestContext",
"var_name": "context"
},
{
"declarator": "schema",
"modifier": "private",
"original_string": "private Schema schem... | {
"body": "@Test\n public void testObtainSchema_OnWrite_WithUserProvidedSchema_Json_FullPathToLocalFile_Spaces() {\n context.setRequestType(RequestContext.RequestType.WRITE_BRIDGE);\n context.addOption(\"SCHEMA\", avroDirectory + \"user provided.avsc\");\n\n schema = avroUtilities.obtainSchema... | {
"fields": [
{
"declarator": "COMMON_NAMESPACE = \"public.avro\"",
"modifier": "private static",
"original_string": "private static String COMMON_NAMESPACE = \"public.avro\";",
"type": "String",
"var_name": "COMMON_NAMESPACE"
},
{
"declarator": "fileSearcher",
"m... | {
"body": "public Schema obtainSchema(RequestContext context, Configuration configuration, HcfsType hcfsType) {\n Schema schema = (Schema) context.getMetadata();\n\n if (schema != null) {\n return schema;\n }\n try {\n schemaPath = context.getDataSource();\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_8 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
},
{
"declarator": "factory... | {
"body": "@Test\n public void testConfigurationsLoadedForCaseInsensitiveServerName() {\n Configuration configuration = factory.initConfiguration(\"DeFAulT\", \"DeFAulT\", \"dummy\", null);\n\n assertEquals(\"blue\", configuration.get(\"test.blue\"));\n assertEquals(\"red\", configuration.get(... | {
"fields": [
{
"declarator": "instance = new BaseConfigurationFactory()",
"modifier": "private static final",
"original_string": "private static final BaseConfigurationFactory instance = new BaseConfigurationFactory();",
"type": "BaseConfigurationFactory",
"var_name": "instance"
... | {
"body": "@Override\n public Configuration initConfiguration(String configDirectory, String serverName, String userName, Map<String, String> additionalProperties) {\n // start with built-in Hadoop configuration that loads core-site.xml\n LOG.debug(\"Initializing configuration for server {}\", server... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_16 | {
"fields": [],
"file": "server/pxf-api/src/test/java/org/greenplum/pxf/api/model/FragmentStatsTest.java",
"identifier": "FragmentStatsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void dataToJSON() throws IOException {\n FragmentStats fragmentStats = new FragmentStats(25, 20000000, (long) Math.pow(5, 30));\n String json = FragmentStats.dataToJSON(fragmentStats);\n String expectedJson = \"{\\\"PXFFragmentsStats\\\":\" +\n \"{\\\"f... | {
"fields": [
{
"declarator": "DEFAULT_FRAGMENT_SIZE = 67108864L",
"modifier": "public static final",
"original_string": "public static final long DEFAULT_FRAGMENT_SIZE = 67108864L;",
"type": "long",
"var_name": "DEFAULT_FRAGMENT_SIZE"
},
{
"declarator": "LOG = LogFacto... | {
"body": "public static String dataToJSON(FragmentStats stats) throws IOException {\n ObjectMapper mapper = new ObjectMapper();\n // mapper serializes all members of the class by default\n return \"{\\\"PXFFragmentsStats\\\":\" + mapper.writeValueAsString(stats)\n + \"}\";\n }"... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_371 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
},
{
"declarator": "dbProdu... | {
"body": "@Test\n public void testLeftBounded() {\n IntPartition partition = new IntPartition(COL_RAW, 0L, null);\n String constraint = partition.toSqlConstraint(QUOTE, dbProduct);\n\n assertEquals(COL + \" >= 0\", constraint);\n }",
"class_method_signature": "IntPartitionTest.testLeftBo... | {
"fields": [
{
"declarator": "serialVersionUID = 0L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 0L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "boundaries",
"modifier": "private f... | {
"body": "@Override\n public String toSqlConstraint(String quoteString, DbProduct dbProduct) {\n if (quoteString == null) {\n throw new RuntimeException(\"Quote string cannot be null\");\n }\n\n return generateRangeConstraint(\n quoteString + column + quoteString,\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_234 | {
"fields": [
{
"declarator": "PRUNER = new SupportedOperatorPruner(SUPPORTED_OPERATORS)",
"modifier": "private static final",
"original_string": "private static final TreeVisitor PRUNER = new SupportedOperatorPruner(SUPPORTED_OPERATORS);",
"type": "TreeVisitor",
"var_name": "PRUNER"... | {
"body": "@Test\n public void testSimpleColumnOperator() throws Exception {\n // id > 5\n Filter filter = helper(\"a0c20s1d5o2\", tupleDescription);\n\n assertNotNull(filter);\n assertTrue(filter instanceof SingleColumnValueFilter);\n SingleColumnValueFilter scvFilter = (SingleC... | {
"fields": [
{
"declarator": "OPERATORS_MAP =\n Collections.unmodifiableMap(new HashMap<Operator, CompareFilter.CompareOp>() {{\n put(Operator.LESS_THAN, CompareFilter.CompareOp.LESS); // \"<\"\n put(Operator.GREATER_THAN, CompareFilter.CompareOp.GREATER); // \">\"\... | {
"body": "private ByteArrayComparable getComparator(int type, OperandNode data) {\n ByteArrayComparable result;\n switch (DataType.get(type)) {\n case TEXT:\n result = new BinaryComparator(Bytes.toBytes(data.toString()));\n break;\n case SMALLINT:\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_41 | {
"fields": [],
"file": "server/pxf-api/src/test/java/org/greenplum/pxf/api/filter/CollectionOperandNodeTest.java",
"identifier": "CollectionOperandNodeTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetData() {\n List<String> data = new ArrayList<>();\n data.add(\"s\");\n CollectionOperandNode operand = new CollectionOperandNode(DataType.INTEGER, data);\n\n assertSame(data, operand.getData());\n assertEquals(\"s\", operand.getData().get(0))... | {
"fields": [
{
"declarator": "data",
"modifier": "private final",
"original_string": "private final List<String> data;",
"type": "List<String>",
"var_name": "data"
}
],
"file": "server/pxf-api/src/main/java/org/greenplum/pxf/api/filter/CollectionOperandNode.java",
"identif... | {
"body": "public List<String> getData() {\n return data;\n }",
"class_method_signature": "CollectionOperandNode.getData()",
"constructor": false,
"full_signature": "public List<String> getData()",
"identifier": "getData",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_408 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
}
],
"file": "server/pxf-s3/src/t... | {
"body": "@Test\n public void testQuoteCharacter() {\n RequestContext context = getDefaultRequestContext();\n context.addOption(\"QUOTE\", \"\\\"\");\n InputSerialization inputSerialization =\n new S3SelectAccessor().getInputSerialization(context);\n assertEquals('\"', i... | {
"fields": [
{
"declarator": "COMPRESSION_TYPE = \"COMPRESSION_CODEC\"",
"modifier": "public static final",
"original_string": "public static final String COMPRESSION_TYPE = \"COMPRESSION_CODEC\";",
"type": "String",
"var_name": "COMPRESSION_TYPE"
},
{
"declarator": "F... | {
"body": "InputSerialization getInputSerialization(RequestContext context) {\n InputSerialization inputSerialization = new InputSerialization();\n\n // We need to infer the format name from the profile (i.e. s3:parquet\n // would return parquet for the format)\n String format = context.in... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_367 | {
"fields": [
{
"declarator": "connConfig",
"modifier": "private",
"original_string": "private Properties connConfig, poolConfig;",
"type": "Properties",
"var_name": "connConfig"
},
{
"declarator": "poolDescriptor",
"modifier": "private",
"original_string": ... | {
"body": "@Test\n public void testPoolDescriptorHashCodeAndEquals() {\n poolDescriptor = new PoolDescriptor(\"test-server\", \"test-jdbcUrl\", connConfig, poolConfig, \"foo\");\n\n Properties sameConnConfig = (Properties) connConfig.clone();\n Properties samePoolConfig = (Properties) poolConf... | {
"fields": [
{
"declarator": "USER_PROPERTY_NAME = \"user\"",
"modifier": "private static final",
"original_string": "private static final String USER_PROPERTY_NAME = \"user\";",
"type": "String",
"var_name": "USER_PROPERTY_NAME"
},
{
"declarator": "PASSWORD_PROPERTY_N... | {
"body": "@Override\n public int hashCode() {\n return Objects.hash(server, jdbcUrl, user, password, connectionConfig, poolConfig, qualifier);\n }",
"class_method_signature": "PoolDescriptor.hashCode()",
"constructor": false,
"full_signature": "@Override public int hashCode()",
"identifier": "ha... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_388 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
},
{
"declarator": "dbProdu... | {
"body": "@Test\n public void testInvalidNullDbProduct() {\n DatePartition partition = new DatePartition(COL_RAW, LocalDate.parse(\"2000-01-01\"), LocalDate.parse(\"2000-01-02\"));\n\n thrown.expect(RuntimeException.class);\n\n partition.toSqlConstraint(COL, null);\n }",
"class_method_si... | {
"fields": [
{
"declarator": "serialVersionUID = 0L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 0L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "boundaries",
"modifier": "private f... | {
"body": "@Override\n public String toSqlConstraint(String quoteString, DbProduct dbProduct) {\n if (quoteString == null) {\n throw new RuntimeException(\"Quote string cannot be null\");\n }\n if (dbProduct == null) {\n throw new RuntimeException(String.format(\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_222 | {
"fields": [
{
"declarator": "parameters",
"modifier": "private",
"original_string": "private MultivaluedMap<String, String> parameters;",
"type": "MultivaluedMap<String, String>",
"var_name": "parameters"
},
{
"declarator": "parser",
"modifier": "private",
... | {
"body": "@Test\n public void testHandlerIsNotCalledWhenNotDefined() {\n when(mockPluginConf.getHandler(\"test-profile\")).thenReturn(null);\n parameters.putSingle(\"X-GP-OPTIONS-PROFILE\", \"test-profile\");\n RequestContext context = parser.parseRequest(mockRequestHeaders, RequestType.FRAGM... | {
"fields": [
{
"declarator": "TRUE_LCASE = \"true\"",
"modifier": "private static final",
"original_string": "private static final String TRUE_LCASE = \"true\";",
"type": "String",
"var_name": "TRUE_LCASE"
},
{
"declarator": "FALSE_LCASE = \"false\"",
"modifier":... | {
"body": "@Override\n public RequestContext parseRequest(HttpHeaders request, RequestContext.RequestType requestType) {\n\n RequestMap params = new RequestMap(request.getRequestHeaders());\n\n if (LOG.isDebugEnabled()) {\n // Logging only keys to prevent sensitive data to be logged\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_57 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
}
],
"file": "server/pxf-api/src/... | {
"body": "@Test\n public void testTraverseLeafNode() {\n Node node = new Node();\n TreeVisitor visitor = mock(TreeVisitor.class);\n when(visitor.before(node, 0)).thenReturn(node);\n when(visitor.visit(node, 0)).thenReturn(node);\n when(visitor.after(node, 0)).thenReturn(node);\n... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(TreeTraverser.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(TreeTraverser.class);",
"type": "Logger",
"var_name": "LOG"
}
],
"file": "serv... | {
"body": "public Node traverse(Node node, TreeVisitor... visitors) {\n\n if (ArrayUtils.isEmpty(visitors)) {\n throw new IllegalArgumentException(\"You need to provide at least one visitor for this traverser\");\n }\n\n Node result = node;\n for (TreeVisitor visitor : visitors)... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_330 | {
"fields": [
{
"declarator": "SQL = \"SELECT id, cdate, amt, grade, b FROM sales\"",
"modifier": "private static final",
"original_string": "private static final String SQL = \"SELECT id, cdate, amt, grade, b FROM sales\";",
"type": "String",
"var_name": "SQL"
},
{
"de... | {
"body": "@Test\n public void testColumnProjection() throws Exception {\n // id = 1\n context.setFilterString(\"a0c20s1d1o5\");\n context.getTupleDescription().get(1).setProjected(false);\n context.getTupleDescription().get(3).setProjected(false);\n context.getTupleDescription()... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(SQLQueryBuilder.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(SQLQueryBuilder.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"de... | {
"body": "public String buildSelectQuery() {\n StringBuilder sb = new StringBuilder(\"SELECT \")\n .append(buildColumnsQuery())\n .append(\" FROM \")\n .append(getSource());\n\n // Insert regular WHERE constraints\n buildWhereSQL(sb);\n\n // In... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_275 | {
"fields": [
{
"declarator": "context",
"modifier": "",
"original_string": "RequestContext context;",
"type": "RequestContext",
"var_name": "context"
}
],
"file": "server/pxf-hdfs/src/test/java/org/greenplum/pxf/plugins/hdfs/StringPassResolverTest.java",
"identifier": "Str... | {
"body": "@Test\n /*\n * Test the setFields method: small input\n */\n public void testSetFields() throws Exception {\n StringPassResolver resolver = buildResolver();\n\n byte[] data = new byte[] {\n (int) 'a',\n (int) 'b',\n (int) 'c',\n ... | {
"fields": [
{
"declarator": "oneRow = new OneRow()",
"modifier": "private final",
"original_string": "private final OneRow oneRow = new OneRow();",
"type": "OneRow",
"var_name": "oneRow"
},
{
"declarator": "resolveWriteCount = 0",
"modifier": "private",
"o... | {
"body": "@Override\n public OneRow setFields(List<OneField> record) {\n OneField oneField = record.get(0);\n\n if ((oneField.val instanceof InputStream && resolveWriteCount > 0) ||\n (oneField.val instanceof byte[] && ((byte[]) oneField.val).length == 0)) {\n // For the in... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_94 | {
"fields": [
{
"declarator": "PROPERTY_KEY_USER_IMPERSONATION = \"pxf.service.user.impersonation.enabled\"",
"modifier": "private static final",
"original_string": "private static final String PROPERTY_KEY_USER_IMPERSONATION = \"pxf.service.user.impersonation.enabled\";",
"type": "String"... | {
"body": "@Test\n public void testGlobalImpersonationPropertyAbsent() {\n assertFalse(secureLogin.isUserImpersonationEnabled(configuration));\n }",
"class_method_signature": "SecureLoginTest.testGlobalImpersonationPropertyAbsent()",
"constructor": false,
"full_signature": "@Test public void testGl... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(SecureLogin.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(SecureLogin.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator... | {
"body": "public boolean isUserImpersonationEnabled(Configuration configuration) {\n String valueFromUserImpersonationOnServer = configuration.get(SecureLogin.CONFIG_KEY_SERVICE_USER_IMPERSONATION, System.getProperty(PROPERTY_KEY_USER_IMPERSONATION, \"false\"));\n return StringUtils.equalsIgnoreCase(va... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_127 | {
"fields": [
{
"declarator": "MINUTES = 60 * 1000L",
"modifier": "private static final",
"original_string": "private static final long MINUTES = 60 * 1000L;",
"type": "long",
"var_name": "MINUTES"
},
{
"declarator": "provider = null",
"modifier": "private",
... | {
"body": "@Test\n public void getUGIWithEquivalentSessionsReturnsTheSameInstance() throws Exception {\n SessionId session2 = new SessionId(0, \"txn-id\", \"the-user\", \"default\");\n UserGroupInformation ugi1 = cache.getUserGroupInformation(session, false);\n UserGroupInformation ugi2 = cach... | {
"fields": [
{
"declarator": "NANOS_PER_MILLIS = 1000000",
"modifier": "static final",
"original_string": "static final int NANOS_PER_MILLIS = 1000000;",
"type": "int",
"var_name": "NANOS_PER_MILLIS"
},
{
"declarator": "UGI_CACHE_EXPIRY = 15 * 60 * 1000L",
"modif... | {
"body": "@SuppressWarnings(\"SynchronizationOnLocalVariableOrMethodParameter\")\n public UserGroupInformation getUserGroupInformation(SessionId session, boolean isProxyUser) throws IOException {\n Integer segmentId = session.getSegmentId();\n String user = session.getUser();\n DelayQueue<Ent... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_259 | {
"fields": [
{
"declarator": "context",
"modifier": "private",
"original_string": "private RequestContext context;",
"type": "RequestContext",
"var_name": "context"
},
{
"declarator": "schema",
"modifier": "private",
"original_string": "private Schema schem... | {
"body": "@Test\n public void testObtainSchema_OnWrite_WithUserProvidedSchema_Json_HCFS_Spaces() {\n avroUtilities = new AvroUtilities((file) -> dontFindLocalFile());\n context.setRequestType(RequestContext.RequestType.WRITE_BRIDGE);\n context.addOption(\"SCHEMA\", avroDirectory + \"user prov... | {
"fields": [
{
"declarator": "COMMON_NAMESPACE = \"public.avro\"",
"modifier": "private static",
"original_string": "private static String COMMON_NAMESPACE = \"public.avro\";",
"type": "String",
"var_name": "COMMON_NAMESPACE"
},
{
"declarator": "fileSearcher",
"m... | {
"body": "public Schema obtainSchema(RequestContext context, Configuration configuration, HcfsType hcfsType) {\n Schema schema = (Schema) context.getMetadata();\n\n if (schema != null) {\n return schema;\n }\n try {\n schemaPath = context.getDataSource();\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_170 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
}
... | {
"body": "@Test\n public void definedProfile() {\n ProfilesConf profilesConf = getProfilesConf(\"definedProfile\");\n Map<String, String> hbaseProfile = profilesConf.getPlugins(\"HBase\");\n assertEquals(2, hbaseProfile.keySet().size());\n assertEquals(\"X\", hbaseProfile.get(\"OUTPUTF... | {
"fields": [
{
"declarator": "EXTERNAL_PROFILES = \"pxf-profiles.xml\"",
"modifier": "private final static",
"original_string": "private final static String EXTERNAL_PROFILES = \"pxf-profiles.xml\";",
"type": "String",
"var_name": "EXTERNAL_PROFILES"
},
{
"declarator":... | {
"body": "@Override\n public Map<String, String> getPlugins(String profileName) {\n Profile profile = getProfile(profileName);\n Map<String, String> result = profile.getPluginsMap();\n if (result.isEmpty()) {\n throw new ProfileConfException(NO_PLUGINS_IN_PROFILE_DEF, profileName, ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_189 | {
"fields": [
{
"declarator": "response = null",
"modifier": "",
"original_string": "MetadataResponse response = null;",
"type": "MetadataResponse",
"var_name": "response"
}
],
"file": "server/pxf-service/src/test/java/org/greenplum/pxf/service/MetadataResponseFormatterTest.j... | {
"body": "@Test\n public void formatResponseStringWithModifiers() throws Exception {\n List<Metadata> metadataList = new ArrayList<Metadata>();\n List<Metadata.Field> fields = new ArrayList<Metadata.Field>();\n Metadata.Item itemName = new Metadata.Item(\"default\", \"table1\");\n Meta... | {
"fields": [
{
"declarator": "LOG = LogFactory.getLog(MetadataResponseFormatter.class)",
"modifier": "private static final",
"original_string": "private static final Log LOG = LogFactory.getLog(MetadataResponseFormatter.class);",
"type": "Log",
"var_name": "LOG"
}
],
"file":... | {
"body": "public static MetadataResponse formatResponse(List<Metadata> metadataList, String path) throws IOException {\n /* print the fragment list to log when in debug level */\n if (LOG.isDebugEnabled()) {\n MetadataResponseFormatter.printMetadata(metadataList, path);\n }\n\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_166 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
},
... | {
"body": "@Test\n public void doesNotCleanTheUGICacheOnNonLastCalls() throws Exception {\n expectScenario(false, false, false);\n filter.doFilter(mockServletRequest, mockServletResponse, mockFilterChain);\n verifyScenario(\"login-user\", false);\n verify(mockUGICache).release(any(Sessi... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(SecurityServletFilter.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(SecurityServletFilter.class);",
"type": "Logger",
"var_name": "LOG"
},
... | {
"body": "@Override\n public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain)\n throws IOException, ServletException {\n\n // retrieve user header and make sure header is present and is not empty\n final String gpdbUser = getHeaderValue(... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_218 | {
"fields": [
{
"declarator": "parameters",
"modifier": "private",
"original_string": "private MultivaluedMap<String, String> parameters;",
"type": "MultivaluedMap<String, String>",
"var_name": "parameters"
},
{
"declarator": "parser",
"modifier": "private",
... | {
"body": "@Test\n public void testWireFormatIsPresentAndFormatIsInferredToNothing() {\n parameters.putSingle(\"X-GP-FORMAT\", \"GPDBWritable\");\n parameters.putSingle(\"X-GP-OPTIONS-PROFILE\", \"foobar\");\n RequestContext context = parser.parseRequest(mockRequestHeaders, RequestType.FRAGMEN... | {
"fields": [
{
"declarator": "TRUE_LCASE = \"true\"",
"modifier": "private static final",
"original_string": "private static final String TRUE_LCASE = \"true\";",
"type": "String",
"var_name": "TRUE_LCASE"
},
{
"declarator": "FALSE_LCASE = \"false\"",
"modifier":... | {
"body": "@Override\n public RequestContext parseRequest(HttpHeaders request, RequestContext.RequestType requestType) {\n\n RequestMap params = new RequestMap(request.getRequestHeaders());\n\n if (LOG.isDebugEnabled()) {\n // Logging only keys to prevent sensitive data to be logged\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_82 | {
"fields": [
{
"declarator": "PROPERTY_KEY_FRAGMENTER_CACHE = \"pxf.service.fragmenter.cache.enabled\"",
"modifier": "private",
"original_string": "private String PROPERTY_KEY_FRAGMENTER_CACHE = \"pxf.service.fragmenter.cache.enabled\";",
"type": "String",
"var_name": "PROPERTY_KEY_... | {
"body": "@Test\n public void testFragmenterCachePropertyAbsent() {\n System.clearProperty(PROPERTY_KEY_FRAGMENTER_CACHE);\n assertTrue(Utilities.isFragmenterCacheEnabled());\n }",
"class_method_signature": "UtilitiesTest.testFragmenterCachePropertyAbsent()",
"constructor": false,
"full_sig... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(Utilities.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(Utilities.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "... | {
"body": "public static boolean isFragmenterCacheEnabled() {\n return !StringUtils.equalsIgnoreCase(System.getProperty(PROPERTY_KEY_FRAGMENTER_CACHE, \"true\"), \"false\");\n }",
"class_method_signature": "Utilities.isFragmenterCacheEnabled()",
"constructor": false,
"full_signature": "public static b... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_131 | {
"fields": [
{
"declarator": "MINUTES = 60 * 1000L",
"modifier": "private static final",
"original_string": "private static final long MINUTES = 60 * 1000L;",
"type": "long",
"var_name": "MINUTES"
},
{
"declarator": "provider = null",
"modifier": "private",
... | {
"body": "@Test\n public void getTwoUGIsWithDifferentUsers() throws Exception {\n SessionId otherSession = new SessionId(0, \"txn-id\", \"different-user\", \"default\", false, UserGroupInformation.getLoginUser());\n UserGroupInformation ugi1 = cache.getUserGroupInformation(session, false);\n ... | {
"fields": [
{
"declarator": "NANOS_PER_MILLIS = 1000000",
"modifier": "static final",
"original_string": "static final int NANOS_PER_MILLIS = 1000000;",
"type": "int",
"var_name": "NANOS_PER_MILLIS"
},
{
"declarator": "UGI_CACHE_EXPIRY = 15 * 60 * 1000L",
"modif... | {
"body": "@SuppressWarnings(\"SynchronizationOnLocalVariableOrMethodParameter\")\n public UserGroupInformation getUserGroupInformation(SessionId session, boolean isProxyUser) throws IOException {\n Integer segmentId = session.getSegmentId();\n String user = session.getUser();\n DelayQueue<Ent... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_146 | {
"fields": [
{
"declarator": "UN_SUPPORTED_TYPE = -1",
"modifier": "private static final",
"original_string": "private static final int UN_SUPPORTED_TYPE = -1;",
"type": "int",
"var_name": "UN_SUPPORTED_TYPE"
},
{
"declarator": "output = null",
"modifier": "priva... | {
"body": "@Test\n public void testFillOneGPDBWritableField() throws Exception {\n RequestContext context = new RequestContext();\n addColumn(context, 0, DataType.INTEGER, \"col0\");\n BridgeOutputBuilder builder = makeBuilder(context);\n output = builder.makeGPDBWritableOutput();\n\n ... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(BridgeOutputBuilder.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(BridgeOutputBuilder.class);",
"type": "Logger",
"var_name": "LOG"
},
{
... | {
"body": "void fillOneGPDBWritableField(OneField oneField, int colIdx)\n throws BadRecordException {\n int type = oneField.type;\n Object val = oneField.val;\n GPDBWritable gpdbOutput = (GPDBWritable) output;\n try {\n switch (DataType.get(type)) {\n c... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_4 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
},
{
"declarator": "factory... | {
"body": "@Test\n public void testConfigurationsLoadedFromMultipleFilesForDefaultServer() {\n Configuration configuration = factory.initConfiguration(\"default\", \"default\", \"dummy\", null);\n\n assertEquals(\"blue\", configuration.get(\"test.blue\"));\n assertEquals(\"red\", configuration... | {
"fields": [
{
"declarator": "instance = new BaseConfigurationFactory()",
"modifier": "private static final",
"original_string": "private static final BaseConfigurationFactory instance = new BaseConfigurationFactory();",
"type": "BaseConfigurationFactory",
"var_name": "instance"
... | {
"body": "@Override\n public Configuration initConfiguration(String configDirectory, String serverName, String userName, Map<String, String> additionalProperties) {\n // start with built-in Hadoop configuration that loads core-site.xml\n LOG.debug(\"Initializing configuration for server {}\", server... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_280 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
},
... | {
"body": "@Test\n public void testFileAsRowFailsWithMoreThanOneColumn() {\n expectedException.expect(IllegalArgumentException.class);\n expectedException.expectMessage(\"the FILE_AS_ROW property \" +\n \"only supports tables with a single column in the table \" +\n \"de... | {
"fields": [
{
"declarator": "fileAsRow",
"modifier": "private",
"original_string": "private boolean fileAsRow;",
"type": "boolean",
"var_name": "fileAsRow"
},
{
"declarator": "firstLine",
"modifier": "private",
"original_string": "private boolean firstLine... | {
"body": "@Override\n public void initialize(RequestContext requestContext) {\n super.initialize(requestContext);\n\n // true if the files are read as a single row, false otherwise\n fileAsRow = StringUtils.equalsIgnoreCase(\"true\", context.getOption(\"FILE_AS_ROW\"));\n\n if (fileAsR... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_111 | {
"fields": [
{
"declarator": "serverName",
"modifier": "private",
"original_string": "private String serverName;",
"type": "String",
"var_name": "serverName"
},
{
"declarator": "configuration",
"modifier": "private",
"original_string": "private Configuratio... | {
"body": "@Test\n public void testReloginFromKeytabFailsNoKeytab() throws KerberosAuthException {\n expectedException.expect(KerberosAuthException.class);\n expectedException.expectMessage(\"loginUserFromKeyTab must be done first\");\n\n user.setLogin(mockLoginContext);\n PowerMockito.... | {
"fields": [
{
"declarator": "LOGIN_FAILURE = \"Login failure\"",
"modifier": "private static final",
"original_string": "private static final String LOGIN_FAILURE = \"Login failure\";",
"type": "String",
"var_name": "LOGIN_FAILURE"
},
{
"declarator": "LOG = LoggerFact... | {
"body": "public static void reloginFromKeytab(String serverName, LoginSession loginSession) throws KerberosAuthException {\n\n UserGroupInformation ugi = loginSession.getLoginUser();\n\n if (ugi.getAuthenticationMethod() != UserGroupInformation.AuthenticationMethod.KERBEROS ||\n !ugi.is... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_404 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
}
],
"file": "server/pxf-s3/src/t... | {
"body": "@Test\n public void testFileHeaderInfoIsUse() {\n RequestContext context = getDefaultRequestContext();\n context.addOption(\"FILE_HEADER\", \"USE\");\n InputSerialization inputSerialization =\n new S3SelectAccessor().getInputSerialization(context);\n assertEqua... | {
"fields": [
{
"declarator": "COMPRESSION_TYPE = \"COMPRESSION_CODEC\"",
"modifier": "public static final",
"original_string": "public static final String COMPRESSION_TYPE = \"COMPRESSION_CODEC\";",
"type": "String",
"var_name": "COMPRESSION_TYPE"
},
{
"declarator": "F... | {
"body": "InputSerialization getInputSerialization(RequestContext context) {\n InputSerialization inputSerialization = new InputSerialization();\n\n // We need to infer the format name from the profile (i.e. s3:parquet\n // would return parquet for the format)\n String format = context.in... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_392 | {
"fields": [
{
"declarator": "FILE_FRAGMENTER = \"org.greenplum.pxf.plugins.hdfs.HdfsFileFragmenter\"",
"modifier": "private static final",
"original_string": "private static final String FILE_FRAGMENTER = \"org.greenplum.pxf.plugins.hdfs.HdfsFileFragmenter\";",
"type": "String",
"v... | {
"body": "@Test\n public void testSelectInvalid() {\n thrown.expect(IllegalArgumentException.class);\n thrown.expectMessage(\"Invalid value 'foo' for S3_SELECT option\");\n\n context.setFormat(\"CSV\");\n context.addOption(\"S3_SELECT\", \"foo\");\n handler.getAccessorClassName(... | {
"fields": [
{
"declarator": "S3_SELECT_OPTION = \"S3_SELECT\"",
"modifier": "public static final",
"original_string": "public static final String S3_SELECT_OPTION = \"S3_SELECT\";",
"type": "String",
"var_name": "S3_SELECT_OPTION"
},
{
"declarator": "LOG = LoggerFacto... | {
"body": "@Override\n public String getAccessorClassName(RequestContext context) {\n String accessor = context.getAccessor(); // default to accessor defined by the profile\n if (useS3Select(context)) {\n accessor = S3SelectAccessor.class.getName();\n }\n LOG.debug(\"Determin... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_238 | {
"fields": [
{
"declarator": "context",
"modifier": "private",
"original_string": "private RequestContext context;",
"type": "RequestContext",
"var_name": "context"
},
{
"declarator": "schema",
"modifier": "private",
"original_string": "private Schema schem... | {
"body": "@Test\n public void testObtainSchema_OnRead() {\n context.setRequestType(RequestContext.RequestType.READ_BRIDGE);\n schema = avroUtilities.obtainSchema(context, configuration, hcfsType);\n\n verifySchema(schema, \"example_schema\");\n }",
"class_method_signature": "AvroUtilitie... | {
"fields": [
{
"declarator": "COMMON_NAMESPACE = \"public.avro\"",
"modifier": "private static",
"original_string": "private static String COMMON_NAMESPACE = \"public.avro\";",
"type": "String",
"var_name": "COMMON_NAMESPACE"
},
{
"declarator": "fileSearcher",
"m... | {
"body": "public Schema obtainSchema(RequestContext context, Configuration configuration, HcfsType hcfsType) {\n Schema schema = (Schema) context.getMetadata();\n\n if (schema != null) {\n return schema;\n }\n try {\n schemaPath = context.getDataSource();\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_107 | {
"fields": [
{
"declarator": "serverName",
"modifier": "private",
"original_string": "private String serverName;",
"type": "String",
"var_name": "serverName"
},
{
"declarator": "configuration",
"modifier": "private",
"original_string": "private Configuratio... | {
"body": "@Test\n public void testReloginFromKeytabNoopForNonKeytab() throws KerberosAuthException {\n user.setLogin(mockLoginContext);\n PowerMockito.mockStatic(KerberosUtil.class);\n when(KerberosUtil.hasKerberosKeyTab(subject)).thenReturn(false); // simulate no keytab for subject\n ... | {
"fields": [
{
"declarator": "LOGIN_FAILURE = \"Login failure\"",
"modifier": "private static final",
"original_string": "private static final String LOGIN_FAILURE = \"Login failure\";",
"type": "String",
"var_name": "LOGIN_FAILURE"
},
{
"declarator": "LOG = LoggerFact... | {
"body": "public static void reloginFromKeytab(String serverName, LoginSession loginSession) throws KerberosAuthException {\n\n UserGroupInformation ugi = loginSession.getLoginUser();\n\n if (ugi.getAuthenticationMethod() != UserGroupInformation.AuthenticationMethod.KERBEROS ||\n !ugi.is... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_412 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
}
],
"file": "server/pxf-s3/src/t... | {
"body": "@Test\n public void testFailsOnCloseForWrite() {\n thrown.expect(UnsupportedOperationException.class);\n thrown.expectMessage(\"S3 Select does not support writing\");\n new S3SelectAccessor().closeForWrite();\n }",
"class_method_signature": "S3SelectAccessorTest.testFailsOnClos... | {
"fields": [
{
"declarator": "COMPRESSION_TYPE = \"COMPRESSION_CODEC\"",
"modifier": "public static final",
"original_string": "public static final String COMPRESSION_TYPE = \"COMPRESSION_CODEC\";",
"type": "String",
"var_name": "COMPRESSION_TYPE"
},
{
"declarator": "F... | {
"body": "@Override\n public void closeForWrite() {\n throw new UnsupportedOperationException(\"S3 Select does not support writing\");\n }",
"class_method_signature": "S3SelectAccessor.closeForWrite()",
"constructor": false,
"full_signature": "@Override public void closeForWrite()",
"identifier"... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_384 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
},
{
"declarator": "dbProdu... | {
"body": "@Test\n public void testRightBounded() {\n DatePartition partition = new DatePartition(COL_RAW, null, LocalDate.parse(\"2000-01-01\"));\n String constraint = partition.toSqlConstraint(QUOTE, dbProduct);\n\n assertEquals(\n COL + \" < date'2000-01-01'\",\n ... | {
"fields": [
{
"declarator": "serialVersionUID = 0L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 0L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "boundaries",
"modifier": "private f... | {
"body": "@Override\n public String toSqlConstraint(String quoteString, DbProduct dbProduct) {\n if (quoteString == null) {\n throw new RuntimeException(\"Quote string cannot be null\");\n }\n if (dbProduct == null) {\n throw new RuntimeException(String.format(\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_150 | {
"fields": [
{
"declarator": "mockContext",
"modifier": "",
"original_string": "RequestContext mockContext;",
"type": "RequestContext",
"var_name": "mockContext"
},
{
"declarator": "inputBuilder",
"modifier": "",
"original_string": "BridgeInputBuilder input... | {
"body": "@Test\n /*\n * Test the makeInput method: input > buffer size, no \\n\n */\n public void makeInputBigArrayNoNewLine() throws Exception {\n\n byte[] bigArray = new byte[2000];\n for (int i = 0; i < 2000; ++i) {\n bigArray[i] = (byte) (i % 10 + 60);\n }\n\n ... | {
"fields": [
{
"declarator": "protocolData",
"modifier": "private final",
"original_string": "private final RequestContext protocolData;",
"type": "RequestContext",
"var_name": "protocolData"
},
{
"declarator": "LOG = LogFactory.getLog(BridgeInputBuilder.class)",
... | {
"body": "public List<OneField> makeInput(DataInput inputStream) throws Exception {\n if (protocolData.getOutputFormat() == OutputFormat.TEXT) {\n // Avoid copying the bytes from the inputStream directly. This\n // code used to use the Text class to read bytes until a line\n /... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_296 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
},
{
"declarator": "resolve... | {
"body": "@Test\n @SuppressWarnings(\"deprecation\")\n public void testGetFields_Primitive_RepeatedString() throws IOException {\n List<Type> columns = new ArrayList<>();\n columns.add(new PrimitiveType(Type.Repetition.REPEATED, PrimitiveTypeName.BINARY, \"myString\", OriginalType.UTF8));\n ... | {
"fields": [
{
"declarator": "TIMESTAMP_PATTERN = Pattern.compile(\"[+-]\\\\d{2}(:\\\\d{2})?$\")",
"modifier": "public static final",
"original_string": "public static final Pattern TIMESTAMP_PATTERN = Pattern.compile(\"[+-]\\\\d{2}(:\\\\d{2})?$\");",
"type": "Pattern",
"var_name": ... | {
"body": "@Override\n public void initialize(RequestContext requestContext) {\n super.initialize(requestContext);\n this.columnDescriptors = context.getTupleDescription();\n }",
"class_method_signature": "ParquetResolver.initialize(RequestContext requestContext)",
"constructor": false,
"ful... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_279 | {
"fields": [
{
"declarator": "reader",
"modifier": "",
"original_string": "ChunkReader reader;",
"type": "ChunkReader",
"var_name": "reader"
},
{
"declarator": "mockStream",
"modifier": "",
"original_string": "DFSInputStream mockStream;",
"type": "DFS... | {
"body": "@Test\n public void readChunk() throws Exception {\n\t\treader = new ChunkReader(mockStream);\n\t\twhen( mockStream.read( (byte [])Mockito.anyObject()) ).thenAnswer(new Answer<java.lang.Number>() {\n\t\t\t@Override\n\t\t\tpublic java.lang.Number answer(InvocationOnMock invocation) throws Throwable {\n\t... | {
"fields": [
{
"declarator": "DEFAULT_BUFFER_SIZE = 64 * 1024",
"modifier": "public static final",
"original_string": "public static final int DEFAULT_BUFFER_SIZE = 64 * 1024;",
"type": "int",
"var_name": "DEFAULT_BUFFER_SIZE"
},
{
"declarator": "bufferSize = DEFAULT_B... | {
"body": "public int readChunk(Writable str, int maxBytesToConsume) throws IOException\n {\n ChunkWritable cw = (ChunkWritable) str;\n List<Node> list = new LinkedList<Node>();\n\n long bytesConsumed = 0;\n\n do {\n if (bufferLength > 0) {\n int remaini... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_98 | {
"fields": [
{
"declarator": "PROPERTY_KEY_USER_IMPERSONATION = \"pxf.service.user.impersonation.enabled\"",
"modifier": "private static final",
"original_string": "private static final String PROPERTY_KEY_USER_IMPERSONATION = \"pxf.service.user.impersonation.enabled\";",
"type": "String"... | {
"body": "@Test\n public void testGlobalImpersonationPropertyTrue() {\n System.setProperty(PROPERTY_KEY_USER_IMPERSONATION, \"true\");\n assertTrue(secureLogin.isUserImpersonationEnabled(configuration));\n }",
"class_method_signature": "SecureLoginTest.testGlobalImpersonationPropertyTrue()",
... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(SecureLogin.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(SecureLogin.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator... | {
"body": "public boolean isUserImpersonationEnabled(Configuration configuration) {\n String valueFromUserImpersonationOnServer = configuration.get(SecureLogin.CONFIG_KEY_SERVICE_USER_IMPERSONATION, System.getProperty(PROPERTY_KEY_USER_IMPERSONATION, \"false\"));\n return StringUtils.equalsIgnoreCase(va... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_77 | {
"fields": [
{
"declarator": "PROPERTY_KEY_FRAGMENTER_CACHE = \"pxf.service.fragmenter.cache.enabled\"",
"modifier": "private",
"original_string": "private String PROPERTY_KEY_FRAGMENTER_CACHE = \"pxf.service.fragmenter.cache.enabled\";",
"type": "String",
"var_name": "PROPERTY_KEY_... | {
"body": "@Test\n public void createAnyInstanceOldPackageName() throws Exception {\n\n RequestContext metaData = mock(RequestContext.class);\n String className = \"com.pivotal.pxf.Lucy\";\n\n try {\n Utilities.createAnyInstance(RequestContext.class,\n className, ... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(Utilities.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(Utilities.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "... | {
"body": "public static Object createAnyInstance(Class<?> confClass,\n String className, RequestContext metaData)\n throws Exception {\n\n Class<?> cls;\n try {\n cls = Class.forName(className);\n } catch (ClassNotFoundException e) ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_202 | {
"fields": [
{
"declarator": "parameters",
"modifier": "private",
"original_string": "private MultivaluedMap<String, String> parameters;",
"type": "MultivaluedMap<String, String>",
"var_name": "parameters"
},
{
"declarator": "parser",
"modifier": "private",
... | {
"body": "@Test\n public void getFragmentMetadataNull() {\n parameters.remove(\"X-GP-FRAGMENT-METADATA\");\n RequestContext requestContext = parser.parseRequest(mockRequestHeaders, RequestType.FRAGMENTER);\n assertNull(requestContext.getFragmentMetadata());\n }",
"class_method_signature"... | {
"fields": [
{
"declarator": "TRUE_LCASE = \"true\"",
"modifier": "private static final",
"original_string": "private static final String TRUE_LCASE = \"true\";",
"type": "String",
"var_name": "TRUE_LCASE"
},
{
"declarator": "FALSE_LCASE = \"false\"",
"modifier":... | {
"body": "@Override\n public RequestContext parseRequest(HttpHeaders request, RequestContext.RequestType requestType) {\n\n RequestMap params = new RequestMap(request.getRequestHeaders());\n\n if (LOG.isDebugEnabled()) {\n // Logging only keys to prevent sensitive data to be logged\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_347 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
},
... | {
"body": "@Test\n public void testGetConnectionPoolEnabledNoPoolProps() throws SQLException {\n Driver mockDriver = mock(Driver.class);\n when(DriverManager.getDriver(\"test-url\")).thenReturn(mockDriver);\n when(mockDriver.connect(\"test-url\", connProps)).thenReturn(mockConnection);\n\n ... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(ConnectionManager.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(ConnectionManager.class);",
"type": "Logger",
"var_name": "LOG"
},
{
... | {
"body": "public Connection getConnection(String server, String jdbcUrl, Properties connectionConfiguration, boolean isPoolEnabled, Properties poolConfiguration, String qualifier) throws SQLException {\n\n Connection result;\n if (!isPoolEnabled) {\n LOG.debug(\"Requesting DriverManager.getC... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_193 | {
"fields": [
{
"declarator": "response = null",
"modifier": "",
"original_string": "MetadataResponse response = null;",
"type": "MetadataResponse",
"var_name": "response"
}
],
"file": "server/pxf-service/src/test/java/org/greenplum/pxf/service/MetadataResponseFormatterTest.j... | {
"body": "@Test\n public void formatResponseStringPartialNull() throws Exception {\n List<Metadata> metadataList = new ArrayList<Metadata>();\n List<Metadata.Field> fields = new ArrayList<Metadata.Field>();\n Metadata.Item itemName = new Metadata.Item(\"default\", \"table1\");\n Metada... | {
"fields": [
{
"declarator": "LOG = LogFactory.getLog(MetadataResponseFormatter.class)",
"modifier": "private static final",
"original_string": "private static final Log LOG = LogFactory.getLog(MetadataResponseFormatter.class);",
"type": "Log",
"var_name": "LOG"
}
],
"file":... | {
"body": "public static MetadataResponse formatResponse(List<Metadata> metadataList, String path) throws IOException {\n /* print the fragment list to log when in debug level */\n if (LOG.isDebugEnabled()) {\n MetadataResponseFormatter.printMetadata(metadataList, path);\n }\n\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_20 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
},
{
"declarator": "context... | {
"body": "@Test\n public void testStatsMaxFragmentsFailsOnNegative() {\n thrown.expect(IllegalArgumentException.class);\n thrown.expectMessage(\"Wrong value '-1'. STATS-MAX-FRAGMENTS must be a positive integer\");\n context.setStatsMaxFragments(-1);\n }",
"class_method_signature": "Reque... | {
"fields": [
{
"declarator": "requestType",
"modifier": "private",
"original_string": "private RequestType requestType;",
"type": "RequestType",
"var_name": "requestType"
},
{
"declarator": "accessor",
"modifier": "private",
"original_string": "private Stri... | {
"body": "public void setStatsMaxFragments(int statsMaxFragments) {\n this.statsMaxFragments = statsMaxFragments;\n if (statsMaxFragments <= 0) {\n throw new IllegalArgumentException(String\n .format(\"Wrong value '%d'. STATS-MAX-FRAGMENTS must be a positive integer\",\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_255 | {
"fields": [
{
"declarator": "context",
"modifier": "private",
"original_string": "private RequestContext context;",
"type": "RequestContext",
"var_name": "context"
},
{
"declarator": "schema",
"modifier": "private",
"original_string": "private Schema schem... | {
"body": "@Test\n public void testObtainSchema_OnWrite() {\n context.setTupleDescription(AvroTypeConverter.getColumnDescriptorsFromSchema(testSchema));\n context.setRequestType(RequestContext.RequestType.WRITE_BRIDGE);\n\n schema = avroUtilities.obtainSchema(context, configuration, hcfsType);... | {
"fields": [
{
"declarator": "COMMON_NAMESPACE = \"public.avro\"",
"modifier": "private static",
"original_string": "private static String COMMON_NAMESPACE = \"public.avro\";",
"type": "String",
"var_name": "COMMON_NAMESPACE"
},
{
"declarator": "fileSearcher",
"m... | {
"body": "public Schema obtainSchema(RequestContext context, Configuration configuration, HcfsType hcfsType) {\n Schema schema = (Schema) context.getMetadata();\n\n if (schema != null) {\n return schema;\n }\n try {\n schemaPath = context.getDataSource();\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_310 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
},
... | {
"body": "@Test\n public void constructorCantAccessMetaStore() {\n expectedException.expect(RuntimeException.class);\n expectedException.expectMessage(\"Failed connecting to Hive MetaStore service: which way to albuquerque\");\n\n when(hiveClientWrapper.initHiveClient(context, configuration))... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(HiveDataFragmenter.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(HiveDataFragmenter.class);",
"type": "Logger",
"var_name": "LOG"
},
{
... | {
"body": "@Override\n public void initialize(RequestContext context) {\n super.initialize(context);\n client = hiveClientWrapper.initHiveClient(this.context, configuration);\n }",
"class_method_signature": "HiveDataFragmenter.initialize(RequestContext context)",
"constructor": false,
"full_... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_185 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
}
... | {
"body": "@Test\n public void testOptionMappingsTwoMappings() {\n ProfilesConf profilesConf = getProfilesConf(\"optionMappings\");\n Map<String, String> map = profilesConf.getOptionMappings(\"two-mappings\");\n\n assertEquals(2, map.size());\n assertEquals(\"prop1\", map.get(\"option1\... | {
"fields": [
{
"declarator": "EXTERNAL_PROFILES = \"pxf-profiles.xml\"",
"modifier": "private final static",
"original_string": "private final static String EXTERNAL_PROFILES = \"pxf-profiles.xml\";",
"type": "String",
"var_name": "EXTERNAL_PROFILES"
},
{
"declarator":... | {
"body": "@Override\n public Map<String, String> getOptionMappings(String profileName) {\n return getProfile(profileName).getOptionsMap();\n }",
"class_method_signature": "ProfilesConf.getOptionMappings(String profileName)",
"constructor": false,
"full_signature": "@Override public Map<String, Str... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_36 | {
"fields": [
{
"declarator": "gpCSV",
"modifier": "private",
"original_string": "private GreenplumCSV gpCSV;",
"type": "GreenplumCSV",
"var_name": "gpCSV"
},
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_str... | {
"body": "@Test\n public void testCsvOptionWithQuoteCharInvalidLength() {\n thrown.expect(IllegalArgumentException.class);\n thrown.expectMessage(\"invalid QUOTE character '\\\"\\\"'. Only single character is allowed for QUOTE.\");\n gpCSV.withQuoteChar(\"\\\"\\\"\");\n }",
"class_method... | {
"fields": [
{
"declarator": "QUOTE = '\"'",
"modifier": "private static final",
"original_string": "private static final char QUOTE = '\"';",
"type": "char",
"var_name": "QUOTE"
},
{
"declarator": "ESCAPE = '\"'",
"modifier": "private static final",
"origi... | {
"body": "public GreenplumCSV withQuoteChar(String quoteString) {\n if (StringUtils.isNotEmpty(quoteString)) {\n validateSingleCharacter(quoteString, \"QUOTE\");\n withQuoteChar(quoteString.charAt(0));\n }\n return this;\n }",
"class_method_signature": "GreenplumCSV.wi... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_243 | {
"fields": [
{
"declarator": "context",
"modifier": "private",
"original_string": "private RequestContext context;",
"type": "RequestContext",
"var_name": "context"
},
{
"declarator": "schema",
"modifier": "private",
"original_string": "private Schema schem... | {
"body": "@Test\n public void testObtainSchema_OnRead_WithUserProvidedSchema_Binary_FullPathToLocalFile() {\n context.setRequestType(RequestContext.RequestType.READ_BRIDGE);\n context.addOption(\"SCHEMA\", avroDirectory + \"user-provided.avro\");\n\n schema = avroUtilities.obtainSchema(contex... | {
"fields": [
{
"declarator": "COMMON_NAMESPACE = \"public.avro\"",
"modifier": "private static",
"original_string": "private static String COMMON_NAMESPACE = \"public.avro\";",
"type": "String",
"var_name": "COMMON_NAMESPACE"
},
{
"declarator": "fileSearcher",
"m... | {
"body": "public Schema obtainSchema(RequestContext context, Configuration configuration, HcfsType hcfsType) {\n Schema schema = (Schema) context.getMetadata();\n\n if (schema != null) {\n return schema;\n }\n try {\n schemaPath = context.getDataSource();\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_306 | {
"fields": [
{
"declarator": "factory",
"modifier": "private",
"original_string": "private CodecFactory factory;",
"type": "CodecFactory",
"var_name": "factory"
},
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"origin... | {
"body": "@Test\n public void getCodecNoConf() {\n thrown.expect(NullPointerException.class);\n\n String name = \"org.apache.hadoop.io.compress.GzipCodec\";\n factory.getCodec(name, (Configuration) null);\n }",
"class_method_signature": "CodecFactoryTest.getCodecNoConf()",
"constructor... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(CodecFactory.class)",
"modifier": "private static",
"original_string": "private static Logger LOG = LoggerFactory.getLogger(CodecFactory.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "codecF... | {
"body": "public CompressionCodecName getCodec(String name, CompressionCodecName defaultCodec) {\n if (name == null) return defaultCodec;\n\n try {\n return CompressionCodecName.fromConf(name);\n } catch (IllegalArgumentException ie) {\n try {\n return Compre... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_61 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
}
],
"file": "server/pxf-api/src/... | {
"body": "@Test\n public void testPruningRootNodeDuringVisit() {\n Node root = new Node();\n TreeVisitor visitor = mock(TreeVisitor.class);\n\n when(visitor.before(root, 0)).thenReturn(root);\n\n Node result = new TreeTraverser().traverse(root, visitor);\n\n verify(visitor).befo... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(TreeTraverser.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(TreeTraverser.class);",
"type": "Logger",
"var_name": "LOG"
}
],
"file": "serv... | {
"body": "public Node traverse(Node node, TreeVisitor... visitors) {\n\n if (ArrayUtils.isEmpty(visitors)) {\n throw new IllegalArgumentException(\"You need to provide at least one visitor for this traverser\");\n }\n\n Node result = node;\n for (TreeVisitor visitor : visitors)... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_214 | {
"fields": [
{
"declarator": "parameters",
"modifier": "private",
"original_string": "private MultivaluedMap<String, String> parameters;",
"type": "MultivaluedMap<String, String>",
"var_name": "parameters"
},
{
"declarator": "parser",
"modifier": "private",
... | {
"body": "@Test\n public void protocolIsSetWhenProfileIsSpecified() {\n parameters.putSingle(\"X-GP-OPTIONS-PROFILE\", \"test-profile\");\n when(mockPluginConf.getProtocol(\"test-profile\")).thenReturn(\"test-protocol\");\n\n RequestContext context = parser.parseRequest(mockRequestHeaders, Re... | {
"fields": [
{
"declarator": "TRUE_LCASE = \"true\"",
"modifier": "private static final",
"original_string": "private static final String TRUE_LCASE = \"true\";",
"type": "String",
"var_name": "TRUE_LCASE"
},
{
"declarator": "FALSE_LCASE = \"false\"",
"modifier":... | {
"body": "@Override\n public RequestContext parseRequest(HttpHeaders request, RequestContext.RequestType requestType) {\n\n RequestMap params = new RequestMap(request.getRequestHeaders());\n\n if (LOG.isDebugEnabled()) {\n // Logging only keys to prevent sensitive data to be logged\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_351 | {
"fields": [],
"file": "server/pxf-jdbc/src/test/java/org/greenplum/pxf/plugins/jdbc/utils/HiveJdbcUtilsTest.java",
"identifier": "HiveJdbcUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testURLWithoutImpersonationProperty() throws Exception {\n String url = \"jdbc:hive2://server:10000/default;foo=bar;saslQop=auth-conf\";\n assertEquals(\"jdbc:hive2://server:10000/default;foo=bar;saslQop=auth-conf;hive.server2.proxy.user=foo\",\n HiveJdbc... | {
"fields": [
{
"declarator": "HIVE_URL_IMPERSONATION_PROPERTY = \";hive.server2.proxy.user\"",
"modifier": "private static final",
"original_string": "private static final String HIVE_URL_IMPERSONATION_PROPERTY = \";hive.server2.proxy.user\";",
"type": "String",
"var_name": "HIVE_UR... | {
"body": "public static String updateImpersonationPropertyInHiveJdbcUrl(String url, String user) {\n String suffix, prefix = null;\n int terminatorIndex = findTerminatorIndex(url, 0, TERMINATORS_TWO_CHARS);\n\n // impersonation property might already be in the URL\n int impersonationPrope... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
34568856_0 | {
"fields": [],
"file": "app/src/test/java/com/garethevans/church/opensongtablet/StorageAccessTest.java",
"identifier": "StorageAccessTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void safeFilename() {\n String input = \"This is a <*bad*> /Filename\\\\ & who knows what it wull do!! # $ + \\\" ' { } : @ \";\n String output;\n String expected = \"This is a bad Filename who knows what it wull do\";\n\n StorageAccess storageAccess = new Stor... | {
"fields": [
{
"declarator": "appFolder = \"OpenSong\"",
"modifier": "final",
"original_string": "final String appFolder = \"OpenSong\";",
"type": "String",
"var_name": "appFolder"
},
{
"declarator": "uriTree = null",
"modifier": "private",
"original_string... | {
"body": "public String safeFilename(String filename) {\n // Remove bad characters from filenames\n filename = filename.replaceAll(\"[*?/<>&!#$+\\\"'{}:@\\\\\\\\]\",\"\"); // Removes bad characters\n filename = filename.replaceAll(\"\\\\s{2,}\", \" \"); // Removes double spaces\n return ... | {
"created": null,
"fork": null,
"fork_count": 13,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 34568856,
"size": 35705,
"stargazer_count": 14,
"stars": null,
"updates": null,
"url": "https://github.com/thebigg73/OpenSongTablet"
} |
153280357_3 | {
"fields": [
{
"declarator": "tokenStore",
"modifier": "private",
"original_string": "private MongoTokenStore tokenStore;",
"type": "MongoTokenStore",
"var_name": "tokenStore"
},
{
"declarator": "tokenStoreDifferentOwner",
"modifier": "private",
"original_s... | {
"body": "@Test\n void testInitializeSegmentThrowsUnableToInitializeTokenExceptionForDuplicateKey() {\n GlobalSequenceTrackingToken testToken = new GlobalSequenceTrackingToken(100);\n tokenStore.initializeSegment(testToken, testProcessorName, testSegment);\n // Initializes the given token twi... | {
"fields": [
{
"declarator": "logger = LoggerFactory.getLogger(MongoTokenStore.class)",
"modifier": "private final static",
"original_string": "private final static Logger logger = LoggerFactory.getLogger(MongoTokenStore.class);",
"type": "Logger",
"var_name": "logger"
},
{
... | {
"body": "@Override\n public void initializeSegment(TrackingToken token,\n String processorName,\n int segment) throws UnableToInitializeTokenException {\n try {\n AbstractTokenEntry<?> tokenEntry =\n new Generi... | {
"created": null,
"fork": null,
"fork_count": 7,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 153280357,
"size": 166,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/AxonFramework/extension-mongo"
} |
153280357_2 | {
"fields": [
{
"declarator": "tokenStore",
"modifier": "private",
"original_string": "private MongoTokenStore tokenStore;",
"type": "MongoTokenStore",
"var_name": "tokenStore"
},
{
"declarator": "tokenStoreDifferentOwner",
"modifier": "private",
"original_s... | {
"body": "@Test\n void testRequiresExplicitSegmentInitializationReturnsTrue() {\n assertTrue(tokenStore.requiresExplicitSegmentInitialization());\n }",
"class_method_signature": "MongoTokenStoreTest.testRequiresExplicitSegmentInitializationReturnsTrue()",
"constructor": false,
"full_signature": "@... | {
"fields": [
{
"declarator": "logger = LoggerFactory.getLogger(MongoTokenStore.class)",
"modifier": "private final static",
"original_string": "private final static Logger logger = LoggerFactory.getLogger(MongoTokenStore.class);",
"type": "Logger",
"var_name": "logger"
},
{
... | {
"body": "@Override\n public boolean requiresExplicitSegmentInitialization() {\n return true;\n }",
"class_method_signature": "MongoTokenStore.requiresExplicitSegmentInitialization()",
"constructor": false,
"full_signature": "@Override public boolean requiresExplicitSegmentInitialization()",
"id... | {
"created": null,
"fork": null,
"fork_count": 7,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 153280357,
"size": 166,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/AxonFramework/extension-mongo"
} |
153280357_5 | {
"fields": [
{
"declarator": "ONE_SECOND = Duration.ofSeconds(1)",
"modifier": "private static final",
"original_string": "private static final Duration ONE_SECOND = Duration.ofSeconds(1);",
"type": "Duration",
"var_name": "ONE_SECOND"
}
],
"file": "mongo/src/test/java/org/a... | {
"body": "@Test\n void testUpperBound() {\n MongoTrackingToken first = MongoTrackingToken.of(time(1000), \"0\")\n .advanceTo(time(1001), \"1\", Duration.ofHours(1))\n .advanceTo(time(1002), \"2\", Durati... | {
"fields": [
{
"declarator": "timestamp",
"modifier": "private final",
"original_string": "private final long timestamp;",
"type": "long",
"var_name": "timestamp"
},
{
"declarator": "trackedEvents",
"modifier": "private final",
"original_string": "private f... | {
"body": "@Override\n public TrackingToken upperBound(TrackingToken other) {\n Assert.isTrue(other instanceof MongoTrackingToken, () -> \"Incompatible token type provided.\");\n //noinspection ConstantConditions\n long timestamp = max(((MongoTrackingToken) other).timestamp, this.timestamp);\n... | {
"created": null,
"fork": null,
"fork_count": 7,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 153280357,
"size": 166,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/AxonFramework/extension-mongo"
} |
153280357_8 | {
"fields": [
{
"declarator": "mongod",
"modifier": "private static",
"original_string": "private static MongodProcess mongod;",
"type": "MongodProcess",
"var_name": "mongod"
},
{
"declarator": "mongoExe",
"modifier": "private static",
"original_string": "pr... | {
"body": "@Test\n void testLoadSaga_NotFound() {\n assertNull(sagaStore.loadSaga(MyTestSaga.class, \"123456\"));\n }",
"class_method_signature": "MongoSagaStoreTest.testLoadSaga_NotFound()",
"constructor": false,
"full_signature": "@Test void testLoadSaga_NotFound()",
"identifier": "testLoadSaga... | {
"fields": [
{
"declarator": "mongoTemplate",
"modifier": "private final",
"original_string": "private final MongoTemplate mongoTemplate;",
"type": "MongoTemplate",
"var_name": "mongoTemplate"
},
{
"declarator": "serializer",
"modifier": "private final",
"o... | {
"body": "@Override\n public <S> Entry<S> loadSaga(Class<S> sagaType, String sagaIdentifier) {\n Document dbSaga = mongoTemplate.sagaCollection().find(SagaEntry.queryByIdentifier(sagaIdentifier)).first();\n if (dbSaga == null) {\n return null;\n }\n SagaEntry<S> sagaEntry = ... | {
"created": null,
"fork": null,
"fork_count": 7,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 153280357,
"size": 166,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/AxonFramework/extension-mongo"
} |
153280357_4 | {
"fields": [],
"file": "mongo/src/test/java/org/axonframework/extensions/mongo/eventsourcing/eventstore/MongoFactoryTest.java",
"identifier": "MongoFactoryTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n void createMongoInstance() {\n MongoFactory mongoFactory = new MongoFactory();\n MongoClient mongoInstance = mongoFactory.createMongo();\n\n assertNotNull(mongoInstance);\n }",
"class_method_signature": "MongoFactoryTest.createMongoInstance()",
"constructor": false,
... | {
"fields": [
{
"declarator": "mongoClientSettings = MongoClientSettings.builder().build()",
"modifier": "private",
"original_string": "private MongoClientSettings mongoClientSettings = MongoClientSettings.builder().build();",
"type": "MongoClientSettings",
"var_name": "mongoClientSe... | {
"body": "public MongoClient createMongo() {\n return MongoClients.create(mongoClientSettings);\n }",
"class_method_signature": "MongoFactory.createMongo()",
"constructor": false,
"full_signature": "public MongoClient createMongo()",
"identifier": "createMongo",
"invocations": [
"create"
],... | {
"created": null,
"fork": null,
"fork_count": 7,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 153280357,
"size": 166,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/AxonFramework/extension-mongo"
} |
153280357_7 | {
"fields": [
{
"declarator": "mongoExe",
"modifier": "private static",
"original_string": "private static MongodExecutable mongoExe;",
"type": "MongodExecutable",
"var_name": "mongoExe"
},
{
"declarator": "mongod",
"modifier": "private static",
"original_st... | {
"body": "@Test\n void testOnlySingleSnapshotRemains() {\n testSubject.storeSnapshot(createEvent(0));\n testSubject.storeSnapshot(createEvent(1));\n testSubject.storeSnapshot(createEvent(2));\n\n assertEquals(1, mongoTemplate.snapshotCollection().countDocuments());\n }",
"class_me... | {
"fields": [
{
"declarator": "template",
"modifier": "private final",
"original_string": "private final MongoTemplate template;",
"type": "MongoTemplate",
"var_name": "template"
},
{
"declarator": "storageStrategy",
"modifier": "private final",
"original_st... | {
"body": "@Override\n protected void storeSnapshot(DomainEventMessage<?> snapshot, Serializer serializer) {\n try {\n storageStrategy.appendSnapshot(template.snapshotCollection(), snapshot, serializer);\n storageStrategy.deleteSnapshots(\n template.snapshotCollectio... | {
"created": null,
"fork": null,
"fork_count": 7,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 153280357,
"size": 166,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/AxonFramework/extension-mongo"
} |
153280357_6 | {
"fields": [
{
"declarator": "ONE_SECOND = Duration.ofSeconds(1)",
"modifier": "private static final",
"original_string": "private static final Duration ONE_SECOND = Duration.ofSeconds(1);",
"type": "Duration",
"var_name": "ONE_SECOND"
}
],
"file": "mongo/src/test/java/org/a... | {
"body": "@Test\n void testSerializationDeserialization() throws IOException {\n ObjectMapper objectMapper = new ObjectMapper();\n objectMapper.registerModule(new JavaTimeModule());\n MongoTrackingToken mongoTrackingToken = MongoTrackingToken.of(time(1000), \"0\");\n String serialized ... | {
"fields": [
{
"declarator": "timestamp",
"modifier": "private final",
"original_string": "private final long timestamp;",
"type": "long",
"var_name": "timestamp"
},
{
"declarator": "trackedEvents",
"modifier": "private final",
"original_string": "private f... | {
"body": "public static MongoTrackingToken of(Instant timestamp, String eventIdentifier) {\n return new MongoTrackingToken(timestamp.toEpochMilli(),\n Collections.singletonMap(eventIdentifier, timestamp.toEpochMilli()));\n }",
"class_method_signature": "MongoTrackingT... | {
"created": null,
"fork": null,
"fork_count": 7,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 153280357,
"size": 166,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/AxonFramework/extension-mongo"
} |
153280357_1 | {
"fields": [
{
"declarator": "tokenStore",
"modifier": "private",
"original_string": "private MongoTokenStore tokenStore;",
"type": "MongoTokenStore",
"var_name": "tokenStore"
},
{
"declarator": "tokenStoreDifferentOwner",
"modifier": "private",
"original_s... | {
"body": "@Test\n void testFetchSegments() {\n tokenStore.initializeTokenSegments(\"processor1\", 3);\n tokenStore.initializeTokenSegments(\"processor2\", 1);\n\n assertArrayEquals(new int[]{0, 1, 2}, tokenStore.fetchSegments(\"processor1\"));\n assertArrayEquals(new int[]{0}, tokenSto... | {
"fields": [
{
"declarator": "logger = LoggerFactory.getLogger(MongoTokenStore.class)",
"modifier": "private final static",
"original_string": "private final static Logger logger = LoggerFactory.getLogger(MongoTokenStore.class);",
"type": "Logger",
"var_name": "logger"
},
{
... | {
"body": "@Override\n public int[] fetchSegments(String processorName) {\n ArrayList<Integer> segments = mongoTemplate.trackingTokensCollection()\n .find(eq(\"processorName\", processorName))\n .sort(ascendi... | {
"created": null,
"fork": null,
"fork_count": 7,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 153280357,
"size": 166,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/AxonFramework/extension-mongo"
} |
153280357_0 | {
"fields": [
{
"declarator": "tokenStore",
"modifier": "private",
"original_string": "private MongoTokenStore tokenStore;",
"type": "MongoTokenStore",
"var_name": "tokenStore"
},
{
"declarator": "tokenStoreDifferentOwner",
"modifier": "private",
"original_s... | {
"body": "@Test\n void testInitializeTokensWhileAlreadyPresent() {\n tokenStore.initializeTokenSegments(testProcessorName, testSegmentCount);\n assertThrows(\n UnableToClaimTokenException.class,\n () -> tokenStore.initializeTokenSegments(testProcessorName, testSegmentCo... | {
"fields": [
{
"declarator": "logger = LoggerFactory.getLogger(MongoTokenStore.class)",
"modifier": "private final static",
"original_string": "private final static Logger logger = LoggerFactory.getLogger(MongoTokenStore.class);",
"type": "Logger",
"var_name": "logger"
},
{
... | {
"body": "@Override\n public void initializeTokenSegments(String processorName, int segmentCount) throws UnableToClaimTokenException {\n initializeTokenSegments(processorName, segmentCount, null);\n }",
"class_method_signature": "MongoTokenStore.initializeTokenSegments(String processorName, int segmen... | {
"created": null,
"fork": null,
"fork_count": 7,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 153280357,
"size": 166,
"stargazer_count": 6,
"stars": null,
"updates": null,
"url": "https://github.com/AxonFramework/extension-mongo"
} |
124004218_77 | {
"fields": [
{
"declarator": "writer",
"modifier": "private static",
"original_string": "private static VectorContainerWriter writer;",
"type": "VectorContainerWriter",
"var_name": "writer"
},
{
"declarator": "mutator",
"modifier": "private static",
"origin... | {
"body": "@Test\n public void testSymbolType() throws IOException {\n BsonDocument bsonDoc = new BsonDocument();\n bsonDoc.append(\"symbolKey\", new BsonSymbol(\"test_symbol\"));\n writer.reset();\n bsonReader.write(writer, new BsonDocumentReader(bsonDoc));\n SingleMapReaderImpl mapReader = (SingleMa... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(BsonRecordReader.class)",
"modifier": "static final",
"original_string": "static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(BsonRecordReader.class);",
"type": "org.slf4j.Logger",
"var_nam... | {
"body": "public void write(ComplexWriter writer, BsonReader reader) throws IOException {\n reader.readStartDocument();\n BsonType readBsonType = reader.getCurrentBsonType();\n switch (readBsonType) {\n case DOCUMENT:\n writeToListOrMap(reader, new MapOrListWriterImpl(writer.rootAsMap()), false, nul... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_20 | {
"fields": [],
"file": "exec/java-exec/src/test/java/org/apache/drill/exec/util/FileSystemUtilTest.java",
"identifier": "FileSystemUtilTest",
"interfaces": "",
"superclass": "extends FileSystemUtilTestBase"
} | {
"body": "@Test\n public void testListDirectoriesEmptyResult() throws IOException {\n List<FileStatus> statuses = FileSystemUtil.listDirectories(fs, base, false, new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return path.getName().startsWith(\"abc\");\n }\n });\n ... | {
"fields": [
{
"declarator": "DUMMY_FILTER = new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return true;\n }\n }",
"modifier": "public static final",
"original_string": "public static final PathFilter DUMMY_FILTER = new PathFilter() {\n @Override\n pu... | {
"body": "public static List<FileStatus> listDirectories(final FileSystem fs, Path path, boolean recursive, PathFilter... filters) throws IOException {\n List<FileStatus> statuses = new ArrayList<>();\n listDirectories(fs, path, recursive, statuses, mergeFilters(filters));\n return statuses;\n }",
"class... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_36 | {
"fields": [],
"file": "exec/java-exec/src/test/java/org/apache/drill/exec/util/DrillFileSystemUtilTest.java",
"identifier": "DrillFileSystemUtilTest",
"interfaces": "",
"superclass": "extends FileSystemUtilTestBase"
} | {
"body": "@Test\n public void testListDirectoriesRecursiveWithoutFilter() throws IOException {\n List<FileStatus> statuses = DrillFileSystemUtil.listDirectories(fs, base, true);\n assertEquals(\"Directory count should match\", 3, statuses.size());\n }",
"class_method_signature": "DrillFileSystemUtilTest.te... | {
"fields": [
{
"declarator": "DRILL_SYSTEM_FILTER = new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return !path.getName().startsWith(DrillFileSystem.UNDERSCORE_PREFIX) && !path.getName().startsWith(DrillFileSystem.DOT_PREFIX);\n }\n }",
"modifier": "public static... | {
"body": "public static List<FileStatus> listDirectories(final FileSystem fs, Path path, boolean recursive, PathFilter... filters) throws IOException {\n return FileSystemUtil.listDirectories(fs, path, recursive, FileSystemUtil.mergeFilters(DRILL_SYSTEM_FILTER, filters));\n }",
"class_method_signature": "Drill... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_61 | {
"fields": [
{
"declarator": "built_in = \"built-in\"",
"modifier": "private static final",
"original_string": "private static final String built_in = \"built-in\";",
"type": "String",
"var_name": "built_in"
},
{
"declarator": "udf_jar = \"DrillUDF-1.0.jar\"",
"m... | {
"body": "@Test\n public void testGetAllFunctionsWithHolders() {\n ListMultimap<String, DrillFuncHolder> expectedResult = ArrayListMultimap.create();\n for (List<FunctionHolder> functionHolders : newJars.values()) {\n for(FunctionHolder functionHolder : functionHolders) {\n expectedResult.put(func... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(FunctionRegistryHolder.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(FunctionRegistryHolder.class);",
"type": "org.s... | {
"body": "public ListMultimap<String, DrillFuncHolder> getAllFunctionsWithHolders(AtomicLong version) {\n try (AutoCloseableLock lock = readLock.open()) {\n if (version != null) {\n version.set(this.version);\n }\n ListMultimap<String, DrillFuncHolder> functionsWithHolders = ArrayListMultima... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_3 | {
"fields": [
{
"declarator": "MAX_ALLOCATION = 8 * 1024",
"modifier": "private final static",
"original_string": "private final static int MAX_ALLOCATION = 8 * 1024;",
"type": "int",
"var_name": "MAX_ALLOCATION"
}
],
"file": "exec/memory/base/src/test/java/org/apache/drill/e... | {
"body": "@Test(expected=IllegalStateException.class)\n public void testRootAllocator_closeWithOutstanding() throws Exception {\n try {\n try(final RootAllocator rootAllocator =\n new RootAllocator(MAX_ALLOCATION)) {\n final DrillBuf drillBuf = rootAllocator.buffer(512);\n assertNotNu... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(BaseAllocator.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(BaseAllocator.class);",
"type": "org.slf4j.Logger",
... | {
"body": "@Override\n public DrillBuf buffer(final int initialRequestSize) {\n assertOpen();\n\n return buffer(initialRequestSize, null);\n }",
"class_method_signature": "BaseAllocator.buffer(final int initialRequestSize)",
"constructor": false,
"full_signature": "@Override public DrillBuf buffer(final... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_94 | {
"fields": [
{
"declarator": "FULL_PERMISSION = FsPermission.getDirDefault()",
"modifier": "private static final",
"original_string": "private static final FsPermission FULL_PERMISSION = FsPermission.getDirDefault();",
"type": "FsPermission",
"var_name": "FULL_PERMISSION"
},
... | {
"body": "@Test\n public void testCreatePathAndDeleteOnExitFalse() throws Exception {\n Path initialPath = prepareStorageDirectory();\n Path resultPath = addNLevelsAndFile(initialPath, 2, false);\n Path firstCreatedParentPath = addNLevelsAndFile(initialPath, 1, false);\n\n Path createdParentPath = PERSI... | {
"fields": [
{
"declarator": "DEFAULT = new StorageStrategy(\"002\", false)",
"modifier": "public static final",
"original_string": "public static final StorageStrategy DEFAULT = new StorageStrategy(\"002\", false);",
"type": "StorageStrategy",
"var_name": "DEFAULT"
},
{
... | {
"body": "public Path createPathAndApply(FileSystem fs, Path path) throws IOException {\n List<Path> locations = getNonExistentLocations(fs, path);\n if (locations.isEmpty()) {\n return null;\n }\n fs.mkdirs(path);\n for (Path location : locations) {\n applyStrategy(fs, location, getFolderPe... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_82 | {
"fields": [
{
"declarator": "writer",
"modifier": "private static",
"original_string": "private static VectorContainerWriter writer;",
"type": "VectorContainerWriter",
"var_name": "writer"
},
{
"declarator": "mutator",
"modifier": "private static",
"origin... | {
"body": "@Test\n public void testDoubleType() throws IOException {\n BsonDocument bsonDoc = new BsonDocument();\n bsonDoc.append(\"doubleKey\", new BsonDouble(12.35));\n writer.reset();\n bsonReader.write(writer, new BsonDocumentReader(bsonDoc));\n SingleMapReaderImpl mapReader = (SingleMapReaderImp... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(BsonRecordReader.class)",
"modifier": "static final",
"original_string": "static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(BsonRecordReader.class);",
"type": "org.slf4j.Logger",
"var_nam... | {
"body": "public void write(ComplexWriter writer, BsonReader reader) throws IOException {\n reader.readStartDocument();\n BsonType readBsonType = reader.getCurrentBsonType();\n switch (readBsonType) {\n case DOCUMENT:\n writeToListOrMap(reader, new MapOrListWriterImpl(writer.rootAsMap()), false, nul... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_16 | {
"fields": [],
"file": "exec/java-exec/src/test/java/org/apache/drill/exec/util/FileSystemUtilTest.java",
"identifier": "FileSystemUtilTest",
"interfaces": "",
"superclass": "extends FileSystemUtilTestBase"
} | {
"body": "@Test\n public void testListDirectoriesWithoutFilter() throws IOException {\n List<FileStatus> statuses = FileSystemUtil.listDirectories(fs, base, false);\n assertEquals(\"Directory count should match\", 4, statuses.size());\n }",
"class_method_signature": "FileSystemUtilTest.testListDirectoriesW... | {
"fields": [
{
"declarator": "DUMMY_FILTER = new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return true;\n }\n }",
"modifier": "public static final",
"original_string": "public static final PathFilter DUMMY_FILTER = new PathFilter() {\n @Override\n pu... | {
"body": "public static List<FileStatus> listDirectories(final FileSystem fs, Path path, boolean recursive, PathFilter... filters) throws IOException {\n List<FileStatus> statuses = new ArrayList<>();\n listDirectories(fs, path, recursive, statuses, mergeFilters(filters));\n return statuses;\n }",
"class... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_41 | {
"fields": [],
"file": "exec/java-exec/src/test/java/org/apache/drill/exec/util/DrillFileSystemUtilTest.java",
"identifier": "DrillFileSystemUtilTest",
"interfaces": "",
"superclass": "extends FileSystemUtilTestBase"
} | {
"body": "@Test\n public void testListFilesRecursiveWithFilter() throws IOException {\n List<FileStatus> statuses = DrillFileSystemUtil.listFiles(fs, base, true, new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return path.getName().endsWith(\"a\") || path.getName().endsWith... | {
"fields": [
{
"declarator": "DRILL_SYSTEM_FILTER = new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return !path.getName().startsWith(DrillFileSystem.UNDERSCORE_PREFIX) && !path.getName().startsWith(DrillFileSystem.DOT_PREFIX);\n }\n }",
"modifier": "public static... | {
"body": "public static List<FileStatus> listFiles(final FileSystem fs, Path path, boolean recursive, PathFilter... filters) throws IOException {\n return FileSystemUtil.listFiles(fs, path, recursive, FileSystemUtil.mergeFilters(DRILL_SYSTEM_FILTER, filters));\n }",
"class_method_signature": "DrillFileSystemUt... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_57 | {
"fields": [
{
"declarator": "built_in = \"built-in\"",
"modifier": "private static final",
"original_string": "private static final String built_in = \"built-in\";",
"type": "String",
"var_name": "built_in"
},
{
"declarator": "udf_jar = \"DrillUDF-1.0.jar\"",
"m... | {
"body": "@Test\n public void testAddJars() {\n resetRegistry();\n int functionsSize = 0;\n List<String> jars = Lists.newArrayList();\n ListMultimap<String, DrillFuncHolder> functionsWithHolders = ArrayListMultimap.create();\n ListMultimap<String, String> functionsWithSignatures = ArrayListMultimap.c... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(FunctionRegistryHolder.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(FunctionRegistryHolder.class);",
"type": "org.s... | {
"body": "public void addJars(Map<String, List<FunctionHolder>> newJars, long version) {\n try (AutoCloseableLock lock = writeLock.open()) {\n for (Map.Entry<String, List<FunctionHolder>> newJar : newJars.entrySet()) {\n String jarName = newJar.getKey();\n removeAllByJar(jarName);\n Map<... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_40 | {
"fields": [],
"file": "exec/java-exec/src/test/java/org/apache/drill/exec/util/DrillFileSystemUtilTest.java",
"identifier": "DrillFileSystemUtilTest",
"interfaces": "",
"superclass": "extends FileSystemUtilTestBase"
} | {
"body": "@Test\n public void testListFilesRecursiveWithoutFilter() throws IOException {\n List<FileStatus> statuses = DrillFileSystemUtil.listFiles(fs, base, true);\n assertEquals(\"File count should match\", 3, statuses.size());\n }",
"class_method_signature": "DrillFileSystemUtilTest.testListFilesRecurs... | {
"fields": [
{
"declarator": "DRILL_SYSTEM_FILTER = new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return !path.getName().startsWith(DrillFileSystem.UNDERSCORE_PREFIX) && !path.getName().startsWith(DrillFileSystem.DOT_PREFIX);\n }\n }",
"modifier": "public static... | {
"body": "public static List<FileStatus> listFiles(final FileSystem fs, Path path, boolean recursive, PathFilter... filters) throws IOException {\n return FileSystemUtil.listFiles(fs, path, recursive, FileSystemUtil.mergeFilters(DRILL_SYSTEM_FILTER, filters));\n }",
"class_method_signature": "DrillFileSystemUt... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_17 | {
"fields": [],
"file": "exec/java-exec/src/test/java/org/apache/drill/exec/util/FileSystemUtilTest.java",
"identifier": "FileSystemUtilTest",
"interfaces": "",
"superclass": "extends FileSystemUtilTestBase"
} | {
"body": "@Test\n public void testListDirectoriesWithFilter() throws IOException {\n List<FileStatus> statuses = FileSystemUtil.listDirectories(fs, base, false, new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return path.getName().endsWith(\"a\");\n }\n });\n ass... | {
"fields": [
{
"declarator": "DUMMY_FILTER = new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return true;\n }\n }",
"modifier": "public static final",
"original_string": "public static final PathFilter DUMMY_FILTER = new PathFilter() {\n @Override\n pu... | {
"body": "public static List<FileStatus> listDirectories(final FileSystem fs, Path path, boolean recursive, PathFilter... filters) throws IOException {\n List<FileStatus> statuses = new ArrayList<>();\n listDirectories(fs, path, recursive, statuses, mergeFilters(filters));\n return statuses;\n }",
"class... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_83 | {
"fields": [
{
"declarator": "writer",
"modifier": "private static",
"original_string": "private static VectorContainerWriter writer;",
"type": "VectorContainerWriter",
"var_name": "writer"
},
{
"declarator": "mutator",
"modifier": "private static",
"origin... | {
"body": "@Test\n public void testDateTimeType() throws IOException {\n BsonDocument bsonDoc = new BsonDocument();\n bsonDoc.append(\"dateTimeKey\", new BsonDateTime(5262729712L));\n writer.reset();\n bsonReader.write(writer, new BsonDocumentReader(bsonDoc));\n SingleMapReaderImpl mapReader = (Single... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(BsonRecordReader.class)",
"modifier": "static final",
"original_string": "static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(BsonRecordReader.class);",
"type": "org.slf4j.Logger",
"var_nam... | {
"body": "public void write(ComplexWriter writer, BsonReader reader) throws IOException {\n reader.readStartDocument();\n BsonType readBsonType = reader.getCurrentBsonType();\n switch (readBsonType) {\n case DOCUMENT:\n writeToListOrMap(reader, new MapOrListWriterImpl(writer.rootAsMap()), false, nul... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_95 | {
"fields": [
{
"declarator": "FULL_PERMISSION = FsPermission.getDirDefault()",
"modifier": "private static final",
"original_string": "private static final FsPermission FULL_PERMISSION = FsPermission.getDirDefault();",
"type": "FsPermission",
"var_name": "FULL_PERMISSION"
},
... | {
"body": "@Test\n public void testCreatePathAndDeleteOnExitTrue() throws Exception {\n Path initialPath = prepareStorageDirectory();\n Path resultPath = addNLevelsAndFile(initialPath, 2, false);\n Path firstCreatedParentPath = addNLevelsAndFile(initialPath, 1, false);\n\n Path createdParentPath = TEMPOR... | {
"fields": [
{
"declarator": "DEFAULT = new StorageStrategy(\"002\", false)",
"modifier": "public static final",
"original_string": "public static final StorageStrategy DEFAULT = new StorageStrategy(\"002\", false);",
"type": "StorageStrategy",
"var_name": "DEFAULT"
},
{
... | {
"body": "public Path createPathAndApply(FileSystem fs, Path path) throws IOException {\n List<Path> locations = getNonExistentLocations(fs, path);\n if (locations.isEmpty()) {\n return null;\n }\n fs.mkdirs(path);\n for (Path location : locations) {\n applyStrategy(fs, location, getFolderPe... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_2 | {
"fields": [],
"file": "exec/memory/base/src/test/java/org/apache/drill/exec/memory/TestAccountant.java",
"identifier": "TestAccountant",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void multiThread() throws InterruptedException {\n final Accountant parent = new Accountant(null, 0, Long.MAX_VALUE);\n\n final int numberOfThreads = 32;\n final int loops = 100;\n Thread[] threads = new Thread[numberOfThreads];\n\n for (int i = 0; i < numberOfThreads; i++) {... | {
"fields": [
{
"declarator": "parent",
"modifier": "protected final",
"original_string": "protected final Accountant parent;",
"type": "Accountant",
"var_name": "parent"
},
{
"declarator": "reservation",
"modifier": "protected final",
"original_string": "pr... | {
"body": "public long getAllocatedMemory() {\n return locallyHeldMemory.get();\n }",
"class_method_signature": "Accountant.getAllocatedMemory()",
"constructor": false,
"full_signature": "public long getAllocatedMemory()",
"identifier": "getAllocatedMemory",
"invocations": [
"get"
],
"modifiers"... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_60 | {
"fields": [
{
"declarator": "built_in = \"built-in\"",
"modifier": "private static final",
"original_string": "private static final String built_in = \"built-in\";",
"type": "String",
"var_name": "built_in"
},
{
"declarator": "udf_jar = \"DrillUDF-1.0.jar\"",
"m... | {
"body": "@Test\n public void testGetFunctionNamesByJar() {\n ArrayList<String> expectedResult = Lists.newArrayList();\n for (FunctionHolder functionHolder : newJars.get(built_in)) {\n expectedResult.add(functionHolder.getName());\n }\n compareTwoLists(expectedResult, registryHolder.getFunctionName... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(FunctionRegistryHolder.class)",
"modifier": "private static final",
"original_string": "private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(FunctionRegistryHolder.class);",
"type": "org.s... | {
"body": "public List<String> getFunctionNamesByJar(String jarName) {\n try (AutoCloseableLock lock = readLock.open()){\n Map<String, Queue<String>> functions = jars.get(jarName);\n return functions == null ? Lists.<String>newArrayList() : Lists.newArrayList(functions.keySet());\n }\n }",
"class_... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_37 | {
"fields": [],
"file": "exec/java-exec/src/test/java/org/apache/drill/exec/util/DrillFileSystemUtilTest.java",
"identifier": "DrillFileSystemUtilTest",
"interfaces": "",
"superclass": "extends FileSystemUtilTestBase"
} | {
"body": "@Test\n public void testListDirectoriesRecursiveWithFilter() throws IOException {\n List<FileStatus> statuses = DrillFileSystemUtil.listDirectories(fs, base, true, new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return path.getName().endsWith(\"a\");\n }\n ... | {
"fields": [
{
"declarator": "DRILL_SYSTEM_FILTER = new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return !path.getName().startsWith(DrillFileSystem.UNDERSCORE_PREFIX) && !path.getName().startsWith(DrillFileSystem.DOT_PREFIX);\n }\n }",
"modifier": "public static... | {
"body": "public static List<FileStatus> listDirectories(final FileSystem fs, Path path, boolean recursive, PathFilter... filters) throws IOException {\n return FileSystemUtil.listDirectories(fs, path, recursive, FileSystemUtil.mergeFilters(DRILL_SYSTEM_FILTER, filters));\n }",
"class_method_signature": "Drill... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_21 | {
"fields": [],
"file": "exec/java-exec/src/test/java/org/apache/drill/exec/util/FileSystemUtilTest.java",
"identifier": "FileSystemUtilTest",
"interfaces": "",
"superclass": "extends FileSystemUtilTestBase"
} | {
"body": "@Test\n public void testListFilesWithoutFilter() throws IOException {\n List<FileStatus> statuses = FileSystemUtil.listFiles(fs, new Path(base, \"a\"), false);\n assertEquals(\"File count should match\", 3, statuses.size());\n }",
"class_method_signature": "FileSystemUtilTest.testListFilesWithout... | {
"fields": [
{
"declarator": "DUMMY_FILTER = new PathFilter() {\n @Override\n public boolean accept(Path path) {\n return true;\n }\n }",
"modifier": "public static final",
"original_string": "public static final PathFilter DUMMY_FILTER = new PathFilter() {\n @Override\n pu... | {
"body": "public static List<FileStatus> listFiles(FileSystem fs, Path path, boolean recursive, PathFilter... filters) throws IOException {\n List<FileStatus> statuses = new ArrayList<>();\n listFiles(fs, path, recursive, statuses, mergeFilters(filters));\n return statuses;\n }",
"class_method_signature"... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_76 | {
"fields": [
{
"declarator": "writer",
"modifier": "private static",
"original_string": "private static VectorContainerWriter writer;",
"type": "VectorContainerWriter",
"var_name": "writer"
},
{
"declarator": "mutator",
"modifier": "private static",
"origin... | {
"body": "@Test\n public void testTimeStampType() throws IOException {\n BsonDocument bsonDoc = new BsonDocument();\n bsonDoc.append(\"ts\", new BsonTimestamp(1000, 10));\n writer.reset();\n bsonReader.write(writer, new BsonDocumentReader(bsonDoc));\n SingleMapReaderImpl mapReader = (SingleMapReaderI... | {
"fields": [
{
"declarator": "logger = org.slf4j.LoggerFactory.getLogger(BsonRecordReader.class)",
"modifier": "static final",
"original_string": "static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(BsonRecordReader.class);",
"type": "org.slf4j.Logger",
"var_nam... | {
"body": "public void write(ComplexWriter writer, BsonReader reader) throws IOException {\n reader.readStartDocument();\n BsonType readBsonType = reader.getCurrentBsonType();\n switch (readBsonType) {\n case DOCUMENT:\n writeToListOrMap(reader, new MapOrListWriterImpl(writer.rootAsMap()), false, nul... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
124004218_92 | {
"fields": [
{
"declarator": "FULL_PERMISSION = FsPermission.getDirDefault()",
"modifier": "private static final",
"original_string": "private static final FsPermission FULL_PERMISSION = FsPermission.getDirDefault();",
"type": "FsPermission",
"var_name": "FULL_PERMISSION"
},
... | {
"body": "@Test\n public void testPermissionAndDeleteOnExitTrueForFileOnly() throws Exception {\n Path initialPath = prepareStorageDirectory();\n Path file = addNLevelsAndFile(initialPath, 0, true);\n\n Path createdFile = TEMPORARY_STRATEGY.createFileAndApply(fs, file);\n\n assertEquals(\"Path should ma... | {
"fields": [
{
"declarator": "DEFAULT = new StorageStrategy(\"002\", false)",
"modifier": "public static final",
"original_string": "public static final StorageStrategy DEFAULT = new StorageStrategy(\"002\", false);",
"type": "StorageStrategy",
"var_name": "DEFAULT"
},
{
... | {
"body": "public Path createFileAndApply(FileSystem fs, Path file) throws IOException {\n List<Path> locations = getNonExistentLocations(fs, file.getParent());\n if (!fs.createNewFile(file)) {\n throw new IOException(String.format(\"File [%s] already exists on file system [%s].\",\n file.toUri().... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 124004218,
"size": 6036,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/zpochen/drill"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.